I built a programming language using Claude Code
6 points by abhin4v
6 points by abhin4v
The codebase is C. The parser is over 4kloc of spaghetti. JSON parsing and GC are open-coded; gc.h somewhat resembles the API of libgc. Code is superficially factored nicely, somewhat resembling Linux house style, but some procedure bodies are too deep or too long. APIs are shaped like homomorphisms, which would be lovely in a language which could take advantage of that. chunk.c, ptr_array.c, and runtime.c are all open-coded workarounds for C limitations. The VM uses C stack frames for (some?) Cutlet stack frames. Some user values are not managed by GC and must be manually freed.
I think that the biggest issue here is sheer unmaintainability. I also notice brittle abstractions that could not easily accommodate new concrete syntax or an optimizing backend.
So what if it's unmaintainable. Claude Code can deal with the crap code! Just adjust the prompts and let it rip! This is what the AI techbros want, right?
I’d be remiss if I didn’t include a note on mental health in this already mammoth blog post.
It’s easy to get addicted to agentic engineering tools. While working on this project, I often found myself at my computer at midnight going “just one more prompt”, as if I was playing the world’s most obscure game of Civilization. I’m embarrassed to admit that I often had Claude Code churning away in the background when guests were over at my place, when I stepped into the shower, or when I went off to lunch. There’s a heady feeling that comes from accomplishing so much in such little time.
More addictive than that is the unpredictability and randomness inherent to these tools. If you throw a problem at Claude, you can never tell what it will come up with. It could one-shot a difficult problem you’ve been stuck on for weeks, or it could make a huge mess. Just like a slot machine, you can never tell what might happen. That creates a strong urge to try using it for everything all the time. And just like with slot machines, the house always wins.
These days, I set limits for how long and how often I’m allowed to use Claude. As LLMs become widely available, we as a society will have to figure out the best way to use them without destroying our mental health.
This is the part I’m not very optimistic about. We have comprehensively failed to regulate or limit our use of social media, and I’m willing to bet we’ll have a repeat of that scenario with LLMs.
Wanted to bring this up since this post is likely going to fall off the front page (and I'm not advocating it not do that). I think this section would have made a much better blog post in and of itself. I definitely recognize the potential for addiction with LLMs, as well as that need to keep it running as much as possible. Those who have to use them will need to be smart to set better boundaries than we have with phones, social media, actual gambling, etc.
The syntax examples for the @ operator look interesting, although I'm not sure if prototype inheritance is what one "would expect from a dynamic language" other than JS or flash derivatives.
Maybe it would be good to write the actual language specification on a second post, and avoid the vibecoding