News for hackers. Stuff that matters.
Re:MessagePack: like JSON, but fast and small by Minor49er on Tuesday March 10, 2020 @04:18PM (#22539248)
1. You could use a float. 2. Probably in the documentation of whatever it is that's using it
Re:MessagePack: like JSON, but fast and small by ci5er on Tuesday March 10, 2020 @04:35PM (#22539400)
Floats are ugly because the distance between any two successive numbers are not the same. This makes them inappropriate for discretized time and anything accounting-related (money).
Re:MessagePack: like JSON, but fast and small by nitrogen on Tuesday March 10, 2020 @04:30PM (#22539357)
Epoch floats and doubles are not good for timestamps, as the further we get from 1970 the less precise they become.

Current precision with a 32-bit float (JSON/JavaScript are 64-bit usually, though in non-JS it's common to use Bigdecimal in slight non-compliance) is much worse than one second.

Re:MessagePack: like JSON, but fast and small by stickfigure on Tuesday March 10, 2020 @04:49PM (#22539543)
> in the documentation of whatever it is that's using it

That's the point, timestamps should be self-describing. If "look up the structure in documentation" suffices we might as well just use protobufs.

Re:MessagePack: like JSON, but fast and small by eyelidlessness on Tuesday March 10, 2020 @05:31PM (#22539946)
1. YUK 2. ISO 8601 is a better format for this.