News for hackers. Stuff that matters.
Re:CoffeeScript hits 1.0 -- Happy Holidays, HN by gabrielroth on Friday December 24, 2010 @10:37PM (#2038464)
Newbie question: How is CoffeeScript typically used? On a web server running node.js? In the browser after including CoffeeScript the way you might include jQuery? Either? Some other way?
Re:CoffeeScript hits 1.0 -- Happy Holidays, HN by jashkenas on Friday December 24, 2010 @11:44PM (#2038530)
Anywhere you might use JavaScript. For building web sites, working with canvas, doing servers with Node.js, or scripting the JVM with Rhino ... for example:

A Riak client: http://riakjs.org/

A canvas sketch: http://jashkenas.s3.amazonaws.com/misc/buddhabrot/buddhabrot...

A string scanning library: http://sstephenson.github.com/strscan-js/

An in-browser tank game: https://github.com/stephank/orona

A Node.js-powered Rack server: http://josh.github.com/nack/

Re:CoffeeScript hits 1.0 -- Happy Holidays, HN by pyrotechnique on Saturday December 25, 2010 @08:26AM (#2038905)
Both.

Since CoffeeScript itself is written in CoffeeScript it was quite easy for the team to create a distribution of the compiler that runs in the browser.

You can find it in the extras folder of the source code repository.

Usually though, people opt to pre-compile their CoffeeScript on the server, pack, optimise and minify it before serving it to clients.

At Feisty, we write CoffeeScript that is intended to be executed on both the server and client.

To achieve this, we wrote "requisition" - https://github.com/feisty/requisition - a server-side packager and client-side loader - via require() - for CommonJS Modules written in CoffeeScript.

For a simpler, ad-hoc solution check out my tutorial project "Walk the Line" - http://github.com/pyrotechnick/walk_the_line