Vroom
Designed by | Rignchen |
---|---|
Appeared in | 2023 |
Memory system | stack |
Dimensions | Three-dimensional languages |
Computational class | Turing complete |
Reference implementation | Vroom |
File extension(s) | .vroom |
Vroom is a three-dimensional esolanng based on the concept of pathfinding. Every vroom program is composed of one or more blocks of code. Code blocks are separated by an empty line. The program starts in the first block. The cursor starts in slot 1:1 (the top left) and then moves to 1:3 through the fastest way possible. However, it can only move on spaces. Each time the cursor moves, it will run the instruction written under it (so 1:1 run the instruction in 2:1 and 314:42 runs 315:42). Once it reach the end of the code block, it will go to the beginning of another block of code determined by the last value of the stack. If the stack is empty or the block doesn't exist, the program will stop. Since some IDEs replace 2 spaces with a tab, tabs are replaced by 4 spaces when the code is read.
Commands
Name | Description |
---|---|
' '
|
Add the Unicode value of the next operation to the stack and skip the next operation |
#
|
Skip the next instruction |
?
|
If the last value of the stack is not 0, skip the next instruction |
p
|
Print the last value of the stack as a Unicode character |
⌨
|
Push a value inputted by the user at the beginning of the stack (each character a value + the length of the input) |
+
|
Pop the last 2 values of the stack, add them and push the result |
-
|
Pop the last 2 values of the stack, substract them and push the result |
*
|
Pop the last 2 values of the stack, multiply them and push the result |
/
|
Pop the last 2 values of the stack, divide them and push the result |
%
|
Pop the last 2 values of the stack, modulo them and push the result |
^
|
Pop the last 2 values of the stack, power them and push the result |
¬
|
Pop the last value of the stack, push the opposite |
>
|
Push 0 to the stack if the last value is positive |
<
|
Push 0 to the stack if the last value is negative |
→
|
Move every value in the stack to the right |
←
|
Move every value in the stack to the left |
⇄
|
Swap the last 2 values of the stack |
↩
|
Reverse the stack |
0
|
Pop the last value of the stack |
2
|
Duplicate the last value of the stack |
§
|
Do nothing |
Any other character will return an error if read by the interpreter, but they won't do anything if they aren't read.
Examples
Hello, World!
| | ppppppp§ § | H | | e | p § | l | | l | p § | o | | , | p § | | | w | p § | o | | r | p §| l | | d |p | ! | §§§§|
This program pushes the Unicode value of each character of "Hello, World!" to the stack and prints them one at the time.
Cat program
| | |2-0← | | !-⌨←>§| | | |2+←<0← | | ←0→p2←2→-|
This program takes an input from the user. If this input is not null, it enters the second block, where it loops and prints each character one at the time until the there's no value left in the stack.
Truth machine
| | |§2+0← | | 0 0⌨-⇄2+| | | |20← | | ←0 1←p| | | |§ | | 0↩p|
This program takes an input from the user, checks if the input is 1, running the second block (which prints 1 indefinitely) if so, and going to the third block (which just prints a 0 once) if not.