Oak

Oak

An expressive, simple, dynamic programming language.

Try Oak →

* Oak is still under construction! An official download and documentation for Oak will be available when the language is more finished.

std := import('std')
fmt := import('fmt')
http := import('http')

server := http.Server()
with server.route('/hello/:name') fn(params) {
    fn(req, end) if req.method {
        'GET' -> end({
            status: 200
            body: fmt.format('Hello, {{ 0 }}!'
                std.default(params.name, 'World'))
        })
        _ -> end(http.MethodNotAllowed)
    }
}
server.start(9999)

Once upon a time, there was Ink. Ink was a toy programming language, and I used it to build everything from personal productivity apps to compilers to ray tracers. Ink was wonderful, but had a handful of shortcomings and misfeatures that became more and more obvious over time as I used it.

Oak is a sequel to Ink that tries to correct many of these early mistakes, while being easier to read and use. Oak is intentionally not "Ink 2.0" — it's not a simple upgrade or bugfix, but a completely different language with quite different semantics and syntax.

I've been building Oak since early July 2021. The core language and basic standard libraries are complete, but still feel too unstable to call it ready, and there's a lot missing that I'd like to add to Oak's tooling, like compile-to-JavaScript support baked into the language, and support for automatic code formatting, testing, and documentation generation. This is also why this website is very bare today — I haven't had time to stabilize and document much of anything yet!

In the meantime, if you're curious about the language, you can check out the Oak repository on GitHub, where you'll find more details about the language and a guide on how to try it today.