[Media] Keel 0.3 (alpha..?) - a very fast, statically-typed interpreted language written in Rust - now with a standard library, a map type, prettier errors, and a docs website

58 points horace_h 39 comments
[Media] Keel 0.3 (alpha..?) - a very fast, statically-typed interpreted language written in Rust - now with a standard library, a map type, prettier errors, and a docs website

Hello!

Keel 0.3 (alpha) is now out!

Keel is a fast, statically-typed interpreted language that aims to combine Rust-like syntax with Python's ease-of-use.

It's ~2-10x faster than Python, and competitive with LuaJIT (-joff). It does full type inference, is statically-typed and requires zero annotations (except for dylibs and structs). It has FFI support, meaning you can call functions from dynamic libraries directly from Keel with a "native" (easy) syntax. It's embeddable in other programs through a C ABI.

Keel ships both a binary and a dynamic library artifact, making it easy to embed it. However, keep in mind that the embedding API doesn't have memory/instruction limits yet.

Changelog:

  • Keel now ships a standard library, currently it's just Keel wrappers over native C: std/math, std/time, and std/random
  • Libraries placed in the libs/folder next to the Keel executable can be imported from anywhere
  • That standard library is now included in every binary release artifact and native libraries are compiled per-platform
  • New Map type! The syntax is {key: value, key1: value1}, the type annotation is [K: V]. Available methods are .get() and .insert().
  • Union types are now valid (meaning int | string is now a valid type) but they're currently very experimental and aren't really useful
  • Many errors are now much more useful, more helpful, and clearer. This includes some common compiler/parser errors. Please note that all errors haven't been upgraded yet, it's a process, so some errors will be cooler than others, but this'll improve over time. Some of those upgraded errors are also fixed and now report the error on the correct source file
  • The compiler and the VM have been optimized, the compiler now uses a single unified compilation path, and literal compilation and register allocation are finally uniform. Concerning the VM, redundant bounds checks have been removed.
  • Multiple bug fixes
  • Also: licenses are now shipped in the artifacts
  • And there's a documentation website now! URL: https://docs.keel-lang.com/

This is the third post for Keel, I don't know if I should keep posting for every release, but we'll see.

Any feedback is appreciated!! (Questions too)

Keel v0.3.0: https://github.com/horacehoff/keel/releases/latest

Repo: https://github.com/horacehoff/keel

Documentation: https://docs.keel-lang.com/

Website: https://keel-lang.com/

Online playground: https://keel-lang.com/playground (single-file, so the standard library doesn't work there)