!tDnwWRNkmmYtMXfaZl:nixos.org

Nix Language

1925 Members
Nix programming language358 Servers

Load older messages


SenderMessageTime
1 Jun 2026
@llakala:matrix.orgllakalaworking on a speedup to lib.platforms generation using groupBy, and had the idea to put the most frequent systems first in the individual lists17:11:46
@llakala:matrix.orgllakalaso the elem lookups could find the correct system earlire17:14:16
@llakala:matrix.orgllakala* so the elem lookups could find the correct system earlier17:14:19
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @llakala:matrix.org
judging by my quick look at the impl in noogle, I assume groupBy doesn't preserve order (where the values in the individual groups would be in the order of the original list)
Why do you say that it doesn’t preserve order?
17:15:41
@llakala:matrix.orgllakalawas just looking at the alreadySorted part17:15:57
@llakala:matrix.orgllakalabut apparently i'm wrong, since i just checked and order seems to be preserved17:16:08
@llakala:matrix.orgllakala

meaning we can take

[
  "aarch64-linux"
  "arc-linux"
  "armv5tel-linux"
  "armv6l-linux"
  "armv7a-linux"
  "armv7l-linux"
  "i686-linux"
  "loongarch64-linux"
  "m68k-linux"
  "sh4-linux"
  "microblaze-linux"
  "microblazeel-linux"
  "mips-linux"
  "mips64-linux"
  "mips64el-linux"
  "mipsel-linux"
  "powerpc-linux"
  "powerpc64-linux"
  "powerpc64le-linux"
  "riscv32-linux"
  "riscv64-linux"
  "s390-linux"
  "s390x-linux"
  "x86_64-linux"
]

and turn it into

[
  "x86_64-linux"
  "aarch64-linux"
  "arc-linux"
  "armv5tel-linux"
  "armv6l-linux"
  "armv7a-linux"
  "armv7l-linux"
  "i686-linux"
  "loongarch64-linux"
  "m68k-linux"
  "sh4-linux"
  "microblaze-linux"
  "microblazeel-linux"
  "mips-linux"
  "mips64-linux"
  "mips64el-linux"
  "mipsel-linux"
  "powerpc-linux"
  "powerpc64-linux"
  "powerpc64le-linux"
  "riscv32-linux"
  "riscv64-linux"
  "s390-linux"
  "s390x-linux"
]
17:16:32
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @llakala:matrix.org
was just looking at the alreadySorted part
That’s the regular stuff to avoid sorting stuff that’s already sorted internally.
17:17:43
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)(And by sorting I mean the internal symbol table order which isn’t totally unobservable, but it’s not about the list orderings)17:18:23
@llakala:matrix.orgllakalainteresting, neat to know17:18:41
@mika:matrix.bohinen.nomikabo joined the room.17:54:52
2 Jun 2026
@m0jibake:matrix.org@m0jibake:matrix.org left the room.01:39:59
@halloibims:matrix.orghalloibims joined the room.05:23:36
@haenoe:matrix.orgMax joined the room.07:38:11
@srgalan:matrix.orgSr. Galán joined the room.09:17:03
@toonn:matrix.orgtoonnThe documentation on Floats is rather sparse. Is the following correct? Nix Floats are double-precision floating point numbers, excluding -0, subnormals, NaN and +/-∞.14:25:16
@toonn:matrix.orgtoonnAnd only decimal literals are available?14:26:21
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @toonn:matrix.org
The documentation on Floats is rather sparse. Is the following correct? Nix Floats are double-precision floating point numbers, excluding -0, subnormals, NaN and +/-∞.
Internally everything is just a double. String formatting uses like 4 different formats and is totally busted. You can produce +-0, canonical NaN or +-inf with arithmetic
14:40:08
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Subnormals is kinda meh, depends on the c++ stdlib when it comes to parsing. I seem to recall there were issues with TOML and libc++14:40:56
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Basically it’s a flaming pile of nonreproducibility14:42:14
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)And yeah everything by related to NaNs is platform dependent14:43:43
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)* And yeah everything related to NaNs is platform dependent14:43:47
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Consult the closest ISA manual /s14:44:10
@piegames:flausch.socialpiegamesIf I could I'd rip out floats entirely, and then reintroduce them with a clean implementation later maybe14:44:24
@piegames:flausch.socialpiegamesMaybe I will, but priorities14:44:30
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)I was hoping to just plonk down softfloat and be done with it, native floats is garbage and compilers have a tendency to miscompile it still14:45:00
@toonn:matrix.orgtoonn Oh, * works yeah, couldn't make it happen with +. -1.0 * 0.0 -> -0, 1.e308 * 1.e308 -> inf (negatable) and 1.e308 * 1.e308 * 0.0 -> NaN (negatable). 14:50:11
@toonn:matrix.orgtoonnThank you, Sergei!14:50:36
@toonn:matrix.orgtoonn And of course the only one of those that roundtrips through to/fromJSON is -0.0, even though that's not a legal literal >.< 14:55:35
@lumi:the-apothecary.clubNuwa changed their profile picture.15:43:33

Show newer messages


Back to Room ListRoom Version: 6