Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Describing a compiler as "AI" is certainly a take.




I used to hand roll the assembly, but now I delegate that work to my agent, clang. I occasionally override clang or give it hints, but it usually gets it right most of the time.

clang doesn't "understand" the hints because it doesn't "understand" anything, but it knows what to do with them! Just like codex.


Given an input clang will always give the same output, not quite the same for llms. Also nobody ever claimed compilers were intelligent or that they "understood" things

The determinism depends on the architecture of the model!

Symbolica is working on more deterministic/quicker models: https://www.symbolica.ai

I also wish it was that easy, but compiler determinism is hard, too: https://reproducible-builds.org


An LLM will also give the same output for the same input when the temperature is zero[1]. It only becomes non-deterministic if you choose for it to be. Which is the same for a C compiler. You can choose to add as many random conditionals as you so please.

But there is nothing about a compiler that implies determinism. A compiler is defined by function (taking input on how you want something to work and outputting code), not design. Implementation details are irrelevant. If you use a neural network to compile C source into machine code instead of more traditional approaches, it most definitely remains a compiler. The function is unchanged.

[1] "Faulty" hardware found in the real world can sometimes break this assumption. But a C compiler running on faulty hardware can change the assumption too.


currently LLMs from majorvproviders are not deterministic with temp=0, there are startups focusing on this issue (among others) https://thinkingmachines.ai/blog/defeating-nondeterminism-in...

You can test that yourself in 5 seconds and see that even at a temp of 0 you never get the same output

Works perfectly fine for me.

Did you do that stupid HN thing where you failed to read the entire comment and then went off to try it on faulty hardware?


No I did that HN thing where I went to an LLM, set temp to 0, pasted your comments in and got widely different outputs every single time I did so

"Went" is a curious turn of phrase, but I take it to mean that you used an LLM on someone else's hardware of unknown origin? How are you ensuring that said hardware isn't faulty? It is a known condition. After all, I already warned you of it.

Now try it on deterministic hardware.


Was the seed set to the same value everytime?


Hm, some things compilers do during optimization would have been labelled AI during the last AI bubble.

it's something that crossed my mind too honestly. natural-language-to-code translation.

You can also do search query to code translation by using GitHub or StackOverflow.

Compilers are probably closer to "intelligence" than LLMs.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: