!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-rooms294 Servers

Load older messages


SenderMessageTime
15 Oct 2025
@raitobezarius:matrix.orgraitobezariusyour analyzer for call expressions needs to keep track of entering restrictions and exiting restrictions01:16:48
@charles:computer.surgeryCharlesdoing this is a builtin is probably Wrong and it should really be some kind of language construct01:16:51
@raitobezarius:matrix.orgraitobezariusalso01:16:57
@raitobezarius:matrix.orgraitobezariusimagine01:16:58
@raitobezarius:matrix.orgraitobezarius head (map (_: builtins.restrictNamespace) [ foo ]) 01:17:12
@raitobezarius:matrix.orgraitobezarius * head (map builtins.restrictNamespace [ foo ]) 01:17:28
@charles:computer.surgeryCharlesyikes01:17:29
@charles:computer.surgeryCharlessee also lol01:17:41
@raitobezarius:matrix.orgraitobezariusthis is what I mean by static analyzers are completely fucked in front of this01:17:43
@raitobezarius:matrix.orgraitobezarius yeah, feels like to me you want { } 01:17:54
@raitobezarius:matrix.orgraitobezarius
let

   {
      fucking around
    }
    x = 3;
in
 { ... }
01:18:11
@raitobezarius:matrix.orgraitobezariusbut basically you can always scope things01:18:40
@raitobezarius:matrix.orgraitobezariuswith attrsets?01:18:43
@raitobezarius:matrix.orgraitobezarius
let
  scope = _: { foo = 4 };
  bar = (x: x + foo);
in bar 5
01:19:53
@raitobezarius:matrix.orgraitobezariuslike i have trouble finding cases where you cannot structure your code that way01:20:26
@raitobezarius:matrix.orgraitobezariusif your let bindings are the most locals to what you need01:20:33
@raitobezarius:matrix.orgraitobezariusthere's no global pollution01:20:36
@raitobezarius:matrix.orgraitobezariusyou can always thunk things in function scopes to avoid the problem01:20:44
@charles:computer.surgeryCharles the reason i want something like this is to be able to enforce that the return value of source and input in sprinkles can't be polluted by external state 01:21:02
@raitobezarius:matrix.orgraitobezariuswhat do you want to avoid by achieving that?01:21:40
@raitobezarius:matrix.orgraitobezariussimulate triviality checks?01:22:00
@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

Show newer messages


Back to Room ListRoom Version: 10