Live data from Hacker News

Claude’s C Compiler vs. GCC

harshanu.space

171–180 of 377 posts

Re: Claude’s C Compiler vs. GCC

#171

Earlier quoted context omitted.

Hmm. It’s not clear what specific task it can’t handle. Can you come up with a concrete example?

Are you saying you've never had them fail at a task? I wanted to refactor a bunch of tests in a TypeScript project the other day into a format similar to table driven tests that are common in Golang, but seemingly not so much in TypeScript. Vitest has specific syntax affordances for it, though It utterly failed at the task. Tried many times with increasing specificity in my prompt, did one myself and used it as an ex…

I see. Did you use Claude code? With access to compiling and running.

Re: Claude’s C Compiler vs. GCC

#172

Earlier quoted context omitted.

Are you saying you've never had them fail at a task? I wanted to refactor a bunch of tests in a TypeScript project the other day into a format similar to table driven tests that are common in Golang, but seemingly not so much in TypeScript. Vitest has specific syntax affordances for it, though It utterly failed at the task. Tried many times with increasing specificity in my prompt, did one myself and used it as an ex…

I see. Did you use Claude code? With access to compiling and running.

Codex on high, yeah it had access to compiling/running

Re: Claude’s C Compiler vs. GCC

#173
post #125
post #93

Earlier quoted context omitted.

I just read that whole thread and I think the author made the mistake of submitting a 13k loc PR, but other than that - while he gets downvoted to hell on every comment - he's actually acting professionally and politely. I wouldn't call this a fiasco, it reads to me more that being able to create huge amounts of code - whether the end result works well or not - breaks the traditional model of open source. Small contr…

He is not polite, he is of the utmost rudeness. As a reply to being pointed to the fact that he copied so much code that the generated code included someone else's name in the License, his reply was https://github.com/ocaml/ocaml/pull/14369/changes/ce372a60bd... I struggle to think how someone thinks this is polite. Is politeness to you just not using curse words?

Admittedly, his handling of this aspect was perhaps less than ideal, but I cannot see any impoliteness here whatsoever. As a matter of fact, I struggle to think how you could think otherwise.

But I am biased. After having lived a number of years in a country where I would say the average understanding of politeness is vastly different from where I've grown up, I've learned that there is just a difference of opinion of what is polite and what isn't. I have probably been affected by that too.

Re: Claude’s C Compiler vs. GCC

#174
post #19

Earlier quoted context omitted.

> It's not fair to compare them like this! As someone who leans pro in this debate, I don't think I would make that statement. I would say the results are exactly as we expect. Also, a highly verifiable task like this is well suited to LLMs, and I expect within the next ~2 years AI tools will produce a better compiler than gcc.

Don't forget that gcc is in the training set. That's what always puts me off: when AI replaces artists, SO and FOSS projects, it can only feed into itself and deteriorate..

it can feed into itself and improve. the idea that self-training necessarily causes deterioration is fanfic. remember that they spend massive amounts of compute on rl.

Re: Claude’s C Compiler vs. GCC

#175

"The miracle is not that the bear can dance well, it's that the bear can dance at all." - Old Russian proverb.

But the poster, the ticket seller, and the ringmaster all said "Anna Pavlova reincarnated, a Bear that can dance as well as famous Ice Skaters!"

Re: Claude’s C Compiler vs. GCC

#176
post #51

I think this is a great example of both points of view in the ongoing debate. Pro-LLM coding agents: look! a working compiler built in a few hours by an agent! this is amazing! Anti-LLM coding agents: it's not a working compiler, though. And it doesn't matter how few hours it took, because it doesn't work. It's useless. Pro: Sure, but we can get the agent to fix that. Anti: Can you, though? We've seen that the more c…

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.

Re: Claude’s C Compiler vs. GCC

#177
post #167
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:/…

I'm humbled by the maintainer's answer [0]. Must be great to work with people like him who have infinite patience and composure. [0] https://github.com/ocaml/ocaml/pull/14369#issuecomment-35565...

gasche has been active on various forums over the years, and yes can confirm that he has infinite patience.

Re: Claude’s C Compiler vs. GCC

#178
One missing analysis, that IMHO is the most important right now, is : what is the quality of the generated code ?

Having LLM generates a first complete iteration of a C compiler in rust is super useful if the code is of good enough quality that it can be maintained and improved by humans (or other AIs). It is (almost) completely useless otherwise.

And that is the case for most of today's code generated by AIs. Most of it will still have to be maintained by humans, or at least a human will ultimately be responsible for it.

What i would like to see is whether that C compiler is a horrible mess of tangled spaghetti code with horrible naming. Or something with a clear structure, good naming, and sensible comments.

Re: Claude’s C Compiler vs. GCC

#180

> CCC compiled every single C source file in the Linux 6.9 kernel without a single compiler error (0 errors, 96 warnings). This is genuinely impressive for a compiler built entirely by an AI. It would be interesting to compare the source code used by CCC to other projects. I have a slight suspicion that CCC stole a lot of code from other projects.

It's less impressive when you realize CCC happily compiles invalid C without emitting any errors.
Post reply on HN