Janet, a functional and imperative language as well as bytecode interpreter, is being developed as a general-purpose platform for expressive code. The language, named after a character from the TV show The Good Place, consists of the core library, interpreter, compiler, and assembler.
A Lisp version implemented in a previous C standard known as C99, the beta Janet language takes features from Lua and Clojure. It can serve as a scripting language or be embedded in other programs. Janet is suitable for prototyping and runs on Windows, MacOS, and Linux, and it can be ported to other systems.
While suitable for internet of things and embedded development, it has a footprint of about 375KB for the largest complete build, which rules it out for very small devices, creator Calvin Rose said.
Janet’s features include:
- One binary, intended to provide for minimal setup.
- Garbage collection.
- Setup via one binary.
- Python-style generators, implemented as a plain macro.
- Mutable and immutable arrays and strings.
- Interoperability with C via abstract types and C functions.
- A functional and imperative standard library.
- An interactive environment
- A read-evaluate-priont loop (REPL).
- More than 300 functions and macros in the core library.
In beta, Janet can be used in small projects and by “eager hackers,” Rose said.
Plans call for increasing test coverage, improving documentation, and finalizing the C API. With this API, Janet should be more easily embedded into other projects. Also on the drawing board are bindings to C libraries, possibly multithreading, and possibly a foreign function interface (FFI) library.
Where to download Janet
You can download Janet from GitHub.