4 ms·
Duncan Coutts has been working on replacing the current fairly brain dead Data.Binary encoding for Haskell by using CBOR [1], which I believe is currently on th
by axman6 11y ago
Duncan Coutts has been working on replacing the current fairly brain dead Data.Binary encoding for Haskell by using CBOR [1], which I believe is currently on the back burner (more important work to be done elsewhere). The results appear very promising and I'd love to see this announcement provide the impetus to keep the work going.
[1] http://code.haskell.org/~duncan/binary-experiment/binary.pdf http://code.haskell.org/~duncan/binary-experiment/binary.pdf
- thesz 11y agoPlease, someone let Duncan know that CBOR encoding is somewhat not as useful as it could be. I twitted about that unusefulness here [1] and here [2]. In short, CBOR orders major types in such a way that if you use memcmp negative integers go as bigger values than positive integers. This breaks important invariant "memcmp ordering as value ordering" which is EXTREMELY useful. If you preserve that invariant then you can sort, index and navigate over compact opaque representation of values without their decoding, saving time and memory. [1] https://twitter.com/sergueyz/status/603491963258740736 https://twitter.com/sergueyz/status/603491963258740736 [2] https://twitter.com/sergueyz/status/603492486191947776 https://twitter.com/sergueyz/status/603492486191947776