!9IQChSjwSHXPPWTa:lix.systems

Lix

1185 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-rooms325 Servers

Load older messages


SenderMessageTime
10 Jun 2026
@k900:0upti.meK900And yes, it composes07:13:28
@k900:0upti.meK900
~
❯ nix-instantiate --eval --expr '{ stuff = [ { number = "one"; } { number = "two"; } { number = "three"; } ]; }' -A stuff.0.number
"one"
07:13:31
@k900:0upti.meK900Someone update the iceberg07:13:39
@eirikwit:pvv.ntnu.no@eirikwit:pvv.ntnu.no joined the room.08:01:18
@eirikwit:pvv.ntnu.no@eirikwit:pvv.ntnu.no left the room.08:02:47
@acidbong:unredacted.orgAcid Bong
In reply to @k900:0upti.me
~
❯ nix-instantiate --eval --expr '{ stuff = [ { number = "one"; } { number = "two"; } { number = "three"; } ]; }' -A stuff.0.number
"one"
what in the nushell
08:05:35
@zooter9:matrix.org@zooter9:matrix.org left the room.10:00:19
@k900:0upti.meK900To be clear none of this is nushell14:27:42
@k900:0upti.meK900This is all well-defined nix-instantiate (and other things that support -A) behavior14:27:58
@acidbong:unredacted.orgAcid Bongik, just Nu is the only lang i know where accessing by number is done the same way as accessing by attr15:31:00
@piegames:flausch.socialpiegamesLol15:44:50
@piegames:flausch.socialpiegamesI think this is unsound?15:44:57
@piegames:flausch.socialpiegames Or at least, it is type-dependant, because it could be an attribute named "0" instead 15:45:32
@jyrama:garm.jrd.fijyramaSounds very YAML to me. Sometimes you just cannot decide if no mean no, ie. false or Norway. Not fan of ambiguous types.18:50:21
@k900:0upti.meK900
~ 
❯ nix-instantiate --eval --expr '{ "0" = [ 0 1 2 ]; }' -A 0.0
error: the expression selected by the selection path '0.0' should be a list but is a set: { "0" = «thunk»; }
19:24:05
@k900:0upti.meK900 Nope if it's a number it's just a number always 19:24:07
@k900:0upti.meK900
~ 
❯ nix-instantiate --eval --expr '{ "0" = [ 0 1 2 ]; }' -A '"0".0'
error: the expression selected by the selection path '"0".0' should be a list but is a set: { "0" = «thunk»; }
19:24:20
@boomi123:nope.chatboomi123 joined the room.19:25:51
@toonn:matrix.orgtoonn Isn't 0 an attrName that always needs to be quoted? 19:40:33
@k900:0upti.meK900The second example does have it quoted19:41:05
@k900:0upti.meK900 And it's still failing 19:41:09
@k900:0upti.meK900 So no, this specific path lookup is just weirdly special 19:41:20
@davidvmu:matrix.orgDavid joined the room.22:43:38
11 Jun 2026
@kris_shannon:matrix.orgKris ShannonYeah the parsing of the attribute path splits it into a list of strings but as part of that throws away any knowledge of quoting. All that the quoting does is allow you to have empty path components or components containing periods.20:27:06
12 Jun 2026
@dontblameme:matrix.orgDontBlameMe joined the room.16:25:57
13 Jun 2026
@debtquity:matrix.orgdebtquity set a profile picture.03:21:36
@debtquity:matrix.orgdebtquity removed their profile picture.03:21:41
@debtquity:matrix.orgdebtquity set a profile picture.03:22:46
@pengo:pengo.ukPengo joined the room.04:59:34
@kokosa:mozilla.orgkokosa joined the room.06:21:41

There are no newer messages yet.


Back to Room ListRoom Version: 10