All docsGetting started

Getting started

Install Venutian, run your first program, and learn the shape of a .ven file in ten minutes.

Venutian arrives on your machine already whole. There is nothing to compile first and no environment to assemble. Install it, write a file, run it.

Install

On macOS or Linux, one line does everything. It downloads the right build for your machine, unpacks it, and puts venutian on your PATH.

shell
curl -fsSL https://venutian.org/install.sh | sh

On Windows, open PowerShell and run:

shell
irm https://venutian.org/install.ps1 | iex

Check that it landed:

shell
venutian --version

You should see a line like Venutian 1.0.0.

Every platform has a direct download too, on the download page.

Your first program

Create a file called hello.ven with one line in it:

venutian
print "Hello from Venutian"

Run it:

shell
venutian run hello.ven

Which prints:

text
Hello from Venutian

A function

Now something with a little more shape. Create greet.ven:

venutian
make greet(name)
    give "Hello, " + name

print greet("world")
shell
venutian run greet.ven

Prints:

text
Hello, world

Three words did all the work. make builds a reusable piece of computation. give hands a result back. print says it out loud. There is no ceremony around any of them.

The shape of a file

A .ven file is read top to bottom. A value is bound to a name with a plain =. Blocks are marked by indentation, and every example in these docs uses four spaces. A line beginning with :: is a comment and is ignored entirely.

venutian
:: this line explains itself
active = yes

when active
    print "ready"
otherwise
    print "not yet"
shell
venutian run flag.ven

Prints:

text
ready

What just ran

venutian run reads the source text, tokenizes it, parses it, resolves every use (more on that in the language tour), compiles it to bytecode, and hands that bytecode to the virtual machine, in one step. There is no separate build phase you have to remember, though venutian build is there when you want the compiled .vbc file on disk (see native compilation).

Where to go next