News for hackers. Stuff that matters.
Re:What’s new in Node v0.10? by mtgx on Monday March 11, 2013 @12:00PM (#5357527)
v0.10 comes after v0.8(0)? That's like launching Chrome v3 after Chrome v25.
Re:What’s new in Node v0.10? by untog on Monday March 11, 2013 @12:07PM (#5357597)
0.10 != 0.1, in the same way that 0.8 != 0.80
Re:What’s new in Node v0.10? by taytus on Monday March 11, 2013 @12:27PM (#5357753)
Could you explain that?, because if you're right I been wrong my whole life.
Re:What’s new in Node v0.10? by masklinn on Monday March 11, 2013 @12:54PM (#5357979)
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

Re:What’s new in Node v0.10? by adlpz on Monday March 11, 2013 @12:35PM (#5357832)
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.

Re:What’s new in Node v0.10? by jQueryIsAwesome on Monday March 11, 2013 @01:27PM (#5358222)
´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.
Re:What’s new in Node v0.10? by jordan0day on Monday March 11, 2013 @12:54PM (#5357980)
It probably would have been better to say v0.10 != v0.1, since obviously "0.10 != 0.1" is a misleading statement.
Re:What’s new in Node v0.10? by taytus on Monday March 11, 2013 @01:03PM (#5358039)
Thank you all for your explanations, but this was exactly what I meant.
Re:What’s new in Node v0.10? by libria on Monday March 11, 2013 @03:20PM (#5359004)
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.
Re:What’s new in Node v0.10? by bpierre on Monday March 11, 2013 @12:31PM (#5357795)
<integer>.<integer>
Re:What’s new in Node v0.10? by sjwright on Monday March 11, 2013 @12:39PM (#5357866)
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.

Re:What’s new in Node v0.10? by masklinn on Monday March 11, 2013 @12:52PM (#5357958)
> 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.

Re:What’s new in Node v0.10? by jackbravo on Monday March 11, 2013 @12:34PM (#5357820)
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...)
Re:What’s new in Node v0.10? by homeomorphic on Monday March 11, 2013 @02:00PM (#5358498)
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).
Re:What’s new in Node v0.10? by homeomorphic on Monday March 11, 2013 @12:40PM (#5357873)
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).

Re:What’s new in Node v0.10? by cristiantincu on Monday March 11, 2013 @12:26PM (#5357738)
Re:What’s new in Node v0.10? by IsaacSchlueter on Monday March 11, 2013 @01:07PM (#5358070)
It's a 3-tuple, not a float.
Re:What’s new in Node v0.10? by asafh on Monday March 11, 2013 @12:11PM (#5357630)
The version is not a decimal but a dot delimited list of integers. Which gives you 10 > 8.
Re:What’s new in Node v0.10? by rydgel on Monday March 11, 2013 @12:18PM (#5357684)
Not sure if trolling…
Re:What’s new in Node v0.10? by 1SaltwaterC on Monday March 11, 2013 @01:39PM (#5358315)
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.

Re:What’s new in Node v0.10? by homeomorphic on Monday March 11, 2013 @02:09PM (#5358557)
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.
Re:What’s new in Node v0.10? by 1SaltwaterC on Tuesday March 12, 2013 @03:00AM (#5360629)
"Rage faces" aren't necessarily composed only of "rage". Explained in the other comment why this actually isn't lexicographic sorting.
Re:What’s new in Node v0.10? by aviraldg on Monday March 11, 2013 @12:12PM (#5357642)
I agree, if they're doing that, then v0.8 should actually have been v0.08
Re:What’s new in Node v0.10? by epidemian on Monday March 11, 2013 @12:27PM (#5357748)
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?
Re:What’s new in Node v0.10? by aviraldg on Monday March 11, 2013 @12:33PM (#5357812)
Actually, I prefer the YY.MM format of versioning (like Ubuntu .)
Re:What’s new in Node v0.10? by untog on Monday March 11, 2013 @12:54PM (#5357973)
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.
Re:What’s new in Node v0.10? by neave on Monday March 11, 2013 @12:09PM (#5357612)
It's major.minor.revision, not decimal.
Re:What’s new in Node v0.10? by aneth4 on Monday March 11, 2013 @12:15PM (#5357660)
Thus why versions should be stored as strings or several integers, not floats.
Re:What’s new in Node v0.10? by masklinn on Monday March 11, 2013 @12:55PM (#5357990)
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.

Re:What’s new in Node v0.10? by homeomorphic on Monday March 11, 2013 @01:28PM (#5358226)
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.
Re:What’s new in Node v0.10? by 1SaltwaterC on Monday March 11, 2013 @12:07PM (#5357604)
v0.8 < v0.10 < ... < v0.80. God damn math.
Re:What’s new in Node v0.10? by homeomorphic on Monday March 11, 2013 @12:31PM (#5357800)
It's not meant to be a decimal number. A version number is a sequence of natural numbers ordered lexicographically.
Re:What’s new in Node v0.10? by 1SaltwaterC on Monday March 11, 2013 @01:33PM (#5358263)
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/
Re:What’s new in Node v0.10? by homeomorphic on Monday March 11, 2013 @01:52PM (#5358422)
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.

Re:What’s new in Node v0.10? by 1SaltwaterC on Tuesday March 12, 2013 @02:57AM (#5360620)
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.