4 ms·
Yeah but #!/usr/bin/node does work. I've used some node.js command line scripts, and it works decently well. Some people praise Node.js for general purpose comm
by chewbranca 16y ago
Yeah but #!/usr/bin/node does work. I've used some node.js command line scripts, and it works decently well. Some people praise Node.js for general purpose command line scripts. Personally, I find Ruby easier to use for command line utilities and scripts.
- gaius 16y agoIt's more than that - if you could assume #!/usr/bin/javascript (Or c:\windows\system32\javascript.exe) on any machine that had Netscape installed, then you'd have a viable ecosystem. The reason Perl became popular was not because it was the "best" language for CGI scripts but because you could assume that the sysadmin had already installed it for his own use. Node.js (which admittedly I've never used) would appear to be available only on a tiny minority of machines you would encounter "in the wild".
- grayrest 16y ago> Node.js (which admittedly I've never used) would appear to be available only on a tiny minority of machines you would encounter "in the wild". Given that it really only hit the public consciousness last November or so, that's more or less expected. What makes people so bullish is that the number of JS developers isn't going to decrease any time soon. It is, however, a pretty awful shell scripting environment and I don't know who would prefer it to Ruby. I say this despite writing a build system for it this weekend to drop dependencies on Ruby and Java. Coffeescript improves things but it's still pretty raw.