!9IQChSjwSHXPPWTa:lix.systems

Lix

1079 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-rooms291 Servers

Load older messages


SenderMessageTime
15 Oct 2025
@raitobezarius:matrix.orgraitobezariusstatic analysis doesn't work anymore :(01:14:43
@raitobezarius:matrix.orgraitobezarius it's a with-style construct 01:14:48
@raitobezarius:matrix.orgraitobezariusit could even be said this is anti with01:14:54
@charles:computer.surgeryCharlesyeah basically lol01:15:20
@raitobezarius:matrix.orgraitobezariuswhy do you need so hard to restrict names?01:15:44
@charles:computer.surgeryCharles hm why not? to me this seems sort of similar to mod in rust except you don't get use 01:15:46
@raitobezarius:matrix.orgraitobezariusstatic analyzers needs to keep track if they have entered into a restricted scope01:16:11
@raitobezarius:matrix.orgraitobezariusso you cannot just go brrrrrrr and look at every scopes and collect variables01:16:31
@charles:computer.surgeryCharlesyeah, that's true01:16:39
@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

Show newer messages


Back to Room ListRoom Version: 10