| 1 Dec 2025 |
raitobezarius | nixos/tests/zfs.nix | 11:34:28 |
raitobezarius | a ultra common pattern is | 11:34:32 |
raitobezarius | { x ? a, y ? b, c ? d }: ... | 11:34:41 |
raitobezarius | this gets autocalled all the time | 11:34:45 |
raitobezarius | many default.nix starts with { pkgs ? import <nixpkgs> { } }: ... | 11:34:54 |
piegames | I know that pattern, but where does that get autocalled? | 11:36:44 |
piegames | I've seen it manually called at times and that's it | 11:36:54 |
piegames | I haven't seen much autocalling entry points in the wild | 11:37:09 |
raitobezarius | well | 11:44:43 |
raitobezarius | if you do | 11:44:44 |
raitobezarius | nix-build -A xyz | 11:44:46 |
raitobezarius | you are doing autocalling? | 11:44:49 |
raitobezarius | if you do nix-build nixos/tests/zfs.nix | 11:45:01 |
raitobezarius | you are doing autocalling as well? | 11:45:05 |
Qyriad | nix-build, nix-shell, nix develop, and nix build all do autocall, among certainly many others | 11:46:37 |
Qyriad | nix-build '<nixpkgs>' -A hello autocalls <nixpkgs/default.nix> { } | 11:47:01 |
niko ⚡️ | Honestly though how many users are there of deep auto-calls and auto-calling functors | 11:49:19 |
niko ⚡️ | I can't imagine there being that many | 11:49:31 |
raitobezarius | yeah, i expect this to be ≤10 | 11:49:34 |
raitobezarius | but we should prove it via large scale evaluations | 11:49:41 |
niko ⚡️ | And if someone is auto-calling a functor, they're probably doing it on accident | 11:49:49 |
raitobezarius | no one has been accidentally comparing attrsets with functions at all | 11:50:28 |
| * niko ⚡️ clueless | 11:50:48 |
raitobezarius | function pointer equality | 11:54:50 |
Qyriad | Autocall does nest but in practice it almost certainly only happens at toplevel or maybe one level deep 90% of the timebu | 11:56:10 |
K900 | Not function pointer | 11:56:20 |
K900 | Attrset pointer | 11:56:23 |
K900 | nix-repl> (x: x) == (x: x)
false
nix-repl> { f = x: x; } == { f = x: x; }
false
nix-repl> let f = x: x; in { f = f; } == { f = f; }
true
| 11:57:16 |
Qyriad | * Autocall does nest but in practice it almost certainly only happens at toplevel or maybe one level deep 90% of the time | 11:58:15 |
niko ⚡️ | Surely a very worth it optimization that never caused anyone any problems | 11:58:46 |