!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
@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
@k900:0upti.meK900Y'all are actualyl just going to reinvent metatables aren't you12:30:43
@k900:0upti.meK900* Y'all are actually just going to reinvent metatables aren't you12:30:46
@raitobezarius:matrix.orgraitobezariuslua arc for lix letsgo12:30:57
@raitobezarius:matrix.orgraitobezariuspersonally idk yet12:31:12
@raitobezarius:matrix.orgraitobezariusthe idea is interesting for sure12:31:16
@raitobezarius:matrix.orgraitobezariusand would provide a very nice way to escape from the funext mess12:31:25
@qyriad:katesiria.orgQyriadIt 110% needs like, to be very well thought out so we don't trap ourselves, but we do think something in that direction is the right direction for Lix12:32:36
@k900:0upti.meK900I mean honestly I don't mind metatables12:33:07
@k900:0upti.meK900I do mind the rest of Lua12:33:12

Show newer messages


Back to Room ListRoom Version: 10