News for hackers. Stuff that matters.

noam_k

Re:Git rebase -I is not that scary on Sunday July 26, 2026 @12:56AM (#49054868)
I wouldn't say it's wrong.

My preference, however, is creating a fixup commit and using rebase to squash it into the old one.

Edit: A sibling comment mentioned "git history fixup" which I'll have to try out.

Is it really not ELF? The file starts with the \x7FELF magic, but I'm not by my laptop to see what `file btry` outputs.
Re:System76 on Age Verification Laws on Friday March 06, 2026 @06:31AM (#47273685)
You might want to take a look at differential privacy. It takes an unintuitive amount of noise to make the system useless.

You also need to account for how "easy" it is to de-anonymize a profile.

(Sorry I don't have links to sources handy.)

Re: on Tuesday February 03, 2026 @03:38AM (#46868258)
I'd like to draw a parallel to carpentry:

A carpenter uses tools to shape wood into furniture. Each tool in the toolbox has different uses, but some are more efficient than others. For example, a table saw lets the carpenter cut more quickly and accurately than a hand saw. Nobody would say "that's not a real carpenter, he cheats by using a table saw".

A carpenter can also have an assistant (and I'm specifically not talking about an apprentice) who can help with certain tasks. The assistant might be trained by someone else and know how to perform complex tasks. When the carpenter builds something with the assistants help, is that considered a team effort? Does the carpenter need to take responsibility for the assistants mistakes, or the trainer? Who gets credit for the work?

I don't have answers for these questions, but I think the parallel to software is straightforward: we have a new tool (assistant) that's available, and we're trying to use it effectively. Perhaps it's going to replace some of our older tools, and that's a good thing! Some of us will be lazy and offload everything to it, and that's bad.

I do think that learning the fundamentals is as necessary as ever, and AI is a great tool for that as well.

(Disclaimer: I've been programming for about 15 years, and haven't integrated AI into my workflow yet.)

Re:Lisp: Notes on its Past and Future (1980) on Monday November 03, 2025 @03:27AM (#45796980)
I'm not sure what exactly you're referring to, but one avenue to implement AI is genetic programming, where programs are manipulated to reach a goal.

Lisp languages are great for these manipulations, since the AST being manipulated is the same data structure (a list) as everything else. In other words, genetic programming can lean into Lisp's "code is data" paradigm.

As others mentioned, today everything is based on neural networks, so people aren't learning these other techniques.

Re:Interstellar Mission to a Black Hole on Friday October 24, 2025 @06:54AM (#45693283)
That would be cool.

I read somewhere that a black hole with the mass of the moon will absorb about as much cosmic radiation as it emits Hawking radiation. This is a fine line between "the black hole disappears before we can examine it" and "oops, we got eaten by a black hole".

Re:Weird CPU architectures, the MOV only CPU (2020) on Saturday September 13, 2025 @04:42PM (#45235150)
I'm surprised the article doesn't mention OpenASIP [0], which not only helps you define the architecture, but also provides RTL synthesis and a working (if not always useful) compiler.

[0] http://openasip.org/

Re:No adblocker detected on Tuesday September 09, 2025 @12:57AM (#45177583)
Can anyone explain why the ID of the div is modified?
Re:Homomorphically Encrypting CRDTs on Wednesday June 18, 2025 @01:39PM (#44311834)
I think the issue here is that the server would have to store a copy of the register per peer, as it can't calculate which one is the most recent. Using FHE allows the server to hold a single copy.

In other words the server could forward and not store if all parties are always online (at the same time).

Re:My AI skeptic friends are all nuts on Tuesday June 03, 2025 @02:14AM (#44166902)
This sounds like the "only following orders" argument.

_If_ developers _collectively_ were to quit jobs that don't line up with their morals and ethics, we _might_ see a change. I'm not saying this is an easy decision to make, and I definitely don't want to judge someone who decides to take a higher paying job, but there's potential here to shift the direction AI is taking.

Re:Ask HN: Memory-Safe Low Level Languages on Sunday April 27, 2025 @10:29AM (#43812203)
You may want to look at Lua[0]. It's often used as an embedded scripting language in larger projects (and games), has good performance, is memory safe, and is extensible in the same manner as Python (write your performance bottleneck in C/C++).

I don't remember specifics, but there are some odd footguns to look out for.

[0] https://www.lua.org/

Re:It Does Not Take 21 Days to Form a Habit on Tuesday April 22, 2025 @11:34PM (#43768408)
I happen to be taking a Team Lead course, and forming habits came up yesterday. 21 days weren't mentioned explicitly, the time frame was "a few weeks". We were given 6 criteria when forming a habit:

1. Tangible - you need to pick a tangible action that is observable. If you're trying to fix a part of your behavior you can't pick "I'll pay more attention" as a habit to correct yourself, instead you should write a note or say some phrase.

2. Up to me - don't form a habit that requires outside factors. If you want to start jogging, don't ask your neighbor to jog with you. Each time he's not available, you'll have an excuse not to jog.

3. Swallow the frog - don't push it off. This isn't a well defined criteria, the idea is to minimize excuses (like #2).

4. Daily - a habit needs to be formed by taking action every day.

5. Trigger - your action needs a trigger. This can be an internal (feeling hungry), external (a timer on your phone), or contextual (every morning, every time you walk into a conference room).

6. New - it's very hard to form a habit if you've already tried and failed. Pick an action that you haven't already tried.

There was also an important note that changing behavior often requires multiple steps. The instructor gave the example of using dental floss. It's hard to go from nothing to flossing every day, so break it into:

1. Every time you go into the bath room in the evening, pick up the dental floss, and put it down.

2. After picking up the floss becomes a habit, cut a piece of floss, and throw it out.

3. After cutting the floss becomes a habit, floss a few teeth.

And so on.

Re:What would happen if we didn't use TCP or UDP? on Tuesday February 25, 2025 @03:07AM (#43169391)
Is this a real issue? SCTP runs over IP, so unless your talking about firewalls and such, the support should be there.

Edit: a quick search showed that NAT traversal is an issue (of course!)

But then you can't tell the difference between 0.12 and 0.00012.

Unless you're suggesting to use the strings "0" and "00012", at which point you could just use a byte string with the utf8 encoding of the value.

Re:Numbers Are Leaves on Saturday December 28, 2024 @02:22PM (#42533688)
Not a professional mathematician, but you have the benefit of set operations mapping to functions you're familiar with.

For example, set union becomes the max function.

Re:Egoless Engineering on Wednesday December 04, 2024 @04:12AM (#42315771)
I heard this phrase in college and it stuck: "when all you have in your toolbox is a hammer, every problem looks like a nail".
Re:You are probably sitting down for too long on Monday July 22, 2024 @01:35PM (#41037076)
When my daughter is standing, I tell her to sit down. When she slouches in her chair, I tell her to sit up.

(I'm American, and curious if British have similar/differing expressions.)

Amazing summary, Jeremy!

One nitpick is regarding the double-CRT: you are referring to the RNS encoding, when the original paper[0] uses the term to talk about how polynomials are stored for fast computation. It's a nice philosophical view of decomposing the polynomial Φm(X) into products X − ζi the same way that the integer modulus Q is decomposed into primes. So it's more like one CRT on the coefficients, and another implemented as a DFT.

[0] https://eprint.iacr.org/2012/099

Re:HTML Attributes vs. DOM Properties on Thursday April 25, 2024 @04:54AM (#40155084)
Good point, but HTML already has a workaround by using strings:

<div onClick="func()">...</div>

Now, I'm not a JS developer, so my opinion shouldn't count for much, but that looks like a much less usable standard to me.

Re:How Matzo Is Made on Thursday April 18, 2024 @10:12AM (#40076477)
This is a somewhat generally accepted theory. (I don't have sources handy, though.)

What makes modern matzah hard is the flour/water ratio. When more water is added, the bread is also softer. The issue with soft matzah is that it spoils quickly, and if you need bread for 7 days you need to make matzah during Passover.

Okay, you say, so make some matzah on Passover, right? But matzah is tricky, because if enough time passes between mixing the water and flour, it is considered leavened. (This is a religious definition, not a physical one.) Merely owning leavened bread is prohibited, so European Jews made dry matzah to prevent unfortunate slip-ups.

This custom started within the last few hundred years (again, I don't have sources, so I'm not sure about exact dates). Yemenite Jews still use soft matzah.

Edit: part of the Passover story mentions Hillel, who would wrap matzah around his Passover offering and bitter herbs. This definitely indicates soft matzah, but is much later than the Exodus itself.

Re:Improvements to static analysis in GCC 14 on Wednesday April 03, 2024 @12:33PM (#39919544)
Very cool stuff!

I haven't done much C development lately, so I'm curious how often `strcpy` and `strcat` are used. Last I checked they're almost as big no-nos as using goto. (Yes, I know goto is often preferred in kernel dev...) Can anyone share on how helpful the c-string analyses are to them?

Re:Simpson's Paradox on Tuesday March 12, 2024 @11:32AM (#39680726)
Well, if we're going to nitpick, light has zero rest mass[0], but does have mass while in motion. This is how solar sails can work, since they use the momentum from the photons.

[0] https://en.m.wikipedia.org/wiki/Invariant_mass

Re:Why is Prettier rock solid? on Tuesday February 20, 2024 @12:07AM (#39438261)
I can't agree more, and I can't disagree more. There's a great deal to be learned by experimenting yourself.

My workflow is:

* Learn the concept

* Implement it

* Research prior art

* Throw away my first implementation and rewrite it properly

(Edit: formatting)

Re:Zed Editor: All Occurrences Search from 1s to 4ms on Sunday February 18, 2024 @01:34PM (#39421676)
I didn't delve too deeply into the code in the post, but no, I wouldn't say that this is example of zero-cost abstractions at all.

Zero cost can come in two forms (that come to my mind right now, feel free to comment with more): runtime and memory. You mentioned dynamic dispatch (when calling a vtable method) that _can_ be zero cost when using generics, the compiler will "inline" the type and know what method is being called. Note that there is a compile-time trade-off here, and the binary size would be larger than using `&dyn` (a pointer to a vtable).

To illustrate memory zero-cost, consider an optional boolean argument to a program. A boolean has two valid states, but used 8 bits of memory, defining `Option<bool>` would naively use one byte for the discriminant, and another for the value. Rust uses the niche optimization[0] to promise that this type will only use one byte of memory.

[0]https://google.github.io/comprehensive-rust/smart-pointers/b...

Re:Hacking a CTF: Do not use ECB mode for encryption on Friday January 05, 2024 @01:26AM (#38876351)
I recommend going through the CryptoPals[0] challenges. I'm halfway and they really beat into you the problems with ECB.

[0]https://cryptopals.com/

My preference is 100 characters. I find it usually takes up half the screen, allowing split screen editing (on modern screen sizes).

But while on the subject, I can't help bringing up the QEMU coding style[0]:

> Some people like to tile their 24” screens with a 6x4 matrix of 80x24 xterms and use vi in all of them. The best way to punish them is to let them keep doing it.

[0]: https://qemu-project.gitlab.io/qemu/devel/style.html#line-wi...

Re:Intel, Samsung, and TSMC Demo 3D-Stacked Transistors on Saturday December 16, 2023 @11:57PM (#38670426)
In addition to the answers already given, there are defects during the process that are more likely to render your chip useless the larger your chip is. This is true for smaller chips as well, and often the design handles a defunct component, but you prefer minimizing defects per chip.

Older »