5 ms·
v0.10 comes after v0.8(0)? That's like launching Chrome v3 after Chrome v25.
by mtgx 14y ago
v0.10 comes after v0.8(0)? That's like launching Chrome v3 after Chrome v25.
- untog 14y ago0.10 != 0.1, in the same way that 0.8 != 0.80
- taytus 14y agoCould you explain that?, because if you're right I been wrong my whole life.
- bpierre 14y ago<integer>.<integer>
- sjwright 14y agoIn 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.
- masklinn 14y ago> 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.
- jackbravo 14y agohere, 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#Incrementing_sequences http://en.wikipedia.org/wiki/Software_versioning#Incrementin...)
- homeomorphic 14y agoThat'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).
- adlpz 14y agoVersion 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.
- jQueryIsAwesome 14y ago´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.
- deleted 14y ago[deleted]
- masklinn 14y agohttp://semver.org/ 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
- jordan0day 14y agoIt probably would have been better to say v0.10 != v0.1, since obviously "0.10 != 0.1" is a misleading statement.
- 1SaltwaterC 14y agov0.8 < v0.10 < ... < v0.80. God damn math.
- homeomorphic 14y agoIt's not meant to be a decimal number. A version number is a sequence of natural numbers ordered lexicographically.
- 1SaltwaterC 14y agoDo 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/ http://semver.org/
- homeomorphic 14y agoThe 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.
- 1SaltwaterC 14y agoIf 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.
- neave 14y agoIt's major.minor.revision, not decimal.
- deleted 14y ago[deleted]
- asafh 14y agoThe version is not a decimal but a dot delimited list of integers. Which gives you 10 > 8.
- aviraldg 14y agoI agree, if they're doing that, then v0.8 should actually have been v0.08
- epidemian 14y agoWhat 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?
- aneth4 14y agoThus why versions should be stored as strings or several integers, not floats.
- masklinn 14y agoThen 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.
- homeomorphic 14y agoI 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.
- rydgel 14y agoNot sure if trolling…
- 1SaltwaterC 14y agoBy 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.
- homeomorphic 14y agoI'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.
- 1SaltwaterC 14y ago"Rage faces" aren't necessarily composed only of "rage". Explained in the other comment why this actually isn't lexicographic sorting.
- cristiantincu 14y agohttp://semver.org/ http://semver.org/
- homeomorphic 14y agoVersion 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).
- IsaacSchlueter 14y agoIt's a 3-tuple, not a float.