Skip to content

Repository files navigation

#+TITLE: Karuta 🎴


#+html: <a href="https://builtwithnix.org"><img alt="built with nix" src="https://builtwithnix.org/badge.svg" /></a><br>
#+html: <a href="https://github.com/dont-rely-on-nulls/karuta/actions/workflows/build.yml"> <img alt="[Client] Build" src="https://github.com/dont-rely-on-nulls/karuta/actions/workflows/build.yml/badge.svg" /></a><br>

#+html: <p align="center"><img src="images/logo.png" alt="The Karuta Logo" style="width: 30%;"></p>

* About
This is a semi-toy, general-purpose relational (aiming to be constraint-based)
programming language. We are not held accountable for anything that might happen if
you are crazy enough to use it.

* Requirements

** [[https://minikanren.org/][Kanren]]

*** Basic Feature Set

- [X] Parsing
- [X] Query Conjunction
- [X] Comments
- [X] BEAM runtime library (logic variables, backtracking)
- [X] Compilation
- [X] Atom Literals  
- [X] Integer Literals
- [X] List Literals
- [X] Implement toolchain (i.e. compile to BEAM assembly, call ~erlc~ on that)
- [X] Modules
- [X] Integration Testing (testing Karuta programs directly)
- [ ] Unit Testing (testing stages of the compiler)

*** Advanced Features

- [ ] Static Type System
- [ ] Mode System
- [ ] ML Functors
- [ ] Constraint-based
- [ ] Effect System  
- [ ] Build System
- [ ] REPL
- [ ] Concurrency

*** Challenges

- [ ] Higher Order Predicates
- [ ] Full Database Support (all operations)
- [ ] Embeddable VM Compilation

** [[https://github.com/dont-rely-on-nulls/sakura][Sakura]]
- [ ] AST nodes for Sakura interaction.
- [ ] Sakura directives.
- [ ] Runtime support for database interaction (sockets).
- [ ] Compiler can fold together multiple queries in a single predicate body.

* References

- [[http://webyrd.net/scheme-2013/papers/HemannMuKanren2013.pdf][μKanren: A Minimal Functional Core for Relational Programming]]
- [[https://okmij.org/ftp/ML/index.html#dynvar][Dynamic scoping implementation using OCaml Effect handlers]]
- [[https://www.erlang.org/doc/apps/erts/absform.html][BEAM Abstract Form]]
- [[https://webperso.info.ucl.ac.be/~pvr/VanRoyHaridi2003-book.pdf][Computer, Techniques, and Models of Computer Programming]]
- [[https://users.dimi.uniud.it/~marco.comini/Students/Documentation/wam-book.pdf][Warren's Abtract Machine]]

Releases

Packages

Contributors

Languages