logoalt Hacker News

I Hate Compilers

66 pointsby xenatoday at 5:10 AM53 commentsview on HN

Comments

jdw64today at 6:03 AM

Reading this, I think low level engineering is actually more dependent on specific environments. Hardware also has its own points of change. Usually, when you think at a high level, environmental changes are less significant than you might expect. But low level thinking tends to be tied to specific environments, which is what makes it difficult. The reason low level is hard is that even if the code itself is short, the hidden assumptions inside it are difficult and place a heavy cognitive load on the programmer. For example, even a short snippet in C like `int value = (int)buffer` requires a lot of implicit knowledge about the 4 byte alignment of the buffer, or whether int is exactly 32 bits. LLMs do not seem to be very good at knowing these things. Rather, they are strong at high level wrapping, but at the low level, they seem surprisingly difficult and somewhat useless. Hardware has CPU generation changes, and in the case of PLCs, where I mainly work, the protocol differences between vendors are far too severe. There does not seem to be any technology with a very long lifecycle.

show 1 reply
biglosttoday at 6:13 AM

Time date env variables and random address... Is also input data, maybe not as a flag but still

show 2 replies
swiftcodertoday at 6:43 AM

The Birth and Death of Javascript really had the gift of prophecy, eh

show 1 reply
ComputerGurutoday at 5:58 AM

These seem very reasonable, the workarounds used are natural, and overall the article is not at all congruous with the conclusion in the (clickbait?) title?

Compilers literally made your project possible!

show 1 reply
crvdgctoday at 6:39 AM

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.

show 2 replies
pertymcperttoday at 6:04 AM

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 cost to guarantee deterministic iteration order.

show 1 reply
Animatstoday at 7:40 AM

I hate proof of work code running on my machine for the benefit of someone else. It's like planting a crypto miner.

znpytoday at 7:50 AM

> What do you do when the client has WebAssembly disabled?

> I decided to take inspiration from the legendary talk The Birth and Death of JavaScript and just recompile the WebAssembly to JavaScript.

So what do you do when the client has Javascript disabled ?

show 1 reply
sylwaretoday at 7:01 AM

To avoid all those grotesque and absurd compilers and runtimes, more for those of computer languages with a ultra-complex syntax (c++ and similar), I now design "binary specifications" which I "design" and "validate" with RISC-V assembly coding.

Here, since any whatwg cartel web engine is an issue, the author should not bother.

mathisfun123today at 5:43 AM

[flagged]

show 3 replies
charcircuittoday at 5:38 AM

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.

show 1 reply
dyauspitrtoday at 5:42 AM

LLMs should be trained on and directly output binary.

show 7 replies