Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
What’s new in Node v0.10? (strongloop.com)
47 points by sickeythecat on March 11, 2013 | hide | past | favorite | 49 comments


So a readable stream is an EventEmitter, but it's not recommended that you actually listen for 'data' events? (Instead you're supposed to call read()?) That seems ... counterintuitive.

Anyone know what you're supposed to do if you have code with multiple listeners for 'data' events?


If you add a listener for 'data', or call stream.resume() then it'll start flowing data as it receives it, just like v0.8 and before. The only caveat is that listening for 'end' will not automatically start the flow of data, so you do sometimes have to either call resume() or add a data listener.

In practice, it's rare that you care about the end of the stream, but not about the data coming through it, except in tests.

tl;dr Your existing programs will almost certainly Just Work.


Thanks. Is there any significant performance difference? (I'm wondering if it makes sense to roll my own "proxy" converting read()s to emit()s.)


No, it does not make sense to roll your own proxy turning read() calls into emits. You probably won't get it to go faster than it does now. Whether you use on('data') or read(), you get equivalent performance.


Look here for a detailed analysis of benchmarks. http://blog.nodejs.org/2013/03/11/node-v0-10-0-stable/

From that post, their focus is on v0.12 and then v1.0. Nice to see we're getting to that stage.


After 9 months all we get is a new streams interface?


Given how all manner of languages, libraries and frameworks tend to massively sprawl over time, keeping the growth of core components down is a good idea.


First, it's a very nice new streams interface. Second, the core functionality can't change that much at this point if people want their old code to work. Read the discussion of streams2 and see how much thought went into avoiding breakage. http://blog.nodejs.org/2012/12/20/streams2/


v0.10 comes after v0.8(0)? That's like launching Chrome v3 after Chrome v25.


0.10 != 0.1, in the same way that 0.8 != 0.80


Could you explain that?, because if you're right I been wrong my whole life.


http://semver.org/

the version number is a tuple, not a decimal, encoded with dots as field separators.

0.10 is an encoding for (0, 10). So 0.10 > 0.9, and 3.7.4a makes perfect sense.

edit: furthermore version number ordering has additional complexity: 3.7.4a < 3.7.4


Version numbers are not numbers. How would you explain, for example, Chrome's version 24.0.1312.57?

Dots separate logical numberings, like version, patch, bugfix, etc. So 3.0 goes after 2.0 And 2.0.2 after 2.0.1. And 1.10 after 1.9.


´n.n.n.n´ where the dot does not represent decimal notation but a less significant variation (of the software) than the previous number. This is universally true for the first two numbers but not always for the rest.


It probably would have been better to say v0.10 != v0.1, since obviously "0.10 != 0.1" is a misleading statement.


Thank you all for your explanations, but this was exactly what I meant.


Please don't do this; it's annoying and unnecessary. The context for untog's comment was quite clear. A lot of folks wasted time trying to clarify something for you.


<integer>.<integer>


In other words, not <integral>.<fractional>

This should be fairly clear given your typical version number takes the form of <integer>.<integer>.<integer> which can't possibly be mistaken for a decimal fraction.


> This should be fairly clear given your typical version number takes the form of <integer>.<integer>.<integer>

With letters, short hashes or even whole words thrown in.


here, the dot is not used to separate integers from decimals, just to separate two integer numbers. This is common practice in software projects (http://en.wikipedia.org/wiki/Software_versioning#Incrementin...)


That's not the role of the dot in ordinary decimal expansions either. There its role is to mark where the sequence transitions from positive powers of ten (to its left) to negative powers of ten (to its right).


Version 0.8 isn't version 0.80. A version number is a sequence of natural numbers, ordered lexicographically and written with periods separating elements. The version (x1, x2, ...) compares to the version (y1, y2, ...) as follows: If x1 =/= y1, then whichever of x1 and y1 is bigger decides which version is the highest. Otherwise, recurse and compare the versions (x2, x3, ...) and (y2, y3, ...).

You can think of a decimal number in the same way (well, leaving out some minor technicalities with numbers requiring infinite expansions here), but you then have to allow only numbers between 0 and 9 (inclusive) in your sequence. Let's leave out positive numbers (because otherwise we'd have to grow sequences in both directions from the decimal point, which is an annoying technicality). Then 0.12345 is simply the sequence (1, 2, 3, 4, 5), which in version notation is 0.1.2.3.4.5. On the other hand, decimal 0.80 is version 0.8.0, not version 0.80.

Really, all in all, version numbers are just decimal expansions, except that we leave out the equivalence relation that says that, for example, 10x10^1 is the same as 1x10^2. So while 0.8.0 and 0.80.0 are distinct version numbers, they collapse to the same value as real numbers (or you might want to collapse 0.80.0 to 8.0 -- it doesn't matter, that's all a matter of taste).



It's a 3-tuple, not a float.


The version is not a decimal but a dot delimited list of integers. Which gives you 10 > 8.


Not sure if trolling…


By reading some of the gems around here, apparently not. Example:

> A version number is a sequence of natural numbers ordered lexicographically.

I need a new rage face for expressing this.


I'm sorry I made you angry. But leaving out versioning schemes in which 0.1 and 0.10 are in fact considered the same, and leaving out letters and stuff (which are trivially encoded in scheme you quote anyway), this is what a version number is, in its general sense.


"Rage faces" aren't necessarily composed only of "rage". Explained in the other comment why this actually isn't lexicographic sorting.


I agree, if they're doing that, then v0.8 should actually have been v0.08


What if they happen to reach 100 on the minor version, should they've named it "1.008" just in case? And if it reaches 1000?


Actually, I prefer the YY.MM format of versioning (like Ubuntu .)


There are cases for both, IMO. The YY.MM model doesn't communicate when an upgrade is major and when it's just a minor change.


It's major.minor.revision, not decimal.


Thus why versions should be stored as strings or several integers, not floats.


Then again, it's not like you can store 0.1.3 as a float.

On the other hand, some version numbers can be stored as floats (kind-of, to a point): Knuth's software is versioned using approximations of irrational numbers, the more digits the later the version. TeX's current version is 3.1415926 and METAFONT's is 2.718281. Both can be stored as floats, although the respective and eventual π and e can't be.


I think you're thinking about decimal expansions, not IEEE 754 floats. Most (almost all) prospective TeX version numbers cannot be stored accurately as floats, but they can as decimal expansions.


v0.8 < v0.10 < ... < v0.80. God damn math.


It's not meant to be a decimal number. A version number is a sequence of natural numbers ordered lexicographically.


Do you have _any_ standard to back up that claim or you're pulling that out of nowhere like the rest of the down-voter crowd? Besides, in the node.js community the semantic versioning is accepted as standard. npm is the default tool for managing packages. For reference: http://semver.org/


The claim that version numbers aren't the same as decimal expansions of real numbers? Yes, well, the link you just provided gives evidence for that. I'm not familiar with semantic versioning, but as far as I can tell, one element of it is version numbers being triples of natural numbers. Well then, at least in the case you're talking about, version numbers aren't the same as decimal expansions of real numbers.

In general, I would argue version numbers are sequences of natural numbers ordered lexicographically. That means they're not the same as decimal expansions of real numbers.


If you look at my comparison, you can see that it isn't a decimal number. I said (dropping the v prefix, that may bee to subtle for HN): 0.8 < 0.10 < 0.80. In decimal that would be: 0.8 < 0.1 < 0.8 - the comparison doesn't work this way (duh). But it isn't lexicographic sorting either. This sequence: 0.8, 0.80, 0.2, 0.20 has this lexicographic order: 0.2, 0.20, 0.8, 0.80, while a proper version ordering is to compare the stuff after the dot aka 2 < 8 < 20 < 80.


huh so these strongloop guys are the new node maintainers?


No.

StrongLoop employs 2 node core committers, Ben Noordhuis and Bert Belder, who are also two of the most active libuv committers. (They have other folks that work there, of course, but those two also work on Node itself quite a lot.)

Joyent still is the custodian and IP owner of the Node.js project. They pay me to work on node, and also provide the project with marketing, legal, hosting, and other resources. Joyent also uses Node extensively in their technology stack, and builds tools to debug their own and their customers' production Node applications.

StrongLoop will be providing support to users of their Node Distro, which bundles v0.10 with a few battle-tested npm modules.

Joyent and StrongLoop are very different companies, and while they're not officially partners, that I'm aware of, they are certainly not competitors in any sense.


As I read it, Joyent relicenses the IP under MIT, so although they may be the IP "owner" they immediately give anyone a license to do pretty much whatever with the code.

Definitely appreciate that they pay you to work on it. Appreciate that there are new companies in the ecosystem too.

And finally someone who looks like they are going to support Node on Windows and Linux!


The node team has supported Windows since 0.6, and Linux forever.

StrongLoop Node is a bundled distro with modules etc that they're going to support as well.


“For those looking for commercial support, StrongLoop (Ben Noordhuis & Bert Belder's company) has released a distribution containing node v0.10 that they will support on Windows, Mac, Red Hat/Fedora, Debian/Ubuntu and multiple cloud platforms. You can download their Node distribution here.” —http://blog.nodejs.org/2013/03/11/node-v0-10-0-stable/


W00t!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: