InterNet
Jump to navigation
Jump to search
InterNet is an esoteric programming language invented by User:A that relates to the net of a cube. It is designed to be really hard to program in.
Nets of a cube (list of commands)
@ @@@@ @ @ @@@@ @ @ @@@@ @ @ @@@@ @ @ @@@@ @ @ @@@@ @ @@ @@@ @ @@ @@@ @ @@ @@@ @ @@ @@ @@ This cannot be fit into a 3x4 grid, so it will be ignored: @@@ @@@
This language begins with the first net mentioned.
Also, there is a "block-pusher" to push the squares of the net apart. A command will be entered if the current state is a valid net of a cube. The block-pusher starts at line 1, column 1, facing right.
Syntax
0: Turn right. 1: Move the block that the block-pusher is currently standing a unit of the block pusher's direction. If there is a block at that direction, move the block-pusher 1 unit to that direction instead of moving the blocks. Note that if the block-pusher formed another net in the process of executing, that command will be entered instead of the desired command.
Example
@ @@@@ @ to @@ @@ @@ 10101010101000110101010101011010101011010101101010001
Commands
@ @@@@ @ @ @@@@ @ @ @@@@ @ @ @@@@ @ @ @@@@ @ @ @@@@ @ @@ @@@ @ @@ @@@ @ @@ @@@ @ @@ @@ @@ These correspond to the nets above: : Reset all digits in the pool to 0 ^ Flip the digit at the pointer ! Output the pool < Move the pointer to the left > Push the character into the queue ; Pop a character from the queue + Add the frontmost 2 numbers and push it - Subtract ' Pop a value from the queue and set it as the pool ? If the front of the queue is nonzero, execute the next command.
The whole program is executed inside an infinite loop. If the user tries to pop an empty queue, the execution stops.