| 24 Oct 2025 |
lillecarl | 522 it/its ⛯ΘΔ: But also: Even the default GC is a bit eager at removing things as it is right now. It'll happily remove anything you don't have in gcroots even if you fetched it five minutes ago, the likelyhood that you're going to use something you fetched 5 minutes ago is pretty high... 😄 | 23:33:26 |
522 it/its ⛯ΘΔ | i mean i do personally think time shouldn't really be a factor in gc, since that's kinda fragile | 23:35:55 |
522 it/its ⛯ΘΔ | the correct way to do this imoimo is to add stuff to gcroots | 23:36:46 |
lillecarl | 🤷 There's a reason why nixbuild, attic and cachix do something similar but ofc it's a perfectly valid opinion to leave QOL features to external tools | 23:40:05 |
522 it/its ⛯ΘΔ | like, once you have "nix run makes a gcroot in a specified directory" then you can do your own gc management on that yourself without involving nix code | 23:40:53 |
lillecarl | Yeah except it's entirely unreasonable to install and maintain gcroots on a binary cache, which is what I'm proposing this feature for, this doesn't matter much for your nixos configuration | 23:42:00 |
| 25 Oct 2025 |
| Rcat 🏳️🌈🏳️⚧️ changed their profile picture. | 06:14:46 |
raitobezarius | lillecarl: I think that the Lix project is not enthusiast into extending the SQLite database, we are more interested into deleting it atm; we would rather recommend to build a "lastRequired" information out of band and use GC roots to enforce it using the Lix's GC code | 09:45:22 |
KFears (burnt out) | In reply to @piegames:flausch.social Yes Would it make sense to stabilize forward pipe? | 11:05:51 |
Sofie 🏳️⚧️ (she/her) | Is there a way to get rid of this without well,,, patching Nixpkgs | 11:41:44 |
Katalin 🔪 | In reply to @piegames:flausch.social We currently have a backpipe operator, but it is not guaranteed to stay that’s disappointing to hear, I use it much more often than the forward pipe (currently 36 times vs 4 times in my main repo) and it would suck to lose it without a replacement. It’s very useful in removing levels of nested parentheses | 12:55:58 |
piegames | do you have some usage snippets for me to look at? | 12:56:32 |
Katalin 🔪 | sure, hold on | 12:57:39 |
Katalin 🔪 | https://git.dblsaiko.net/systems/tree/nixos/modules/sys2x/ssl.nix#n51 https://git.dblsaiko.net/systems/tree/configurations/whiprock/xmpp.nix#n15 | 13:07:18 |
KFears (burnt out) | I've seen you use backpipes, but I can't parse how it works at all | 13:38:50 |
Cyborus | Not to be confused with bagpipes | 13:40:09 |
Katalin 🔪 | In reply to @kfears:matrix.org I've seen you use backpipes, but I can't parse how it works at all essentially, they are equivalent to putting everything after them in parentheses, I think exactly like the haskell $ operator | 13:42:40 |
Katalin 🔪 | or, if not exactly, it’s close enough at a glance. I don’t write haskell lol | 13:43:22 |
Katalin 🔪 | yeah: https://wiki.haskell.org/$ | 13:44:36 |
KFears (burnt out) | So like foo bar (baz queux) is foo bar |> baz queux? | 13:45:11 |
KFears (burnt out) | But it only works with the last argument, because otherwise you still have to parenthesise? | 13:45:46 |
Katalin 🔪 | <|, but yeah | 13:46:18 |
Katalin 🔪 | adapting the example from the haskell wiki:
f <| g <| h x == f (g (h x))
f g h x == ((f g) h) x
| 13:47:57 |
emily | <| is also more "order-of-eval-correct" | 13:48:41 |
emily | (though (&) as flip ($) is also popular in Haskell – or was, back in my day…) | 13:48:52 |
emily | (I personally avoided using $ in Haskell for various reasons so I have little opinion on any of this other than to say what I'd really like in Nix is function composition operators) | 13:49:29 |
KFears (burnt out) | Interesting. Is it weird that I prefer parens? | 13:50:19 |
K900 | ~~lib.pipe~~ | 13:50:28 |
emily | parens can be ugly if you want something (x: …) (vs. something <| x: …) | 13:50:42 |
Katalin 🔪 | In reply to @emilazy:matrix.org parens can be ugly if you want something (x: …) (vs. something <| x: …) unfortunately the latter doesn’t actually parse right now :( | 13:51:05 |