| 2 Jun 2026 |
Sergei Zimmerman (xokdvium) | * And yeah everything related to NaNs is platform dependent | 14:43:47 |
Sergei Zimmerman (xokdvium) | Consult the closest ISA manual /s | 14:44:10 |
piegames | If I could I'd rip out floats entirely, and then reintroduce them with a clean implementation later maybe | 14:44:24 |
piegames | Maybe I will, but priorities | 14:44:30 |
Sergei 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 still | 14:45:00 |
toonn | 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 | Thank you, Sergei! | 14:50:36 |
toonn | 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 changed their profile picture. | 15:43:33 |
toonn | Hmm, those aren't legal JSON anyway I suppose. | 16:14:43 |
| @simx72:matrix.org joined the room. | 21:11:36 |
| @simx72:matrix.org left the room. | 21:13:37 |
| @lumi:the-apothecary.club changed their profile picture. | 22:34:43 |
| 3 Jun 2026 |
toonn | More 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 changed their profile picture. | 11:23:47 |
ghpzin | 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 | OK, thanks for the digging! | 12:57:28 |
| @k:matrix.fawkes.io left the room. | 18:03:55 |
| Yves (she/they) changed their profile picture. | 18:29:05 |
llakala | 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 | * 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 | 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 | my instinct is that v2 will prevent a string comparison since comparing the types will fail | 22:35:54 |
llakala | but i'd like that instinct to be validated | 22:36:37 |
llakala | * but i'd like that instinct to be validated or chastised | 22:36:43 |
llakala | 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 removed their profile picture. | 22:41:01 |
| @lumi:the-apothecary.club removed their display name Vel. | 22:41:23 |
| Björn changed their display name from ^x3ro to Björn. | 22:42:00 |
| @lumi:the-apothecary.club set a profile picture. | 22:53:19 |