
Libcbor – CBOR implementation for C and others - pjk
http://libcbor.org/
======
axman6
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
Please, 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)

------
the_angry_angel
I found a previous discussion on CBOR fairly insightful from 572 days ago -
[https://news.ycombinator.com/item?id=6632576](https://news.ycombinator.com/item?id=6632576)

------
michaelmior
I wrote some Python bindings[0] for fun some time ago. I never did get around
to implementing the full spec. I never did get around to implementing the full
spec, but I did enjoy parsing the tests directly from the RFC.

[0]
[https://github.com/michaelmior/pycbor](https://github.com/michaelmior/pycbor)

------
c-rack
See [http://cbor.io/](http://cbor.io/) for details about RFC 7049 "Concise
Binary Object Representation" (CBOR)

