Thorsten Ball

Home Books (Update!) Posts Talks Projects Contact

I wrote a second book!

It's called Writing A Compiler In Go and is the sequel to Writing An Interpreter In Go.

It's a sequel in code and in prose. We're picking up right where we left off and write a compiler and a virtual machine for Monkey. Just like before, the focus is runnabled and tested code, built from the ground up, step by step. Only this time, we're compiling and executing bytecode. It's the next step in Monkey's evolution.

Find out more at compilerbook.com

Higher Value Tools

08 Feb 2017

There are certain tools that provide incredibly high value. Much more so than others. They provide so much value by acting as a multiplier of power and leverage. And I think there’s something they all have in common.

I’m talking about interpreters, compilers and transpilers. Programming languages are the ultimate, universal tools and sit at the bottom of stack on which a bazillion other tools are built. Some programming languages offer so much power that their creation was the big bang for whole categories of other tools.

But I’m also talking about DSLs, code generators and templating engines. And databases with query languages. And database drivers that make these databases available to programming languages. jQuery and its $('exactly what I want') interface. jq and its query language. Webservers. Editors, IDEs, code analysers and generators.

It seems to me what they all have in common, what is close to their center of power, is parsing. Parsing user input, parsing source code, parsing query expressions, parsing configuration files, parsing network responses. Maybe it’s parsing itself what makes these tools so powerful. I’m not sure.

What I know and what I’m sure about is that without knowledge of parsing you won’t be able to build tools like these. Knowing how to write a parser is like a secret power and once you have it, you realize that you’re now able to solve a whole range of problems you haven’t even considered before. Now you can create higher value tools.

Follow me on twitter: @thorstenball. Or send me an email to me@thorstenball.com. Or check out my books at interpreterbook.com and compilerbook.com.

I also maintain a mailing list, on which I sent out occasional updates about my books or this blog. I won't spam you and you can unsubscribe at any time.

Keep me updated!