Miru is a research language and yet another attempt at unifying Lisp and the ML families.
While OCaml and Clojure are the primary inspirations, this doesn't mean porting features 1:1.While Miru inherits a lot of their aspects, it also tries to extend and experiment where it makes sense. Some of these include:
- type-informed macros
- row polymorphic records
- algebraic effects as the only non-local control flow with effect types and capabilities
- and, many others that i'll rigorously document.
I like to conceptually divide Miru into two distinct parts: the base language and the cover language. The base language is a reduced form which contains a very small set of features which, the rest of the language is bootstrapped around (hence the name "cover"; the term is derived from topological covers).
Note
Implementation is currently halted due to systematic redesign that is being heavily documented in DRAFT.md. The memory model will be completely overhauled with a Value Kind model to replace the strictly uniform memory model. I'm also researching about Liquid Refinement Types, Data Kinds and native N-D tensor extensions to Miru. Once the draft is somewhat solidified, I'll start re-implementing sections.
- miru-rtl or Miru runtime library is written in Rust. It is built
to be embedable. (This replaced
miru-corein case you are trying to find it). - miru holds the lowering tools (source -> bytecode, and source -> assembly in future), macro engine, type checker, etc. all written in OCaml.
- miru-machine is the register machine written in Rust. This also powers the macro engine and is bridged to OCaml.
- miru-repl is the Read-Eval-Print-Loop and the primary way to interact with Miru right now.
It's a fresh project with lots of aspirations. I want to take my time to learn and implement things mindfully. This means a lot of experimentation and what could be better than a REPL for such situations? To try out the repl:
# Scaffold the development environment
direnv allow
# Build and run the REPL
dune exec miru-replAlternatively, Miru integrates deeply with the Nix ecosystem (partly cause I use Nix for everything). So, you can build and run the REPL directly using:
nix run sourcehut:~debarchito/miru#miru-replTake a look at DRAFT.md for a quick guide on the syntax of the language.
This repository is dual-licensed under either the MIT License or the Apache 2.0 License, at your option.