!9IQChSjwSHXPPWTa:lix.systems

Lix

1104 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms295 Servers

Load older messages


SenderMessageTime
1 Dec 2025
@commentator2.0:elia.gardenRutile (Commentator2.0) feel free to pingohno12:22:00
@qyriad:katesiria.orgQyriad It is, and not just that, but let lib = import <nixpkgs/lib>; in lib.recursiveUpdate == (import <nixpkgs/lib>).recursiveUpdate is also true 12:22:16
@commentator2.0:elia.gardenRutile (Commentator2.0) feel free to pingfn equality is just cursed and error if not for f-ing cppnix compatibility, though i understand the need for it somehow12:22:29
@niko:nrab.lolniko ⚡️
In reply to @qyriad:katesiria.org
It is, and not just that, but let lib = import <nixpkgs/lib>; in lib.recursiveUpdate == (import <nixpkgs/lib>).recursiveUpdate is also true
Oh that’s cursed what
12:22:48
@qyriad:katesiria.orgQyriadin nixlangv2 the thoughts are to just ban function equality altogether, including attrsets-with-functions12:23:14
@raitobezarius:matrix.orgraitobezariusi think it's really bad to implement a partial procedure12:23:57
@raitobezarius:matrix.orgraitobezariuseither we implement the full procedure (bisimulation on the induced lambda term graph)12:24:11
@commentator2.0:elia.gardenRutile (Commentator2.0) feel free to pingonly thing i remember is this exact same disscussion in here, somewhere a few weeks back12:24:12
@raitobezarius:matrix.orgraitobezariuseither we don't12:24:13
@raitobezarius:matrix.orgraitobezariusand the full procedure is very complicated for dubious gains12:24:21
@qyriad:katesiria.orgQyriadHaskell bans lambda equality iwrc12:24:54
@raitobezarius:matrix.orgraitobezariusthat's probably the healthiest thing to pursue12:25:22
@qyriad:katesiria.orgQyriad We::Osiria would be in favor of allowing attrsets to define their own equality comparators to be used regardless of the presence of functions 12:25:42
@niko:nrab.lolniko ⚡️ I think properly specifying what constitutes “same instance of a function” would also be feasible, because importing the same file twice (or instantiating the same function twice?) to me doesn’t seem like it should result in the same pointer, just based on vibes 12:25:55
@qyriad:katesiria.orgQyriad __eq but like. hopefully less cursed 12:25:55
@raitobezarius:matrix.orgraitobezariuswell it is very related to the concept of maximal sharing12:26:21
@raitobezarius:matrix.orgraitobezarius https://wiki.lix.systems/books/lix-contributors/page/pointer-equality 12:26:25
@raitobezarius:matrix.orgraitobezariusi explained a bunch of things there12:26:28
@raitobezarius:matrix.orgraitobezariusfrom what I gathered12:26:31
@raitobezarius:matrix.orgraitobezariusthe import machinery not caching things for example would break maximal sharing12:26:46
@qyriad:katesiria.orgQyriad

It's because imports are cached.

nix-repl> (scopedImport { } <nixpkgs/lib>).recursiveUpdate == (scopedImport { } <nixpkgs/lib>).recursiveUpdate
false
nix-repl> (scopedImport { } <nixpkgs/lib>).recursiveUpdate == (import <nixpkgs/lib>).recursiveUpdate
false
12:27:15
@qyriad:katesiria.orgQyriad scopedImport disables that caching 12:27:24
@raitobezarius:matrix.orgraitobezariusyeah, it feels like a nixlang2 thing12:27:53
@raitobezarius:matrix.orgraitobezariusnot a fan of special meaning attributes12:28:10
@qyriad:katesiria.orgQyriadWe would be in favor of something more metatable-flavored over magic attributes12:28:37
@raitobezarius:matrix.orgraitobezariushow would that look like?12:29:38
@raitobezarius:matrix.orgraitobezarius setMetaAttributes attrs { __eq = x; } ? 12:30:00
@qyriad:katesiria.orgQyriadYeah something like that12:30:14
@qyriad:katesiria.orgQyriadWhich would return a new attrset obvi, not mutate12:30:23
@raitobezarius:matrix.orgraitobezariusye12:30:32

Show newer messages


Back to Room ListRoom Version: 10