Since we can run JavaScript using various interpreters, like V8 or Rhino, I thought there should be a way to run CoffeeScript code inside a terminal as well.
Technically, I can do that by using Node.js while running javascript, but I'm curious if there is a standalone interpreter specifically designed for CoffeeScript.
No. You can launch a coffeescript file with coffee filename
, but this will just compile the coffeescript file in-RAM and run it as javascript. Well, actually someone did write an interpreter for coffeescript, but that interpreter is written in javascript or coffeescript or so and therefore has to run inside of a JS engine, too. Also, it's slow as hell because it's an interpreter and not a JIT compiler.
As I said, just use the coffee
command.
What's wrong with simply installing and running the interpreter that comes with CoffeeScript itself?
Read the installation part of the guide here: http://jashkenas.github.com/coffee-script/#installation
And then use it like this:
Or am I missing some dimension of your question?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With