| 12 Aug 2022 |
K900 | I actually disagree | 15:19:08 |
K900 | The spec for Nix the language shouldn't include anything about Nix the implementation | 15:19:20 |
K900 | And there may be a separate spec for the nix-daemon protocol | 15:19:29 |
nbp | Well … this is not as simple as that, as the derivation function is the only reason for the Nix language to have String context. | 15:20:09 |
Robert Hensing (roberth) | classic. Nix is not a name for any specific thing. There's a ton of interfaces that can be specified, some of them called "Nix". | 15:20:10 |
K900 | In reply to @nbp:mozilla.org Well … this is not as simple as that, as the derivation function is the only reason for the Nix language to have String context. The spec for the language defines string context, the spec for the daemon defines how it's passed to the daemon | 15:22:14 |
nbp | Nix language: Here is a lazy functional programming language, which has a string-context feature which is unnecessary, but this is part of the spec.
Nix daemon object model: Here is the derivation function that extends the Nix language spec, oh and by the way it relies on the string-context feature.
| 15:25:27 |
K900 | The derivation function is part of the language | 15:25:46 |
K900 | As is everything else in builtins | 15:25:50 |
nbp | ah, so we agree. | 15:25:55 |
K900 | To me the Nix language spec has to document everything Nix does | 15:26:26 |
K900 | Just without documenting how it does it | 15:26:31 |
K900 | But you need to document the semantics of derivation and such | 15:27:01 |
Alyssa Ross | you could reimplement Nix with no daemon, and it would still have a derivation function | 15:28:09 |
K900 | My smoke test for the spec would be basically just sitting down and writing a very basic Nix interpreter without looking at the code of Nix or nixpkgs | 15:31:12 |
K900 | And then having it build something actually useful | 15:31:22 |
John Ericson | In reply to @Ericson2314:matrix.org Doxygen is good, but not a replacement for an implementation-agnostic spec! ooos and I did the wrong channel | 17:01:22 |
| 13 Aug 2022 |
Wanja Hentze | In reply to @k900:0upti.me My smoke test for the spec would be basically just sitting down and writing a very basic Nix interpreter without looking at the code of Nix or nixpkgs that sounds fun, I'd be down for thatr | 01:44:12 |
Wanja Hentze | * that sounds fun, I'd be down for that | 01:44:25 |
| 16 Aug 2022 |
Robert Hensing (roberth) | if anyone's interested, here's a possible minimal module system, that might address performance concerns compared to the full-featured one
https://gist.github.com/roberth/940dff88ca5f5f95949dc309dbe60a65 | 21:12:30 |
Robert Hensing (roberth) | it's little more than a brain dump and a ~100 line module system core implementation | 21:12:47 |
DavHau | Robert Hensing (roberth): It sounds super interesting. What is POP? | 22:33:51 |
Robert Hensing (roberth) | https://github.com/NixOS/nixpkgs/pull/116275 | 23:37:46 |
| 17 Aug 2022 |
| pbsds joined the room. | 00:04:35 |
j-k | I'm guessing it's split out into loads of separate items mostly for effect?
looks very easy to add to but as for removing values would you overwrite or use lib.remove in some way?
| 08:30:34 |
Robert Hensing (roberth) | POP is split out you mean? Maybe it helps its generality | 10:32:56 |
Robert Hensing (roberth) | Seems like POP is not a great fit for minimod, because super is redundant and the extra machinery will add overhead | 10:33:36 |
Robert Hensing (roberth) | so both cognitive and performance overhead | 10:35:43 |
Robert Hensing (roberth) | super isn't very declarative anyway, but functional. It makes you think about how to change something wrong to something right. Change. | 10:36:24 |
Robert Hensing (roberth) | the same can be said of the module system priority system (mkForce and friends, also supported in minimod), but that plays a smaller role | 10:46:06 |