Documentation menu

Getting Started

Start Here

MAKO lets you tell a computer what to do. You write simple instructions in a file ending in .mko, then MAKO reads them from top to bottom. Start with the tiny example below. You do not need to understand everything yet.

New to coding?

Copy the examples exactly first. Run them. Then change one number or word and run them again. You are not expected to memorize the command lists.

1

Step 1: Make a file

Create a file named hello.mko. Put this inside it. main means ‘start here.’ print tells MAKO to show words on the screen.

Try this code
main() {
    print "Hello, world!";
}
2

Step 2: Run it

Open a terminal in the same folder. Type the first line and press Enter. MAKO will print Hello, world! The second line does the same thing.

Try this code
mko hello.mko
mko run hello.mko
3

Step 3: Make it count

A loop repeats instructions. This loop gives number the values 1, 2, 3, 4, and 5. print shows each one.

Try this code
main() {
    for number in range(1, 6) {
        print number;
    }
}
4

Later: Run it like an app

This is optional. On Linux, the first line can tell the computer to open the file with MAKO.

Try this code
#!/usr/bin/env mko
main() {
    print "hello!";
}

You can skip this while learning. When you are ready, run chmod +x script.mko once, then ./script.mko.