!9IQChSjwSHXPPWTa:lix.systems

Lix

1078 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-rooms289 Servers

Load older messages


SenderMessageTime
15 Oct 2025
@pktls:matrix.orgDavid Leehmm as best I can tell it's that NIX_PATH is explicitly set by the runner script sudo env NIX_PATH="${nix_path}" nixos-rebuild "$cmd" --no-reexec "$@"01:22:36
@charles:computer.surgeryCharles

to prevent a mistake like

let
   source = { foo = 5; };
   input = source': { foo = source.foo + 1 };
in
...

i guess

01:22:48
@raitobezarius:matrix.orgraitobezariusthis example can be transformed into01:23:11
@raitobezarius:matrix.orgraitobezarius
let
    input = source: let source' = { foo = 5; } in { foo = source'.foo + 1; };
in
01:23:30
@raitobezarius:matrix.orgraitobezarius *
let
    input = source: let source' = { foo = 5; } in { foo = source'.foo + 1; };
in
01:23:33
@raitobezarius:matrix.orgraitobezariuseven with your restriction mechanism, you are not out of the woods here01:23:44
@raitobezarius:matrix.orgraitobezariusit definitely feels like you want the expression defining input to be mostly trivial01:24:08
@quadradical:federated.nexusQuadRadical (Ping)by the way, raitobezarius, did you ever take a look at my freeze?01:24:11
@quadradical:federated.nexusQuadRadical (Ping)with the nextest?01:24:18
@raitobezarius:matrix.orgraitobezariusnot yet, sorry01:24:23
@charles:computer.surgeryCharlesi don't think this is what i want?01:24:28
@raitobezarius:matrix.orgraitobezariusplease ping me tomorrow 4pm CEST again01:24:31
@quadradical:federated.nexusQuadRadical (Ping)ah okay, no worries01:24:32
@quadradical:federated.nexusQuadRadical (Ping)sounds good01:24:38
@raitobezarius:matrix.orgraitobezariusi'm just saying you can always inline your example into this01:24:38
@charles:computer.surgeryCharles to be clear the mistake is referring to source instead of source' in the body of input 01:24:58
@raitobezarius:matrix.orgraitobezariusah i see01:25:16
@charles:computer.surgeryCharles if source weren't nameable in the context of input then it's not possible to make this mistake 01:25:37
@raitobezarius:matrix.orgraitobezarius but why would it be source' 01:25:38
@raitobezarius:matrix.orgraitobezarius and not source ? 01:25:40
@raitobezarius:matrix.orgraitobezarius if it's source, shadowing takes over 01:25:46
@charles:computer.surgeryCharlesthat just sweeps the problem under the rug rather than actually preventing it01:26:10
@raitobezarius:matrix.orgraitobezariusfeels like that restricting the scope to prevent this mistake goes quite far into curbing the possibilities you have with the nixlang for a user01:26:29
@raitobezarius:matrix.orgraitobezariusis it worth the tradeoff?01:26:39
@charles:computer.surgeryCharles maybe instead of source' they call it s to make naming it shorter and then forget they did that 01:26:49
@raitobezarius:matrix.orgraitobezariusshouldn't be this problem fixed by linting?01:27:31
@raitobezarius:matrix.orgraitobezariusdefine a convention that no let binding named source should appear01:27:40
@raitobezarius:matrix.orgraitobezarius we could have a weird lang construct where we would have input = source': {{ foo = source.foo + 1; }} 01:28:21
@charles:computer.surgeryCharlesdoes it? scope restriction would be optional; seems like it gives you strictly more control over what your code can/can't do01:28:22
@raitobezarius:matrix.orgraitobezarius where {{ means no inheritance 01:28:25

Show newer messages


Back to Room ListRoom Version: 10