vyrn

Vyrn

Write the rule.
The compiler proves it, checks it,
or tells you why not.

A systems language with no garbage collector. It compiles to native code and WebAssembly.

Facts on results

A result carries what is true of it.

sort makes xs sorted(byAge). binarySearch needs that fact, and the compiler checks it before anything runs. Every other line keeps it, turns it, or drops it.

ages.vyrnproved
let xs = readAges()
.sort(byAge)
.reverse()
.filter(isAdult)
.map(jitter)
xs.push(17)
binarySearch(xs, 30) // needs sorted(byAge)
// click a line to add or remove it

Effects

Every function says what it touches.

A pure function keeps everything inside the seal. print leaps over it to stdout; a write to count runs out to its buoy. A gen fn must stay sealed.

table.vyrnpure
gen fn table() -> Array<Int64> {
let xs = build()
print(xs.length)
count = count + 1
return xs
}
// click gen, print or count

No collector

Every value sinks once, at a point known before the run.

Nothing piles up and nothing is swept. Press run and watch the pool drain: allocations equal frees.

main.vyrnready
fn main() {
let xs = readAges() // owned by xs
let s = summarize(xs) // xs moves in
print(s) // released at its end
}
90,000allocated0released

Still water

Write the rule. Let the compiler carry it.

Install Vyrn

Operating system
curl -fsSL https://vyrn-lang.github.io/install.sh | sh
powershell -c "irm https://vyrn-lang.github.io/install.ps1|iex"
Other ways to install