• Eric Myhre's avatar
    Hej, we've got tokenization. · 027146d7
    Eric Myhre authored
    You could now readily rig up the ipldfree.Node implementation to a
    refmt cbor.TokenSink, for example, and go to town.  (At the moment,
    doing so is left as an exercise to the reader.  We'll make that a
    smooth built-in/one-word function at some point, but I'm not yet sure
    exactly how that should look, so it's deferred for now.)
    
    While working on this, a lot of other things are cooking on simmer:
    I'm churning repeatedly over a lot of thoughts about A) API semantics
    in general, B) how to cache CIDs of nodes, and C) how to memoize
    serializations / reduce memcopies during partial tree updates...
    And (unsurprisingly) I keep coming back to the conclusion that the API
    for dang near everything should be immutable at heart in order to
    keep things sane.  The problem is figuring out how to pursue this
    A) efficiently, B) in tandem with reasonably low-friction nativeness
    (i.e. I want autocompletion in a standard golang editor to be as useful
    as possible!), and C) given an (as yet) lack of good builder or
    mutation-applier patterns.  ipldbind was meant to be a solution to the
    majority of the B and C issues there, but that rubs smack against the
    grain of "let's be immutable" in golang >:/  So... a rock and a hard
    place, in short.
    Signed-off-by: default avatarEric Myhre <hash@exultant.us>
    027146d7
node.go 3.79 KB