| 20 Mar 2026 |
piegames | In reply to @emilazy:matrix.org
''\ is deprecated? that's quite painful considering I believe it's the only way to write some strings... No it's not, just certain ill-defined escape sequences | 13:36:17 |
emily | right, I mean you need that behaviour to write certain ''...'' strings unless I'm misunderstanding you | 13:41:05 |
emily | IIRC a literal ''${ or something is quite hard otherwise. forget if that's the case I ran into where it's necessary | 13:41:42 |
piegames | nix-repl> ''''${''
"\${"
still works
| 14:03:28 |
piegames | if you have any examples that can't be written because of the deprecation, lmk. | 14:04:33 |
emily | that's not ''${ :) | 14:05:35 |
piegames | ugh, sorry | 14:05:48 |
emily | I'll see if I can double check an example when I'm back at a keyboard though. | 14:06:11 |
piegames | I mean to type
nix-repl> '''''''${''
"''\${"
of course :)
| 14:06:05 |
piegames | (Nix is real and can't hurt you) | 14:06:14 |
piegames | * (Nix is not real and can't hurt you) | 14:06:26 |
emily | yeah I think it probably involved a \ or something in there too. but no REPL to jog my memory right now. | 14:07:27 |
piegames | admittedly some of these are a bit tricky even when a better alternative exists, so we might at least improve the error message to point users in the right direction | 14:11:19 |
piegames | I'd so much love to scrap all of this bullshit and redo a proper string syntax, but alas this will have to wait until langver which is soft-blocked on bytecode and Rust | 14:11:53 |
KFears& 🏳️⚧️ (they/them) | Why is it soft-blocked on bytecode and Rust? Because the current thing is a horrible pain? | 14:12:43 |
piegames | the current deprecations are a best effort attempt at removing a loaded gun from users' hands | 14:12:54 |
piegames | basically, yes. I tried 1.5y ago at https://gerrit.lix.systems/c/lix/+/2359/1 and eventually gave up. Having to create new, versioned, AST nodes with different semantics etc was inacceptably bad, and would have made maintenance in the long term even worse | 14:14:25 |
piegames | so better to do it right from the beginning, clean up the codebase, put the correct abstraction layers in place, and then everything is much less unpleasant | 14:14:59 |
KFears& 🏳️⚧️ (they/them) | Fair enough | 14:17:02 |
KFears& 🏳️⚧️ (they/them) | We wouldn't attempt the C++ maneuver with a gun pointed to our head, so it's extremely impressive you tried that | 14:17:44 |
whispers [& it/fae] | langver being the ability to experiment with changing the nix language while still being compatible with nix proper? (akin to rust's editions?) | 14:19:32 |
whispers [& it/fae] | * | 14:20:09 |
K900 | Basically that, yes | 14:20:19 |
piegames | In reply to @kfears:matrix.org We wouldn't attempt the C++ maneuver with a gun pointed to our head, so it's extremely impressive you tried that "How bad could it be?" | 14:32:06 |
piegames | OTOH I wouldn't be able to know where to go if I hadn't tried and failed that way | 14:32:35 |
| Patrick changed their display name from patrickdag to Patrick. | 14:52:01 |
emily | (FWIW since ''\' is apparently still accepted I'm not sure I know of any issues with the escapes) | 15:41:42 |
emily | (though I wouldn't be super surprised if there's something with ''\$ or ''\\) | 15:42:08 |
aloisw | The only ones that I know of you can't write any more are when every line starts with at least one space. | 17:17:47 |
emily | hmm, that's unfortunate. allow ''\<space> too? | 18:01:35 |