!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

431 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.144 Servers

Load older messages


SenderMessageTime
23 Mar 2026
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)imagining how relaxing will be May compared to these past months makes taking time off even better22:30:08
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)there's class of errors you simply cannot remediate to22:31:10
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)what if hash FOD mismatch was a Result<Derivation, FODMismatchError>22:31:22
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)what value is there into unwrapping the error?22:31:28
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)what can you meaningfully do with this information?22:31:36
@raitobezarius:matrix.orgraitobezarius (DECT: 7248) to me, it is the basis to support moving some of the processing logic outside of Nix because those things have inherently impure management 22:32:10
@raitobezarius:matrix.orgraitobezarius (DECT: 7248) in order to leave Nix a pure core 22:32:16
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)incompleteness of a derivation is yet another example and is driven by the lack of instrumented recursive evaluation of attribute sets IMHO, there's no way to perform fancy traversal of these graphs with impure action responses22:33:04
@raitobezarius:matrix.orgraitobezarius (DECT: 7248) nix-eval-jobs is one instrumented recursive evaluation of attribute sets meant as a porcelain to build more complicated tooling, it theoretically can also do way more than tryEval-based techniques because it has full access into the C++ evaluator primitives and can catch the uncatchable (modulo impl details) 22:33:56
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)yeah, i have been aligned with horrors for a long time on this22:35:02
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)if we could create the conditions to remove that weird exception handling fragment, that'd be great22:36:13
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)i don't mind replacing it with Result<T, E> though I think as I said: it's a dream, I don't see that realistic compared to do it right in nix222:36:52
@blokyk:matrix.orgzoë (she/her) i do agree with that tbf, and i think the FOD error is a good example of something that doesn't make sense to make catchable; but i don't think all errors should be that way. while in general, things related to bare derivations and building probably aren't gonna be the most useful to catch, the fact you can't run/use any nix expression inside your code without the fear that it might fatally throw is a little frustrating imo. if we did have a Result type it'd obviously be preferable to exceptions, but for the foreseeable future we won't, so i do think it's useful to be able to tell if e.g. some packages fail to eval in nixpkgs, or a property of a object we computed actually throws, etc 22:46:42
@blokyk:matrix.orgzoë (she/her)anyway, i think i should maybe stop here, i don't have the same experience and "vision for nix" that most people have here ^^;22:47:23
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)i agree22:47:25
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)i think that approaching this problem from different perspective is welcome; but i think: for the exercise to be interesting, it needs to be thorough22:48:03
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)that is, for each current catchable/uncatchable behavior, providing a rationale for its current status or a rationale to change it22:48:23
@raitobezarius:matrix.orgraitobezarius (DECT: 7248) i know that i did that when i finished most of the catchable/uncatchable impl in https://snix.dev (which doesn't rely on exceptions but proper Result<T, E> at the Rust level) and i acquired some taste along the fun 22:48:54
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)otherwise, we are kinda condemned into discussing n=1,2,3 examples and i'm not sure this will lead to a satisfying design overall22:49:28
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)to put it in another way: do not let grand words like "vision for nix" discourage you from finding out your own opinions and communicating them22:50:06
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)but i'd appreciate reading an overall coherent set of opinions if you find the time to do it ;-)22:50:17
@raitobezarius:matrix.orgraitobezarius (DECT: 7248) (not saying you don't provide a coherent set of opinions atm, but more like, this is what i would like to read from a different perspective) 22:50:41
@piegames:flausch.socialpiegames
In reply to @blokyk:matrix.org
i do agree with that tbf, and i think the FOD error is a good example of something that doesn't make sense to make catchable; but i don't think all errors should be that way. while in general, things related to bare derivations and building probably aren't gonna be the most useful to catch, the fact you can't run/use any nix expression inside your code without the fear that it might fatally throw is a little frustrating imo. if we did have a Result type it'd obviously be preferable to exceptions, but for the foreseeable future we won't, so i do think it's useful to be able to tell if e.g. some packages fail to eval in nixpkgs, or a property of a object we computed actually throws, etc
Basically at the core is the following problem: any fallibility which may depend on impure outside context propagates that impurity into the language if caught. I agree that not being able to catch runtime type errors is annoying though, and this may be fixable, but no guarantees (also a pproper type system would instant fix this entire class of issues)
22:51:03
@blokyk:matrix.orgzoë (she/her)

(i am somewhat reminded of the line i saw in last month's core team meting:

We wonder if we should have more boring people in our project
and seeing everyone's very interesting ideas compared to just the "nix is fun :D functional programming is fun :D if only haskell $ operator tho :( and also not cursed :((" idea i have definitely makes me kinda resonate with that line (which, obviously no problem with that, i am a pretty boring person in general) x)

22:51:27
@blokyk:matrix.orgzoë (she/her) *

(i am somewhat reminded of the line i saw in last month's core team meting:

We wonder if we should have more boring people in our project

and seeing everyone's very interesting ideas compared to just the "nix is fun :D functional programming is fun :D if only haskell $ operator tho :( and also not cursed :((" idea i have definitely makes me kinda resonate with that line (which, obviously no problem with that, i am a pretty boring person in general) x)

22:52:06
@blokyk:matrix.orgzoë (she/her)

also a proper type system would instant fix this entire class of issues

yeah, nix's lack of a type system is probably my biggest gripe with it; even stripping the cursed/badly designed parts of it, the dynamic nature makes writing nix just landmine after landmine

22:52:57
@blokyk:matrix.orgzoë (she/her)anyway i do agree with the solution of making externally-caused errors uncatchable, that makes complete sense to me; it's really mostly runtime errors that annoy me22:55:47
@blokyk:matrix.orgzoë (she/her)* anyway i do agree with the solution of making externally-caused errors uncatchable, that makes complete sense to me; it's really mostly runtime errors that frustrate me22:55:52
@blokyk:matrix.orgzoë (she/her)i really shouldn't have been, but i was genuinely surprised that the actual evaluator uses c++ exceptions to propagate eval/user-facing errors, instead of using a result type; it just felt... dirty. again, really shouldn't have been surprised, it is the nix codebase after all x)22:58:57
@raitobezarius:matrix.orgraitobezarius (DECT: 7248)my lawyer does not allow me to comment on these matters22:59:15

Show newer messages


Back to Room ListRoom Version: 10