Mochi v0.6.0 introduces dataset queries for filtering, joining and grouping lists. Programs can now build analysis pipelines using SQL-like syntax. The release also ships a WebAssembly compiler, notebook integration and new set operations for lists.
Dataset Queries
let result = from o in orders
join from c in customers on o.customerId == c.id
where o.total > 100
group by c.name into g
select { name: g.key, total: sum(from r in g select r.total) }
WebAssembly Compiler
The wasm compiler emits WebAssembly binaries using the Go toolchain or TinyGo so Mochi programs run in the browser.
List Set Operations
Lists support union, union all, except and intersect operators for combining results.
Other Changes
- %%mochi Jupyter cell magic
- Vector search runtime with a flat index
- Dataset query support across Go, Python and TypeScript compilers
Changelog
- b8031fd Add Jupyter cell magic
- f360311 Add LeetCode 11 solution in Mochi
- 1106452 Add Two Sum example and tests
- 4f0090a Add WebAssembly build
- 6b140d7 Add agent stream example
- d255a55 Add basic agent runtime and interpreter integration
- 9e95629 Add cheatsheet command
- ed64029 Add data runtime library
- 58e92be Add dataset sort/skip/take query support
- 176d572 Add dataset support to TypeScript compiler
- 276c4ba Add group by query support
- b51c9e9 Add interpreter error golden tests
- 8dcc33a Add join interpreter tests
- 6a92fdf Add join query test for Python compiler
- 1634105 Add join type checking and tests
- 05cdeab Add left join feature
- 642007e Add memoization for pure calls in Go compiler
- 58b7be0 Add query comprehension example and interpreter support
- 82ec9d0 Add solution for LeetCode 3442
- 5431d5c Add string indexing example and support
- b1e8312 Add union operator for lists
- 4e97f26 Add while loop support to compilers
- be0a869 Fix race condition
- 6892c65 Implement 'in' operator for string containment
- 0aaa4f5 Implement runtime/agent
- 8e627bf Merge pull request #170 from mochilang/mochilang/runtime/agent
- c8ea710 Merge pull request #171 from mochilang/codex/integrate-agent-with-interpreter-and-ensure-correctness
- c0b1d56 Merge pull request #172 from mochilang/codex/move-agent.mochi-and-add-golden-tests
- 2d04025 Merge pull request #173 from mochilang/codex/update-go-compiler-to-support-agent
- fd10118 Merge pull request #174 from mochilang/codex/update-python-compiler-for-agent-support
- df026cf Merge pull request #175 from mochilang/codex/update-mochi-to-support-agent-block
- a0866af Merge pull request #176 from mochilang/codex/update-golden-tests-for-compiler
- 06725af Merge pull request #177 from mochilang/codex/update-documentation-for-new-agent-support
- eb651d0 Merge pull request #178 from mochilang/codex/update-golden-tests-for-agents
- edd1a7c Merge pull request #179 from mochilang/c60kjx-codex/update-golden-tests-for-agents
- b40f244 Merge pull request #180 from mochilang/codex/implement-two-sum-solution-in-mochi
- 0453e8c Merge pull request #181 from mochilang/codex/extend-mochi-to-support-while-statement
- 2c566eb Merge pull request #182 from mochilang/codex/save-example-and-extend-mochi-for-string-iteration
- 9b3c7f7 Merge pull request #183 from mochilang/codex/update-string.mochi-and-enhance-parser
- 689c3f1 Merge pull request #184 from mochilang/codex/update-documentation-for-new-iterator-and-index-operator
- 8998461 Merge pull request #185 from mochilang/codex/implement-solution-for-container-with-most-water
- d406cf8 Merge pull request #186 from mochilang/codex/update-go-compiler-for-string-index-and-iterator
- 128c760 Merge pull request #191 from mochilang/03y5p1-codex/update-python-compiler-for-string-index
- 8236e57 Merge pull request #192 from mochilang/codex/update-readme-and-docs-for-while-statement
- 60e96ae Merge pull request #193 from mochilang/famf5e-codex/implement-solution-for-longest-repeating-character-replaceme
- 0a96467 Merge pull request #194 from mochilang/codex/update-typescript-compiler-settings
- c1727b4 Merge pull request #195 from mochilang/codex/extend-go,-typescript,-python-to-support-while-statement
- 84df934 Merge pull request #196 from mochilang/codex/write-release-notes-and-changelog-for-v0.5.0
- 1a5ae44 Merge pull request #197 from mochilang/codex/review-and-expand-docs-folder-documents
- a0b3416 Merge pull request #198 from mochilang/codex/review-errors.go-and-add-golden-tests
- 1f3a015 Merge pull request #199 from mochilang/codex/review-errors.go-and-add-golden-tests
- 61886db Merge pull request #200 from mochilang/codex/refactor-streamfield-to-typeref
- 91a8ebf Merge pull request #201 from mochilang/codex/remove-unnecessary-golden-tests-and-error-handling
- b612339 Merge pull request #202 from mochilang/codex/update-spec.md-with-missing-details
- 2417f25 Merge pull request #203 from mochilang/codex/enhance-missing-features-in-go-compiler
- 4631cb6 Merge pull request #204 from mochilang/codex/enhance-python-compiler-based-on-parser.go
- 7218024 Merge pull request #205 from mochilang/codex/enhance-typescript-compiler-based-on-parser.go
- a980797 Merge pull request #206 from mochilang/codex/enhance-compiler-to-exclude-async-when-no-stream-code
- d319950 Merge pull request #207 from mochilang/codex/review-go-compiler-type-inference
- 414e35e Merge pull request #208 from mochilang/codex/improve-type-inference-in-compilers
- 1956af6 Merge pull request #210 from mochilang/codex/enhance-type-infer-to-remove-helperslice
- f086bd8 Merge pull request #211 from mochilang/codex/implement-purity-check-and-compile-time-optimization
- 70d1706 Merge pull request #212 from mochilang/ztgiok-codex/run-benchmark-and-check-output
- b9db619 Merge pull request #214 from mochilang/codex/enhance-interpreter-with-purity-check
- 74a89e5 Merge pull request #215 from mochilang/codex/enhance-go-compiler-with-purity-check
- 887ecee Merge pull request #216 from mochilang/ed27u9-codex/run-benchmark-and-check-output
- 1ef6ac1 Merge pull request #217 from mochilang/codex/enhance-argskey-for-memorization
- 9d57688 Merge pull request #218 from mochilang/codex/update-golden-tests-for-go-compiler
- 410870d Merge pull request #219 from mochilang/codex/add-memorization-option-in-interpreter
- af3ee68 Merge pull request #220 from mochilang/codex/add-cheatsheet-command-to-mochi-binary
- 92f59d6 Merge pull request #222 from mochilang/codex/apply-aot-in-interpreter-and-benchmark
- 4af9a01 Merge pull request #223 from mochilang/bbbnga-codex/write-golden-tests-for-go-compiler-folding
- ea797d4 Merge pull request #224 from mochilang/codex/apply-fold-let-logic-to-interpreter
- d679e63 Merge pull request #225 from mochilang/codex/update-readme-and-docs-for-mochi-cheatsheet-command
- 631b9f5 Merge pull request #226 from mochilang/codex/enhance-typescript-annotations-for-tests
- bf5012b Merge pull request #227 from mochilang/codex/enhance-python-compiler-with-typehint
- 125c1e8 Merge pull request #228 from mochilang/codex/enhance-typescript-compiler-with-type-annotator
- 0e95cbe Merge pull request #247 from mochilang/codex/save-and-run-agent-stream-example
- d8157f9 Merge pull request #248 from mochilang/codex/update-mochi-cheatsheet.mochi
- 47bc3d9 Merge pull request #250 from mochilang/codex/update-documentation-to-latest-version
- 57af018 Merge pull request #251 from mochilang/codex/write-release-notes-for-version-0.5.1
- 05f07c4 Merge pull request #252 from mochilang/codex/implement-runtime/vector-with-flat-index-and-tests
- 53c627f Move agent example to v0.5 and add parser golden tests
- a8e9a34 Refactor query handling and rename data package
- ba4db77 Remove golden tests for character replacement
- 6a251be Update compiler golden outputs
- bb5da54 Update fold constant folding test with sum function
- fdea2fb Update golden tests with new Go compiler
- 9c821b9 build: add TinyGo WASM setup
- 2d09ecd chore: update benchmark results
- 9efcb3b chore: update benchmarks
- 8fcfc23 compiler: add join support
- 52a54a0 compiler: fix query var names
- 33427b1 compiler: inline indexing for typed collections
- c1fcc44 compiler: inline slice for typed collections
- 478362f compiler: skip async wait when no streams
- b31a8e2 doc: document list union operators
- 22c23bf feat(go): handle string indexing and iteration
- a371c69 feat(interpreter): fold let constants
- 65c8ef6 feat(interpreter): memoize pure function calls
- 45ce2a0 feat(interpreter): type cast stream events
- 9e2e4e1 feat(py): add agent support
- 49734df feat(py): add dataset query support
- f50a68c feat(py): add join helper
- ba684ec feat(py): add type hints in python compiler
- 2b35e52 feat(py): support string index and iteration
- d8d07e1 feat(ts): add type annotations to functions
- 22db442 feat(ts): annotate variable declarations
- 180bdf1 feat(ts): support string indexing and iteration
- 908471d feat: add AOT folding option
- 4ab0d6d feat: add except set difference
- 2a6fed6 feat: add full outer join
- ac93862 feat: add in-memory data driver
- e66ed13 feat: add intersect set operation
- 1dac97c feat: add join support
- 21b9776 feat: add right join support
- 43b1ecd feat: add sort/skip/take to query compilers
- 929615e feat: add union all operator
- da7e4c5 feat: add wasm compiler
- 64993bc feat: add while statement
- a28145c feat: support cross join in queries
- c32e4c3 fix diagnostic help placeholders
- cb79115 fix examples and enforce naming
- 05192be go compiler: add agent support
- acf40ca go compiler: add cast support
- 5cad8e3 go compiler: add dataset query support and tests
- 2608562 go compiler: specialize string index helper
- 6981455 go: add basic left join support
- 862897c go: add join helper and detection
- 2b93788 improve argsKey memoization
- 07e4f81 interpreter: add optional memoization
- 854dc7b parser: add dataset query features and tests
- 557fb47 parser: add dataset query syntax
- 64f23d8 parser: add join clause support
- c32f950 py compiler: support model declarations and ignore cast
- 7de3300 refactor: move pure call eval to interpreter
- f6abcbb refactor: move query eval to runtime/data
- 0f9b9e6 release: v0.5.0
- 72699db release: v0.5.1
- 08e923d release: v0.6.0
- a3da8c4 runtime/vector: add vector index implementation
- 5472078 test(types): add missing error golden tests
- b08c0bd tests: add agent golden cases
- a9bcb36 tests: add agent golden cases
- c7c6284 tests: fix newline
- 93a92a6 ts compiler: add agent block support
- 6874432 ts compiler: add join helper
- 2cbb3ae ts compiler: support tests and expect
- 62485c7 types: handle queryExpr in dataset type checks
- f9ad084 types: remove unused equality error and dead code
- 8e57433 types: validate query source is list