| 11 Jul 2023 |
@piegames:matrix.org | Instead I suggest tucking on some dependency system onto the module system, and the evaluator now additionally checks that each module only references options which are declared as one of its dependencies. (That's the main part I did back then). | 13:33:39 |
profpatsch | piegames: To confirm or reject the statement “you need to have some cycles to be powerful enough”, obviously | 13:33:41 |
@piegames:matrix.org | In reply to @profpatsch:augsburg.one piegames: To confirm or reject the statement “you need to have some cycles to be powerful enough”, obviously I mean, you could always design something that works without, which I tried, and it was no fun. I don't remember the exact issues I was running into though | 13:34:51 |
nbp | Profpatsch: https://github.com/NixOS/nixpkgs/blob/master/nixos/maintainers/option-usages.nix You are lucky, it still exists! | 13:39:06 |
@piegames:matrix.org | In reply to @profpatsch:augsburg.one piegames: To confirm or reject the statement “you need to have some cycles to be powerful enough”, obviously I think you probably won't need it for most modules, but you might need it for some of the more "core" bits. Which is basically my point: with a coarse dependency graph which tracks that information, one would not pay the performance penalty of recursion unless where required. | 13:41:01 |
infinisil | @room: The next meeting will take place in 30 minutes - meeting link - live stream - meeting notes | 13:57:35 |
profpatsch | piegames: in that case maybe have a package abstraction that can merge multiple files, but not generically | 14:19:06 |
profpatsch | I mean, ML has basically solved this problems with functors | 14:20:29 |
profpatsch | We could just follow suit | 14:20:34 |
infinisil | tomberek: John Ericson: Joining? | 14:33:09 |
John Ericson | sorry in a work meeting will be late :/ | 14:33:25 |
@piegames:matrix.org | "TODO: refactor once something like Profpatsch's types-simple will land" what's types-simple, and when will it land? | 15:52:55 |
@piegames:matrix.org | Ah, found it: https://github.com/NixOS/nixpkgs/compare/master...Profpatsch:nixpkgs:types-simple-WIP | 15:54:21 |
profpatsch | piegames: notime, Eelco said he doesn’t want it | 16:08:40 |
@piegames:matrix.org | Somebody else would have to veto in order to stop me (: | 16:10:13 |
@piegames:matrix.org | I might be motivated to pick this up, unless somebody shows me another way to solve my problems described in https://discourse.nixos.org/t/the-module-system-is-dead-how-to-do-input-validation/30297/4 | 16:11:20 |
profpatsch | piegames: An alternative with a slightly different design is https://code.tvl.fyi/tree/nix/yants/default.nix | 16:11:44 |
@piegames:matrix.org | Yeah I've seen YANTS and didn't like it as much | 16:12:07 |
profpatsch | The main difference is that types-simple is out-of-band, while yants is in-band | 16:12:11 |
@piegames:matrix.org | wdym | 16:12:30 |
profpatsch | which gives yants the (partial) ability to type-check functions | 16:12:37 |
profpatsch | types-simple can only typecheck “data”, not functions | 16:14:19 |
profpatsch | depends on what you want to do, for checkMeta only checking data should be enough | 16:14:47 |
@piegames:matrix.org | Well ideally I'd like to use this for Nixpkgs configuration too, but merging :( | 16:16:05 |
profpatsch | merging is different from typechecking | 16:16:53 |
profpatsch | conflating the two is a big source of annoyance | 16:17:02 |
@piegames:matrix.org | I know | 16:17:13 |
@piegames:matrix.org | One thing that I'd really like to have is some type checking but with default values support. Because currently, there's only the module system which can do that, and instantiating a module system just for each package's meta is not something that is going to fly | 17:03:53 |
profpatsch | piegames: I haven’t thought in-depth about that, but to me a merging algorithm is just a monoidal thingy | 17:15:27 |
profpatsch | you can do a lot of things with that | 17:15:47 |