tvl-depot/users
Profpatsch 59a9955d75 feat(users/Profpatsch/netencode): fully streaming parser
In order to arbitrarily split netencode over multiple reads, we need
to make the parser completely streaming, so that it recognizes all
cases where it needs more input.

Luckily, this is fairly trivial, after working around a bunch of
overeager parsing.

The tricky part was the giant `alt`, where inner parsers would start
consuming input and thus become incomplete when they fail afterwards.
Sinc the format *always* starts the different types with one
discriminator char, we can use that to instantly return the parser and
try the next one instead.

The other tricky part was that lists and records would parse all inner
elements and then choke on the empty string after the last element,
because the inner parser would consume at least the descriminator, and
an empty string is always `Incomplete`. We wrap these into a small
combinator which plays nice with `many0` in that regard.

Change-Id: Ib8d15d9a7cab19d432c6b24a35fcad6a5a72b246
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2704
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-01 07:28:07 +00:00
..
cynthia feat(cynthia): add SSH CA 2020-09-27 23:14:12 +00:00
edef fix(edef/keys): add readTree header 2020-08-05 02:21:47 +00:00
ericvolp12 chore(users/ericvolp12): Create ericvolp12 user directory and OWNERS file 2020-06-16 02:37:07 +00:00
eta feat(whitby): add eta 2020-08-17 22:27:25 +00:00
firefly feat(users/firefly): initialize with key for as 2020-09-28 13:41:40 +00:00
flokli feat(ops/nixos/whitby): add flokli user 2021-03-26 20:31:48 +00:00
glittershark feat(gs/emacs): Add terraform config 2021-03-30 22:50:37 +00:00
isomer chore(whitby): Move isomer's SSH key to user directory 2020-07-23 19:32:15 +00:00
lukegb chore(lukegb): add keys.clouvider-lon01-nix 2020-11-30 23:18:39 +00:00
Profpatsch feat(users/Profpatsch/netencode): fully streaming parser 2021-04-01 07:28:07 +00:00
qyliss feat(whitby): Add SSH key for qyliss 2020-07-23 19:37:09 +00:00
riking feat(u/riking/dotfiles): add tmux.conf 2021-03-01 22:31:13 +00:00
sterni feat(users/sterni/htmlman): hyperlink .Xr macro in output 2021-03-11 14:31:19 +00:00
tazjin chore(tverskoy): Disable networking.firewall 2021-03-30 10:54:38 +00:00
tvlbot.jpg chore(users/tazjin): Add avatar for tvlbot 2020-06-14 22:23:04 +00:00