logoalt Hacker News

iv11today at 6:48 AM1 replyview on HN

I wonder how well an LLM would do for a new CPU architecture for which no C compiler exists yet, just assembler.


Replies

lelanthrantoday at 10:50 AM

> I wonder how well an LLM would do for a new CPU architecture for which no C compiler exists yet, just assembler.

Quite well, possibly.

Look, I wasn't even aware of this until it popped up a few days ago on HN, I am not privy to the details of Anthropics engineers in general, or the specific engineer who curated this marathon multi-agent dev cycle, but I can tell you how anyone familiar with compilers or programming language development will proceed:

1. Vibe an IL (intermediate language) specification into existence (even if it is only held in RAM as structures/objects)

2. Vibe some utility functions for the IL (dump, search, etc)

3. Vibe a set of backends, that take IL as input and emit ISA (Instruction Set Architecture), with a set of tests for each target ISA

4. Vibe a front-end that takes C language input and outputs the IL, with a set of tests for each language construct.

(Everything from #2 onwards can be done in parallel)

I have no reason to believe that the engineer who vibe-coded CCC is anything other than competent and skillful, so lets assume he did at least the above (TBH, he probably did more)[1].

This means that CCC has, in its code, everything needed to vibe a never-before-seen ISA, given the ISA spec. It also means it has everything needed to support a new front-end language as long as it is similar enough to C (i.e. language constructs can map to the IL constructs).

So, this should be pretty easy to expand on, because I find it unlikely that the engineer who supervised/curated the process would be anything less than an expert.

The only flaw in my argument is that I am assuming that effort from CC was so large because it did the src -> IL -> ISA route. If my assumption is wrong, it might be well-nigh impossible to add support for a new ISA.

------------------------------

[1] When I agreed to a previous poster on a previous thread that I can recreate the functionality of CCC for $20k, these are the steps I would have followed, except I would not have LLM-generated anything.