News for hackers. Stuff that matters.
Re:Node v4.0.0 by blowski on Tuesday September 08, 2015 @03:55PM (#10187855)
I believe that Node can and will become more stable. It feels like it has too much momentum not to. But until it does achieve stability, it's difficult to use it for anything serious without investing a lot of time into it.

Perhaps Go is a better comparison than Ruby and Python.

Re:Node v4.0.0 by weddpros on Tuesday September 08, 2015 @04:18PM (#10187984)
in fact, to my surprise, I've just tested our app (v0.10.x in production) on v4.0.0 and all our unit tests pass, the server works...

I'm amazed. A single module had to be bumped (Elasticsearch@8) while we directly rely on 50+ third party modules... Our npm-shrinkwrap is 2600 lines long.

That's not really a sign of instability to me, but rather great work

Re:Node v4.0.0 by TheHydroImpulse on Tuesday September 08, 2015 @04:43PM (#10188114)
Most of the instability is related to compiled modules. Hopefully they'll be updated to support v4.0.0 shortly.
Re:Node v4.0.0 by weddpros on Wednesday September 09, 2015 @01:17AM (#10189826)
mongodb and redis are two compiled modules and we didn't have problems with those. Honestly, there may be others, I don't even know!

We try hard to keep our dependencies up to date to limit the risks of an upgrade. We progressively apply dependencies updates to dev->staging->sandbox->production environments.

Was I worried when node.js forked? sure! but the situation is much better now. I think node.js can move forward smoothly now.

Re:Node v4.0.0 by blowski on Tuesday September 08, 2015 @04:26PM (#10188029)
You seemingly have much more experience with Node than me. Perhaps my amateur anecdotes are just bad luck, but certainly my Bash scripts that talk to Node break frequently.
Re:Node v4.0.0 by morgante on Tuesday September 08, 2015 @06:51PM (#10188655)
Bash scripts talking to Node sounds like a recipe for disaster.
Re:Node v4.0.0 by mbrock on Wednesday September 09, 2015 @03:58AM (#10190289)
Why?
Re:Node v4.0.0 by eyko on Wednesday September 09, 2015 @08:33AM (#10191016)
Please explain.
Re:Node v4.0.0 by weddpros on Wednesday September 09, 2015 @01:27AM (#10189856)
I think the npm project should document best practices, like when to use "*" version, when to use npm-shrinkwrap, etc... to limit problems.

NPM is a very powerful tool. In fact, it's our deploy tool: we run `npm install` on servers (private Sinopia npm repository) to deploy. But to do that, you must follow many many rules that are written nowhere.

Re:Node v4.0.0 by vkjv on Wednesday September 09, 2015 @10:18AM (#10191569)
We used to do this and it caused a lot of issues. Shrinkwrap is a must to keep versions stable. NPM and network unreliability can cause failed installs, as well as other issues.

Our first major improvement to this work flow was a tar of the app with all of the dependencies coupled with `npm rebuild` after unpacking. This worked quite well.

However, recently, we have switched to using Docker to generated this sealed packages which is working great.

Re:Node v4.0.0 by weddpros on Wednesday September 09, 2015 @11:12AM (#10191915)
We've never really had a problem... Our sinopia npm server is probably isolating some network problems, plus we don't start/update servers that often.

Our NPM workflow also ensures builds are easy to replicate. Most problems in development occur because of obsolete versions of some packages (our apps contain many private modules)... Clean npm-installs shields us from that in production.

Re:Node v4.0.0 by untog on Tuesday September 08, 2015 @04:08PM (#10187932)
it's difficult to use it for anything serious without investing a lot of time into it.

Isn't that true for many platforms?

Either way, I have multiple apps running Node in production, and I've never had the issues described. You don't have to be as breakneck as Node itself - some things I have are still running v0.10x just fine.

Re:Node v4.0.0 by twblalock on Tuesday September 08, 2015 @05:34PM (#10188336)
I use Java/Spring, Ruby, and Node.js in production, and Node.js is by far the hardest to stay up to date with without introducing major problems. The only framework I have used that is harder to update is Finagle.

It's not just Node itself to blame. There seems to be a culture of breaking things in the Node.js ecosystem. Breaking changes in third-party libraries are common. I have to specify exact dependency versions in my package.json, and almost every time I update one of them, something goes wrong.

Re:Node v4.0.0 by vectorpush on Tuesday September 08, 2015 @07:53PM (#10188878)
In my experience, Ruby (particularly rubygems) is quite a pain in the ass with regard to package upgrades, especially when the previous developer/ops has leveraged rvm to install multiple combinations of ruby/gem versions. I can't tell you how many times I've had to trace down problems in a project because a single gem fails to upgrade/pull/compile/resolve on 2 out of 4 machines even though the project has an identical gemfile and available ruby version on every server.

I contrast this with node/npm where my projects seem to behave identically across deployments (and in some cases, when in a bind, I've even been able to simply tar & scp the project src and have it run without further effort beyond installing node, something I've never been able to do with ruby).

Re:Node v4.0.0 by boundlessdreamz on Wednesday September 09, 2015 @02:19AM (#10190001)
Identical Gemfile.lock and same OS? Then you shouldn't be having any problems. What kind of errors were you getting?
Re:Node v4.0.0 by untog on Tuesday September 08, 2015 @06:12PM (#10188496)
have to specify exact dependency versions in my package.json, and almost every time I update one of them, something goes wrong.

That's where semantic versioning comes in. Most libraries follow it - if the major version number changes, it's a breaking change. If it doesn't, you're safe to upgrade.

Re:Node v4.0.0 by Touche on Tuesday September 08, 2015 @08:39PM (#10189014)
Semantic version doesn't solve compatibility problems, it just makes it more transparent. In some ways semver encourages breaking changes that otherwise might be avoided because, how, a major version bump gives you sufficient warning.

There are some major libraries that are on version 15 or greater... there's nothing good from a user's perspective about having a library they use do a major breaking release every other month.

What's worse is many libraries take advantage of "it's the wild west until 1.0" rule in semver and simple never release a 1.0.

Re:Node v4.0.0 by blowski on Tuesday September 08, 2015 @04:46PM (#10188134)
> Isn't that true for many platforms?

I would say that the ROI is lower for time spent learning Node. I've found that with all the other languages I've learnt, in a couple of days I've been able to build something useful, leave it running in production and reuse skills learned a year later.

With Node, even the name of the language is not stable! A few weeks back I went to install Zombie, and now I have to install iojs and not Node. Assumedly it's now Node again. If you live and breathe the language, subscribe to the mailing lists, go to the meetups, etc, these things might be obvious. But when you're just dipping in and out, it really dents your confidence in the language.

Re:Node v4.0.0 by nilliams on Tuesday September 08, 2015 @05:22PM (#10188275)
Your latter paragraph seems a bit fuddy as people 'just dipping in and out' would never have to have contended with the iojs 'name' any more than Python/Ruby/PHP people have to switch to a different VM every time one is announced (e.g. PyPy/Rubinius/Hack).

I'd agree with your first paragraph in that Node is a bit lower-level out of the box and probably takes more effort to get started building a web-app, but I think the time invested jumping in at that low-level is actually useful vs diving in at a higher 'framework level' with some of the other popular web languages.

Also it does have superior installer/package-manager/deployment stories compared to say ... Python & Django, which does have an impact on ROI.

Re:Node v4.0.0 by blowski on Tuesday September 08, 2015 @05:57PM (#10188429)
> Your latter paragraph seems a bit fuddy as people 'just dipping in and out' would never have to have contended with the iojs 'name' any more than Python/Ruby/PHP people have to switch to a different VM every time one is announced (e.g. PyPy/Rubinius/Hack).

One of my main use cases for Node is Zombie, and that required io.js after v3. No mainstream PHP, Ruby or Python application has required a different interpreter.

Re:Node v4.0.0 by mmebane on Tuesday September 08, 2015 @08:39PM (#10189015)
The io.js situation was more akin to Python 3 vs Python 2 than Python vs PyPy. It might not have looked like a major difference at first glance, but there were notable significant, which came with some breaking under-the-hood changes.
Re:Node v4.0.0 by hcon on Tuesday September 08, 2015 @06:10PM (#10188480)
Sounds to me like your issue is with the author of Zombie.
Re:Node v4.0.0 by Touche on Tuesday September 08, 2015 @10:36PM (#10189366)
Actually it's with jsdom, Zombie's major dependency which dropped Node support pretty soon after IOjs was released.
Re:Node v4.0.0 by WalterSear on Wednesday September 09, 2015 @12:57AM (#10189770)
That sounds political, more than anything else.
Re:Node v4.0.0 by thechriswalker on Wednesday September 09, 2015 @10:02AM (#10191476)
Actually, IIRC it's the exact same reason as the io.js split. The maintainer of jsdom had changes that weren't being merged into node's VM module.

So jsdom 3.x used a lib called "contextify". When io.js was released and the changes included, node support was dropped. Now node 4.0.0 is out and has those changes, jsdom now works on node again.

Re:Node v4.0.0 by lfuller on Wednesday September 09, 2015 @03:52PM (#10194027)
It was. The maintainer of jsdom decided to no longer support node after 3.x and made the library throw a condescending exception if you tried to run it with node. The docs were also filled with childish "tm" symbols whenever node was mentioned.

I see things like this all the time and it really puts me off OSS.