| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This is an experiment about whether we can get away with using the
non-recursive version by default.
The U::Record variant uses a Vec instead of a HashMap by default, to
make encoding from lists easier, and keep the ordering as given.
|
| |
|
|
|
|
|
| |
We can define a more or less complete generator in less than 50 lines
of nix. Nice.
|
| |
|
| |
|
|
|
|
|
| |
Instead of adding a new type, it just uses the 2^1 natural, which has
exactly two possibilities.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The “shallow” parser uses the fact that every netencode value is
length-encoded (or a scalar with a fixed length).
It does not need to parse the inner values in order to get the
structure of the thing.
That means that we can implement very fast structure-based operations,
like “take the first 5 elements of a list” or “get the record value
with the key name `foo`”.
We can even do things like intersperse elements into a list of values
and write the resulting netencode structure to a socket, without ever
needing to copy the data (it’s all length-indexed pointers to bytes).
|
|
Less generic, has the spirit of “netstrings, but extended to a
structured encoding format”.
|