Skip to content

pprice/vole

Repository files navigation

Vole

A fast little scripting language, with fancy types.

Vole is a statically typed, JIT-compiled language built on Cranelift. It has structural typing, generics, first-class functions, iterators, generators, async tasks, and a module system with a standard library.

Status: Extremely Alpha

Note: ⚠️⚠️⚠️ This is an experimental project exploring what it looks like to build a programming language primarily through collaboration with AI coding assistants (specifically Claude Code and Codex). The vast majority of the code has been written by and reviewed by coding assistants, with human direction for features and guardrails.

Quick look

interface Scorable {
    func score() -> i64
    func label() -> string
}

class Player {
    name: string,
    wins: i64,
    losses: i64,
}

extend Player with Scorable {
    func score() -> i64    { return self.wins * 3 - self.losses }
    func label() -> string { return "{self.name}: {self.score()} pts" }
}

// Works with any type that implements Scorable
func leaderboard<T: Scorable>(players: [T]) -> [string] {
    return players
        .filter(p => p.score() > 0)
        .map(p => p.label())
        .collect()
}

func main() {
    let squad = [
        Player { name: "Alice", wins: 10, losses: 2 },
        Player { name: "Bob",   wins: 4,  losses: 8 },
        Player { name: "Carol", wins: 7,  losses: 1 },
    ]

    for line in leaderboard(squad) {
        println(line)
    }
}

Install

See docs/install.md for download and build instructions.

Documentation

The language documentation lives in docs/language/:

Building from source

Requires Rust (stable) and just.

git clone https://github.com/pprice/vole.git
cd vole
cargo build --release
./target/release/vole run hello.vole

License

MIT

About

A fast little scripting language, with fancy types.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages