vision
Install

Install

Install Vision

Get the compiler on your machine in two steps: grab the source from Kepr, build it with make. There is no package installer and no make install target — Vision is built from source, like its peers.

Before you start

You will need three things on your machine: a C compiler (clang or gcc), GNU Bison, and Flex. On macOS, xcode-select --installplus brew install bison flex covers it. On Debian and Ubuntu, apt install build-essential bison flex is enough. On other distributions, the equivalent packages are usually named bison, flex, and a C compiler package.

Get the source from Kepr

Vision source lives on Kepr at kepr.uk/vision. There are two ways to grab a copy.

Via koh steal

If you have Koh installed, koh steal downloads a Kepr snapshot as a Koh repository you can save into. It is the preferred path — the result is already a working .koh/ directory you can make in.

koh steal https://kepr.uk/vision

The new directory will be named after the Kepr project. Move into it and build from there.

Via tarball

If you do not have Koh, download the source bundle directly. The tarball is the full snapshot, updated on every save.

https://kepr.uk/vision/bundle

curl -L -o vision.tar.gz https://kepr.uk/vision/bundle
tar -xzf vision.tar.gz

Either path leaves you with a directory that contains the compiler source plus a working makefile.

Build the compiler

From inside the source directory, run make. The compiler binary lands at build/vision. The build takes roughly a minute on a modern machine; it generates parser and lexer tables from Bison and Flex grammars, compiles the runtime, then compiles the compiler itself.

make

Put it on your PATH

Vision has no make install step, because the source-build model is the install model. Add build/vision to your PATH for the current shell, or symlink it somewhere already on your PATH:

# one shell
export PATH="$PWD/build:$PATH"

# every shell
ln -s "$PWD/build/vision" /usr/local/bin/vision

The compiler does not need write access anywhere; everything stays in the source tree.

Hello, Vision

With the compiler on your PATH, write a two-line program and follow it through to a runnable binary. The next guide walks through the same path with explanations; this page just confirms that the toolchain is wired up.

first-program.viscompiler checked
to begin:
    say "hello, vision"
to begin:
    say "hello, vision"
The complete first program. Save it as hello.vis anywhere on disk.
vision hello.vis -o hello.c
cc -std=c11 hello.c -lm -pthread -o hello
./hello

The expected output is one line: hello, vision. The Your first program guide walks through each of those three commands in detail, and the language reference covers every feature the toolchain can compile.

What next

The concept guide walks through the language in reading order. The language reference is the exhaustive counterpart for every page in the guide. The diagnostics reference keys every compiler diagnostic by its stable code, and the tooling reference documents the eleven-verb command-line surface.