Compelling demonstration of parser combinators for date parsing: https://medium.com/mercury-bank/a-magic-date-input-using-parser-combinators-in-typescript-3c779741bf4c
You build up a series of functions for parsing elements, which composes much more nicely than regexps.
Related Posts
Counter-intuitively, if you're writing a parser for a programming language, you need it to be a total function. As soon as you build IDE tooling, you need ASTs from invalid or incomplete input.
The parser should return (Ast, List<Error>) rather than Result<Ast, Error>.
I've released difftastic 0.65! Highlights of this release:
* Better parsing of Clojure, Common Lisp, Kotlin, Rust and Zig.
* Quality of life improvements for binary files.
https://github.com/Wilfred/difftastic/releases/tag/0.65.0
It's a small thing, but I'm much happier with the output of --version in the latest version of difftastic.
It shows the release version number, the commit hash, and the commit date. This gives you a sense of the age of release, but you still have a reproducible build (unlike build time).
It also shows OS, arch and compiler, because those are common requirements in bug reports.