Skip to content

debarchito/miru

Repository files navigation

1. What is Miru about?

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).

2. What are the components?

NOTE: All components are not yet complete.

  • miru-rtl or Miru runtime library is written in Rust. It is built to be embedable.
  • 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.

3. Get started!

It's a fresh project with lots of aspirations. I want to take my time 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-repl

Alternatively, 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-repl

I'll attach a document explaining the syntax in the upcoming days, so you have a reference to evaluate the REPL against.

5. Licensing.

Miru is licensed under GPLv3-only.

About

My take on a specialized statically typed Lisp+ML hybrid. Mirror of https://git.sr.ht/~debarchito/miru

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors