Collab
Jump to navigation
Jump to search
Collab is a collaborative esolang.
Do not modify other's commands!
Commands
Command | Description |
---|---|
#
|
Start the program |
$
|
End the program |
:
|
Push 0 to the front of the Deque |
;
|
Inject 0 to the back of the deque |
+
|
Increment the value at the front of the deque, works like brainfuck + if data is a tape
|
-
|
Decrement the value at the front of the deque, works like brainfuck - if data is a tape
|
*
|
Move the value at the bottom of the deque to the top, if the deque is a tape, move the tape pointer right |
""
|
Push the literal string within the quotation marks to the deque |
k
|
Turn the deque into a tape, with cells 0 - n initialized to the values in the deque from back to front. The pointer is initialized to the location of the front of the deque |
l
|
Turn the tape into a deque |
q
|
Copy the next two characters and append them to the end of the code. The characters are still run after the q command runs (for example, q+k appends +k to the code, increments tbe front of the deque, and turns the deque into a tape).
|
<
|
Move the tape pointer left. If the data is a deque, Move the value at the top of the deque to the bottom |
o
|
Output the string at the top of the deque. If data is a tape, output the current cell's value as a number |
s
|
Run the string at the top of the deque as code |
?
|
pop the top value of the deque, and skip that many commands if the second from top (which is now the top) of the deque or the current cell is not zero |
.
|
Skip next command if top of stack or current cell is 0 |
[
|
Go to the command before the matching ]
|
]
|
Go to the command after the matching [
|
i
|
Take a number from user input and push it to the deque |
n
|
NOP |
a
|
Pop the top two values and preform lunar addition on them. |
m
|
Pop the top two values and preform lunar multiplication on them. |
^
|
Duplicate top two values of the deque |
&
|
Line comment |
\
|
push a newline character |
Examples
Hello World
#"Hello, World!"o
Truth-machine
#i[:kol$:+:++?][:+kol]
99 bottles of beer
::+++++++++++k[*+++++++++<-.]*- & get 98, leaving a 0 behind it [+ kol" bottles of beer on the wall,"o\o kol" bottles of beer."o\o "take one down, pass it around"o\o k-ol" bottles of beer on the wall"o\o\o -.]+ & end loop if top of stack is 1 "1 bottle of beer on the wall"o\o "1 bottle of beer."o\o "take one down, pass it around"o\o "no bottles of beer on the wall"
Computational class
Collab is Turing-complete, as the Turing-complete subset of Underload :()^
is equivalent to the Collab commands ^""s