Live data from Hacker News

We tasked Opus 4.6 using agent teams to build a C Compiler

anthropic.com

321–330 of 787 posts

Re: We tasked Opus 4.6 using agent teams to build a C Compiler

#321

Earlier quoted context omitted.

There are many, here's a simple Google search: https://github.com/jyn514/saltwater https://github.com/ClementTsang/rustcc https://github.com/maekawatoshiki/rucc

I found this one too: https://github.com/PhilippRados/wrecc

A genuinely impressive effort, but alas, still missing some pretty critical features (const, floating point, bools, inline, anonymous structs in function args).

Re: We tasked Opus 4.6 using agent teams to build a C Compiler

#322

I spent a good part of my career (nearly a decade) at Google working on getting Clang to build the linux kernel. https://clangbuiltlinux.github.io/ This LLM did it in (checks notes): > Over nearly 2,000 Claude Code sessions and $20,000 in API costs It may build, but does it boot (was also a significant and distinct next milestone)? (Also, will it blend?). Looks like yes! > The 100,000-line compiler can build a bootab…

This is getting close to a Ken Thompson "Trusting Trust" era -- AI could soon embed itself into the compilers themselves.

Sorry, clang 26.0 requires an Nvidia B200 to run.

Re: We tasked Opus 4.6 using agent teams to build a C Compiler

#323
post #310

Earlier quoted context omitted.

If you read the entire GCC source code and then create a compatible compiler, it's not clean room. Which Opus basically did since, I'm assuming, its training set contained the entire source of GCC. So even if they were actively referencing GCC I think that counts.

What if you just read the entire GCC source code in school 15 years ago? Is that not clean room?

No.

I'd argue that no one would really care given it's GCC.

But if you worked for GiantSodaCo on their secret recipe under NDA, then create a new soda company 15 years later that tastes suspiciously similar to GiantSodaCo, you'd probably have legal issues. It would be hard to argue that you weren't using proprietary knowledge in that case.

Re: We tasked Opus 4.6 using agent teams to build a C Compiler

#324

I spent a good part of my career (nearly a decade) at Google working on getting Clang to build the linux kernel. https://clangbuiltlinux.github.io/ This LLM did it in (checks notes): > Over nearly 2,000 Claude Code sessions and $20,000 in API costs It may build, but does it boot (was also a significant and distinct next milestone)? (Also, will it blend?). Looks like yes! > The 100,000-line compiler can build a bootab…

It’s cool but there’s a good chance it’s just copying someone else’s homework albeit in an elaborate round about way.

This is cool and actually demonstrates real utility. Using AI to take something that already exists and create it for a different library / framework / platform is cool. I'm sure there's a lot of training data in there for just this case.

But I wonder how it would fare given a language specification for a non-existent non-trivial language and build a compiler for that instead?

Re: We tasked Opus 4.6 using agent teams to build a C Compiler

#325

Earlier quoted context omitted.

This is firmly where I am. "The wonder is not how well the dog dances, it is that it dances at all."

"It's like if a squirrel started playing chess and instead of "holy shit this squirrel can play chess!" most people responded with "But his elo rating sucks""

I'm not trying to get coached in chess by the squirrel for 200 per month though.

Re: We tasked Opus 4.6 using agent teams to build a C Compiler

#327

Earlier quoted context omitted.

> C compiler is one of the most rigorously specified pieces of software out there /me Laughs in "unspecified behavior."

Undefined is absolutely clear in the spec. Unspecified is whatever you want it to mean. I am also laughing, having never heard "unspecified" before.

Unspecified behaviour is defined in the glossary at the start of the spec and the term "unspecified" appears over a hundred times...

Re: We tasked Opus 4.6 using agent teams to build a C Compiler

#328

Earlier quoted context omitted.

> This was a clean-room implementation This is really pushing it, considering it’s trained on… internet, with all available c compilers. The work is already impressive enough, no need for such misleading statements.

I'm using AI to help me code and I love Anthropic but I chocked when I read that in TFA too. It's all but a clean-room design. A clean-room design is a very well defined term: "Clean-room design (also known as the Chinese wall technique) is the method of copying a design by reverse engineering and then recreating it without infringing any of the copyrights associated with the original design." https://en.wikipedia.or…

[dead]

Re: We tasked Opus 4.6 using agent teams to build a C Compiler

#329

I spent a good part of my career (nearly a decade) at Google working on getting Clang to build the linux kernel. https://clangbuiltlinux.github.io/ This LLM did it in (checks notes): > Over nearly 2,000 Claude Code sessions and $20,000 in API costs It may build, but does it boot (was also a significant and distinct next milestone)? (Also, will it blend?). Looks like yes! > The 100,000-line compiler can build a bootab…

This is getting close to a Ken Thompson "Trusting Trust" era -- AI could soon embed itself into the compilers themselves.

Then i'll be left wondering why my program requires 512TB of RAM to open

Re: We tasked Opus 4.6 using agent teams to build a C Compiler

#330
post #4

> The generated code is not very efficient. Even with all optimizations enabled, it outputs less efficient code than GCC with all optimizations disabled. Worse than "-O0" takes skill... So then, it produced something much worse than tcc (which is better than gcc -O0), an equivalent of which one man can produce in under two weeks. So even all those tokens and dollars did not equal one man's week of work. Except the on…

Claude is only a few years old so we should compare it to a 3 year old human's C compiler

Claude requires many lifetimes worth of data to "learn". Evolution aside humans don't require much data to learn, and our learning happens in real-time in response to our environment.

Train Claude without the programming dataset and give it a dozen of the best programming books, it'll have no chance of writing a compiler. Do the same for a human with an interest in learning to program and there's a good chance.

Post reply on HN