| 10 Dec 2025 |
piegames | Main criteria are maximum performance and good error handling, with support for multiple errors but no full-blown error recovery | 14:36:53 |
Rutile (Commentator2.0) feel free to ping | In reply to @goldstein:tty5.dev hi! I’m trying to add a functional test for my patch, but a couple of those seem to be failing even on main, e.g. tarball (fails with line 37: TMPDIR: unbound variable) and bash-profile (fails with ../../scripts/nix-profile.sh.in: No such file or directory). do I need to do something special to set them up other than just build install test?.. That is sadly a known bug, you must have it set in your shell env, though dont remember to what value...
Something something functional2 will fix this | 14:56:11 |
goldstein | In reply to @commentator2.0:elia.garden
That is sadly a known bug, you must have it set in your shell env, though dont remember to what value...
Something something functional2 will fix this okay, thanks. it passes in CI, so ig I’ll just ignore it for now | 14:56:49 |
Rutile (Commentator2.0) feel free to ping | In reply to @goldstein:tty5.dev okay, thanks. it passes in CI, so ig I’ll just ignore it for now Yep, thats what i did... I think a just setup might fix it but don't remember tbh | 14:58:25 |
Charles | i like parser combinators, chumsky is neat but its cool features (zero copy parsing) are only on unstable releases and its development has been slow lately, winnow is also good (i haven't actually tried winnow, but i have tried nom, which is what it forked from; winnow mainly just adds some extra stuff like span tracking for errors) | 15:21:47 |
Charles | there's a somewhat related library called ariadne which can generate very pretty error messages for parsing errors | 15:23:04 |
crop | In reply to @charles:computer.surgery i like parser combinators, chumsky is neat but its cool features (zero copy parsing) are only on unstable releases and its development has been slow lately, winnow is also good (i haven't actually tried winnow, but i have tried nom, which is what it forked from; winnow mainly just adds some extra stuff like span tracking for errors) I heared positive things about winnow. But also didn't use it myself | 15:25:14 |
kloenk | also do quite a bit of parser dev currently for a project :)
decided against chumsky as I also wanted to have the possibility to add a lsp and formatter later. Currently using ariadne as well for error reporting. did consider looking at miette (miette has a magic flag to create screen reader friendly output) | 15:32:11 |
piegames | Yeah I've heard that of miette, which is really nice | 15:32:43 |
piegames | Though on a first glance the ariadne API seems a lot simpler | 15:32:55 |
Charles | hmm what about chumsky precludes its use for LSPs and formatters? | 15:34:30 |
kloenk | my want for a lossless syntax tree. Chumsky apparently can somehow integrate into rowan, but found it so painful that I decided to use logos and do it with only logos | 15:35:09 |
Charles | oh right yeah i forgot to mention rowan exists | 15:35:29 |
kloenk | yeah that is true. and apparently they have a todo for screen reader output so maybe at some point | 15:35:52 |
piegames | For lix performance will be key and everything else will require a secondary parser. Maybe even error handling will get a secondary parser | 15:35:59 |
piegames | In reply to @kloenk:kloenk.eu my want for a lossless syntax tree. Chumsky apparently can somehow integrate into rowan, but found it so painful that I decided to use logos and do it with only logos With lossless syntax tree you mean CST? | 15:36:19 |
kloenk | then cumsky could be interesting. but apparently it's a pain with the type signatures. My (kconfig) project sadly is single threaded either way as the language is shit | 15:36:46 |
kloenk | yeah I think that's the same. never exatly sure what is what | 15:37:00 |
piegames | One thing I worry about nom is that statless parsing is simpler but may end up requiring more allocations/moves of data and thus hurt performance. Winnow seems to support stateful parsing. How does chumpksy work there? | 15:39:10 |
piegames | Stateful parsing is more annoying on backtracking, but the Nix language is almost LL1 and the two edge cases where it isn't can be handled manually | 15:39:52 |
K900 | cumsky | 15:40:12 |
K900 | Sorry | 15:40:14 |
piegames | Chompsky | 15:41:12 |
kloenk | I don't remember exactly. but IIRC it was titled as parser combinator which does some backtracking internally and tries to optimize everything as good as possible which just throwing compile time on it | 15:41:18 |
helle (just a stray cat girl) | chumsky, what a name..... not a recipe for headaches there :P | 15:43:30 |
kloenk | Oh there is also a library to bridge chumsky and logos for token based parsing. Apparently it’s utter shit and looks very AI generated | 16:05:33 |
rosssmyth | I've written several parsers in Rust and TBH for best error handling recursive descent will always win. | 16:26:03 |
rosssmyth | Chumsky is my favorite library though | 16:26:13 |
rosssmyth | * I've written several parsers in Rust and TBH for best error handling hand-rolled recursive descent will always win. | 16:26:20 |
rosssmyth | Pratt parsing is nice | 16:26:41 |