Earlier quoted context omitted.
Claude was reverse engineering gcc. It was using it as an oracle and attempting to exactly march its output. That is the definition of reverse engineering. Since Claude was trained on the gcc source code, that’s not a clean room implementation. > By your definition no one can do a clean room implementation if they've taken a recent compilers course at university. Clean room implementation has a very specific definiti…
Why do you say it reversed engineered gcc instead of llvm? If you read the code it has much more of llvm concepts than gcc.
We tasked Opus 4.6 using agent teams to build a C Compiler
781–787 of 787 posts
Re: We tasked Opus 4.6 using agent teams to build a C Compiler
#782Earlier quoted context omitted.
I’ve spent nearly 20 years working as a consultant writing software, I know that. How do you think humans solve that problem?
Typically by putting cost caps on deliverables.
Re: We tasked Opus 4.6 using agent teams to build a C Compiler
#783Earlier 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.
They did bot compile the whole linux, mind you, just an absolute minimal kernel. Doing a real compiler to be used by humans is difficult. Doing a compiler that “gets the thing done” is a different thing.
Re: We tasked Opus 4.6 using agent teams to build a C Compiler
#784Earlier quoted context omitted.
assembler is far from trivial at least for x86 where there are many possible encodings for a given instruction. emitting the most optimal encoding that does the correct thing depends on surrounding context, and you'd have to do multiple passes over the input.
What is a single example where the optimal encoding depends on context? (I am assuming you're just doing an assembler where registers have already been chosen, vs. a compiler that can choose sse vs. scalar and do register allocation etc.)?
Re: We tasked Opus 4.6 using agent teams to build a C Compiler
#785Earlier quoted context omitted.
I am surprised by the number of comments that say the assembler is trivial - it is admittedly perhaps simpler than some other parts of the compiler chain, but it’s not trivial. What you are doing is kinda serialising a self-referential graph structure of machine code entries that reference each others addresses, but you don’t know the addresses because the (x86) instructions are variable-length, so you can’t know the…
All you have to do is record a table of fixup locations you can fill in in a second pass once the labels are resolved.
You also need to choose optimal instruction encoding, and you need to understand how relocs work - which things can you resolve now vs which require you to encode info for the linker to fill in once the program is launched, etc etc.
Not sure why I'm on this little micro-rant about this; I'm sure Claude could write a workable assembler. I'm more like.. I've written one assembler and many, many parsers, and the parsers where way simpler, yet this thread is littered with people that seem to think assemblers are just lookup tables from ascii to machine code with a loop slapped on top of them.
Re: We tasked Opus 4.6 using agent teams to build a C Compiler
#786Earlier quoted context omitted.
So let’s say you fund a single engineer for an open‑source project with $20k. The outcome will be a prototype with some interesting ideas. And yes, with a few hundred bucks' worth of AI assistance that single engineer might get much further than without (but not using any of the techniques presented in this blog). People can coalesce around the project as contributors. A seed was planted and watered a bit. In this ca…
I agree that there's not a lot of value in your example, but it's the wrong example. AI writing code and humans refining it and maintaining it is probably an inferior proposition, more so if the project is FOSS. The model I'm referring to is: "if it walks like software and quacks like software, it's software." Its writers and maintainers are AI. It has a commercial purpose. Its value comes from fulfilling its require…
The requirements will have to come from somewhere, and they will have to be quite precise although probably higher-level than code written today. You're talking about just a new kind of software engineer. The kind of stuff described at https://martin.kleppmann.com/2025/12/08/ai-formal-verificati... (note the "the challenge will move to correctly defining the specification")
Unless what you have in mind is some sort of Moltbook add-on that the bots would write for themselves.
I'm talking software providing value to humans.
Re: We tasked Opus 4.6 using agent teams to build a C Compiler
#787Earlier quoted context omitted.
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 actua…
It depends on what kind of start-up we're talking about.
A compiler start-up probably should show some kind of efficiency gain even in an MVP. As in: we're insanely efficient in this part of the work, but we're still missing all other functionalities but have a clear path to implementing the rest.
This is more like: It's inefficient, and the code is such a mess that I have no idea on how to improve on it.
As per the blog improvements were attempted but that only started a game of whack-a-mole with new problems.
If on the other hand you're talking about Claude Teams for writing code as an MVP: the outcome is more like proof that the approach doesn't work and you need humans in the loop.