Readit News logoReadit News
repiret commented on Bring Back the Blue-Book Exam   chronicle.com/article/bri... · Posted by u/diodorus
add-sub-mul-div · 3 days ago
Because a tradeoff of relying on calculators means the average person can't do simple math on their own. It would be bad for society if a crutch for general thinking dulls those skills the same way calculators dulled home economics skills. In theory people could pull out a calculator at the grocery store but I've never seen it happen.
repiret · 3 days ago
I don't know what you mean by "home economics", but to me, that encompasses things like balancing a checkbook and making a budget and taxes and understanding how savings and debt and compound interest works how to choose when to save and when to go into debt. The sort of money matters that apply to any schmuck trying to live in the world. The reason so many people lack those skills is that for the most part we don't teach them in high school. Calculators have nothing to do with it.

Thank god we still teach quadratic equations, complex numbers, hyperbolic trig functions, and geometric constructions though. I don't know what would become of the world if most people didn't understand those things when we set them loose in the world.

repiret commented on A Virginia public library is fighting off a takeover by private equity   lithub.com/a-virginia-pub... · Posted by u/sharkweek
repiret · 2 months ago
Based on my experience with county boards of supervisors and their interactions with library management and library funding decisions, the Warren County Board of Supervisors' statement that the library has poor management shouldn't be given much credence unless backed up by evidence.

Somewhat amusingly, the library is a subordinate of the county. If the library is in fact poorly managed, the poor management is the fault of the board of supervisors.

repiret commented on That XOR Trick (2020)   florian.github.io//xor-tr... · Posted by u/hundredwatt
anitil · 2 months ago
It really tickles my brain in a lovely way that it avoids all overflow risk as well
repiret · 2 months ago
There is no overflow risk. The trick works on any Abelian group. N-bit values form an Albanian group with xor where 0 is the identity and every element is its own inverse. But N-bit values also form an Abelian group under addition with overflow, where 0 is the identity and 2s-compliment is the inverse.

If you’re working on an architecture where a single multiplication and a bit shift is cheaper than N xor’s, and where xor, add, and sub are all the same cost, then you can get a performance win by computing the sum as N(N+1)/2; and you don’t need a blog post to understand why it works.

repiret commented on That XOR Trick (2020)   florian.github.io//xor-tr... · Posted by u/hundredwatt
moron4hire · 2 months ago
No, again, that's not my point. The code from the article is O(2n) when it could be O(n). I know we're not supposed to care about constant factors, but I've lived in a world where not micro optimizing the ever loving shit out of my software could potentially make people throw up, so this sort of stuff kind of stands out to me.
repiret · 2 months ago
The code in the article is written in Python, whose only for loop is for-each. It is 2N XOR operations, regardless of whether you use one or two loops.

I probably would have written it with a single loop, using the `enumerate` iterator adapter. But in Python, two loops is almost certainly more efficient.

repiret commented on Introduction to the A* Algorithm (2014)   redblobgames.com/pathfind... · Posted by u/auraham
JohnKemeny · 2 months ago
It's that time of year again. I like A* as much as the next one, but it seems a bit excessive a times.

Title should have a (2014) in it: Introduction to the A* Algorithm (2014).

