No if, no while, no return: only symbols.
Self-hosted, statically typed without annotations, compiled straight to native code
with no libc, no linker and no virtual machine.
nihil-lang.dev · source code · contact@nihil-lang.dev
fib(n = 0) {
n < 2 { : n; } // a BOOL before "{" is an if; ":" returns
: fib(n - 1) + fib(n - 2);
}
>> fib(30); >> "\n"; // 832040
- Self-hosted: a compiler in assembly bootstraps one written in Nihil, which compiles itself to a fixed point.
- Native: x86-64 Linux ELF written directly by the compiler; ARM64 macOS through a translator. A "hello world" is 6 KB.
- Batteries for data: fixed-width record files with an on-disk key index, and queries like
rows.where(price > 10.0).sort(name).
Install (Linux x86_64, macOS arm64):
curl -fsSL https://nihil-lang.dev/install.sh | shThe source code is at nihillang/nihil, under the MIT license. Security reports: security@nihil-lang.dev.