4 ms·
Node.js is the pragmatic choice for ClojureScript command line apps. One of Clojure's weaknesses was that the JVM was not a great choice for these types of scr
by fogus 15y ago
Node.js is the pragmatic choice for ClojureScript command line apps. One of Clojure's weaknesses was that the JVM was not a great choice for these types of scripts. ClojureScript + Node.js effectively solves this problem.
- runevault 15y agoOh I fully agree with that, and even if we got NOTHING else from this that would be cool. I just can't help from finding some humor in the idea as well.
- technomancy 15y agoI don't understand; why bring a web framework into it for command-line work? Is it just that straight-up V8 has a crappy CLI experience?
- fogus 15y agoWeb framework? Do you mean Google Closure? If so, bear in mind that the compilation phase will remove unused code, so you're not forced to carry any of it with you if you never use it in your code. As for Node, you do not need it I suppose, but I do not have experience using straight-up V8.
- technomancy 15y agoRight, I was talking about node. It sounds like perhaps node has had more people polishing the command-line tools? Stuff that probably belongs in V8, but goes in node because it's a more openly-developed project? The mention of node just seemed a little out of place at first glance.
- fogus 15y agoI only mentioned Node because the parent post did, but as for the reason it was chosen for the target of the first round is because it's definitely got the polish as far as libs, installation experience, etc. go.
- deleted 15y ago[deleted]
- deleted 15y ago[deleted]
- sjs 15y agoNode isn't a web framework, it's more of unixy, network oriented stdlib for v8.
- bashwort 15y agoI'm no expert here but I think Node gives you the ability to convey command-line args to JavaScript out of the box. From the brief research I have done, it appears that you need to write a C wrapper to do this with V8. If the JavaScript does not require command-line args, it will run just fine with V8.