sfscala.org: Li Haoyi, FastParse: Fast, Programmable, Modern Parser-Combinators in Scala

Опубликовано: 08 Май 2026
на канале: FunctionalTV
6,752
94

ai.bythebay.io Nov 2025, Oakland, full-stack AI conference Scale By the Bay 2019 is held on November 13-15 in sunny Oakland, California, on the shores of Lake Merritt: https://scale.bythebay.io. Join us!
-----

Parsing semi-structured text has always been a pain: from fragile regexes, to complex tools like YACC or ANTLR. Scala's parser combinators promised another approach: your parser is just a few simple objects right in your code! But they brought with it a confusing API, buggy internals, and overwhelmingly slow performance.


FastParse is a cleaned up, modern take on parser combinators that aims to fix that. FastParse drops dozens of glyphs in the scala-parser-combinators API for a few well-documented operators, and is 100x faster than scala-parser-combinators, approaching the speed of hand-written parsers. Best of all,

FastParse can be trivially extended to provide extra features like ad-hoc querying or automatic-syntax highlighting, right from the grammar you already wrote for the parser!


This talk will present FastParse and how you can use it next time you're facing semi-structured text.

Haoyi works at Dropbox during the day and does things with Scala/Scala.js at night.

Haoyi's own screen recording and slides: https://vimeo.com/142341803