Description #
Janet is a functional and imperative programming language built for embedded systems and scripting, with a Lisp-like syntax and modern features like fibers and bytecode compilation.
History #
Janet was created by Caleb Evans and first released in 2017. Designed as a lightweight yet powerful language, Janet is embeddable in C programs and well-suited for system scripting, automation, and REPL-based workflows.
Hello World Code #
(print "Hello, World!")
How to Run #
Option 1: Online
https://janet-lang.org/playground/
Option 2: Local
Install via Homebrew (macOS) or from source:
brew install janet
Run:
janet
Paste code directly or save to hello.janet
and run:
janet hello.janet
Key Concepts #
- Lisp-inspired but not a strict Lisp dialect
- Interpreted with an optional compiler to bytecode
- Lightweight and fast (written in C)
- Supports macros and metaprogramming
- Built-in fibers for concurrency
- REPL-based scripting
- Embeddable in C applications
- Data-oriented types like structs, tables, buffers
- Used for CLI tools, scripting, and games
- Small binary footprint
Try It Online #
https://janet-lang.org/playground
Fun Facts #
- Janet compiles to bytecode and runs on a custom VM.
- Despite Lisp influences, it uses square brackets for arrays and does not follow full parenthetical syntax.
- Janet has been used to build CLI tools, web servers, and plugin systems for games.