1. 9

    Msgpack has the same flaw that a lot of other binary-JSON formats do: no random access. Since array and object items are variable length, the only way to find item N is to parse and skip items 0…N-1. Recursively. This means that for most practical purposes, you need to convert the whole thing into a native collection tree (Array, HashMap, NSDictionary, etc.) This is many times more expensive than the actual data parsing since it involves allocating memory and constructing objects.

    The two formats I know of that avoid this are Google’s FlexBuffers and my own (well, Couchbase’s) Fleece. They both use internal ‘pointers’ (offsets) to create fixed-width arrays and key/value mappings. This allows them to avoid creating objects; instead you can just work directly with interior pointers in the data, which has almost zero overhead.

    1. 2

      It won’t obviously be as fast as a format you can random access, but I wrote a CBOR parser that is stack/recursing based with no mem usage: https://github.com/quartzjer/cb0r/blob/master/src/cb0r.c

      It’s primarily for constrained embedded use-cases where CBOR is an excellent fit.

    1. 3

      I have two, one is a remote logging/programming device attached to some work hardware via a JLink, and the other is my new personal home XMPP/Jabber server running Prosody (with free DNS via Cloudflare and port forwarding on my home NAT/router).

      1. 2

        I used to do distributed systems resilience consulting for a few different blockchain projects. I never saw an anti-sybil mechanism that wasn’t easily gamable with relatively simple race conditions or a rich person splitting their account into many small ones to gain more votes for gaming whatever anti-concentration or democratic mechanisms the specific network is trying to incentivize. Can anyone today with a straight face say that this issue is addressed by a non-government/strong KYC mechanism?

        1. 1

          I don’t have anything to add other than I’ve been down the same path and I agree, I haven’t seen anything that doesn’t ultimately end up with some form of governance/KYC. I do want a verifiable and trust-building solution to exist though.

          1. 1

            The GNUnet project implements a Sybil-resistant DHT, and tries to prevent Sybil attacks on other layers as well. See this paper (PDF) and try searching for “sybil” if you’re interested.

            1. 1

              GNUnet forces participants to calculate a small hash, basically bitcoin-style but cheap enough that the weakest “legitimate user” of the system can still do it. Maybe that’s fine for GNUnet, but once there are any sort of significant decision happening based on client participation, it becomes very difficult to make a system that can protect itself from a rich person forcing that decision to happen in a way that causes them to become even richer.

          1. 2

            If you like nerd history or have spent any time in the embedded world, you’ll really enjoy this video :)

            1. 8

              I plan on spending some time with KiCad, I want to build up enough experience to start making boards for my own experiments with low level UHF/RFID tech.

              1. 1

                I had a lot of fun making a two layer board with kicad, and want to build some more boards with it now.

              1. 3

                Busy tuning firmware to drive a Cat-M1 module on a new board, loving working on hardware!