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...

Labels:

2 Comments:

  • How is your compiler coming?

    By OpenID catholic, At May 12, 2010 at 9:46 PM  

  • It's coming along, although I haven't been able to work on it for a while. It can handle basic printed output and the arithmetic operators; next will be conditionals, at which point I'll be able to write basic recursive functions (e.g. factorial).

    By Blogger charlie, At May 12, 2010 at 11:30 PM  

Post a Comment

Subscribe to Post Comments [Atom]