Skip to content
Djinzi edited this page Nov 16, 2026 · 19 revisions

Contents


Getting Started

Note

Please keep in mind that Vivi is currently in extremely early alpha and is highly experimental. A lot of this can and will change.

As of right now, Vivi only supports Linux x86-64/AMD64.

C++17, g++ and your distros native build tools should be the only dependencies required to get Vivi up and running. If that's wrong, please make a git issue.

Building from source

git clone https://github.com/djxnzi/Vivi.git
cd Vivi
make install

NixOS Install

The Nix flake is maintained by Xansi at XansiOnGit/vivi-flake.

To install the current version of vivi on NixOS, add it to the flake.nix of your system config:

inputs = {
  vivi-src = {
    url = "github:djxnzi/Vivi";
    flake = false;
  };

  vivi = {
    url = "github:XansiOnGit/vivi-flake";
    inputs.nixpkgs.follows = "nixpkgs";
    inputs.vivi-src.follows = "vivi-src";
  };
};

Then in your configuration module (make sure inputs is passed via specialArgs):

environment.systemPackages = [
  inputs.vivi.packages.${pkgs.system}.default
];

Vivi should now be accessible globally by running vivi.

To update, run nix flake update and rebuild.

Syntax Highlighting

Syntax Highlighting is available for vscode and tree-sitter, courtesy of jkylander. These are currently outdated and not up to spec, but they'll do for now.

What is Vivi

A statement up front: Vivi is an experimental work in progress, it's not a finished or stable language. Currently it's only interpreted with an AST walker, and many feataures aren't implemented. You should expect bugs and quirks that will hopefully be ironed out in the near future.

If you find any issues, have suggestions, or critiques about poorly explained sections of this document, please don't hesitate to open a git issue.

If you'd like to contribute to the language, please first read CONTRIBUTING.md.

Vivi is, eventually, intended to be a lightweight, hackable, modern metaprogramming language. Vivi doesn't concern itself with whether it wants to be scripted or compiled, static or dynamic, high or low level, or what the "best practices" it wants to impose on you are. It doen't care for programming debates, it just lets you write what you want and doesn't get in your way. There's no reason it can't do all of the above, and the only reason languages tend to pick one over the other is convention.

Vivi is designed to start out high level and scripted by default, with every path to low level being optional. On top of that, Vivi will eventually be able to interop into C, and be embedded into C with a whitelist/blacklist subset. Its interpreter can also be included in compiled binaries to include that subset within programs it compiles.

Vivi can be run from the command line and shebang'd (experimental), and a repl is planned. Its default is a scripting language, but it will be able to compile into a bytecode intermediary at some point. It will then further compile down to a native binary/wasm from there. Memory is automatically arena managed by default, with manual management, pointers, and references being opt in whenever you need it, whether you run the interpreter or a compiled binary.

Its #proctime (currently unimplemented) works like #comptime, giving you full reflective access to the program before execution. It's important to note that it's a preprocessor step, split into multiple phases, not a traditional compile time directive.

What Vivi is not

- Garbage collected.
- A virtual machine, virtual environment, or JIT enabled interpreter.
- Fully interpreted or compiled, high/low, statically typed, etc. Opt in to what you need.
- A language that has traditional macros. Generate it with #proctime.
- An object oriented language. No objects, no this, but you can extend it with #phrase
- A language with a fully featured core library.
- A language with an unmodifiable core library.
- A language that locks you into itself, you can interop.
- Rigid or locked down, you can hack it.
- Free of opinions, but it is also a lang that doesn't get in your way.
- Finished and fully functional.

However, Vivi's grammar extension which operates through its #phrase, #proctime and #inline directives allows you to extend the grammar and language features however you see fit. If you really want garbage collection or OOP, you're free to implement it at a low level. You can extend the language from within Vivi without ever having to leave the language.

#proctime, #inline and #ffi are not ready as of the time you are currently reading this. #phrase is implemented as a limited proof of concept that will gain complexity when the other directives are implemented.

Reflection, compilation and custom memory management are also not implemented as of yet.

Batteries are not included, but if you view Vivi as a Forth style extensible language, it's fully featured with batteries included. /j

What Vivi is, as of right now

Vivi is about 50% feature complete. The core language is mostly done, but FFI and compilation are more than double the current work already put into it. It's currently only interpreted through an AST walker, and it's lightning fast if our benchmarking is accurate, still with room for improvement.

It starts out high level, dynamic, inferred, and scripted by default, it doesn't even need a main() loop. You can just write linearly, call vivi on the file, and it'll execute the program as an interpreter running a script.

Everything from there is opt in all the way down to low level, with everything being derived from a small irreducible backend surface. That means almost every function is derived from a small handful of buitlins, and all the implementation is extendable, hackable, and overwritable by design. That also means it's gradually typed (which really means optional type annotations with inferrence and coercion), both high/low level, and is currently only scripted.

Please see the overview for the current language specification.

Clone this wiki locally