Tuesday, March 1, 2011

Getting started

QuasiScript is my personal open source project to write a Lisp-to-JavaScript compiler.

It's a passion project, with an aim to learn and explore nooks and crannies along the way.

Why?
JavaScript is ubiquitous, and really should have been "Scheme in the browser", and now CoffeeScript has shown how to fix the JavaScript quirks, but stops at a Ruby/Python syntax rather than going all the way to Lisp. 

Also, with the rise of node.js, server-side and network programming in and on JavaScript just got a whole lot more interesting.

Influences
I started off by trying to contribute to Jacob Rothstein's Sibilant project, which already does an impressive job, but quickly founded that I needed to learn more of the basics, so here I am!

Warming up
I've started by porting Peter Norvig's lis.py Scheme interpreter to JavaScript, specifically node.js, with nodeunit for tests (invaluable) and npm for package management.  But an interpreter is only an interpreter.

Other influences are
Getting stuck in
Abdulaziz Ghuloum has written an excellent paper, An Incremental Approach to Compiler Construction [pdf], which outlines the kind of approach I will try to follow: essentially a test-driven approach.  Ghuloum goes from Scheme to x86 assembly with Scheme as the implementation language.

I'll be bootstrapping out of JavaScript, and start with a Scheme-like language, but it will change along the way (although making the core language forms "skinnable" is an option).

For incremental steps, I intend to start by trying to follow CoffeeScript's capabilities, and its readable generated JavaScript.

No comments:

Post a Comment