!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

417 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.139 Servers

Load older messages


SenderMessageTime
31 Jul 2025
@weethet:catgirl.cloudWeetHet It's been possible since forever 13:59:14
@raitobezarius:matrix.orgraitobezariusBut that's exactly lazy trees? :'D13:59:34
@weethet:catgirl.cloudWeetHet
In reply to @raitobezarius:matrix.org
But that's exactly lazy trees? :'D
Lazy trees do pure evaluation
14:00:04
@raitobezarius:matrix.orgraitobezarius
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:matrix.orgraitobezariusLast time I read CppNix source code, I saw a use of a non-pure primitive :)14:00:36
@raitobezarius:matrix.orgraitobezarius making the whole evaluation impure 14:00:44
@weethet:catgirl.cloudWeetHethttps://github.com/NixOS/nix/pull/13225/files14:03:06
@weethet:catgirl.cloudWeetHetI don't see anything impure?14:03:11
@raitobezarius:matrix.orgraitobezarius https://github.com/NixOS/nix/pull/13225/files#diff-34086a6cc2cf161aec3ef471b784dc65d0afbab7fe1b921af8211ff67492bbb9R79 14:03:48
@weethet:catgirl.cloudWeetHetIt's not impure it's uhh non-deterministic 14:04:29
@weethet:catgirl.cloudWeetHetAnd it's only because computing the hash before copying is slow?14:05:00
@weethet:catgirl.cloudWeetHetAnd it's only non-deterministic if you're comparing the paths for equality14:06:08
@weethet:catgirl.cloudWeetHet* And it's only non-deterministic if you're comparing paths for equality14:06:21
@weethet:catgirl.cloudWeetHetI'm not sure that's even a real usecase14:06:32
@weethet:catgirl.cloudWeetHetBecause on a path <-> string boundary the paths are devirtualised14:07:33
@weethet:catgirl.cloudWeetHetSo the nondeterminism leak is minimal14:07:51
@weethet:catgirl.cloudWeetHetI don't love it but realistically it's not as big of a trade off as it can seem in the first place14:09:10
@emilazy:matrix.orgemilytbf, lazy trees prevents torn writes14:10:47
@emilazy:matrix.orgemilythough of course nondeterminism in pure eval mode sans IFD is not really acceptable14:10:57
@emilazy:matrix.orgemily(and does not really seem necessary)14:11:07
@weethet:catgirl.cloudWeetHetThe real issue is that calculating the path and copying the source to the store are computationally very similar tasks14:11:53
@emilazy:matrix.orgemilythey're not really14:12:16
@emilazy:matrix.orgemilyjust hashing is meaningfully faster14:12:28
@weethet:catgirl.cloudWeetHetI don't know if nar-hash can be constructed iteratively so that you only need to rehash changed files14:13:14
@emilazy:matrix.orgemilysee https://github.com/NixOS/nix/pull/13225#pullrequestreview-2858935020 for discussion, particularly the later review subthread14:13:17
@emilazy:matrix.orgemilyI think roberth has it right that you want an opaque path type14:13:26
@emilazy:matrix.orgemilythough that is of course a big lift14:13:30
@emilazy:matrix.orgemilyNAR hashing is also just bad… but that's another matter14:13:50
@emilazy:matrix.orgemilyanyway14:14:00
@emilazy:matrix.orgemily does anyone have feelings about /nix/var/nix/b instead of /nix/var/nix/builds? 14:14:07

Show newer messages


Back to Room ListRoom Version: 10