Word

From Esolang
Jump to navigation Jump to search

Word is a language by User:PuzzleHunter84 that takes the form of sentences. It is stack-based and has 18 variables (i-z).

Language

Each of the letters of the alphabet is assigned one of twelve instructions (thirteen including the nop instruction). The letters a-m and n-z use the same instructions. The period also has an instruction and the space just separates words. The words are taken letter by letter separately in alphabetical order and the actual order they occur in the word is not actually important, i.e. art, tar, rat, atr, rta, and tra are all the same.

Instructions

Instruction Description
a/n Pops the top two stack values and pushes their sum.
b/o Pops the top two stack values and pushes their difference (top minus second-from-top).
c/p Pops the top two stack values and pushes their product.
d/q Pops the top two stack values and pushes their quotient(top divided by second-from-top).
e/r Nop.
f/s Push the number of letters in this word onto the stack.
g/t Push the ASCII value of the next letter in this word alphabetically onto the stack but still execute its instruction. Do nothing if it is the last letter in this word alphabetically.
h/u Pop the top value of the stack and set the variable named by the next letter in this word alphabetically to it but still execute its instruction. Do nothing if it is the last letter in this word alphabetically.
i/v Retrieve the value from the variable named by the next letter in this word alphabetically and push it onto the stack but still execute its instruction. Do nothing if it is the last letter in this word alphabetically.
j/w Duplicate the top value of the stack.
k/x Swap the top two values of the stack.
l/y Input a value and push it on top of the stack.
m/z Pop the top value of the stack.
. Output the top value of the stack as an ASCII character.

Programs

Hello, world!

reef fee prefer per. rester rug ore referee rex beer.  rester rug ore
were. ere.  effort go.  referee free are free per.  refers rep seer ex
roe.  wet reem.  effort go.  fee true or.  rester rug ore.  referees
me rester rug ore beer.  referee free are fee per.

External resources