Get format specs, match type patterns, and quoted-field CSV parsing working in the Cubry interpreter.
Assistant
Sure — I'll get format specs, match patterns, and quoted-field CSV parsing working in Cubry.
Assistant
Now I'll look at the Python interpolation regex and the Pythonista f-string converter.
Assistant
Now the detection function in rust.rs must accept :spec too.
Assistant
Now the Python interpreter's _interpolate with the same spec semantics.
Assistant
Implementing real type patterns in match via parser desugar (fresh binding + type_of guard), identically in both parsers.
Assistant
Type patterns work in Rust. Mirror in the Python parser.
Assistant
All three paths agree. Now csv_parse/csv_stringify and flags() in the Rust runtime.
Assistant
Consistent with args(). Now the Python interpreter builtins.
Assistant
Now the Pythonista prelude + emission for the three new builtins.
Assistant
All three paths byte-identical. Extending the fixture, tests, and showcase.
Assistant
Walkthrough
Format specs, match type patterns, and quoted-field CSV parsing running in the Studio.
Wave 26 — everyday-data ergonomics, identical across the Rust compiler, Python interpreter, and Pythonista export:
Format specs in string interpolation: "{price:.2f}" fixed decimals, "{n:5}" width, "{s:<8}" / "{s:>8}" alignment (numbers right-align, text left-aligns, matching Python f-strings); unknown names and invalid specs like stay literal.
{12:30}
Real type patterns in match: case int =>, case string =>, plus float, number, bool, array, object, nil, function — desugared in both parsers to a fresh binding with a type_of guard, combined with user guards via &&. This also fixes a bug: case int previously bound the scrutinee to a variable named int and always matched.
csv_parse / csv_stringify with proper quoted-field handling (embedded commas, "" escapes), hand-implemented identically in all three paths.
flags() builtin for CLI ergonomics: --key value, --key=value, bare --flag booleans, positionals under _.
New builtins wired into Studio autocomplete and LSP hover docs; fixture, showcase corpus, and docs updated.
Testing
✅ cargo test — 54 unit tests + 13 smoke + LSP + package integrations
✅ python3 -m pytest python/tests — 53 tests
✅ cargo test smoke_tests_cubry_directory -- --ignored — all 29 fixtures (90 s)
✅ cargo test smoke_language_showcase_full_pipeline -- --ignored — 17k-line corpus end-to-end (2.5 min)
✅ ./tools/parity_check.sh (11 fixtures) and ./tools/export_check.sh (8 fixtures) — byte-identical
Manual: all wave-26 features run in the Studio in Chrome (video above); tri-path probes for format specs, type patterns, CSV, and flags() produced identical output.
Studio is running on port 3000 with the latest build.