• There is a coffeescript REPL: http://coffeescript.org/documentation/docs/repl.html

    You would have to run it on the client and modify the included eval function so that it sends the compiled JS to the board instead of executing it.

    Or make your own REPL. Compiling little bits of coffeescript code into javascript interactively is quite easy to do:

    coffeeCode = '((s)->console.log s) "hello"'
    jsCode = require('coffee-script').compile coffeeCode, {bare: true}
    

    You would just have to read coffeeCode from stdIn and send jsCode to the board. The option bare=true is important because without it, the coffeescript compiler wraps everything in its own closure to keep the namespace clean. In that case, if you compile and run "a=5" and then compile and rund "console.log a", it would print "undefined", unless you specify bare=true

    I will look into it once I get my Espruino board. Still waiting for it to ship...

About

Avatar for Dennis @Dennis started