Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by zitterbewegung on Saturday January 01, 2022 @09:54AM
(#29758746)
The only reason I can think of is that storing a version as a number would allow you to check if your version is incompatible with another server or feature / extension. By using less than or greater than.
[ Parent
| on HN ]
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by ilikehurdles on Saturday January 01, 2022 @10:07AM
(#29758919)
Not necessarily.
2.2 is greater than 2.12 but v2.2 is actually an early predecessors to v2.12
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by mmis1000 on Saturday January 01, 2022 @10:14AM
(#29759007)
That would work if padding is always forced (like date).
And in this case, it actually is.
2.02 is smaller than 2.12
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by pfooti on Saturday January 01, 2022 @10:17AM
(#29759045)
Best hope you don't end up releasing 2.100 then
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by mmis1000 on Saturday January 01, 2022 @10:41AM
(#29759357)
It can also ends up as 2.99.01. Jokes aside, there is another bug caused by some poor programmer hard-coded the length of version field recently. https://news.ycombinator.com/item?id=29702128
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by zmmmmm on Saturday January 01, 2022 @08:16PM
(#29764715)
that is exactly why you would create a transformation to something like a big fat integer with each segment of the version number isolated to separate parts of the bit mask so you can compare it as an integer.
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by frays on Saturday January 01, 2022 @09:58AM
(#29758804)
If they were stored as characters you could still do a string comparison using greater than and less than signs and logic.
"202201010001" > "202112122359"
evaluates to True in Python, SQL and many other languages.
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by oefnak on Saturday January 01, 2022 @10:10AM
(#29758955)
But "1000"<"999" in Python.
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by laumars on Saturday January 01, 2022 @10:18AM
(#29759062)
String comparison works as long as you order your date time by significance and zero pad all values, which they were doing with their date stamp anyway.
Plus if they weren’t then even numerical comparisons would fail eg 1012021 (Oct/1/2021) < 5102020 (May/10/2020) so you argument is moot.
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by jpambrun on Saturday January 01, 2022 @10:17AM
(#29759044)
This is going to be a problem in about 8,000 years tho.
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by 6c696e7578 on Saturday January 01, 2022 @11:26AM
(#29759890)
Wouldn't it be done more like this though?
"%04d%02d%02d" % (999,1,1)
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22
by thomasfedb on Saturday January 01, 2022 @10:15AM
(#29759021)
But the format and length for these numerical strings is fixed.