| 10 Dec 2025 |
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:matrix.org | I've written several parsers in Rust and TBH for best error handling recursive descent will always win. | 16:26:03 |
@rosssmyth:matrix.org | Chumsky is my favorite library though | 16:26:13 |
@rosssmyth:matrix.org | * I've written several parsers in Rust and TBH for best error handling hand-rolled recursive descent will always win. | 16:26:20 |
@rosssmyth:matrix.org | Pratt parsing is nice | 16:26:41 |
@rosssmyth:matrix.org | https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html | 16:27:05 |
@rosssmyth:matrix.org | Why do you need a library for that? | 16:27:42 |
@rosssmyth:matrix.org | They integrate just fine | 16:28:05 |
kloenk | Friend looked at the lib for it and was very unhappy. Not looked myself into it. Mostly happy with logos and hand rolled conversion into rowan | 16:28:48 |
@rosssmyth:matrix.org | Yeah my latest project has a lexer that is just a copy of Rustc's lexer with my tokens in it, ungrammar for the cst data structures, and then hand-rolled parser. | 16:29:58 |
@rosssmyth:matrix.org | Logos is cool though | 16:30:09 |
@rosssmyth:matrix.org | Used it before | 16:30:14 |
@rosssmyth:matrix.org | The thing about parsing is that perf doesn't really matter that much, it's such a small amount of time unless you really mess it up. Better to focus on making it have really good errors | 16:32:12 |