Skip to content

lambé 0.11.0: rumil 0.10 family, rule()-free parser#9

Merged
hakimjonas merged 3 commits into
mainfrom
chore/bump-rumil-0.10
May 31, 2026
Merged

lambé 0.11.0: rumil 0.10 family, rule()-free parser#9
hakimjonas merged 3 commits into
mainfrom
chore/bump-rumil-0.10

Conversation

@hakimjonas
Copy link
Copy Markdown
Owner

Summary

lambé 0.11.0. Moves onto the published rumil 0.10.0 family and rewrites the query parser's left-recursive postfix chain to be rule()-free. No language or API changes — queries parse to identical ASTs. The changes are entirely performance.

Changes

  • Dependency bump (8a2b785): rumil 0.7.1→0.10.0, rumil_parsers 0.8.1→0.10.0, rumil_expressions 0.7.0→0.10.0, rumil_tokens 0.1.0→0.10.0. Picks up rumil's stack-safe CEK interpreter (~2× faster) and the iterative value layer lambé reads/writes through.
  • rule()-free parser (50460e5): the postfix chain (.a.b[0] | op) was parsed with rule()/Warth seed-growth; it's now _atom + a left fold of suffixes — the standard LR-free encoding. Verified byte-for-byte AST-identical across a stress corpus; ~1.3–1.6× faster on the query-parse path in isolation. lambé no longer uses rule().
  • Release + docs (e5f5270): version 0.11.0, CHANGELOG with measured numbers, and a precision pass on DESIGN/ROADMAP/non-goals (they described the parser as using Warth seed-growth / left-recursion support — corrected to reflect the fold; streaming-evaluation blocker restated in terms of rumil's backtracking parsers needing random access, the durable reason independent of Warth).

Measured (same machine, medians)

End-to-end CLI (AOT, 11 runs), 0.10.0 vs 0.11.0:

Workload 0.10.0 0.11.0 Δ
--print-shape 50k 718 ms 196 ms 3.7×
filter | length 50k 734 ms 201 ms 3.7×
group_by 1k 31 ms 10 ms 3.1×

REPL completer (AOT, median µs, 1k records): simple 37→9, sort_by 65→13, group_by 93→31, unique 44→10, nested 45→13 (3–5×).

The CLI cases are JSON-parse-dominated, so most of that win is rumil_parsers' faster decoders; the fold's contribution is on the query-parse path (visible in the completer).

Verification

  • format, analyze --fatal-infos, full suite (1657 tests) — all green.
  • pana 160/160 (resolving published rumil 0.10.0 deps).
  • Equivalence of the fold vs the old rule() form verified over a stress corpus before the swap (scaffolding removed).

Publish (dart pub publish) is run separately, not via this PR.

Move all four rumil dependencies onto the published 0.10.0 family:
rumil 0.7.1 -> 0.10.0, rumil_parsers 0.8.1 -> 0.10.0,
rumil_expressions 0.7.0 -> 0.10.0, rumil_tokens 0.1.0 -> 0.10.0.

Picks up the stack-safe-nesting interpreter, the iterative value layer,
and the ~2x engine speedup from the 0.8->0.10 rumil releases. Resolves
clean; format, analyze --fatal-infos, and the 1657-test suite all pass
unchanged against the new family.
_postfix was defined with rule()/Warth seed-growth. A left-recursive
postfix chain (postfix SUFFIX | atom) is equivalent to an atom followed
by zero-or-more suffixes folded left-to-right, so it's now _atom plus
_postfixSuffix.many folded onto the base.

Verified byte-for-byte AST-identical to the rule() form across a 42-case
stress corpus (chaining, slice-vs-index backtracking, pratt-operator
interaction). Parses real queries ~1.3-1.6x faster on AOT and JIT
(iterating with many vs re-running a growing seed per position). Removes
lambé's only rule() usage. Full 1657-test suite passes unchanged.
Version 0.10.0 -> 0.11.0 (regenerate _version.dart). CHANGELOG entry for
the rumil family bump and the rule()-free postfix fold, with measured
same-machine before/after (CLI 3.1-3.7x, completer 3-5x).

Doc precision pass: correct DESIGN.md, ROADMAP.md, and doc/non-goals.md,
which described the parser as using Warth seed-growth / left-recursion
support. lambé's postfix grammar is still left-recursive but is now
parsed as a left fold, so it uses no rule(); the streaming-evaluation
blocker is restated in terms of rumil's backtracking combinator parsers
needing random access, which is the durable reason and independent of
Warth.
@hakimjonas hakimjonas merged commit 41824d8 into main May 31, 2026
4 checks passed
@hakimjonas hakimjonas deleted the chore/bump-rumil-0.10 branch May 31, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant