Nixpkgs Architecture Team | 231 Members | |
| https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture | 51 Servers |
| Sender | Message | Time |
|---|---|---|
| 12 Jul 2023 | ||
| compared to e.g. Last | 08:42:54 | |
| (there could always be something with higher priority that the evaluator hasn’t seen yet, so you have to look at absolutely everything) | 08:43:33 | |
| I don’t know how nickel solves this? | 08:43:57 | |
Almost the same story for SOS, the intent was to not remove mkDerivation but delay it to be executed at the very end of the fix-point, thus making packages just ordinary attribute sets available through prev/super, which can be overwritten by using Nix's update operator within Nixpkgs' overlays. | 10:00:03 | |
In reply to @nbp:mozilla.orgHow does this deal with e.g. Python packages? I like the idea but again I don't think this is going to work well until we've foxed our builders | 10:16:18 | |
| Unrelated, but one change I’d like to see is having features be a special attribute set, and each feature ideally carries the information which dependencies it needs. | 10:58:16 | |
| That way static information is available. Question is whether this would be done symbolically (by projecting it out of the fixpoint as is the case now) or by-name (as a string) | 10:59:14 | |
| by flattening python packages under the top-level fix-point. What these python sets are is a custom python package with a set of python packages relying on these. To make it short, this is providing only a different An alternative would be to make inherited inputs. For example:
In which case one could assume that the last scope definition overrides the package inputs, unless override by the user with the update operator. We have many options to choose from. | 11:00:32 | |
These __scope would again be resolved last, only if the name is not explicitly bound on the packages inputs. | 11:01:52 | |
| No I was talking about builders like PythonPackage, not the package set itself | 11:04:10 | |
| Then I do not know, nor see how it would be different than today. | 11:05:14 | |
| Well the situation of today is pretty bad, so I hope it would be different | 11:06:31 | |
| simple paths when | 13:33:53 | |
| RFC is merged 🎉 | 13:46:11 | |
| as of 12 mins ago https://github.com/NixOS/rfcs/pull/140#event-9799573690 | 13:46:28 | |
| Yes. | 13:46:39 | |
| * | 13:46:57 | |
| Yes, "just" the implementation work left 😄 | 13:47:50 | |
| https://github.com/NixOS/nixpkgs/pull/237439 | 13:48:08 | |
On the performance matter, it's not really related to modules per se but in general I personally have high hopes in the incremental evaluation approach. It's less of an issue that your evaluation from scratch is slow, under the hypothesis that each new generation is just a small diff from the previous one, and that your interpreter can reuse most of the previous results incrementally. Lazy evaluation turns out to play quite well with incremental evaluation (basically, you can more or less swap the evaluator with a one performing various caching strategies without changing the semantics of the language). But hard to tell before trying this at scale.
I might be misunderstanding, but I feel like it's more of a NixOS module system design decision (put everything in one big fixpoint soup), rather than something inherent to merging as defined e.g. in CUE ? Couldn't you build a more scoped/hierarchical system based on CUE for example (or even in pure Nix)? | 14:59:02 | |
| yannham: Actually, one case where maximal-laziness this would shine a lot is on the nixos/maintainers/option-usages.nix expression, where NixOS evaluation is re-done completely with one option changed, and evaluating whether one option is used as part of the computation. This was one of my assumption, until I realize that the feature got removed :( | 15:25:18 | |
| What is CUE? | 15:26:16 | |
| CUE is a configuration language, non Turing-complete, with a very interesting approach (https://cuelang.org/). I would suspect it's not expressive enough for the Nix use-case, but they have a "meet" operator that is close to the fixpoint-merging done by the NixOS module system and Nickel's merging (and, for that matter, Jsonnet's inheritance '+' operator) | 15:28:54 | |
| Yeah, maximal laziness (plus a format to write the cached values on disk) would achieve that. I wonder if hash-consing and caching every little thing is the right tradeoff though, it might be quite costly and even a pessimization on big expressions. I suspect something slightly less fine-grained, such as caching at the level of attributes (recursively) and let bindings might work better. It's totally. It's totally speculative though, not backed by evidence | 15:37:28 | |
| * Yeah, maximal laziness (plus a format to write the cached values on disk) would achieve that. I wonder if hash-consing and caching every little thing is the right tradeoff though, it might be quite costly and even a pessimization on big expressions. I suspect something slightly less fine-grained, such as caching at the level of attributes (recursively) and let bindings might work better. It's totally speculative though, not backed by evidence | 15:37:46 | |
In reply to @yannham:matrix.orgFWIW, I authored a "writeCueValidator" in nixpkgs | 15:38:10 | |
| we use for bootspec | 15:38:12 | |
| To be frank, one of my hidden pleasure was that the module system is turing complete, and that people do not have to learn about functional programming to use it in NixOS. | 15:38:14 | |
it's optional behind bootspec.enableValidation because it pulls Go and this is not really acceptable for system build | 15:38:31 | |
| (except if you want to go beyond its interface and extend it, of course) | 15:38:45 | |