!9IQChSjwSHXPPWTa:lix.systems

Lix

810 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-rooms236 Servers

Load older messages


SenderMessageTime
16 Feb 2025
@ma27:nicht-so.sexyma27
In reply to @irenes:matrix.org
I'm on nix (Lix, like Nix) 2.93.0-dev-pre20250120-5f1782a which I realize may be slightly old
IIRC this was indeed a regression on master and the date sounds like you could still be affected. So it probably makes sense to try upgrading.
09:40:24
@irenes:matrix.orgIreneshmm thanks!09:42:11
@aloisw:julia0815.dealoisw changed their profile picture.10:14:30
@noob_tea:matrix.orgtea
In reply to@piegames:flausch.social
Though I'd probably stringify the enum tag instead of using a boolean, especially in combination with symbol optimization (strings in the symbol table compress down to u32)
i am now afraid to ask, how are booleans stored?
11:32:12
@piegames:flausch.socialpiegames
In reply to @noob_tea:matrix.org
i am now afraid to ask, how are booleans stored?
Maybe I was a bit unclear: I'd prefer strings over booleans for usability reasons, and there are ways to do so without eating performance
11:33:57
@noob_tea:matrix.orgtea
In reply to@piegames:flausch.social
Maybe I was a bit unclear: I'd prefer strings over booleans for usability reasons, and there are ways to do so without eating performance
ah okay, I thought you implied that booleans would be larger than an u32 (which would be terrible, but not that surprising, knowing nix)
11:35:46
@piegames:flausch.socialpiegamesI mean they are, at least in the sense that all Nix values are 24 byes (IIRC), but string are still slower because of more allocations and bookkeeping (string context etc.)11:38:05
@gretj:catgirl.cloudgretj joined the room.16:11:33
@charles:computer.surgeryCharles
In reply to @piegames:flausch.social
Though I'd probably stringify the enum tag instead of using a boolean, especially in combination with symbol optimization (strings in the symbol table compress down to u32)
I've just realized that you could just get rid of the bool entirely and just go off the length of the list
16:41:49
@charles:computer.surgeryCharlesIn this particular case anyway. But yeah you'd need a string tag or something in the general case16:42:16
@charles:computer.surgeryCharlesAlso this (the general case) is pretty much the same as what I came up with for python a while back: https://charles.pages.gitlab.computer.surgery/blog/python-has-sum-types.html16:48:14
@piegames:flausch.socialpiegames
In reply to @charles:computer.surgery
In this particular case anyway. But yeah you'd need a string tag or something in the general case
Yeah, this exactly. I'd probably prefer making it a more general sum type system
16:50:33
@charles:computer.surgeryCharles is there a name for the <nixpkgs> syntax? newer versions of the cppnix manual seem to call this "path lookup", but i don't see that term in the lix manual anywhere 18:32:36
@antifuchs:asf.computerantifuchsBelieve that’s just called a path, at least that’s what the nix manual calls them18:41:23
@antifuchs:asf.computerantifuchsFrom https://nix.dev/manual/nix/2.18/language/values#type-path18:41:36
@charles:computer.surgeryCharlesyour manual is too old18:41:45
@charles:computer.surgeryCharleshttps://nix.dev/manual/nix/2.25/language/constructs/lookup-path18:42:03
@antifuchs:asf.computerantifuchsFine fine https://docs.lix.systems/manual/lix/stable/language/values.html#type-path18:42:39
@charles:computer.surgeryCharlesthat doesn't give the construct a name18:42:59
@charles:computer.surgeryCharlesit just says you can use that syntax, but it doesn't give it a name18:43:19
@charles:computer.surgeryCharlesi'm looking for a name18:43:23
@antifuchs:asf.computerantifuchsAh, for the syntax; got it18:43:38
@charles:computer.surgeryCharlesyeah18:43:44
@charles:computer.surgeryCharles semantically paths and lookup paths behave the same way so for a type system they should probably both just belong to a single path type, but i think it would be useful to have a term for both actual paths and the angle bracket syntax 18:44:20
@antifuchs:asf.computerantifuchsHm, yeah, maybe something to put on the value’s meta info (:18:49:26
@charles:computer.surgeryCharlesrelatedly, here's some half-baked thoughts on a system for doing type annotations in nix-the-language: https://hedgedoc.computer.surgery/s/59ni6v-oA#19:37:35
@charles:computer.surgeryCharles if anyone has ideas for how to solve the problem mentioned with callPackage towards the end there i'd be interested in hearing it 19:46:06
@charles:computer.surgeryCharles basically, callPackage will add attributes if the thing you're callPackageing returns an attribute set, otherwise it won't bother 19:47:01
@charles:computer.surgeryCharlesthe type in the reference doesn't even indicate this behavior: https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.customisation.callPackageWith21:27:59
@jyrama:garm.jrd.fijyramaI somehow managed to get my nix-env oom-killed while running comma. Not sure why comma even ran nix-env in the background. Anyone has pointers for gathering information on the process so the underlying problem could be investigated after I start reproducing it?21:38:28

Show newer messages


Back to Room ListRoom Version: 10