Ale

From Esolang
Jump to navigation Jump to search

Ale is an esoteric programming language designed by David Chipping. It was named after what the author happened to be drinking at the time.

Ale is kind of like Brainfuck. Some notable differences are the provision of two tapes, one of which is of finite length and simply provides convenient constant values, and two pointers, each of which can address either tape. At any given time there is a concept of the "current pointer", which is the pointer that instructions typically affect. The pointer which is not the current pointer is referred to as the "other pointer".

Instruction Set

Command Description
\ Make the other pointer become the current pointer (swap roles).
/ Make the current pointer address the other tape.
> Move the current pointer forward by one tape cell.
< Move the current pointer backward by one tape cell.
! Output the value under the current pointer; if nothing, get input.
+ Add the value under the other pointer to the value under the current pointer.
- Subtract the value under the other pointer from the value under the current pointer.
: If the value under the current pointer is nonzero, increase the program counter by the value under the other pointer.

External resources