Skip to content

Máni ... an awesome, super simple programming language!

License

Notifications You must be signed in to change notification settings

mani-language/Mani

Repository files navigation

Máni

Máni

Version 1.3.0

An awesome, super simple language!

  • Simple and lightweight
  • No external dependencies
  • Straight recursive descent parser
  • Multi-language support

What is it?

Máni is an interpreted language that is simple to learn, and easy to use.

The idea behind it is, take some of the good parts of other languages like nodejs, c++, python etc. Implement them into this, and try and build an "Alpha" language... if that is even a such thing.

What Máni code looks like.

# "arrays";

class Vector {
    Vector(a, b, c) {
        this.x = a;
        this.y = b;
        this.z = c;
    }

    get() {
        return [this.x, this.y, this.z];
    }

    add(v) {
        if (v is "list") {
            return Vector(this.x+v.at(0), this.y+v.at(1), this.z+v.at(2));
        } else if (v is "number") {
            return Vector(this.x + v, this.y + v, this.z + v);
        } else if (v is "vector") {
            return Vector(this.x + v.x, this.y + v.y, this.z + v.z);
        }
        return nil;
    }

    show() {
        return "[" + this.x + "," + this.y +"," + this.z + "]";
    }


}

let v1 = Vector(1, 2, 3);
let v2 = Vector(4, 5, 6);
let v3 = v1 + v2;

say v1 + " + " + v2 + " = " + v3;

Checkout some more examples of Mani code and submit your own here.

Syntax highlighting

ATOM VSCODE

Team

Brayden Moon Joe Rickard Odin
Founder Contributor Faithful Builder
Github Github Github