[Media] Keel 0.2 (alpha) - a fast, statically typed interpreted language written in Rust - structs, error handling, an embedding API, a new handwritten parser, and performance improvements
![[Media] Keel 0.2 (alpha) - a fast, statically typed interpreted language written in Rust - structs, error handling, an embedding API, a new handwritten parser, and performance improvements](https://i.redd.it/uzuj6vhz898h1.png)
Keel 0.2 (alpha) is out!
Keel is a fast, statically typed interpreted programming language written in Rust that tries to combine Rust-like syntax with Python's ease of use.
Since the last version, structs, error handling, and an experimental embedding API have been added, and the module system has been improved, along with multiple syntax changes, and many performance improvements & bug fixes. The parser has also been rewritten from the ground up (it previously used LALRPOP). It's now handwritten and with a lexer that uses logos. It's also much smaller and ~20x faster. memchr, lexical_core, and zmij are now used to speed up string operations and number<->string conversions.
The latest release now also contains both the Keel CLI (what most people want to download) and Keel as a dynamic library to make it easy to embed it.
Behind the scenes, Keel uses a register machine with NaN-boxing, a mark-and-sweep GC, and can natively call C/dynamic library functions thanks to libffi. The compiler does constant folding, literal pooling, full type inference (without annotations), and monomorphization, along with other aggressive compile-time optimizations. In benchmarks, it's roughly 2-15x faster than Python and competitive with LuaJIT (-joff).
Questions are welcome!
Repo | Latest release | Website | Online playground
Disclaimer: I previously used AI to write some code comments, which I've since removed and rewritten myself. All of the code and architecture is designed and written by me.