| 31 Jul 2025 |
WeetHet | It's been possible since forever | 13:59:14 |
raitobezarius | But that's exactly lazy trees? :'D | 13:59:34 |
WeetHet | In reply to @raitobezarius:matrix.org But that's exactly lazy trees? :'D Lazy trees do pure evaluation | 14:00:04 |
raitobezarius | In reply to @weethet:catgirl.cloud Lazy trees do pure evaluation Oh well, this is the first time I hear about this then | 14:00:24 |
raitobezarius | Last time I read CppNix source code, I saw a use of a non-pure primitive :) | 14:00:36 |
raitobezarius | making the whole evaluation impure | 14:00:44 |
WeetHet | https://github.com/NixOS/nix/pull/13225/files | 14:03:06 |
WeetHet | I don't see anything impure? | 14:03:11 |
raitobezarius | https://github.com/NixOS/nix/pull/13225/files#diff-34086a6cc2cf161aec3ef471b784dc65d0afbab7fe1b921af8211ff67492bbb9R79 | 14:03:48 |
WeetHet | It's not impure it's uhh non-deterministic | 14:04:29 |
WeetHet | And it's only because computing the hash before copying is slow? | 14:05:00 |
WeetHet | And it's only non-deterministic if you're comparing the paths for equality | 14:06:08 |
WeetHet | * And it's only non-deterministic if you're comparing paths for equality | 14:06:21 |
WeetHet | I'm not sure that's even a real usecase | 14:06:32 |
WeetHet | Because on a path <-> string boundary the paths are devirtualised | 14:07:33 |
WeetHet | So the nondeterminism leak is minimal | 14:07:51 |
WeetHet | I don't love it but realistically it's not as big of a trade off as it can seem in the first place | 14:09:10 |
emily | tbf, lazy trees prevents torn writes | 14:10:47 |
emily | though of course nondeterminism in pure eval mode sans IFD is not really acceptable | 14:10:57 |
emily | (and does not really seem necessary) | 14:11:07 |
WeetHet | The real issue is that calculating the path and copying the source to the store are computationally very similar tasks | 14:11:53 |
emily | they're not really | 14:12:16 |
emily | just hashing is meaningfully faster | 14:12:28 |
WeetHet | I don't know if nar-hash can be constructed iteratively so that you only need to rehash changed files | 14:13:14 |
emily | see https://github.com/NixOS/nix/pull/13225#pullrequestreview-2858935020 for discussion, particularly the later review subthread | 14:13:17 |
emily | I think roberth has it right that you want an opaque path type | 14:13:26 |
emily | though that is of course a big lift | 14:13:30 |
emily | NAR hashing is also just bad… but that's another matter | 14:13:50 |
emily | anyway | 14:14:00 |
emily | does anyone have feelings about /nix/var/nix/b instead of /nix/var/nix/builds? | 14:14:07 |