logoalt Hacker News

jdw64today at 5:17 PM2 repliesview on HN

I'm writing the C backend by hand and using AI for the rest, so how did this author manage to finish an entire language in just 34 hours? I've been steadily catching and fixing what the AI writes, so it's amazing to me that they ended up with a complete language. It makes me wonder if the way I'm building a compiler is just wrong.


Replies

swiftcodertoday at 5:22 PM

If you tell it to write a spec -> then write the tests -> then implement, the LLM should be able to pretty much one-shot a compiler frontend. LLMs really benefit from the kind of task that has a built-in validation loop.

show 1 reply