:: software-development :: programming-language-zoo :: pilaje


The following is from the readme on github:


Pilaje aims to be an extended version of pila, written in pure Java.

Here's a factorial macro:

:fac dup 0 = #(dup 1 - fac *) #(pop 1) if

Here's how you use it:

$main[0]> 6 fac .

Here's a Fibonacci calculator:

:fib dup 1 <= #(1 - dup fib swap 1 - fib +) #(pop 1) if

And an example:

$main[0]> 6 fib .

String manipulation can be neat too:

$main[0]> "foo" "bar" + .
$main[1]> "baz" 3 * ...
["foobar", "bazbazbaz"]<=
$main[2]> + .
$main[1]> !bye

Anonymous macros open up the possibilities for meta-programming. Here's a particularlybad example:

:a #(:b a) call b

New Features

Pilaje adds several new features to pila, aside from being written in Javaand more portable, such as:

Get it

You can get pilaje at its official github repo: gatesphere/pilaje