!RRerllqmbATpmbJgCn:nixos.org

Nix / NixOS

3853 Members
Nix/NixOS user help channel | Latest NixOS: 24.05 (Uakari) | Ask your question here or on https://discourse.nixos.org | All NixOS rooms are moderated! Ask for help in #moderation:nixos.org660 Servers

Load older messages


SenderMessageTime
21 Oct 2024
@kfears:matrix.orgKFears (tragedy arc)Not necessarily "hostile relationship"21:45:48
@kfears:matrix.orgKFears (tragedy arc)But that's mostly being pedantic21:46:25
@sr.estegosaurio:matrix.orgSr. 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:matrix.orgSr. Estegosaurio Aaand vkcube is giving me an error. 21:54:51
@sr.estegosaurio:matrix.orgSr. Estegosaurio Cannot connect to XCB. 21:55:05
@sliedes:hacklab.fiSami LiedesDoes 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:matrix.orgKFears (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
@sliedes:hacklab.fiSami LiedesOh, that's a language builtin! I looked at lib.versions and saw something there.21:57:58
@sliedes:hacklab.fiSami LiedesI vaguely remembered hearing of compareVersions.21:58:07
@sliedes:hacklab.fiSami LiedesI guess the next question is what is it used for? :)21:58:22
@gchristensen:matrix.orggrahamc 🤡(but for the most part, it isn't used much, and mostly versions are arbitrary strings.)21:58:23
@emilazy:matrix.orgemilyversionOlder/versionAtLeast are used extensively21:58:29
@sliedes:hacklab.fiSami LiedesAh.21:58:38
@emilazy:matrix.orgemilyfor multi version packages, OS versions etc21:58:42
@sliedes:hacklab.fiSami LiedesI'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:matrix.orgKFears (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
@sliedes:hacklab.fiSami LiedesFunny that it's a language builtin. Really feels like a library function to me.22:01:08
@emilazy:matrix.orgemilypretty sure that's for perf22:01:23
@kfears:matrix.orgKFears (tragedy arc)There are some weird builtins22:01:32
@emilazy:matrix.orgemilyor for string manipulation in nix is hell22:01:33
@emilazy:matrix.orgemilyor for nix-env's broken behaviour is based on it so why not expose it22:01:51
@mjm:midna.devmjmOnly builtins can be implemented in C++ afaik22:01:56
@emilazy:matrix.orgemilyso I guess I'm not sure22:02:05
@sliedes:hacklab.fiSami LiedesAh, makes sense.22:02:09
@kfears:matrix.orgKFears (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 NixLang22:02:32
@kfears:matrix.orgKFears (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 stuff22:03:08
@mjm:midna.devmjmAlso lib is a nixpkgs construct that is independent of Nix itself22:03:51
@sliedes:hacklab.fiSami LiedesAh, versionOlder is in lib.strings, not lib.versions.22:04:05
@kfears:matrix.orgKFears (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:midna.devmjmIf you use nix without nixpkgs somehow, you don’t have lib at all22:04:28

Show newer messages


Back to Room ListRoom Version: 10