charlie's blog

Monday, December 7, 2009

a fool's errand

I've decided to write a compiler, something I've wanted to do for a long time. Compilers are the tools that take the gibberish programmers write and turn it into programs you can use for writing email, twittering, and doing your taxes (you may or may not actually do any of these, but you've at least heard of them). This compiler will be for Google's new language Go.

Anyway, hopefully it won't really be a fool's errand, but right now it feels like one. Compilers for real programming languages are pretty complicated affairs, easily many thousands of lines of code. The specification for the language runs to 55 printed pages, which is actually pretty short for an entire programming language, but it's still pretty daunting. I'm not going to get paid for this, so I'll be doing it in my free time; half an hour here, an hour there. At that rate I have no idea how long it will take, but if I had a working prototype within six months I'd be thrilled. Really I guess it doesn't matter how long it takes, though, since I'm doing it for fun.

So that's the plan - write a compiler and try to have it working before the language gets retired. We'll see how it goes...