!9IQChSjwSHXPPWTa:lix.systems

Lix

1104 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms295 Servers

Load older messages


SenderMessageTime
12 Dec 2025
@emilazy:matrix.orgemilyI suspect Nickel might be doing something closer13:48:59
@arianvp:matrix.orgArianDepends on what you mean with dynamically typed. It’s a lattice. So you can do static analysis by merging with an abstracter lattice13:51:34
@emilazy:matrix.orgemily(I know types-as-values/more general dependent typing can make this a fuzzy question already because you have type-checking recursing into evaluation, so for clarity I mean "you cannot type-check an expression with a free variable of known type but unknown value, right?" - but I could be wrong.)13:52:22
@arianvp:matrix.orgArianthe static-ness of a defintion is a nice partial order with types at the top and uninhabited values at the bottom. Slice the lattice was much as yo need13:52:23
@emilazy:matrix.orgemilyright... I guess you can try evaluating by just setting the variable to its type. hmm...13:52:46
@arianvp:matrix.orgArianyes… or to a static constraint13:53:03
@emilazy:matrix.orgemilyIIRC CUE has limited control flow, right? I am not sure if the properties would scale to making it a "real PL"13:53:45
@emilazy:matrix.orgemilye.g. I don't see how you could typeck a recursive branching function in this way13:54:15
@emilazy:matrix.orgemilywhich sort of scuppers it as a model for Nix13:54:24
@emilazy:matrix.orgemilyeh, maybe you could with enough memoization. wouldn't work for polymorphic recursion but that's a high bar.13:55:11
@arianvp:matrix.orgAriancue doesn’t have functions. it’s more a model of the NixOS module system; not of nix13:55:12
@arianvp:matrix.orgArianmy thesis is that nix is a terrible host language for the NixOS module system :P13:55:20
@emilazy:matrix.orgemilyyeah13:56:08
@emilazy:matrix.orgemilywell I don't like the module system anyway, it's too global. throws away half of the properties that make Nix nice for package graphs.13:56:34
@kfears:matrix.orgKFears (burnt out) I really like modules. Functional package graphs get weird and very global when splicing and pkgsStatic and build variants become a thing 16:06:05
@emilazy:matrix.orgemilyI don't think the module system solves the issue of variant sets16:24:52
@emilazy:matrix.orgemily(it just doesn't really have to deal with it in practice since people do the equivalent thing with NixOS much less, although still not zero)16:25:33
@emilazy:matrix.orgemilythe equivalent of NixOS modules for the package set would be if every package definition in Nixpkgs could monkey-patch any other package arbitrarily16:26:32
@llakala:matrix.orgllakala
In reply to @emilazy:matrix.org
well I don't like the module system anyway, it's too global. throws away half of the properties that make Nix nice for package graphs.
i will plug my fav alternate module system
18:17:22
@llakala:matrix.orgllakalahttps://github.com/adisbladis/adios18:17:42
@llakala:matrix.orgllakalait's basically what I always wanted in a module system18:18:20
@llakala:matrix.orgllakalawhere it only evaluates the modules you actually use18:18:35
@llakala:matrix.orgllakalai did some eval profiling for my use of it and it only adds about 2% extra evaluation time - the rest is just from the drvs18:19:43
@llakala:matrix.orgllakalasince the docs are pretty barebones (something I'm hoping to fix), you can see real-world usage here https://github.com/llakala/nixos/tree/6e15be6cae6a9051f763e34ae711460751672df7/wrappers18:20:41
@llakala:matrix.orgllakalamodules can read from the config values in another module, and with my new PR, you can even mutate another modjle18:22:05
@llakala:matrix.orgllakala* modules can read from the config values in another module, and with my new PR, you can even mutate another module18:22:11
@llakala:matrix.orgllakalabut both of those are done with explicit dependency relationships18:22:34
@llakala:matrix.orgllakalai think of it as "a recursive `callPackage` set on steroids"18:23:31
@emilazy:matrix.orgemilylooks interesting, thanks18:42:00
@emilazy:matrix.orgemilyI definitely hate the global namespace / lack of POLA a lot more than the monoid, so it's nice to see something tackling that18:42:35

There are no newer messages yet.


Back to Room ListRoom Version: 10