Homeโ€บBlogโ€บLarzscript
Larzscript

What Is Larzscript? A Money-Native Programming Language Explained

2026-08-01 ยท Larzscript

Most programming languages treat money as an afterthought โ€” you reach for a payments SDK, add a database table for balances, and hope your rounding logic never drifts. Larzscript takes the opposite approach: money is a first-class type in the grammar itself, right next to strings, numbers and lists.

A real, standalone language

Larzscript isn't a DSL bolted onto another language. It's a real general-purpose language with its own C interpreter, shipped as a single statically-linked binary โ€” no Python, no Node, no runtime to install. You write .lz files and run them:

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

It has everything you'd expect from a general-purpose language โ€” functions, closures, lists, dicts, string formatting, a REPL, a package manager. Here's ordinary Larzscript, no money involved:

fn fib(n) {
    if n < 2 { return n }
    return fib(n - 1) + fib(n - 2)
}
let words = "the cat the dog the bird".split(" ")
let counts = {}
for w in words { counts[w] = counts.get(w, 0) + 1 }
print(f"fib(10) = {fib(10)}, counts = {counts}")

Then money becomes part of the grammar

This is where Larzscript is genuinely different. wallet, pay, price, require and paywall are reserved keywords, not functions from a library:

wallet customer = $20.00
wallet platform
wallet 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
}
buy(customer)
print(f"creator earned: {creator.balance}")   # creator earned: $7.20

Money is stored internally as integer cents, not floats, so $9.00 * 0.8 doesn't drift into $7.199999999999999 the way it would in most languages. A revenue split that would normally be a payments-API call plus a database transaction is here just two lines that either both happen or neither does.

Why keywords instead of a library

A payments SDK can always be misused โ€” nothing stops you from debiting a wallet before checking the balance, or forgetting to record a transaction. Because require and pay are part of the language, the buy() function above literally cannot reach the pay lines unless the require line already passed. The safety property is enforced by the grammar, not by convention or code review.

What else is in the box

Try it right now

No install needed to see it work โ€” the Larzscript playground runs the real interpreter compiled to WebAssembly, entirely in your browser. Paste the example above and run it, or start with the tutorial if you want a guided first program. The language has since grown a natural-language syntax too - is, unless, for...to - worth a look. To see it all used for something real, see LarzBudget, a public budget-tracker CLI built entirely in Larzscript.

Ready to get started?

Everything here is free to try.

Try Larzscript now โ†’

Explore the apps