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/
niksnut has quit [Ping timeout: 246 seconds]
niksnut has joined #nix-lang
rajivr has joined #nix-lang
<pie_> infinisil: tbf being able to append to builtinScope might be simpler than lift functions
<pie_> lol make it run guix expressions
<pie_> oh thats probably what it does, i feel asleep yesterday :P (that happens)
<pie_> i just remembered needing to pass the args through in defun
<pie_> infinisil: the error is line 6 https://bpa.st/GZZA i cant substitute a defun var
<pie_> *string interpolate
<pie_> whatever its called
<pie_> well, coerce
<pie_> but like, returning it and getting a value at the end works fine?
<pie_> ok i was going to say lifting a function to do it doesnt work either, but it worked in the smaller test case, so nevermind :/
<infinisil> pie_: The "${a}" looks like the problem
<pie_> yeah sorry i spoke too soon , i got it :P
<infinisil> :)
<pie_> i did see the problem i just go ttripped up by the ast stuff again
Dotz0cat has joined #nix-lang
Dotz0cat_ has quit [Ping timeout: 246 seconds]
rajivr has quit [Quit: Connection closed for inactivity]
<aaronjanse> Sometimes in Nixpkgs I see something like { ${if condition then "someAttrName" else null} = someValue; }
<aaronjanse> How does this evaluate? I get an error whenever I try it in the Nix REPL
<aaronjanse> Huh, I'll assume it removes it from the set. Maybe the issue is just me testing in a REPL
<sterni> > { ${null} = 12; }
<{^_^}> { }
<sterni> > { ${if false then "foo" else null} = 23; }
<{^_^}> { }
<sterni> works in the repl :)
<aaronjanse> Huh, both those throw an error in `nix repl`
<aaronjanse> Oh well. Thanks!
<sterni> not for me they don't
<sterni> nixUnstable?
<aaronjanse> Yep
<sterni> interesting
<sterni> maybe a regression?
<sterni> who knows
<aaronjanse> Oh well, no worries
<aaronjanse> Good news is that my Nix evaluator can now evaluate stuff like `pkgs.gcc`. Ofc the actual attributes aren't all evaluated, but you can still get the name etc
<sterni> well it'd be interesting if this still evaluated correctly in files
<sterni> if no that's bad news
<aaronjanse> Yeah the official interpreter can still evaluate it correctly in files