3 ms·
Oops. I was hoping to post this to HN in a couple of days when it's finished, but the latest commits to CoffeeScript on Github include a compiler that's written
by jashkenas 17y ago
Oops. I was hoping to post this to HN in a couple of days when it's finished, but the latest commits to CoffeeScript on Github include a compiler that's written entirely in CoffeeScript. It's been compiling itself since Friday.
This means that you can compile scripts in the browser, should you choose to, or within Node.js on the server, and greatly increases the speed of the interactive REPL. It's also a nice showcase for what's possible in CoffeeScript.
For example, take a peek at the Jison parser, using a little DSL function that makes for a nice style of grammar declaration:
http://github.com/jashkenas/coffee-script/blob/master/src/grammar.coffee http://github.com/jashkenas/coffee-script/blob/master/src/gr...
If you'd like to play with the CoffeeScript-in-CoffeeScript implementation, use bin/node_coffee when you check out the source. bin/coffee remains the Ruby implementation until the CoffeeScript side is up to feature parity.
Here's the original post, things have come a long way since then:
http://news.ycombinator.com/item?id=1014080 http://news.ycombinator.com/item?id=1014080
- grandalf 17y agoSorry about posting it early :) I must have missed the original story and when I discovered it today I thought it merited sharing with HN.
- bprater 17y agoBrilliant. I was turned off by the need to compile separately with Ruby. Now I can play with it without that overhead and always compile down when done with development for speed. Kudos!