Live data from Hacker News

I hate compilers

xeiaso.net

31–40 of 182 posts

Re: I hate compilers

#31
post #26

Earlier quoted context omitted.

> I don't see why that's the case. LLM trained on binary would totally see it, not? It would not. You find the correct version by counting the number of bytes to the destination. LLMs are famously bad at this kind of problem (counting). > Also the tool can also be running the test and a debugger. The test needs to provide a good amount of signal. That’s too hard if you are throwing machine code at the wall. In order…

Can "LLMs are bad at counting" be generalized to "LLM are better in complex stuff but make more mistakes in simple"?

I would phrase it as "LLMs are good at big picture stuff and bad at fine detail", or to put it another way, they're accurate, but imprecise and with low reproducibility.

Re: I hate compilers

#32
Nix also needs the build output to be deterministic to calculate the hash. It also has the problems of timestamps etc. The build environment tries to be hermetic by setting the time to be epoch among other things.

Re: I hate compilers

#33
post #23

If Clang generated non-deterministic output due to pointer addresses then that's a bug (happens regularly) that should be fixed. The most common way this happens if it some code path is iterating over a DenseMap which is non-deterministic. Sometimes that's fine and sometimes that's not depending on how that map is used. The common way to fix that is to switch to a MapVector which pays some additional runtime/memory c…

I'll try and make a minimal reproduction case and file a bug. Do you know if any tooling that can take a binary and fuzz it down to a minimal reproduction set?

cvise. Here is a link to a mini tutorial I wrote for a user in an LLVM issue: https://github.com/llvm/llvm-project/issues/108827#issuecomm...

Re: I hate compilers

#35

[flagged]

> This is the goofiest I've seen written unironically in quite a long - the C preprocessor is not part of the compiler. The pre in preprocessor should probably give it away.

This is true but doesn't seem relevant; does replacing the word "compiler" with "build chain" change anything? Because that seems like the clear meaning.

Re: I hate compilers

#36

As long as the program is equivalent there isn't an actual problem here. Requiring the output to always be the same is an arbitrary restriction. If you want to have users trust that someone else hasn't modified it, then sign it with your identity.

We'd like to verify, not trust.

Re: I hate compilers

#37
post #23

If Clang generated non-deterministic output due to pointer addresses then that's a bug (happens regularly) that should be fixed. The most common way this happens if it some code path is iterating over a DenseMap which is non-deterministic. Sometimes that's fine and sometimes that's not depending on how that map is used. The common way to fix that is to switch to a MapVector which pays some additional runtime/memory c…

I'll try and make a minimal reproduction case and file a bug. Do you know if any tooling that can take a binary and fuzz it down to a minimal reproduction set?

Claude code is actually rather good at this. If your initial testcase is not too big, you can use creduce or cvise.

Re: I hate compilers

#39
post #26

Earlier quoted context omitted.

Can "LLMs are bad at counting" be generalized to "LLM are better in complex stuff but make more mistakes in simple"?

No, I don’t think so. LLMs are good at a lot of simple tasks, but bad at certain simple tasks. Moravec’s paradox in a new iteration. It applies to humans too. Calculus is “simple” but it takes something like sixteen years to train a human to do it, if all goes well. Meanwhile, most humans think that inverse kinematics is, like, the easiest thing in the world (it’s a super complicated task).

Calculus is definitely the harder task, considering it took a species developing the cognitive capacity for symbolic reasoning for it to show up, whereas any animal can figure out how to position its limbs. Yeah, we figured out how to make CAS programs before inverse kinematics software, but that's because computers were made to solve numerical problems, not to replace the cerebella of chordates.
Post reply on HN