about summary refs log tree commit diff
path: root/fun/wallpapers/by_gathering3_2880.webp (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-01-31 r/2169 refactor(users/Profpatsch/read-http): parse headers as utf8Profpatsch1-9/+11
Headers should always be ASCII, so let’s crash if they are not. The thing gets a lot easier to use, and clients who fail this restriction can just fuck off. Also actually print the results to stdout instead of stderr … Change-Id: I782c96c537ae11b541175e96453c4114e0a71b05 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2451 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-31 r/2168 fix(users/Profpatsch/lib): eprintenv should exec into progProfpatsch1-1/+1
Change-Id: I2eab4ce24871121381011c1cfc8ef5e042502cb2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2450 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-31 r/2167 refactor(users/Profpatsch): move arglib_netencode into its own libProfpatsch2-21/+43
arglib is the simple idea of passing structured data via a conventional environment variable instead of implementing an optparser for every little tool. Pop the envvar, decode the contents, return the contents. Change-Id: Ie44148293a58aae9a0a613895176227d43b491bb Reviewed-on: https://cl.tvl.fyi/c/depot/+/2449 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-30 r/2166 feat(nix): add nix.tag, a way of discriminating via tagged unionsProfpatsch2-0/+237
Introduces the concept of a “tag”, a single-keyed attrset which annotates a nix value with a name. This can be used to implement tagged unions (by implying the list of possible tags is well-known), which has some overlap with how `nix.yants` does it. However, the more fascinating use-case is in concert with a so-called discriminator, `match` and hylomorphisms. The discriminator can take a nix value, and add tags to it based on some predicate. With `match`, we can then use that information to convert the discriminated values again. With `hylo`, we can combine both the “constructive” discriminator step with the “destructive” match step to recursively walk over a nix data structure (based on a description of how to recurse, e.g. through attrset values or list values), and then apply a transformation in one go. Change-Id: Ia335ca8b0881447fbbcb6bcd80f49feb835f1715 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2434 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-01-30 r/2165 feat(nix/readTree): add tests of the traversal logic in READMEProfpatsch15-1/+95
This should closely match the documented behaviour. It might still be missing some edge cases of course. Change-Id: I5c75fa045d5f3be8cf5eab787a02644500c14522 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2466 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-30 r/2164 feat(nix/readTree): add tests of the README exampleProfpatsch7-0/+47
First step to slowly giving readTree some coverage, so we can do refactoring without breaking functionality. Change-Id: If25a8c0fa9c4ac7472c0473372f10a9326cccaf7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2465 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-30 r/2163 chore(nix/readTree): move function into __functorProfpatsch1-12/+13
We are going to export some tests under `nix.readTree.tests`, so in order to do that and still have `nix.readTree` be a function, let’s move it to `__functor`. This requires wiring the `args` and `initPath` arguments through explicitly. Change-Id: Ife7956b85d35e59c22174b42dcb7cca83ed868ea Reviewed-on: https://cl.tvl.fyi/c/depot/+/2464 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-30 r/2162 feat(nix/runTestsuite): add assertThrowsProfpatsch1-4/+22
Uses `builtins.tryEval` to check that the expression throws when `deepSeq`-ed. Change-Id: I0d57cc37f473bb733f57a1b1c0d889084152fd2f Reviewed-on: https://cl.tvl.fyi/c/depot/+/2463 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-01-30 r/2161 fix(nix/runTestsuite): wrap runTestsuite into derivationProfpatsch1-8/+26
Previously we would throw or return `{}`, which doesn’t integrate nicely into our C