News for hackers. Stuff that matters.
Re:Fleece: A super-fast, compact, JSON-equivalent binary dat... by ebb_earl_co on Wednesday December 06, 2023 @05:34PM (#38550426)
Interesting that this is on the front page(ish) at the same time as SQLite’s JSONB announcement.
Re:Fleece: A super-fast, compact, JSON-equivalent binary dat... by paulddraper on Wednesday December 06, 2023 @05:43PM (#38550509)
in what way is that interesting
Re:Fleece: A super-fast, compact, JSON-equivalent binary dat... by paulddraper on Wednesday December 06, 2023 @05:45PM (#38550531)
FWIW the README is excellent. Background, goals, and comparisons.

Also lol

> Q: Why didn't you write this in $NEW_LANGUAGE instead of crufty C++?

> A: I probably should have! $NEW_LANGUAGE is deservedly attracting a lot of attention for its combination of safety, readable syntax, and support for modern programming paradigms. I've been trying out $NEW_LANGUAGE and want to write more code in it. But for this I chose C++ because it's supported on all platforms, lots of people know how to use it, and it still supports high-level abstractions (unlike C.)

Re:Fleece: A super-fast, compact, JSON-equivalent binary dat... by shaftway on Wednesday December 06, 2023 @11:19PM (#38552774)
I'd be curious to see the difference in size / performance with gzipped data in the mix. My guess is that gzipping will make the size difference negligable (may actually be worse in Fleece due to the abundance of pointers that can't be easily compressed). The times might be worse, but if this is intended as a wire format then that might not matter as much.
Re:Fleece: A super-fast, compact, JSON-equivalent binary dat... by jvalencia on Thursday December 07, 2023 @12:09PM (#38558921)
How does it compare to: https://msgpack.org/index.html ?
Re:Fleece: A super-fast, compact, JSON-equivalent binary dat... by c-cube on Thursday December 07, 2023 @05:18PM (#38562602)
It seems to be maybe a bit less compact in terms of absolute number of bytes, but faster to parse. That is, parsing is just one-pass validation, and then data can be read directly from the buffer without an intermediate structure, with random access. It also has a notion of "pointer" so you can introduce sharing (a smart-ish encoder might use that to reuse common keys or strings, making the result smaller).
Re:Fleece: A super-fast, compact, JSON-equivalent binary dat... by Kiuhrly1 on Friday December 08, 2023 @09:46AM (#38569642)
I went down the rabbit hole of trying to find the best binary JSON-ish format a couple of years ago, it's very interesting to compare their different design choices. Having read the specification, this looks to be a fresh and minimalist take on a binary format, which is great.

In general, it seems CBOR won the standardisation and support battle while also being one of the more complex and ambiguous (in terms of the number of ways to encode something) formats. I think MessagePack is nicer, though I still wish UBJSON caught on.