Getting Started

Installation

You can install Oxynium on any Linux/MacOS system by running the following command in your terminal:

curl -sSL https://oxynium.org/scripts/install | bash

Unstable version

You can also install the latest version by passing the latest argument to the installation script.

curl -sSL https://oxynium.org/scripts/install | bash -s -- latest

Requirements

Oxynium will require cargo, rust, nasm and gcc to be installed on your system.

Upgrade

To upgrade to the latest version of Oxynium, run the installation script:

curl -sSL https://oxynium.org/scripts/install | bash

Uninstallation

You can uninstall Oxynium by running the following command in your terminal:

curl -sSL https://oxynium.org/scripts/uninstall | bash

Examples

These are a few simple examples which showcase some of the language's features.

Hello, World!

print("Hello, World!")

Fibonacci

const N = 10

def fib (n: Int) Int {
    if n <= 1 {
        return n
    }
    return fib(n - 1) + fib(n - 2)
}

print(fib(N).Str()) // 55

FizzBuzz

def main() {
	for i in range(100) {
		print(fizzbuzz(i))
	}
}

def fizzbuzz (n: Int) Str {
    if n % 3 == 0 && n % 5 == 0 {
        return "FizzBuzz"
    }
    if n % 3 == 0 -> return "Fizz"
    if n % 5 == 0 -> return "Buzz"
    return n.Str()
}