Shirka

Shirka is a programming language that does not generate memory garbage: its runtime does not need a garbage collector to function properly, but the human is not required to manage memory manually either.

It is concatenative (like Forth) and homoiconic (like Lisp). Below is a short Shirka program implementing the Trabb Pardo–Knuth algorithm.

-- Operation computing |n|^0.5 + 5*n^3
(=> f)
  [ -> n
    n abs 0.5 ^ n 3 ^ 5 * + ]

-- Ask the human to enter 11 numbers
"Please enter 11 numbers:" puts
[]
(11 times)
  [ get-value cons ]

-- Apply `f' and display the result
(each)
  [ f >> 400 >
    (if) [ [ << "Overflow!" puts ]
           [                puts ] ] ]

Getting started

The Shirka interpreter is written in ANSI C and should work on most Unix‑like systems (it is developed on OS X).

git clone git://github.com/hashmal/shirka.git
cd shirka
make

It reads and executes Shirka files (usually saved with the .shk extension):

./shirka FILE

You can now try the interactive mode (./shirka examples/repl.shk) and learn the language. Have fun!