!9IQChSjwSHXPPWTa:lix.systems

Lix

1121 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-rooms302 Servers

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


SenderMessageTime
30 Nov 2025
@anouk:kif.rocks@anouk:kif.rocks left the room.23:28:51
@niko:nrab.lolniko ⚡️ and this is even more unexpected: nix-building a file like this { __functor = self: <derivation>; }, which obviously isn't "valid" nix code (technically valid, but for the sake of brevity let's just say it's invalid), actually builds the derivation... what? Surely this is not expected, that's not how functors work 23:51:11
@niko:nrab.lolniko ⚡️

Some more cursed observations. Given file:

# foo.nix
{
  foo = "hi from outside";
  __functor = _: {
    foo = "hi from inside";
  };
}

We can observe:

$ nix-instantiate --eval foo.nix
{ __functor = <CODE>; foo = "hi from outside"; }
$ nix-instantiate --eval foo.nix -A foo
"hi from inside"
23:57:39
1 Dec 2025
@niko:nrab.lolniko ⚡️

I guess this is kinda expected given how nix-build works, but still. I don't like this. And better yet:

# foo.nix
{
  __functor = _: {
    foo = "hi from inside";
  };
}
# bar.nix
{
  __functor = _: {}: {
    foo = "hi from inside";
  };
}
# baz.nix
{
  __functor = _: _: {
    foo = "hi from inside";
  };
}
$ nix-instantiate --eval foo.nix -A foo
"hi from inside"
$ nix-instantiate --eval bar.nix -A foo
"hi from inside"
$ nix-instantiate --eval baz.nix -A foo
error: the value being indexed in the selection path 'foo' at '' should be a set but is a function: «lambda __functor @ baz.nix:2:18»
00:02:11
@raitobezarius:matrix.orgraitobezarius
In reply to @niko:nrab.lol
and this is even more unexpected: nix-building a file like this { __functor = self: <derivation>; }, which obviously isn't "valid" nix code (technically valid, but for the sake of brevity let's just say it's invalid), actually builds the derivation... what? Surely this is not expected, that's not how functors work
Auto call semantics mindfucking again?
00:21:20
@raitobezarius:matrix.orgraitobezarius(yes all my homies hate *deep* auto calls.)00:21:36

Show newer messages


Back to Room ListRoom Version: 10