Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

40% Positive

Analyzed from 1154 words in the discussion.

Trending Topics

#code#level#binary#should#llms#output#deterministic#machine#llm#don

Discussion (50 Comments)Read Original on HackerNews

jdw64about 3 hours ago
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.
jstimpfleabout 2 hours ago
Depends on what you mean by low level I guess. Compared to web application framework churn rate, simple procedural programming without many dependencies is remarkably stable. You tend to program in a way that works for most platforms (all targetted platforms). How to best do that you learn over the years. To me personally it's very refreshing if the environment around you does not constantly change. That affords learning a bag of tricks and a list of gotchas to avoid.
jdw64about 2 hours ago
I think you're right too. So I also think that maybe I'm viewing the changes as bigger than they actually are, based on my own standards
biglostabout 3 hours ago
Time date env variables and random address... Is also input data, maybe not as a flag but still
RyanSquaredabout 3 hours ago
Time and date are... tolerable. There's SOURCE_DATE_EPOCH which should always be set to whack it into submission when used. ASLR of the _compiler being invoked_ resulting in a difference in the _program being compiled_ is nuts and would break any self-hosting compiler with consistency checks.
yjftsjthsd-habout 2 hours ago
Explicit is Better than Implicit.
swiftcoderabout 3 hours ago
The Birth and Death of Javascript really had the gift of prophecy, eh
neocron15 minutes ago
Was that the thing where Gary predicted js in the kernel?
ComputerGuruabout 3 hours ago
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!

crvdgcabout 3 hours ago
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.
lloekiabout 2 hours ago
SOURCE_DATE_EPOCH is not a Nix thing

https://reproducible-builds.org/docs/source-date-epoch/

(although Nix sets it as a default)

stabblesabout 1 hour ago
Nix hashes the build inputs, for which deterministic builds are not required, only desirable.
Animatsabout 2 hours ago
I hate proof of work code running on my machine for the benefit of someone else. It's like planting a crypto miner.
pertymcpertabout 3 hours ago
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.
xenaabout 3 hours ago
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?
amatriaabout 3 hours ago
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...
glandiumabout 2 hours ago
Claude code is actually rather good at this. If your initial testcase is not too big, you can use creduce or cvise.
znpyabout 1 hour ago
> 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 ?

sylwareabout 2 hours ago
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.

charcircuitabout 4 hours ago
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.

yjftsjthsd-habout 2 hours ago
We'd like to verify, not trust.
charcircuitabout 2 hours ago
The whole point of a signature is that you are able to verify what was signed was in fact a message that was signed by signer.
robinsonb5about 2 hours ago
Sure, but a signature doesn't prove that a particular binary came from a particular codebase - merely that a particular human (or other trusted entity, for varying degrees of "trusted") has vouched for it.

Being able to reproduce the binary from the source code and being able to verify that it's the same as the original is quite important in some contexts.

dyauspitrabout 4 hours ago
LLMs should be trained on and directly output binary.
klodolphabout 3 hours ago
On the off chance that you’re serious, that would result in disastrously bad output. The difference between “jmp $+15” and “jmp $+16” is inscrutable and the LLM would not be able to pick the right one without tooling.

That tooling is a compiler. The higher level, the better chance the LLM can be steered to good output. Machine code is hopeless, don’t bother.

pjmlpabout 3 hours ago
That compiler does wonders with languages that have UB on their specs, especially when having optimizations passes with heuristics.

Also there are dynamic compilers were the shape of machine code changes as the code executes, and each single execution will certainly generate different sequences, depending on the program execution and where it is running.

Deterministic JIT compiler code generation, at least on optimising ones, is not a solved problem.

faangguyindiaabout 3 hours ago
What about AOT optimization? whuch brings aot closer to JITs performance? Isn't that something LLM + Harness can easily do?
klodolphabout 3 hours ago
I think the idea that AOT is inherently faster than JIT, or vice versa, is a thoroughly debunked idea.

You can have LLMs help you optimize code but I don’t think you can do this unattended for non-trivial code.

jenadineabout 3 hours ago
> The difference between “jmp $+15” and “jmp $+16” is inscrutable

I don't see why that's the case. LLM trained on binary would totally see it, not?

Also the tool can also be running the test and a debugger.

klodolphabout 3 hours ago
> 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 for debuggers to work, you need some kind of model that describes what the code should do and what state the computer should be in after each instruction. That model is high-level code.

I can understand the intuitive appeal of training LLMs with machine code, but all of my experience with LLMs suggest that they are incredibly ill-suited to the task, and we just don’t have the capacity to train them to make useful machine code.

dezgeg25 minutes ago
Even if it could, it would be ridiculously token inefficient to update huge amount of addresses instead when some small change is done to the middle of a binary
xiaoyu2006about 3 hours ago
It should not. Abstraction in software engineering brings intelligence. (compression correlates to intelligence)
shshshjajaabout 3 hours ago
runApp()

Done! Excellent abstraction. High intelligence.

frwrfwrfeefwfabout 3 hours ago
people don't get this
dyauspitrabout 3 hours ago
Why? I mean this is all emergent, right? And it’s not like humans ever work at this level. It would be very interesting to see what sort of outputs and abstractions an LLM comes up with.
bandramiabout 3 hours ago
Generative algorithms have been studied for decades now and while they have led to some interesting results they're a bad fit for LLMs because there's no such thing as a "plausible" binary: a small perturbation yields an unusable result.
fulafelabout 3 hours ago
Technically they are, just a subset. But still a practical one, they're frequently used to produce executable files.
junior44660about 2 hours ago
You should go back to elementary school
wahnfriedenabout 3 hours ago
What other recent Musk talking points do you like to repeat?
rvzabout 3 hours ago
I think you forgot the "/s"
Advertisement