Pyro

A dynamically-typed, garbage-collected scripting language.

Version 0.16.14

Quickstart: Local


Prerequisites

You'll need a C compiler and a POSIX compatible operating system (Mac, Linux, BSD, etc.) to build Pyro from source. (If you're on Windows, you can use the WSL to try Pyro.)

You'll also need to have git and make installed.

Building Pyro

First, download the Pyro repository from Github and cd into the pyro directory:

git clone https://github.com/dmulholl/pyro.git
cd pyro

Build the release binary by running:

make release

The release binary will be created in a new build/release directory as build/release/pyro.

Run the Pyro binary with the --help flag to view the command line helptext:

./build/release/pyro --help

You should see Pyro's helptext, i.e.

Usage: pyro [file]

  The Pyro programming language.

Arguments:
  [file]             Script to run. Will open the REPL
                     if omitted.

Flags:
  -h, --help         Print this help text and exit.
  -v, --version      Print the version number and exit.

Commands:
  test               Run unit tests.
  time               Run timing functions.

Command Help:
  help <command>     Print the command's help text.

Running the REPL

Running the Pyro binary without any arguments launches the REPL — an interactive environment where you can run Pyro commands directly.

Try running the REPL:

./build/release/pyro

At the REPL prompt, type echo "hello world"; and hit return:

>>> echo "hello world";
hello world

Pyro statements normally end with a semicolon, ;, but you can omit the semicolon after typing a single statement in the REPL:

>>> echo "hello world"
hello world

Hit Ctrl-D or type exit and hit return to end the REPL session.

Running a Script

Let's make a simple test script. Create a file called hello.pyro and add the following line to it:

echo "hello world";

Run the script by supplying its filepath to the binary:

./build/release/pyro hello.pyro
hello world

That's it, you can officially add Pyro to the list of languages on your CV. Take the tour if you'd like to learn more about the language.

Installing Pyro

You can find instructions for installing the Pyro binary on your system here.