!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

863 Members
For people hacking on the Nix package manager itself186 Servers

Load older messages


SenderMessageTime
30 Jul 2025
@Ericson2314:matrix.orgJohn EricsonI guess the calendar is not updated still14:57:44
@Ericson2314:matrix.orgJohn Ericsonhttps://github.com/nlohmann/json/discussions/261214:57:48
@Ericson2314:matrix.orgJohn Ericsonso maybe we should use that for the new derivation format14:57:55
@Ericson2314:matrix.orgJohn Ericsoncanonical and easy to read14:58:01
@Ericson2314:matrix.orgJohn Ericsonfrankly, I don't think non-canonical would cause issues, because it is fine to have fewer cache hits14:58:24
@Ericson2314:matrix.orgJohn Ericsonbut it do feel better with it14:58:28
@Ericson2314:matrix.orgJohn Ericson* frankly, I don't think non-canonicity would cause issues, because it is fine to have fewer cache hits14:58:49
@Ericson2314:matrix.orgJohn Ericsonoh the RFC exists, but nlohmann doesn't yet implement it 14:59:16
@emilazy:matrix.orgemily(from the last time this came up, including my strong warning against canonicalized JSON formats and suggestions for alternatives)15:00:26
@emilazy:matrix.orgemilythe good thing about JSON canonicalization schemes is that there are so many to pick from!15:00:54
@Ericson2314:matrix.orgJohn Ericson emily: how about CBOR? 15:09:51
@Ericson2314:matrix.orgJohn Ericson Robert Hensing (roberth) was once concerned that making it binary would be a humans debugging drawback 15:10:24
@emilazy:matrix.orgemilymentioned here (there's also three versions of that spec unfortunately)15:10:39
@Ericson2314:matrix.orgJohn Ericsonto be clear, we need a parser that validates the canonical format15:11:19
@Ericson2314:matrix.orgJohn Ericsonit is not good enough to make just the serializer do the thing15:11:31
@emilazy:matrix.orgemilyIMO textual formats are good but you need to keep them separate from the non-malleable canonical forms since the two are pretty in tension. Preserves does this. (though again I doubt Preserves is appealing for direct adoption given lack of ecosystem, it's just the measuring stick for these things in my view)15:11:38
@Ericson2314:matrix.orgJohn Ericsonit has to actually enforce it15:11:39
@emilazy:matrix.orgemilyright. the problem is that there are inevitably multiple consumers15:11:52
@emilazy:matrix.orgemilyof any format trying to do any kind of interoperability (or in some cases not trying)15:12:02
@Ericson2314:matrix.orgJohn EricsonI like BCS, but I do want some extensibility/versionability15:12:22
@Ericson2314:matrix.orgJohn Ericsonwhihc, unless we want a registry of enum tags, means it is good to have some self-describing strings15:12:43
@Ericson2314:matrix.orgJohn Ericson* whihc, unless we want a registry of enum tags, means it is good to have some self-describing sttrings15:12:45
@Ericson2314:matrix.orgJohn Ericsonso I figure that would already be crossing the rubicon out of "most dense information, minimal self description"15:13:30
@Ericson2314:matrix.orgJohn Ericsonlike, as soon as you have string tags, there is probably some slack like is lexigraphic ordering required 15:14:07
@Ericson2314:matrix.orgJohn Ericson* like, as soon as you have string tags, there is probably some slack like whether lexigraphic ordering required15:14:16
@fzakaria:one.ems.hostfzakariai'm not usually a big protobuf fan but i do like having a high level IDL to define the thigns being stored.15:15:11
@Ericson2314:matrix.orgJohn Ericsonif/when we stop putting drvs in store objects and go full harvard architecture, we can no worry about the on-disk version being the hashed canonical form15:15:13
@magic_rb:matrix.redalder.orgmagic_rbSorry to interject, whats BCS15:16:00
@Ericson2314:matrix.orgJohn Ericsonbut so long as we're deciding "what goes in the drv file", the drvPath is that hash of that15:16:02
@Ericson2314:matrix.orgJohn Ericson magic_rb: from facebook's blockchain, it is basically concat the things to do products, use leb128 or whatever the variable thing is called to do enum tags for sums 15:16:40

Show newer messages


Back to Room ListRoom Version: 6