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/
rajivr has joined #nix-lang
simpson has quit [Ping timeout: 258 seconds]
simpson has joined #nix-lang
__monty__ has joined #nix-lang
Synthetica has joined #nix-lang
grimler32 has quit [Quit: Leaving]
rajivr has quit [Quit: Connection closed for inactivity]
<__monty__> How do I find out the scope a variable comes from? Currently trying to figure out where `pkgs` comes from in the various stages of `pkgs/stdenv/darwin/default.nix`.
<pie_> if you find a way i would very much like to know because the best ive been able to do stuff is trace it through by eye..
<pie_> upside of funcitonal programming, downside of no debugger
<pie_> or are they using nested withs or something?
<aaronjanse> ~~my LSP does this when you ctrl-click~~
<aaronjanse> ~~Across files. One more week till it's ready for release~~
<pie_> builtins.unsafeGetAttrPos is pretty useless afaik
<pie_> aaronjanse: huuuuuuuh
<pie_> aaronjanse: can i get a standalone client for that? :P
<pie_> just turn it into a full on freakin debugger
<pie_> aaronjanse: making a nixpkgs interpreter cant be that easy???
<aaronjanse> Already done :-)
<aaronjanse> In Rust
<aaronjanse> Wasn't easy
<pie_> b-b-b-but :D
<pie_> didnt you do this in like a week
<aaronjanse> Yep, a very wild week. But it took me a month to plan the implementation
<aaronjanse> To be fair, it can't actually compile things (it only evaluates), and it has some bugs, but it's definitely enough to significantly help writing Nix code
<pie_> wtf i was joking about the week xD
<aaronjanse> I'm also working on a branch that (for UI purposes only) caches lambda arguments, so you can get stuff like argument autocomplete when `buildRustPackage` is passed in via `callPackage`
<pie_> this is gonna be nuts
<aaronjanse> I'm hyped, as a user of Nix
<aaronjanse> Yesterday I tried a large refactor to clean up the code, but I introduced too many bugs. So tomorrow I'll revert then start cleaning things up while confirming functionality more often
<aaronjanse> The structure is there to do a lot of cool stuff (follow stack traces interactively, hover documentation for builtins, type inference) but I want to first release something that simply works very well
<pie_> sounds too good to be true *-*
<aaronjanse> Here's a screenshot of very basic hover popups from a few days ago
<pie_> can you low key add docstring functionality and thereby force it to become a thing
<aaronjanse> Ahaha
<aaronjanse> Right now I have structure in place to read comments written above lambda arguments, then eventually show those when I finalize autocomplete
<pie_> ;)
<pie_> i wish you the goodest of luck
<aaronjanse> Thank you
<aaronjanse> Big disclaimer, it's definitely not complete. My goal is for it to be a debugger and IDE tooling, so it doesn't handle stuff like outPath or any actual package building
<pie_> i dont see the limitations but it still sounds pretty great
<pie_> you could queue up builds for user confirmation or someting and pass it off to an actual builder to get deeper inspection?
<aaronjanse> Possibly. I think I'd first implement the outPath hashing, so my evaluator would at least be able to re-use /nix/store entries already compiled by Nix
<pie_> ah it cant do that yet?
<pie_> i kind of just assumed it could
<pie_> *nod*
<aaronjanse> Yeah I didn't feel motivated to deal with the exact details of hashing yet. But it turns out that you can still get metadata and everything without it
<aaronjanse> I did figure out how to find the /nix/store path for flake.lock inputs, so eventually I'll pull those from the /nix/store
__monty__ has quit [Quit: leaving]
Synthetica has quit [Quit: Connection closed for inactivity]