21 Oct 2024 |
KFears (tragedy arc) | Not necessarily "hostile relationship" | 21:45:48 |
KFears (tragedy arc) | But that's mostly being pedantic | 21:46:25 |
Sr. Estegosaurio | In reply to @sr.estegosaurio:matrix.org Now inxi -Gx (random tool I've found on the arch forums) displays both my dGPU and nouveau. While testing Xonotic I've encountered that it's using the iGPU insted of the dGPU, why can be that so? | 21:50:06 |
Sr. Estegosaurio | Aaand vkcube is giving me an error. | 21:54:51 |
Sr. Estegosaurio | Cannot connect to XCB. | 21:55:05 |
Sami Liedes | Does nixpkgs have (for some reason that I can't think of) the concept of version number ordering, or are version numbers just arbitrary strings that can be only compared for equality? | 21:56:15 |
KFears (tragedy arc) | In reply to @sliedes:hacklab.fi Does nixpkgs have (for some reason that I can't think of) the concept of version number ordering, or are version numbers just arbitrary strings that can be only compared for equality? There's a builtins thing for version comparison https://nix.dev/manual/nix/2.18/language/builtins#builtins-compareVersions | 21:57:41 |
Sami Liedes | Oh, that's a language builtin! I looked at lib.versions and saw something there. | 21:57:58 |
Sami Liedes | I vaguely remembered hearing of compareVersions. | 21:58:07 |
Sami Liedes | I guess the next question is what is it used for? :) | 21:58:22 |
grahamc 🤡 | (but for the most part, it isn't used much, and mostly versions are arbitrary strings.) | 21:58:23 |
emily | versionOlder/versionAtLeast are used extensively | 21:58:29 |
Sami Liedes | Ah. | 21:58:38 |
emily | for multi version packages, OS versions etc | 21:58:42 |
Sami Liedes | I'm writing an "assert that V1 is newer than V2" function. And then a function of "apply this override, but assert it overrides an older version". Because if I don't force myself to kill my overrides, it will never happen. | 21:59:27 |
KFears (tragedy arc) | In reply to @sliedes:hacklab.fi I guess the next question is what is it used for? :) Not much, AFAIK? Nixpkgs uses its own wrappers, and only in the context of comparing versions of a single package | 21:59:39 |
Sami Liedes | Funny that it's a language builtin. Really feels like a library function to me. | 22:01:08 |
emily | pretty sure that's for perf | 22:01:23 |
KFears (tragedy arc) | There are some weird builtins | 22:01:32 |
emily | or for string manipulation in nix is hell | 22:01:33 |
emily | or for nix-env's broken behaviour is based on it so why not expose it | 22:01:51 |
mjm | Only builtins can be implemented in C++ afaik | 22:01:56 |
emily | so I guess I'm not sure | 22:02:05 |
Sami Liedes | Ah, makes sense. | 22:02:09 |
KFears (tragedy arc) | It's really hard to think on libs in Nix as "builtins"/"lib" as you could in most languages, because builtins are just interfaces to C++ code and lib is all in NixLang | 22:02:32 |
KFears (tragedy arc) | Maybe you could think of builtins as prelude and lib as stdlib? But it doesn't make a lot of sense a lot of the time because perf and stuff | 22:03:08 |
mjm | Also lib is a nixpkgs construct that is independent of Nix itself | 22:03:51 |
Sami Liedes | Ah, versionOlder is in lib.strings, not lib.versions. | 22:04:05 |
KFears (tragedy arc) | I'm pretty sure map or mapAttrs wasn't always in builtins, it was only in NixLang, but it got added later so now we have builtins.map and lib.map and it's the same thing but different perf | 22:04:09 |
mjm | If you use nix without nixpkgs somehow, you don’t have lib at all | 22:04:28 |