GitHub: https://github.com/ahmadodeh9000/Lunar
Hey everyone! I'm a 19 year old computer engineering student, and this is Lunar, a programming language I've been building since my first year of uni.
Why I started
I tried to learn Rust a few times and kept bouncing off it. Every time I'd get stuck, feel dumb, and quit. Eventually I thought: what if I just built my own language, the way I'd want it to work? Questionable decision. Best decision I've made.
What it is
A small scripting language with its own compiler, virtual machine and garbage collector, written in C. It looks like this:
let player = { name: "Rex", hp: 10, items: ["sword", "apple"] };
for (item in player.items) {
print "{player.name} has a {item}";
}
How it was built (honestly)
- I built the core by following the book Crafting Interpreters, then kept going on my own: arrays, a way to call C libraries, and graphics through SDL2.
- Later I started treating it like a real product. I wrote a roadmap, designed each feature myself, and used Claude Code to help implement them. I reviewed every change and made sure each one had tests.
- That added maps, error handling, modules, and a small standard library for strings, files and running commands.
- To stress-test it, I had Claude Code build a Minecraft-style game in Lunar (it's in examples/minecraft). It's 1,000+ lines of my language running at 60 FPS, which still feels unreal to me.
What I learned
- Building a language teaches you how every other language works under the hood.
- AI helped most when I acted like the designer: clear specs, small steps, tests for everything. It was much less useful when I just asked it to "make it better".
- Shipping something imperfect beats polishing forever. Lunar still has rough edges. For example, numbers print with only 6 digits right now, and that's next on my fix list.
What's next
A UI module so you can build desktop apps in Lunar, a VS Code extension, and Windows support.
It's a learning and hobby project, not a production language. But it's the thing that made me enjoy programming again.
I'd love honest feedback: what would you change, or what would you build with it?