suspended-chord.info :: software-development :: programming-language-zoo :: pila

pila

The following is from the readme on github:

Overview

pila is different.

Here's a factorial macro:

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

Here's how you use it:

[0]> 6 fac .
720

Here's a Fibonacci calculator:

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

And an example:

[0]> 6 fib .
13

String manipulation can be neat too:

$ ./pila.io
pila 20120712
[0]> "foo" "bar" + .
"foobar"
[1]> "baz" 3 * ...
["foobar", "bazbazbaz"]<=
[2]> + .
"foobarbazbazbaz"
[1]> !bye
goodbye

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

:a #(:b a) call b

Get it

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