!VRULIdgoKmKPzJZzjj:nixos.org

Nix Package Manager development

836 Members
For people hacking on Nix: https://github.com/NixOS/nix Nix maintainers can be reached here.180 Servers

Load older messages


SenderMessageTime
30 Jul 2025
@Ericson2314:matrix.orgJohn Ericsonit is a formalization of sort of the "obvious" way to do binary representations of algebraic data types15:17:12
@Ericson2314:matrix.orgJohn Ericsonno string tags, no self description, everything is ordered (products have a left side and right side, the variants of the sum types are totally ordered and assigned 0 1 2 3 4....)15:17:52
@Ericson2314:matrix.orgJohn Ericsonit is basically what you would get on the heap too, except there is no padding/alignment, so you can't just cast it captn-proto style in general15:18:19
@Ericson2314:matrix.orgJohn Ericson* it is basically what you would get on the heap (if no pointers) too, except there is no padding/alignment, so you can't just cast it captn-proto style in general15:19:00
@magic_rb:matrix.redalder.orgmagic_rbIll read up more on it, its good to know about this stuff, for when you need a binary format15:20:03
@emilazy:matrix.orgemily yeah. there are more and less rigorous standards about it though. (e.g. https://preserves.dev/canonical-binary.html again as an exemplar.) but anyway I'd just be repeating what I said overviewing a whole bunch of formats last time I think :) 15:21:33
@emilazy:matrix.orgemilyFWIW protobufs are worse at canonicalization than most formats IIRC15:22:05
@emilazy:matrix.orgemilyhttps://protobuf.dev/programming-guides/serialization-not-canonical/15:22:14
@emilazy:matrix.orgemily"Inherent Barriers to Stable Serialization" :)15:22:27
@fzakaria:one.ems.hostfzakariamakes sense; i would probably calculate my own stable key15:23:42
@fzakaria:one.ems.hostfzakaria* makes sense; i would probably calculate my own stable key off the requisite fields15:23:53
@fzakaria:one.ems.hostfzakariai have rarely ever used the serialization format itself as inputs to things15:24:37
@Ericson2314:matrix.orgJohn Ericsonis this preserves thing widely implemented?15:24:44
@fzakaria:one.ems.hostfzakariabut maybe its because i never have canonicalization :P15:24:50
@Ericson2314:matrix.orgJohn EricsonI would like to make it easier to implement "nixlets"15:25:00
@emilazy:matrix.orgemily

no, as I said ecosystem is the main drawback. it's being used in the OCapN effort to standardize CapTP between Agoric/Spritely/I think Cap'n Proto too, and it's used in https://syndicate-lang.org, but it's not the kind of thing you'd expect to find a library in any random language for. I'm not sure what the "second-best" thing is. maybe "whichever of the several CBOR canonical forms is what CTAP uses", but IIRC that's specifically not the RFC one, so that's a nightmare.

I don't know about BCS but at a glance it seems like it does a reasonable job, assuming everyone agrees on what the format actually is. it's not self-describing though, so extensibility will indeed suffer

15:28:27
@Ericson2314:matrix.orgJohn Ericsonyeah I don't think we can use BCS15:29:18
@Ericson2314:matrix.orgJohn Ericsonit would not be good to use a map for an extensible struct15:30:44
@Ericson2314:matrix.orgJohn Ericsonbecause one then gets unnecessary enum tags on the values, which hinders extensibility15:31:00
@Ericson2314:matrix.orgJohn Ericson(you can freely choose your own not-yet-used key, but you need to also choose a not-yet-used enum tag, which is harder)15:31:23
@magic_rb:matrix.redalder.orgmagic_rbNDBF - Nix Derivation Binary Format17:00:42
@flokli:matrix.orgfloklihttps://xkcd.com/927/22:35:11
31 Jul 2025
@ashkaashh:matrix.orgAshKaashh joined the room.22:51:16
@fzakaria:one.ems.hostfzakariaI worked with Yannik on a small test -- https://github.com/NixOS/nix/pull/13673 Small but maybe interesting.23:28:29
@fzakaria:one.ems.hostfzakariainteresting change is making "ref" available to the flake attributes. I only include if impure.23:28:58
1 Aug 2025
@mel05saq:inphima.de@mel05saq:inphima.de left the room.12:13:53
2 Aug 2025
@sorimaxuki:matrix.org@sorimaxuki:matrix.org joined the room.01:18:20
@sorimaxuki:matrix.org@sorimaxuki:matrix.org left the room.01:23:14
@sinan:sinanmohd.comsinan changed their profile picture.06:58:39
@sinan:sinanmohd.comsinan 06:58:46

Show newer messages


Back to Room ListRoom Version: 6