Pike

Pike

Installation

Ubuntu
apt install pike{version}
Arch Linux
yay -S pike
Source Code
# Download Pike-v{version}.tar.gz from https://pike.lysator.liu.se/
tar xzf Pike-v{version}.tar.gz
cd Pike-v{version}
make
make install

Examples

Fibonacci Numbers
// Fibonacci Numbers
int fib(int n)
{
    if (n < 2) {
        return n;
    } else {
        return fib(n - 2) + fib(n - 1);
    }
}
int main(int argc, array(string)argv)
{
    int n;
    n = (int)argv[1];
    write("%d", fib(n));
    return 0;
}

/*
    example
        run:
            pike fib.pk 39
*/