I decided to give CoffeeScript a bit more of a hack around tonight. The biggest thing that got me was the difference between -> and =>. The fat arrow The fat arrow => can be used to both define a function, and to bind it to the current value of this, right on the spot. [...]
Tag Archives: coffeescript
A Readable Conway’s Game of Life
Greg Sabo shares I made a failed attempt at Ludum Dare this weekend, but I decided to share what I did get working, which is a simple implementation of Conway’s Game of Life in CoffeeScript. I’ve tried to make the code as easy-to-understand as possible.
Setting up CoffeeScript
CoffeeScript by Jeremy Ashkenas (the creator and project lead of CoffeeScript) The CoffeeScript compiler is itself written in CoffeeScript, using the Jison parser generator. The command-line version of coffee is available as a Node.js utility. The core compiler however, does not depend on Node, and can be run in any JavaScript environment, or in the [...]