Interlude is an esolang by User:PythonshellDebugwindow.
Interlude programs are two-dimensional. Each program is divided into acts, which are like programs in themselves. Acts are separated by pipes (
|), which form vertical lines called interludes. Acts are rectangular.
This means that the program
AAA|BB|CCCC AAA|BB|CCCC AAA|BB|CCCC
consists of three acts, each one consisting of 9
Bs, and 12
At least two acts must be entered over the course of a program.
The program starts executing at the top-left character of the first act. Acts are executed from left to right, then top to bottom.
For example, the act
ABC DEF GHI
would be executed in alphabetical order.
If the bottom-right character of an act is reached, then the program is exited; if less than two acts have been entered during the program, then an error is thrown.
Interlude uses a queue. Dequeuing from an empty queue returns zero.
||Move the IP down a line; if the IP is on the last line, then quit the program|
||Dequeue an integer n and go to the top-left character of the one-indexed nth act|
||Dequeue an integer n; if n is greater than zero, then dequeue n more integers and enqueue their sum, otherwise dequeue an integer and print its ASCII value|
||If the next character is a digit 0-9, enqueue it; if it is alphabetic, enqueue its ASCII value; if the next character c is a minus sign, then enqueue the result of subtracting |
||If the next character is a period, input a character and enqueue its ASCII value; if the next character is a command listed in this table, skip it if the element that would be dequeued from the queue next is nonzero (but don't dequeue the element); otherwise, empty the queue|
||Throw an error and quit the program (can be used as padding if it will never be executed)|
? will skip their following character, if there is one (
* can skip two characters in some cases, and
? can skip an entire
? command; see #Truth-machine for an example of the latter behaviour). All alphanumeric characters print themselves. Spaces (ASCII 32) cannot appear in a program. All other characters will push 78 to the stack, cause the IP to move to a random act, and change the character directly below the IP (if there is one) to
v in that order.
Note that the second
? can skip the entire
*1 after it. Note also the extensive use of
: as padding.
Outputs a random number from 1 to 6.
& is used to jump to a random act, since it is not a command.