!9IQChSjwSHXPPWTa:lix.systems

Lix

1128 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-rooms315 Servers

Load older messages


SenderMessageTime
20 Mar 2026
@blokyk:matrix.orgzoë (she/her)yep23:33:18
@blokyk:matrix.orgzoë (she/her)
nix-repl> builtins.mapAttrs (n: v: v) (builtins.trace "hi" { a = 5; })
trace: hi
{ a = 5; }
23:33:40
@blokyk:matrix.orgzoë (she/her) * it seems to be the case with most of the builtins i've tried, from memory, which is why i starting looking at prim_break first 23:34:13
@blokyk:matrix.orgzoë (she/her)

to me the most dangerous part is this, cause it's a lot more silent:

nix-repl> builtins.isAttrs (builtins.trace "hi" { a = 5; })            
trace: hi
true

nix-repl> builtins.isAttrs (break { a = 5; })               
false
23:35:15
@blokyk:matrix.orgzoë (she/her)

another fun one is this :D

nix-repl> builtins.map (x: x) (break [])
[ ]

nix-repl> builtins.map (x: x) (break [ 5 ])
error:
       … while calling the 'map' builtin
         at «string»:1:1:
            1| builtins.map (x: x) (break [ 5 ])
             | ^

       … while evaluating the second argument passed to builtins.map

       error: expected a list but found a thunk: «thunk»
23:36:31
@piegames:flausch.socialpiegamesYeah okay23:37:17
@piegames:flausch.socialpiegamesCan you please open an issue with all of this?23:37:28
@blokyk:matrix.orgzoë (she/her)sure23:37:39
@piegames:flausch.socialpiegamesBut also you are right that a forceValue is missing in the primop23:37:42
@blokyk:matrix.orgzoë (she/her)i wasn't sure how widely known this was, since i encountered it all the time (on both cppnix and lix)23:38:29
@piegames:flausch.socialpiegamesThe reason being, that there is some undocumented invariant spread across the evaluator as to when a value is alloeed to be thunked. And break currently violates that, which is why forceValue on a break does not the right thing23:38:54
@piegames:flausch.socialpiegames
In reply to @blokyk:matrix.org
i wasn't sure how widely known this was, since i encountered it all the time (on both cppnix and lix)
I think you may be the single most active user of the debug REPL, maybe ever
23:39:41
@blokyk:matrix.orgzoë (she/her)xD23:39:50
@blokyk:matrix.orgzoë (she/her)i don't even use it that much ;-; it does pain me how unknown and somewhat uncared-for it is ;-;23:40:21
@blokyk:matrix.orgzoë (she/her)* i don't even use it that much ;-; it does pain me how unknown and somewhat uncared-for it is ._.23:40:24
@piegames:flausch.socialpiegamesTo be frank it shouldn't exist in its current form in the first place23:40:59
@piegames:flausch.socialpiegamesIt is uncared for because touching it is exceptionally unforgiving, and it is unknown because nobody bothered documenting a hacky half-working feature23:42:26
@blokyk:matrix.orgzoë (she/her) done! would you want me to make a CL for this that simply adds forceValue (+changes the tests)? 23:57:50
21 Mar 2026
@blokyk:matrix.orgzoë (she/her) * done! would you want me to make a CL for this that simply adds forceValue (+changes the tests)? 00:00:45
@blokyk:matrix.orgzoë (she/her) * done! so would a CL for this that simply adds forceValue (+changes the tests) be ok? 00:01:04
@emilazy:matrix.orgemilythat's not valid in all the cases multiline strings are03:17:48
@emilazy:matrix.orgemilyhmm, or maybe it is? I guess attrset keys can't use it. but, uh, flake inputs?03:18:22
@emilazy:matrix.orgemilyI think an interpolated subexpression has a very different characteristic to an escape in a string literal though03:19:00
@adobo:is.nota.liveadobo joined the room.10:58:40
@webtier:unredacted.orgwebtierDo we actually currently count as a distro or are we a set of mods for nixos?16:13:55
@webtier:unredacted.orgwebtierRather is the lix project... Not me, ha ha16:14:31
@blokyk:matrix.orgzoë (she/her)Redacted or Malformed Event16:14:43
@blokyk:matrix.orgzoë (she/her) you are but a simple set of biological mods for nixos, the e v e r y t h i n g distro 16:15:18
@blokyk:matrix.orgzoë (she/her) * you, nay, humans are but a simple set of biological mods for nixos, the e v e r y t h i n g distro 16:15:50
@blokyk:matrix.orgzoë (she/her) ...now that i think about it, i'm pretty sure neither "reproducible humans" nor "isolated humans" are great goals given, uhm, all of history... 16:20:30

Show newer messages


Back to Room ListRoom Version: 10