Runespells is an esoteric programming language made by TehZ.
The language is a functional language, as each rune is a function which can be passed around with the stack and which can be put in variables. However, data can be edited, so some people might not consider it functional.
In runespells, there is a concept of runes, which are basically functions. Each rune can have six variables, acting as arguments:
There is also a global stack of runes. You start out by defining all the runes existing like this:
Rune <rune id>[<id of variable Fa>, <id of variable Rin>, etc]: <code>
Note that you don't need to define every variable, but you do need the 's. I will tell you about the code a little later.
However, you do need some way of defining the code that needs to be ran. To choose the main rune, called the "Spell", you write:
Spell [<variables>]: <code>
As you see, there are two differences: There is no id, and it's "Spell", not "Rune". Now I will tell you about how the code works.
The code consists of a list of commands, most don't have arguments (Actually, only Giyah has arguments). The commands are:
||si||Enhance the top rune with the code in second top rune and pop both.|
||jaar (or better, Yah as in Yahweh)||Pop and execute top rune.|
||n-IH||Pop and disenhance top rune.|
||gi-AH||Replace the rune |
||mi-SO||Output ascii character corresponding to the number of commands in the top rune and pop the top rune.|
||mi-SI||Push a rune with no-ops corresponding to an ascii character read.|
||LA-fi||Duplicate top of stack.|
||CHI-so-o||Go to start of rune.|
||CHIK-so||Go to start of rune if the stack is empty.|
||CHI-yo||Go to start of rune if the stack is not empty.|
||NAH-WEHY||If the number of commands in the third top rune equals the number of commands in the top rune, execute the second top rune after popping both.|
||GORP-NEH||End program. (Fun fact: If you reverse "endproG" you get "Gorpdne")|
Well, I don't know.
Keep printing numbers, reading a character each time, and if the character read is 0, end the program.
Rune 1[2, 3]: Rin Fa Zi Rune 2: Rune 3: Ne Rune 4: Rune 5: Gorpdne Spell [1, 2, 4, 5]: Rin Mizo Fa Yah Mizi Jyiku Gora Nahweh Chizo
An infinitely repeating cat program follows:
Rune 1: Mizi Mizo Chizo Spell : Fa Yah
This program implements a truth-machine:
Rune 1: Ne Rune 2: Fa Mizo Chizo Spell [1, 2]: Fa Rin Mizi Lafi Mizo Nahweh Gorpdne
- Common Lisp implementation of the Runespells programming language.