Chapter 1: Getting Started

This chapter will get you started up with the Vape interpreter and will introduce you to your very first "Hello World" program written in Vape!

Installing Vape

First, the Vape interpreter requires at least Erlang OTP 19 and Elixir 1.3 to be installed on your machine.

After you've installed Erlang and Elixir, you are now able to install the Vape interpreter!

Run mix escript.install github andrewvy/vape in your terminal.

Also, make sure that ~/.mix/escripts is added to your PATH environment variable!

This will install the Vape CLI tool as vape for interpreting .vape files!

Running your first program

Create a file called HelloWorld.vape. (The capitalization matters here!)

Insert this "Hello World" program.

import Console

object HelloWorld {
  function main() {
    Console.print("Hello World!")

Run this file by executing vape run HelloWorld.vape

$> vape run HelloWorld.vape
Hello World!

Anatomy of a Vape program


Go through how objects and files work, how import works, how scoping works, etc.

results matching ""

    No results matching ""