Why write your own language?

I recently wrote own little lisp implementation. Sometimes when I mention that, I get question “why did you do such a thing?” as a reply. My standard reply is “because some radio amateurs build their own radios”. I think the explanation sums up my reasons particularly well (probably much better than I initially thought even).

Getting the interpreter up and going was relatively simple and took only a couple evenings in the weekend. Even with such a short project, I learned a ton of things: how string is read and tokenized and eventually formed into a syntax tree, how that tree is then executed in a given environment, possibly resulting a new environment, how eval and apply relate to each other and so on. All these things that are behind pretty much every programming language and that I have been taking for granted for all these years.

It’s certainly true that apocrita isn’t anything special. There are tons of good lisp implementations out there that I could have chosen from. It doesn’t add any fancy features (although I have some ideas that I would like to try out in the future, just to better learn the mechanics behind them) either. But it did give me insight on what’s going on uneder the hood and satisfied a little of certain curiosity (I’m sure plenty of people like me liked taking things apart as kid to see what’s inside).

And it’s just exhilarating too write something completely new to myself, wrestle with the details a bit and then get it working. Programming certainly isn’t magic, but sometimes it certainly looks like it.