!9IQChSjwSHXPPWTa:lix.systems

Lix

1124 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-rooms304 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
20 Dec 2025
@piegames:flausch.socialpiegamesYou remind me of https://bartoszmilewski.com/2014/02/26/c17-i-see-a-monad-in-your-future/ :p13:54:32
@cyclopentane:aidoskyneen.eupentane

yeah I've also already thought about how to model the evaluation/build process of Nix derivarions as a monadic data structure

basically you wanna have a monad like Derivation a, where a is the type of the value produced by the build of the derivation (currently, Nix derivations always produce files or directories, but theoretically nothing speaks against derivations producing strings, integers, etc as their build result too)

Derivation FileOrDirectory would then be equivalent to our current .drv files

14:21:10
@cyclopentane:aidoskyneen.eupentane and the monadic bind operation would correspond to IFD 14:21:47
@cyclopentane:aidoskyneen.eupentane cause if you e.g. have a derivation returning a lock file by reading it from an archive or something (Derivation LockFile) and a build helper constructing a package out of that lock file (LockFile -> Derivation Package), you can use >>= to get a Derivation Package 14:24:26
@cyclopentane:aidoskyneen.eupentane and the monoid operation join :: Derivation Derivation a -> Derivation a would basically be "build this .drv file to obtain another .drv file and build that in turn, and then return the result` 14:25:53
@cyclopentane:aidoskyneen.eupentanealthough afaict from a theoretical standpoint, this matches the semantics of dynamic derivations better than IFD14:26:52
@piegames:flausch.socialpiegamesnow that you say all of this, maybe k900 has a point :p14:27:06
@cyclopentane:aidoskyneen.eupentaneyeah I also agree with K90014:27:51

Show newer messages


Back to Room ListRoom Version: 10