!9IQChSjwSHXPPWTa:lix.systems

Lix

1105 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-rooms295 Servers

Load older messages


SenderMessageTime
15 Oct 2025
@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
@raitobezarius:matrix.orgraitobezariusbut that's nix2 realm01:28:37
@raitobezarius:matrix.orgraitobezarius so I defer to nix2 expert, piegames 01:28:42
@raitobezarius:matrix.orgraitobezariusas far as I'm concerned, I feel the builtin path for this seems unlikely01:29:19
@charles:computer.surgeryCharlesi agree01:29:33
@raitobezarius:matrix.orgraitobezariusIn the current constraints of Nix1, linting is the best available option perhaps01:29:40
@raitobezarius:matrix.orgraitobezarius(or scopedImport as you said but separate file)01:29:49
@charles:computer.surgeryCharles (which would be the case that fails eval because source is not nameable here) 01:30:17
@charles:computer.surgeryCharlesi think you transposed these two things but yeah01:30:46
@raitobezarius:matrix.orgraitobezariussorry ^^, 3am01:30:57
@charles:computer.surgeryCharlesnp lol01:31:05
@piegames:flausch.socialpiegamesNyaaaaawn05:46:49
* @piegames:flausch.socialpiegames backlogs05:46:54
@piegames:flausch.socialpiegamesWhatever you do, it needs to fail at parse time nit run time05:52:44
@piegames:flausch.socialpiegamesI think a specially scoped closure à la Rust moving semantics would be possible in theory05:53:08

Show newer messages


Back to Room ListRoom Version: 10