Is there a reason to build a command line application in Node.js? It doesn't really seem like Node is the right tool for the job...
It's fun, simple, fast, and has a good package manager. JS is a high level scripting language like python or ruby but gives significant speed benefits in a lot of cases (in particular, the startup time of CLI programs written in Ruby always bothers me). If you want to write in C for performance reasons, go ahead. But if your other alternatives are Python or Ruby and you already know JS, give node a go -- it's pretty…
How to write a command line application in Node.js
31–40 of 56 posts
Re: How to write a command line application in Node.js
#32Earlier quoted context omitted.
There are tons of better options to choose from. If you're not making a web UI, literally any choice is better than Javascript, unless that is the only language you know.
Compared to most languages you'd use for a commandline application, node has a simple, usable async I/O interface, and the libraries you can get for it actually assume async. If you need that, there are only a handful of choices and node is one of them.
I'm not really arguing against using JavaScript for command-line interfaces. I'd much rather see that than the same in PHP, and if the programmers don't know Perl, Python or Ruby, then why not? We're talking about an area where there are still way to many hacks that consist of badly written bash scripts with lots of inline sed and awk...
Re: How to write a command line application in Node.js
#33Earlier quoted context omitted.
It's fun, simple, fast, and has a good package manager. JS is a high level scripting language like python or ruby but gives significant speed benefits in a lot of cases (in particular, the startup time of CLI programs written in Ruby always bothers me). If you want to write in C for performance reasons, go ahead. But if your other alternatives are Python or Ruby and you already know JS, give node a go -- it's pretty…
This is what happens when you let front-end developers loose in your infrastructure.
Re: How to write a command line application in Node.js
#34can be as simple than that? the right tool for the job..
if i would create a library that everyone could use and embed i would use C for that..
if i would like to build a VM, a compiler, a browser or a OS i would use c++ (is almost c, fast and gives you easy composability and control)
i would use javascript.. but only in the browser and because and dont have nowhere to go or to runaway for.. (no transpiling either please)
this is just the general experience of my years of coding and deling with every lang in the earth.. rsrs
ruby is pretty, eyecandy, bu is like a virgen that cant be touched.. python looks just like perl.. is a complete mess, and is like the mafia,i prefer not to touch or to have any involvement with them.. java is the frankenstein child of c++.. you can create big software with it.. but to many keywords and excessive use of vtables..
and for ui and web, network, etc.. i would use something like dart for this job, any day.. the code can grow and you can still understand your code
so these days i would use c, c++, go or dart.. in the case i can choose of course.. :)
Re: How to write a command line application in Node.js
#35Earlier quoted context omitted.
It's fun, simple, fast, and has a good package manager. JS is a high level scripting language like python or ruby but gives significant speed benefits in a lot of cases (in particular, the startup time of CLI programs written in Ruby always bothers me). If you want to write in C for performance reasons, go ahead. But if your other alternatives are Python or Ruby and you already know JS, give node a go -- it's pretty…
This is what happens when you let front-end developers loose in your infrastructure.
Re: How to write a command line application in Node.js
#36Earlier quoted context omitted.
If you're doing crazy heavy processing or something, it's not the right tool. But you wouldn't do that in JS. You'd shell out or call something native. Node is best used managing parallel streams of stuff. Perhaps surprisingly, a command line application is a great example of that. I would much rather build a nontrivial command line app in node than in anything else. Try it, you'll see.
There are tons of better options to choose from. If you're not making a web UI, literally any choice is better than Javascript, unless that is the only language you know.
Re: How to write a command line application in Node.js
#37Earlier quoted context omitted.
This is what happens when you let front-end developers loose in your infrastructure.
Don't knock it 'till you try it. Most developers would balk at the idea of creating a project in something that isn't their favorite language, especially when they've been burned by poor uses of that language before.
Re: How to write a command line application in Node.js
#38Is there a reason to build a command line application in Node.js? It doesn't really seem like Node is the right tool for the job...
EDIT: Ok, just went through the nodejs api, they have cover a lot of ground now :)
Re: How to write a command line application in Node.js
#39Earlier quoted context omitted.
It's fun, simple, fast, and has a good package manager. JS is a high level scripting language like python or ruby but gives significant speed benefits in a lot of cases (in particular, the startup time of CLI programs written in Ruby always bothers me). If you want to write in C for performance reasons, go ahead. But if your other alternatives are Python or Ruby and you already know JS, give node a go -- it's pretty…
This is what happens when you let front-end developers loose in your infrastructure.
Re: How to write a command line application in Node.js
#40Earlier quoted context omitted.
Hahaha really? Have you seen a pom file on a real project its about 10 pages with plugins galore.
The verbosity of the XML pom is the problem. Alternative syntax using the same coordinate system are great and much easier on the eyes. The real value in maven (I think) is having that clean dependency chain and it works great. XML is what sucks (especially doing it by hand).
[enlive "1.1.1"]
instead of
enlive
enlive
1.1.1