Live data from Hacker News

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

anthropic.com

661–670 of 787 posts

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

#661

>The fix was to use GCC as an online known-good compiler oracle to compare against. >This was a clean-room implementation (Claude did not have internet access at any point during its development); it depends only on the Rust standard library. How does one re-conciliate both of this statements? Sure one can fetch all of gnu.org in local, and a model which already scrapped the whole internet somehow already integrated…

Thank you!!! All these resources being spent on centralizing and claiming to outsource and reduce human thinking to nothing.

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

#662
post #69

I would like to see the following published: - All prompts used - The structure of the agent team (which agents / which roles) - Any other material that went into the process This would be a good source for learning, even though I'm not ready to spend 20k$ just for replicating the experiment.

Just claims with nothing to back it. Steal people's work of years, and turn around be like I make it "so much better". Support this compiler for 20 years then

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

#663

Earlier quoted context omitted.

You are underestimating the complexity of the task so do other people on the thread. It's not trivial to implement a working C compiler very much so to implement the one that proves its worth by successfully compiling one of the largest open-source code repositories ever, which btw is not even a plain ISO C dialect.

I didn’t say it was trivial. Just that I thought my course mates would be able to do it.

You thought your course mates would be able to write a C compiler that builds the Linux?

Huh. Interesting. Like the other guy pointed out, compiler classes often get students to write toy C compilers. I think a lot of students don't understand the meaning of the word "toy". I think this thread is FULL of people like that.

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

#664
post #389

Earlier quoted context omitted.

Do you think this was guided by a low quality Anthropic developer? You can give a developer the GCC test suite and have them build the compiler backwards, which is how this was done. They literally brute forced it, most developers can brute force. It also literally uses GCC in the background... Maybe try reading the article.

[flagged]

[flagged]

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

#665

Earlier quoted context omitted.

Yes a human can hack together a compiler in two weeks. If you can't, you should turn off the AI and learn for yourself for a while. Writing a compiler is not a flex; it's a couple very well understood problems, most of which can be solved using existing libraries. Parsing is solved with yacc, bison, or sitting down and writing a recursive descent parser (works for most well designed languages you can think of). Then…

Meanwhile: > I spent a good part of my career (nearly a decade) at Google working on getting Clang to build the linux kernel. https://news.ycombinator.com/item?id=46905771

If you spend a decade working on something, you’re not “hacking it”.

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

#666
post #464
post #332

Earlier quoted context omitted.

> Still a really cool project! Yeah. This test sorta definitely proves that AI is legit. Despite the millions of people still insisting it's a hoax. The fact that the optimizations aren't as good as the 40 year gcc project? Eh - I think people who focus on that are probably still in some serious denial.

> This test sorta definitely proves that AI is legit. This is an "in distribution" test. There are a lot of C compilers out there, including ones with git history, implemented from scratch. "In distribution" tests do not test generalization. The "out of distribution" test would be like "implement (self-bootstrapping, Linux kernel compatible) C compiler in J." J is different enough from C and I know of no such compile…

There are two compilers that can handle the Linux kernel. GCC and LLVM. Both are written in C, not Rust. It's "in distribution" only if you really stretch the meaning of the term. A generic C compiler isn't going to be anywhere near the level of rigour of this one.

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

#667

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…

> I spent a good part of my career (nearly a decade) at Google working on getting Clang to build the linux kernel Did this come down to making Clang 100% gcc compatible (extensions, UDB, bugs and all), or were there any issues that might be considered as specific to the linux kernel? Did you end up building a gcc compatability test suite as a part of this? Did the gcc project themselves have a regression/test suite t…

> extensions

Some were necessary (asm goto), some were not (nested functions, flexible array members not at the end of structs).

> UDB, bugs and all

Luckily, the kernel didn't intentionally rely on GCC specifics this way. Where it did unintentionally, we fixed the kernel sources properly with detailed commit messages explaining why.

> or were there any issues that might be considered as specific to the linux kernel?

Yes, https://github.com/ClangBuiltLinux/linux/issues is our issue tracker. We use tags extensively to mark if we triage the issue to be kernel-side vs toolchain-side.

> Did you end up building a gcc compatability test suite as a part of this?

No, but some tricky cases LLVM got wrong were distilled from kernel sources using either:

- creduce - cvise (my favorite) - bugpoint - llvm-reduce

and then added to LLVM's existing test suite. Many such tests were also simply manually written.

> Did the gcc project themselves have a regression/test suite that you were able to use as a starting point?

GCC and binutils have their own test suites. Folks in the LLVM community have worked on being able to test clang against GCC's test suite. I personally have never run GCC's test suite or looked at its sources.

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

#668
post #637

Earlier quoted context omitted.

Is there really value being presented here? Is this codebase a stable enough base to continue developing this compiler or does it warrant a total rewrite? Honest question, it seems like the author mentioned it being at its limits. This mirrors my own experience with Opus in that it isn't that great at defining abstractions in one-shot at least. Maybe with enough loops it could converge but I haven't seen definite pro…

This is an experiment to see the current limit of AI capabilities. The end result isn't useful, but the fact is established that in Feb 2026, you can spend $20k on AI to get a inefficient but working C complier.

> The end result isn't useful

Then, as your parent comment asked, is there value in it? $20K, which is more than the yearly minimum wage in several countries in Europe, was spent recreating a worse version of something we already have, just to see if it was possible, using a system which increases inequality and makes climate change—which is causing people to die—worse.

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

#669
post #637

Earlier quoted context omitted.

Is there really value being presented here? Is this codebase a stable enough base to continue developing this compiler or does it warrant a total rewrite? Honest question, it seems like the author mentioned it being at its limits. This mirrors my own experience with Opus in that it isn't that great at defining abstractions in one-shot at least. Maybe with enough loops it could converge but I haven't seen definite pro…

This is an experiment to see the current limit of AI capabilities. The end result isn't useful, but the fact is established that in Feb 2026, you can spend $20k on AI to get a inefficient but working C complier.

> inefficient but working

FWIW, an inefficient but working product is pretty much the definition of a startup MVP. People are getting hung up on the fact that it doesn't beat gcc and clang, and generalizing to the idea that such a thing can't possibly be useful.

But clearly it can, and is. This builds and boots Linux. A putative MVP might launch someone's dreams. For $20k!

The reflexive ludditism is kinda scary actually. We're beyond the "will it work" phase and the disruption is happening in front of us. I was a luddite 10 months ago. I was wrong.

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

#670
I'm annoyed at the cost statement, as that's the sleight of hand. "$20000" at current pricing. Add some orders of magnitude to the costs and you'll get your true price you'll have to pay when the VC money starts to wear off. 2nd, this is ignoring the dev time that he/others put in over multiple iterations of this project (opus 4, opus 4.5) and all the other work to create the scaffolding for it, and all the millions/tens of millions of dollars of hand written test suits (linux kernel, gcc, doom, sqlite, etc) he got to use to guide the process. So add some more cost on top of that orders of magnitude increase and the dev time is probably a couple months/years more than "2 weeks".

And this is just working off the puff pieces statements, and not even diving into the code to see it's limits/origins, etc. I also don't see the scaffold in the repo, as that's where the effort is.

But still it's not surprising, from my own experience, given a rigorously definable problem, enough effort, grunt work, and massaging, you can get stuff out of the current models.

Post reply on HN