Parsers, interpreters, etc.
Open source libraries for parsing, querying, and validating structured data. Built on immutable data, typed errors, and composition over configuration. Dart and Scala.
Principles
Correctness through types
Errors are typed values, not exceptions. Missing data is an explicit state, not null. If the types line up, the program works. The compiler catches the bugs that tests miss.
Composition over configuration
Small pieces that combine predictably. Parsers, codecs, validators, and queries all compose the same way. Learn the pattern once, apply it everywhere.
Description before execution
Programs are built as immutable values that describe what should happen. A separate step interprets them. This makes them inspectable, testable, and safe to refactor.
Honest abstractions
No hidden cost, no magic. Types reflect what the code actually does. When there are trade-offs, they are explicit.
Parsers, query languages, and codecs on pub.dev.
One query language across structured data formats
A query language for JSON, YAML, TOML, HCL, XML, and CSV. Expressions compose through the pipe operator into transformation pipelines. Navigation through missing fields returns null instead of failing, so queries work safely on data you haven't fully explored. Operations that compute on values are strict, catching type errors early. Available as a CLI with an interactive REPL, a Dart library, and an MCP server for AI assistants. Built on Rumil.
- Same query syntax across JSON, YAML, TOML, HCL, XML, and CSV
- Null propagation on navigation, strict on computation
- Interactive REPL with tab completion driven by the data structure
- MCP server for giving AI assistants structured data access
Parser combinators where parsers are values
A parser combinator library that represents parsers as data, not functions. You describe what to parse. A separate interpreter handles the rest: backtracking, memoization, error reporting. Because parsers are just values, left-recursive grammars work without rewriting, deep chains stay stack-safe, and composition is predictable.
- Left-recursive grammars work directly, no need to rewrite around recursion
- Stack-safe to arbitrary depth through defunctionalized trampolining
- Three-way results (success, partial, failure) make error recovery part of the type
- Format parsers for JSON, YAML, TOML, XML, CSV, HCL, and Proto3
Validation and more, published on Maven Central.
Type-safe validation for Scala 3
A validation library for Scala 3 that derives validators from your types at compile time. The derivation uses inline macros and Mirror types to inspect case classes and generate validation code through the type system. If a field type is missing a validator, the compiler reports every missing one, names the fields, and tells you what to add. Validators compose in two modes: zip to collect all errors in one pass, flatMap to stop at the first. Errors are structured with field paths, so a failure in a nested object points to the exact location. Cross-compiles to JVM and Scala Native.
- Compile-time derivation through Scala 3 inline macros and Mirror types
- Both error accumulation and fail-fast, chosen by how you compose
- Structured errors with field paths, severity, and error codes
- JVM and Scala Native