← Back to context

Comment by jdw64

4 hours ago

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.

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.

  • I'm working on something similar, but unlike the author, my progress has been pretty slow. It's tough. I do write about a fifth of the code myself, but I keep getting stuck on the rest.

    • Well... The fact that it took 10x longer for Doom to build than the language tells a lot.

      Doom is not harder to re-implement than a language.

      The language does not "work" by any sense of the word - which is why it took Doom so long to implement.

      You could get GPT to "self host" a "language" in 5 hrs. That's not impressive.

      The language actually working and being non-trivial would be in 20x the time.

      Sure, GPT can build yet-another-Lisp in 2 minutes. You could copy Lispy yourself in that time: https://www.norvig.com/lispy.html

      GPT/Fable/what have you is not building this language, as its laid out, and "working" in a true sense that fast.

      Either OP is completely full of it, the language didn't actually work (and likely still doesn't), or the language is far less sophisticated than it seems from the examples - it's and the examples are minimal, so it's kind of hard to tell what it actually does...