From Esolang
Jump to: navigation, search

Runespells is an esoteric programming language made by TehZ.

Language type

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 6 variables, called Fa, Rin, Gora, Jyiku, Nahy and Zeha (pronounced FAH, rin, gõ-ra, schiKU, na-HY and zeHA). The 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:

 Zi (si): Enhance the top rune with the code in second top rune and pop both.
 Yah (jaar (or better, Yah as in Yahweh)): Pop and execute top rune.
 Ni (n-IH): Pop and disenhance top rune.
 Giyah <rune> (gi-AH): Replace the rune <rune> with the rune with the id that equals the number of commands in the top rune and pop the top rune.
 Ne (neh): No-op.
 Mizo (mi-SO): Output ascii character corresponding to the number of commands in the top rune and pop the top rune.
 Mizi (mi-SI): Push a rune with no-ops corresponding to an ascii character read.
 <rune>: Push <rune>.
 Lafi (LA-fi): Duplicate top of stack.
 Chizo (CHI-so-o): Go to start of rune.
 Chixo (CHIK-so): Go to start of rune if the stack is empty.
 Chiyo (CHI-yo): Go to start of rune if the stack is not empty.
 Nahweh (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.
 Tazi (TAH-ZI): Pop.
 Gorpdne (GORP-NEH): End program. (Fun fact: If you reverse "endproG" you get "Gorpdne")

Computational Class

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