3 ms·
What the nix language needs is support for first-class breakpoint instructions. That is, I ought to be able to do something along the lines of `let x = break
by anon291 3y ago
What the nix language needs is support for first-class breakpoint instructions.
That is, I ought to be able to do something along the lines of
`let x = break (...)`
The semantics here is that, when x is evaluated (i.e., forced into WHNF), I get placed into a debugger where I can examine the context and either (1) choose to return a new value for `x` or (2) let it fall through and let `x` take on the value of `(...)`. The main issue with nix is debuggability
- aliasxneo 3y agoYes, anyone who has spent any serious amount of time maintaining Nix code has felt this pain. I also have come to dislike the Nix language, but it was the daily debugging that eventually drove me away. In my case, it was for production systems, and there's nothing more agonizing then having to debug a Nix stack trace on a deadline.
- unshavedyak 3y agoAgreed, though i prefer types to solve this - but i imagine what you suggest would even benefit a typed language like Nickel. Really would be a useful inspection tool. Nix is just a massive blob of difficult to debug code. Really awful experience for me.
- takeda 3y agolooks like that was added last year: https://github.com/NixOS/nix/blob/4a880c3cc085841a1537040405bc142fefffd7ff/doc/manual/src/release-notes/rl-2.9.md?plain=1#L3 https://github.com/NixOS/nix/blob/4a880c3cc085841a1537040405... https://www.zknotes.com/note/5970 https://www.zknotes.com/note/5970