infinisil changed the topic of #nix-lang to: Channel for discussing Nix as a language - https://nixos.org/nix/manual/#chap-writing-nix-expressions - Logs: https://logs.nix.samueldr.com/nix-lang/
ddellacosta has quit [Ping timeout: 265 seconds]
hmpffff has joined #nix-lang
hmpffff_ has joined #nix-lang
hmpffff has quit [Ping timeout: 256 seconds]
hmpffff_ has quit [Ping timeout: 265 seconds]
hmpffff has joined #nix-lang
__monty__ has joined #nix-lang
<puck> > let a = { outPath = "bar"; }; in builtins.toString a
<{^_^}> "bar"
<puck> but whyyyyyy
<__monty__> > let a = { outPath = "bar"; }; in a
<{^_^}> { outPath = "bar"; }
<__monty__> > builtins.toString { outPath = "bar"; foo = "baz"; }
<{^_^}> "bar"
<puck> :)
<__monty__> I guess the outPath *is* the most convenient way to access an attrset if you have to stringify. String interpolation for example.
<puck> hrmm
<puck> i could've used this to make my rock-paper-scissors output cleaner
tilpner has quit [Ping timeout: 264 seconds]
tilpner_ has joined #nix-lang
tilpner_ is now known as tilpner
<infinisil> > "${{ __toString = "hi"; }}"
<{^_^}> attempt to call something which is not a function but a string, at (string):304:2
<infinisil> > "${{ __toString = _: "hi"; }}"
<{^_^}> "hi"
<infinisil> puck: Also this ^
<__monty__> > "${{ outPath = "foo"; __toString = _: "bar";}}"
<{^_^}> "bar"
<globin> > builtins.toJSON { __toString = _: "foo"; }
<{^_^}> "\"foo\""
<globin> nice a new nix version on the bot!
<infinisil> globin: How do you know?
<globin> I fixed that recently-ish
<infinisil> Ah toJSON + toString?
<globin> yeah, that broke __structuredAttrs in one special case
<globin> (as that calls toJSON internally to create .attrs.json)
<infinisil> Ah makes sense yeah
ddellacosta has joined #nix-lang
elvishjerricco has quit [Ping timeout: 265 seconds]
elvishjerricco has joined #nix-lang
<pie_[bnc]> something something jinja? xD <infinisil> > "${{ __toString = "hi"; }}"
<pie_[bnc]> puck: yes i was confused for a minute by that yesterdat
<pie_[bnc]> niv uses it for its calling convtion and till i guessed my way to what was going on I was very confused
__monty__ has quit [Quit: leaving]