| 14 Dec 2025 |
helle (just a stray cat girl) | lol | 15:56:44 |
Rutile (Commentator2.0) feel free to ping | gimme another day or two and see how much time i have during work | 15:57:11 |
helle (just a stray cat girl) | but erm, yeah, overlap of npins and Lix, rather high | 15:57:27 |
helle (just a stray cat girl) | my npins PR is going to wait another cycle, I may need to kick a lot of code around, for some very specific use cases | 16:00:07 |
piegames | May I present | 16:57:30 |
piegames | » nix-instantiate --parse -E 'with {}; 1.a'
{
…
"body": {
"_type": "ExprCall",
"args": [
{
"_type": "ExprVar",
"value": "a"
}
],
"fun": {
"_type": "ExprLiteral",
"value": 1.0,
"valueType": "Float"
}
}
}
» nix-instantiate --parse -E 'with {}; 0.a'
{
…
"body": {
"_type": "ExprSelect",
"attrs": [
"a"
],
"e": {
"_type": "ExprLiteral",
"value": 0,
"valueType": "Int"
}
}
}
| 16:57:34 |
piegames | » nix-instantiate --parse -E '0.'
error: syntax error, expecting end of file
at «string»:1:2:
1| 0.
| ^
» nix-instantiate --parse -E '1.'
{
"_type": "ExprLiteral",
"value": 1.0,
"valueType": "Float"
}
| 16:58:16 |
piegames | If I die before finishing fixing this stupid language, my ghost will haunt Eelco personally forever until he repents for his sins | 16:59:06 |
piegames | deprecation noises | 16:59:59 |
K900 | This is beautiful | 17:00:00 |
helle (just a stray cat girl) | Eelco shakes very painful fist | 17:01:15 |
kloenk | psychic damage noises | 17:01:29 |
522 it/its ⛯ΘΔ | ... what's with this
# nix-instantiate --parse -E "01.4"
{
"_type": "ExprCall",
"args": [
{
"_type": "ExprLiteral",
"value": 0.4,
"valueType": "Float"
}
],
"fun": {
"_type": "ExprLiteral",
"value": 1,
"valueType": "Int"
}
}
... why is that not just a float literal with value 1.4
| 19:09:30 |
piegames | Quick poll: should function application without spaces be allowed? foo"1"2 | 19:09:36 |
piegames | In reply to @522_:catgirl.cloud
... what's with this
# nix-instantiate --parse -E "01.4"
{
"_type": "ExprCall",
"args": [
{
"_type": "ExprLiteral",
"value": 0.4,
"valueType": "Float"
}
],
"fun": {
"_type": "ExprLiteral",
"value": 1,
"valueType": "Int"
}
}
... why is that not just a float literal with value 1.4
Because it parses as fucking 01 .4 | 19:10:03 |
522 it/its ⛯ΘΔ | lol | 19:10:18 |
522 it/its ⛯ΘΔ | oh right it's presumably just not legal | 19:10:29 |
522 it/its ⛯ΘΔ | yeah | 19:10:35 |
piegames | In reply to @522_:catgirl.cloud lol Yeah because integers can have leading zeroes but not floats | 19:11:58 |
piegames | So floats with leading zeros of course parse as fucking function application | 19:12:21 |
helle (just a stray cat girl) | still slightly dislike nix does not have hex and oct literals from when we started using it first | 19:13:11 |
522 it/its ⛯ΘΔ | the error for 0xff being "you tried to call 0" is really funny | 19:14:31 |
helle (just a stray cat girl) | I know it so far has not really come up with anything we wrote, but still it was "okay, huh" | 19:14:50 |
piegames | Can't be added atm because 0x10 parses as 0 x10 | 19:15:15 |
piegames | So we can deprecate that syntax but can't give it new semantics without langver | 19:15:42 |
helle (just a stray cat girl) | yep, we know, and it rarely comes up | 19:16:10 |
helle (just a stray cat girl) | and nixpkgs brings lib.trivial.fromHexString, which I have used a total of once | 19:16:35 |
helle (just a stray cat girl) | octal, so far, never | 19:16:46 |
piegames | Because permissions are usually treated as strings | 19:22:27 |
helle (just a stray cat girl) | yep | 19:22:42 |