!tDnwWRNkmmYtMXfaZl:nixos.org

Nix Language

1872 Members
Nix programming language345 Servers

Load older messages


SenderMessageTime
2 Jun 2026
@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.club@lumi:the-apothecary.club changed their profile picture.15:43:33
@toonn:matrix.orgtoonnHmm, those aren't legal JSON anyway I suppose.16:14:43
@simx72:matrix.org@simx72:matrix.org joined the room.21:11:36
@simx72:matrix.org@simx72:matrix.org left the room.21:13:37
@lumi:the-apothecary.club@lumi:the-apothecary.club changed their profile picture.22:34:43
3 Jun 2026
@toonn:matrix.orgtoonnMore of a Nixpkgs lib question but anyone know why lib.strings.escapeURL percent-encodes more than strictly necessary?10:44:12
@lumi:the-apothecary.club@lumi:the-apothecary.club changed their profile picture.11:23:47
@9hp71n:matrix.orgghpzin It just doesn't have any special handling for "reserved" characters (all of them are escaped), "unreserved" list is the same as defined in RFC 3986.
From https://github.com/NixOS/nixpkgs/pull/219235 seems like the idea was to add extra parameter if it was needed after.
11:33:36
@toonn:matrix.orgtoonnOK, thanks for the digging!12:57:28
@k:matrix.fawkes.io@k:matrix.fawkes.io left the room.18:03:55
@orowith2os:fedora.imYves (she/they) changed their profile picture.18:29:05
@llakala:matrix.orgllakala

in terms of evaluation performance, does one of these short circuit faster or prevent an allocation?

  # version 1
  if foo.bar.baz or "" == "some-value" then .....
  # version 2
  if foo.bar.baz or null == "some-value" then .....
``
22:33:53
@llakala:matrix.orgllakala *

in terms of evaluation performance, does one of these short circuit faster or prevent an allocation?

  # version 1
  if foo.bar.baz or "" == "some-value" then .....
  # version 2
  if foo.bar.baz or null == "some-value" then .....
22:34:01
@llakala:matrix.orgllakala isDerivation uses v2, while isType in lib.types uses v1. curious if there's any benefit to one or the other 22:35:30
@llakala:matrix.orgllakalamy instinct is that v2 will prevent a string comparison since comparing the types will fail22:35:54
@llakala:matrix.orgllakalabut i'd like that instinct to be validated22:36:37
@llakala:matrix.orgllakala* but i'd like that instinct to be validated or chastised22:36:43
@llakala:matrix.orgllakala

relatedly, does bringing the string out to a variable make any difference in terms of memory, or is it equivalent? for example:

  # current
  isDerivation = value: value.type or null == "derivation";

  # hypothetically
  isDerivation =
    let
      derivation = "derivation";
    in
    value: value.type or null == derivation;
22:39:11
@lumi:the-apothecary.club@lumi:the-apothecary.club removed their profile picture.22:41:01
@lumi:the-apothecary.club@lumi:the-apothecary.club removed their display name Vel.22:41:23
@x3ro_:matrix.orgBjörn changed their display name from ^x3ro to Björn.22:42:00
@lumi:the-apothecary.club@lumi:the-apothecary.club set a profile picture.22:53:19

Show newer messages


Back to Room ListRoom Version: 6