Live data from Hacker News

Claude’s C Compiler vs. GCC

harshanu.space

181–190 of 377 posts

Re: Claude’s C Compiler vs. GCC

#181
A few things to note:

1. In the real world, for a similar task, there are little reasons for: A) not giving the compiler access to all the papers about optimizations, ISAs PDFs, MIT-licensed compilers of all the kinds. It will perform much better, and this is a proof that the "uncompressing GCC" is just a claim (but even more point 2).

2. Of all the tasks, the assembler is the part where memorization would help the most. Instead the LLM can't perform without the ISA documentation that it saw repreated infinite number of times during pre-training. Guess what?

3. Rust is a bad language for the test, as a first target, if you want an LLM-coded Rust C compiler, and you have LLM experience, you would go -> C compiler -> Rust port. Rust is hard when there are mutable data structures with tons of references around, and a C compiler is exactly that. To compose complexity from different layers is an LLM anti pattern that who worked a lot with automatic programming knows very well.

4. In the real world, you don't do a task like that without steering. And steering will do wonders. Not to say that the experiment was ill conceived. The fact is that the experimenter was trying to show a different point of what the Internet got (as usually).

Re: Claude’s C Compiler vs. GCC

#183
post #78

As a neutral observation: it’s remarkable how quickly we as humans adjust expectations. Imagine five years ago saying that you could have a general purpose AI write a c compiler that can handle the Linux kernel, by itself, from scratch for $20k by writing a simple English prompt. That would have been completely unbelievable! Absurd! No one would take it seriously. And now look at where we are.

Indeed, it's the Overton window that has moved. Which is why I secretly think the pro-AI side is more right than the anti-AI side. Makes me sad.

Re: Claude’s C Compiler vs. GCC

#184
post #176
post #51

Earlier quoted context omitted.

Exactly. This flawed argument by which everything will be fixed by future models drives me crazy every time.

So far it has been accurate though. Models have gotten much better than even the most optimistic predictions.

No? The most optimistic predictions involved AGI around the corner, 6 months until no more developers for years now.

Re: Claude’s C Compiler vs. GCC

#185
post #39

Earlier quoted context omitted.

I'm reminded, once again, of the recent "vibe coded" OCaml fiasco[1]. The PR author had zero understanding why their entirely LLM-generated contribution was viewed so suspiciously. The article validates a significant point: it is one thing to have passing tests and be able to produce output that resembles correctness - however it's something entirely different for that output to be good and maintainable . [1] https:/…

>Here's my question: why did the files that you submitted name Mark Shinwell as the author? >Beats me. AI decided to do so and I didn't question it. Haha that's comedy gold, and honestly a good interview screening situation - you'd instantly pass on the candidate!

I once had a PR. I told the dev that "LLM is ok but you own the code"

He told me "I spent n days to architect the solution"

He shows me claude generated system design .. and then i say ok, I went to review the code. 1hr later i asked why did you repeat the code all over at the end. Dude replies "junk the entire PR it's AI generated"

Re: Claude’s C Compiler vs. GCC

#187

Earlier quoted context omitted.

That’s not true. It didn’t have access to the internet and no LLM has the fidelity to reproduce code verbatim from its training data at the project level. In this case, it’s true that compilers were in its training data but only helped at the conceptual level and not spitting verbatim gcc code.

> In this case, it’s true that compilers were in its training data but only helped at the conceptual level and not spitting verbatim gcc code. How do you know that? At this point AI coding feels like religion. You have to believe in it.

well the part where it's written in rust was a lil bit of a giveaway

Re: Claude’s C Compiler vs. GCC

#188

Earlier quoted context omitted.

You're right. It's been pretty incredible. It's also frustrating as hell though when people extrapolate from this progress Just because we're here doesn't mean we're getting to AGI or software developers begging for jobs at Starbucks

Sure then make your prediction? It’s always easy to hand wave and dismiss other people’s predictions. But make yours: what do you think llms can do in 2 years?

Something that looks and sounds impressive but in the end not of much substance.

This will be true for next 2 years, 4 years, next decade, few decades. Until the state of the art ML paradigm remains language models.

Re: Claude’s C Compiler vs. GCC

#189
post #78

As a neutral observation: it’s remarkable how quickly we as humans adjust expectations. Imagine five years ago saying that you could have a general purpose AI write a c compiler that can handle the Linux kernel, by itself, from scratch for $20k by writing a simple English prompt. That would have been completely unbelievable! Absurd! No one would take it seriously. And now look at where we are.

Now consider how much of the original C compiler's source code it was trained on and still managed to output a worse result?

Re: Claude’s C Compiler vs. GCC

#190
I think AI will definitely help to get new compilers going. Maybe not the full product, yet. But it helps a lot to create all the working parts you need to get going. Taking lengthy specs and translating them into code is something AI does quite well - I asked it to give me a disassembler - and it did well. So, if you want to make a new compiler, you now don't have to read all the specs and details beforehand. Just let the AI mess with e.g. PE-Headers and only take care later if something in that area doesn't work.
Post reply on HN