The money-native
programming language.

A small, fast, memory-safe general-purpose language where wallets, payments and metering are keywords — shipped as a single static binary with zero dependencies.

garbage collected comprehensions modules & packages formatter f-strings lazy ranges try / catch one C file

Install — one line

Linux x86_64 / ARM64. Downloads the binary and the package manager.

curl -fsSL https://raw.githubusercontent.com/larz-scripter/larzscript/main/install.sh | sh

Or build it — one C file, no dependencies:

cc -O2 -o larzscript native/larzscript.c
./larzscript program.lz

A taste

A real general-purpose language — and money is part of the grammar.

# general-purpose: functions, dicts, comprehensions, f-strings
fn wordcount(text) {
    let counts = {}
    for w in text.split(" ") { counts[w] = counts.get(w, 0) + 1 }
    return counts
}
print(f"squares: {[x * x for x in range(6)]}")

# money-native: wallets, pay, require, gas-metering
wallet customer = $20.00
wallet platform, creator
price premium = $9.00

fn buy(buyer) {
    require buyer.balance >= premium, "not enough funds"
    pay premium from buyer to platform
    pay premium * 0.8 from platform to creator   # a revenue split
}
buy(customer)
print(f"creator earned {creator.balance}")   # creator earned $7.20

Batteries included

Language

numbers, strings, lists, dicts, functions & lambdas, modules, comprehensions, try/catch/throw, f-strings, slicing, default params, lazy ranges.

Money-native

$3.50 is exact cents; pay … from … to …, require, paywall/subscribe, and gas-metered functions are built in.

Memory-safe

A precise mark-sweep garbage collector reclaims everything — verified under AddressSanitizer. Long-running programs stay bounded.

Toolchain

a multi-line REPL, a canonical formatter (fmt), a syntax checker (--check), a doc generator (larzdoc), and a package manager (larzpkg).

Packages — larzpkg install <name>

A registry of installable libraries; they compose, e.g. json.parse(http.get(url)).

PackageWhat it does
jsonparse & stringify JSON
httpHTTP client (get/post/status/download)
csvparse & write CSV
base64encode/decode base64
tablealigned ASCII tables
colorANSI terminal colors
argscommand-line argument parsing
logleveled logging
testa tiny test framework
time · string · random · fs · mathxtime/duration · string utils · seeded PRNG · filesystem · math

Add yours by opening a PR against packages/registry.txt.

Learn more

Language reference →

The complete spec: values, operators, control flow, money, the standard library.

Browser playground →

Run Larzscript live, no install.

Releases →

Prebuilt static binaries for Linux x86_64 / ARM64.

Editor support →

Syntax highlighting for VS Code and Vim.