This tweet by Gary Bernhardt has been bopping around in my head ever since reading it a few weeks ago:
It’s also so refreshing to have a problem where there’s nothing in my way except myself. There are zero questions about “can this tool do the thing I need to do?” Only “can I find the solution?” and “can I make it fast enough to be usable?”
I know exactly what he’s talking about. I’ve talked about it many times myself.
Whenever I’m asked what I find fascinating about hacking on compilers or interpreters I say this: working on my Monkey interpreter (that turned into interpreterbook.com) was the most joy-inducing programming I had ever done.
It was so unrestrained, so fast: no libraries, no database, no browser, no UI, barely any IO. Just throw a bunch of strings into one end and run the tests to make sure the right result comes out the other end. The rest is up to you: tokenize it, parse it, evaluate it, do whatever the hell you want. It’s you, your editor, the host language, and the ideas you can come up with.
I highly recommend it to anyone who programs. Sure, we’ve all done this in some form or another, but mostly in small programs: little test script here, very over-engineered fizzbuzz there, maybe some example code over there.
When you’re building a programming language, though, you can grow the program to thousands and thousands of lines of code while keeping everything out of the way, except yourself.
Try it.