1 points, 8 months ago, 1 comments: Introduction to the a* Algorithm (https://news.ycombinator.com/item?id=41897736)

202 points, 3 years ago, 30 comments: Introduction to the A* Algorithm (2014) (https://news.ycombinator.com/item?id=30287733)

4 points, 5 years ago, 1 comments: Introduction to the a* Algorithm (https://news.ycombinator.com/item?id=24146045)

201 points, 7 years ago, 14 comments: Introduction to A* (2014) (https://news.ycombinator.com/item?id=18642462)

5 points, 7 years ago, 0 comments: Introduction to A* (https://news.ycombinator.com/item?id=16190604)

repiret · 2 months ago
I think A* deserves the popularity. It’s a simple variation on depth-first and breadth-first graph traversal that everyone learns in CS101, massively useful in some situations, yet for some reason isn’t a standard part of CS education. It’s a marvelous thing the first time you learn about it.

It’s even more marvelous if it helps you recognize that the difference between BFS and DFS is how you pick the next node to explore out of your bag of unexplored nodes. That symmetry is easily lost if DFS is only taught as a recursive algorithm.

Let it keep coming up every couple years to marvel a new generation of programmers.

repiret commented on Infinite Grid of Resistors   mathpages.com/home/kmath6... · Posted by u/niklasbuschmann
neepi · 2 months ago
I'm a bit mathematician and a bit electrical engineer.

The electrical engineer suggests it's not measurable unless you apply current and also asks "when" after the current is applied referring to the distributed inductive and capacitive element and the speed of field propagation. The mathematician goes to a bar and has a stiff drink after hearing that.

repiret · 2 months ago
I think there are two interpretations of schematics.

One is where the components on the schematic represent physical things, where the resistors have some inductance and some non-linearity, and some capacitance to the ground plane and so on. This is what we mean by schematics when we’re using OrCad or whatever.

There is another interpretation where resistors are ideal ohms law devices, the traces have no inductance or propagation delay or resistance. Where connecting a trace between both ends of a voltage source is akin to division by zero.

Sometimes you translate from the first interpretation to the second, adding explicit resistors and inductors and so on to model the real world behavior of traces etc. if you don’t, then maybe SPICE does for you.

Infinite resistor lattices exist only in the second interpretation.

repiret commented on The US has approved CRISPR pigs for food   technologyreview.com/2025... · Posted by u/DocFeind
pazimzadeh · 4 months ago
This resembles the Chinese HIV CRISPR study because the deleted receptor was CCR5, an immune receptor. This was controversial because we don't know the long term effects of of deleting CCR5.

Viruses often use immune or other surface proteins as receptors presumably because they are important (can't be down-regulated too much).

For the pigs, it looks like they deleted just the SRCR5 domain of the CD163 protein. CD163 is used by macrophages to scavenge the hemoglobin-haptoglobin complex.

A 2017 article (of 6 pigs?) suggests that the engineered pigs are resistant to the virus "while maintaining biological function" although I don't see any experiments comparing hemoglobin-haptoglobin scavenging ability of engineered vs unedited pigs. https://pmc.ncbi.nlm.nih.gov/articles/PMC5322883

This 2024 study (of 40 pigs) found 'no significant difference' in a panel of health measures and meat quality, except that the engineered pigs had statistically significantly more greater backfat depth than the edited animals. https://www.frontiersin.org/journals/genome-editing/articles...

Interestingly, the mean weight of live pigs is slightly higher for edited pigs but lower for dead pigs. Total fat slightly higher for the edited pigs. These numbers are not statistically significant (but only a small number of pigs were tested).

The pigs were assessed at approximately 205 days in age. Pigs can live up to 20 years. Would be good to test the long term effects and the effects over multiple generations.

This paragraph is striking:

> Under the conditions of these studies, neither homozygous nor heterozygous or null pigs inoculated with PRRSV showed the acute clinical signs typically observed in commercial pigs and had overall low depression and respiratory scores (1). This may be explained by the fact that these pigs were sourced from a high-health farm and managed with minimal stress, which differs from disease expression under commercial conditions.

Sounds like the genetic editing is not necessary as long as the farm conditions are good..

repiret · 4 months ago
> The pigs were assessed at approximately 205 days in age. Pigs can live up to 20 years. Would be good to test the long term effects and the effects over multiple generations.

It would be good to test for those things if the concern was for the long-term health of the pigs. The concern is whether or not they produce safe meat. Somewhere between most and all of the pork I've eaten in my life came from pigs less than a year old.

repiret commented on Hybrid AC/DC distribution system with a shared neutral (2020)   electrical-engineering-po... · Posted by u/1970-01-01
xenadu02 · 4 months ago
As the sibling comment notes: The US/Canada are already split-phase 240v/120v systems.

As near to 100% as makes no difference every single house is already wired for 240v. In fact wired for it and using it: electric ranges, stoves, dryers, etc are all 240v.

NEMA even defines 240v receptacles/plugs for normal amperage: NEMA 6-15 (two horizontal blades: meh face) and 6-20 (one vertical, one horizontal: wink with other eye closed). Unlike the common 240v dryer/large appliance cords that are huge and bulky 6-15 and 6-20 are about the same size as our current 120v plugs. They have the same compatibility as 5-15/5-20: The 15 amp version fits in the 20 amp receptacle but the 20 amp only fits 20 amp. And it is impossible to plug 120 into 240 or vice-versa. Everything made for 120v (to a rough approximation) is also rated for 240v.

Unfortunately no one bothers to install the 6-15/6-20 plugs. There is nothing stopping any builder from doing it standard, especially in the kitchen. There is nothing stopping a homeowner/buyer from asking for it either. But no one does. Therefore there is no market for appliances that use these plugs. And thus no demand to wire for them.

It would likely take a push from government, manufacturers, the NEC, etc to push for supporting 240v for common appliances. Start installing them in new homes. Offering the 240v version of electric kettles and such.

Note: some European appliances can be wired up this way and will run fine because they tolerate 60Hz but not all of them.

repiret · 4 months ago
> Unfortunately no one bothers to install the 6-15/6-20 plugs

Almost no one, but I had a 6-15R put in my kitchen. Then I imported a 3kW tea kettle from the UK, lopped off the plug, and put on a 6-15P. And now my wife doesn’t have to wait very long for her hot water.

repiret commented on IBM orders US sales to locate near customers, RTO for cloud staff, DEI purge   theregister.com/2025/04/1... · Posted by u/rntn
MyPasswordSucks · 4 months ago
> I am curious if anyone can find the text for "IBM's Policy Letter #4" written by IBM's chairman in 1953, which is referenced in this article.

https://web.archive.org/web/20110409171021/http://www-03.ibm...

It has both the original typewritten scan and a searchable-text version right underneath.

repiret · 4 months ago
Veering off topic, but this letter is in a variable width font. Were there typewriters that could do that? Was this so widely distributed that it was typeset on a printing press? The letterhead and body text aren’t aligned, so if it did go through a press it took two passes. The signature is also in ink, so that’s either a third pass for color, or an actual signature, and the letter doesn’t have the notation to indicate that it was signed by the secretary, so that leads me to think that it wasn’t widely distributed.

Does anybody have any other insights?

repiret commented on Debian bookworm live images now reproducible   lwn.net/Articles/1015402/... · Posted by u/bertman
ryandrake · 5 months ago
C compilers offer __DATE__ and __TIME__ macros, which expand to string constants that describe the date and time that the preprocessor was invoked. Any code using these would have different strings each time it was built, and would need to be modified. I can't think of a good reason for them to be used in an actual production program, but for whatever reason, they exist.
repiret · 5 months ago
> I can't think of a good reason for them

I work on a product whose user interface in one place says something like “Copyright 2004-2025”. The second year there is generated from __DATE__, that way nobody has to do anything to keep it up to date.

u/repiret

KarmaCake day1872February 22, 2010View Original