A small, statically typed programming language.
Lopolith is compiled to portable bytecode, runs on a compact register VM, and is designed to be embedded: one process hosts an Engine of shared modules and one or more VMs, each with its own heap, while native code extends the language through ordinary shared libraries.
%simple com.example.Hello implements Main
#import Std
int run(int argc, String[] argv) Main@run {
Std.print("Hello, world!\n")
return 0
}
Hello, world!
$ make && make libs
$ ./loth run -e com.example.Hello hello.loth
Hello, world!
.lothc) and a register VM with computed-goto dispatch.-fwrapv (integer arithmetic is defined everywhere)..so describes its classes; the VM validates it against the .loth declarations before binding.synchronized, volatile, Lock, Cond, Thread.Engine (shared read-only modules), many VMs (independent heaps), host threads supported.The documentation is organized as three independent tracks. Each one is a step-by-step tutorial with complete programs that are compiled and run on every change.
%native classes in C: the ABI, the GC root contract,
exceptions, callbacks and multi-class libraries.