| 1 Dec 2025 |
raitobezarius | https://wiki.lix.systems/books/lix-contributors/page/pointer-equality | 12:26:25 |
raitobezarius | i explained a bunch of things there | 12:26:28 |
raitobezarius | from what I gathered | 12:26:31 |
raitobezarius | the import machinery not caching things for example would break maximal sharing | 12:26:46 |
Qyriad | 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 | scopedImport disables that caching | 12:27:24 |
raitobezarius | yeah, it feels like a nixlang2 thing | 12:27:53 |
raitobezarius | not a fan of special meaning attributes | 12:28:10 |
Qyriad | We would be in favor of something more metatable-flavored over magic attributes | 12:28:37 |
raitobezarius | how would that look like? | 12:29:38 |
raitobezarius | setMetaAttributes attrs { __eq = x; } ? | 12:30:00 |
Qyriad | Yeah something like that | 12:30:14 |
Qyriad | Which would return a new attrset obvi, not mutate | 12:30:23 |
raitobezarius | ye | 12:30:32 |
K900 | Y'all are actualyl just going to reinvent metatables aren't you | 12:30:43 |
K900 | * Y'all are actually just going to reinvent metatables aren't you | 12:30:46 |
raitobezarius | lua arc for lix letsgo | 12:30:57 |
raitobezarius | personally idk yet | 12:31:12 |
raitobezarius | the idea is interesting for sure | 12:31:16 |
raitobezarius | and would provide a very nice way to escape from the funext mess | 12:31:25 |
Qyriad | It 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 Lix | 12:32:36 |
K900 | I mean honestly I don't mind metatables | 12:33:07 |
K900 | I do mind the rest of Lua | 12:33:12 |
Qyriad | Same | 12:33:13 |
K900 | But metatables are fine | 12:33:16 |
Qyriad | Yes valid | 12:33:18 |
Qyriad | It would also help the general problem of "attrsets represent packages you can enumerate but also other stuff and if you shove metadata into the set of packages now suddenly enumerating packages is more complicated" etc | 12:33:51 |
niko ⚡️ | In reply to @qyriad:katesiria.org
scopedImport disables that caching Is the caching also on expressions themselves? Because if importing twice reuses the same eval, I’d expect let f = _: x: x; in f 0 == f 0 to also be true, at least based on vibes again, since applying a function feels equivalent to importing, for some definition of feeling | 12:34:31 |
Qyriad | Function calls are not cached iwrc, but the attrs they return are? I think? | 12:36:12 |
niko ⚡️ | I think this is where problems start for me personally | 12:39:55 |