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.
curl -fsSL https://venutian.org/install.sh | sh
On Windows, open PowerShell and run:
irm https://venutian.org/install.ps1 | iex
Check that it landed:
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:
print "Hello from Venutian"
Run it:
venutian run hello.ven
Which prints:
Hello from Venutian
A function
Now something with a little more shape. Create greet.ven:
make greet(name)
give "Hello, " + name
print greet("world")
venutian run greet.ven
Prints:
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.
:: this line explains itself
active = yes
when active
print "ready"
otherwise
print "not yet"
venutian run flag.ven
Prints:
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
- Language tour for the full grammar, in the order a working program actually uses it.
- The CLI for every subcommand
venutianhas. - Interactive mode for the REPL.
- Standard library for what ships without an install.
- Package manager for pulling in code someone else wrote.