Live data from Hacker News

Claude’s C Compiler vs. GCC

harshanu.space

131–140 of 377 posts

Re: Claude’s C Compiler vs. GCC

#131
post #30

Earlier quoted context omitted.

This to me sounds a lot like the SpaceX conversation: - Ohh look it can [write small function / do a small rocket hop] but it can't [ write a compiler / get to orbit]! - Ohh look it can [write a toy compiler / get to orbit] but it can't [compile linux / be reusable] - Ohh look it can [compile linux / get reusable orbital rocket] but it can't [build a compiler that rivals GCC / turn the rockets around fast enough] - T…

> the insane rate of progress Yeah but the speed of progress can never catch the speed of a moving goalpost!

Training data only teaches it how to reach the goalpost, not how to overtake it.

Re: Claude’s C Compiler vs. GCC

#132
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.

[deleted]

Re: Claude’s C Compiler vs. GCC

#133
post #12

Earlier quoted context omitted.

Lexical parsing C is simple, except that typedef's technically make it non-context-free. See https://en.wikipedia.org/wiki/Lexer_hack When handwriting a parser, it's no big deal, but it's often a stumbling block for parser generators or other formal approaches. Though, I recall there's a PEG-based parser for C99/C11 floating around that was supposed to be compliant. But I'm having trouble finding a link, and maybe it…

Clang's solution (presented at the end of the Wikipedia article you linked) seem much better - just use a single lexical token for both types and variables. Then, only the parser needs to be context sensitive, for the A* B; construct which is either a no-op multiplication (if A is a variable) or a variable declaration of a pointer type (if A is a type)

Well, as you see this is inherently taking the spirit of GLL/GLR parser -- defer parse until we have all the information. The academic solution to this is not to do it on token level but introduce a parse tree that is "forkable", meaning a new persistent data structure is needed to "compress" the tree when we have different routes, and that thing is called: graph structured stack (https://en.wikipedia.org/wiki/Graph-structured_stack)

Re: Claude’s C Compiler vs. GCC

#134

Earlier quoted context omitted.

If someone told you 5 years ago that a computer generated a working C compiler, would you think it was a big deal or not?

Sounds amazing, but the computer didn’t do it out of blue with intelligence, but more like cookie-cutter style from already existing code. What’s the big deal about that?

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.

Re: Claude’s C Compiler vs. GCC

#135
post #80

Earlier quoted context omitted.

As an Anti, my argument is "if AI will good in future, then come back in the future"

As a pro, my argument is "it's good enough now to make me incredibly productive, and it's only going to keep getting better because of advancements in compute". I'd rather get really good at leveraging AI now than to bury my head in the sand hoping this will go away. I happen to agree with the saying that AI isn't going to replace people, but people using AI will replace people who don't. So by the time you come back…

[dead]

Re: Claude’s C Compiler vs. GCC

#137

Earlier quoted context omitted.

If someone told you 5 years ago that a computer generated a working C compiler, would you think it was a big deal or not?

yeah its pretty amazing it can do this. The problem is the gaslighting by the companies making this - "see we can create compilers, we won't need programmers", programmers - "this is crap, are you insane?", classic gas lighting.

It’s giving you an idea of what Claude is capable of - creating a project at the complexity of a small compiler. I don’t know if it can replace programmers but can definitely handle tasks of smaller complexity autonomously.

Re: Claude’s C Compiler vs. GCC

#138
post #19

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…

> 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.

[dead]

Re: Claude’s C Compiler vs. GCC

#139
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.

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?

Re: Claude’s C Compiler vs. GCC

#140

Earlier quoted context omitted.

It's a marketing gimmick. Cursor did the same recently when they claimed to have created a working browsers but it was basically just a bunch of open source software glued together into something barely functional for a PR stunt.

Incorrect. This compiler can compile and run doom.

Claims require evidence so where is your evidence?
Post reply on HN