Monadic Parsers at the Input Boundary
summary
Recommends parsing every incoming byte stream with purescript-parsing rather than ad hoc splitting or regexes, demonstrating concrete parsers: an "a then b" parser returning a boolean, many and a custom twice combinator, integer extraction that converts to Int, a recursive balanced‑parentheses parser, and a full RFC 5322 email parser ported from Parsec/purebred‑email. Shows replace features in purescript-parsing-replace, compares to a claimed 99.99% regex, and warns JS runtimes make monadic parsers about 10× slower than native regex.
AI-written summary · about
chapters (11)
- 0:00Introduction to parsing
- 5:18Working with parser combinators
- 11:50Parsing complex structures
- 12:57RFC 5322 implementation
- 13:25Parsers vs. regular expressions
- 22:46Parser theory
- 23:15Performance considerations
- 24:22Q&A: performance and evaluation
- 27:19Q&A: grammar complexity
- 31:08Grammar hierarchies
- 35:52Advanced patterns and closing
related talks
26mText Parsing the Case for Monads
42mMonoidal Parsing
44mPretty Parsing
56mFunctional Programming with JavaScript
53mUnderstanding parser combinators: a deep dive
41mFunctional Programming Without Succumbing to Fads
21mParsing lexical ambiguity with Elm and expressive types
42mFunctional interpreters and you
