Infbf
Jump to navigation
Jump to search
Infbf is an esoteric programming language by User:Fyr. It is a derivative of brainfuck with an infinite-dimensional hypercube tape where each dimension has two cells.
The brainfuck commands >
and <
are repurposed as rotation to a different dimension, instead |
is used for moving to the other cell in the current dimension.
A brainfuck program can be converted into an Infbf program by replacing each >
and <
with |>
and <|
.
Commands
Command | Description |
---|---|
> |
Increment the dimension |
< |
Decrement the dimension |
| |
Move to the other cell in the current dimension |
+ |
Increment the current cell |
- |
Decrement the current cell |
. |
Output a character from the current cell |
, |
Input a character and store it in the current cell |
[ |
Jump forward to the matching ] if the current cell is zero
|
] |
Jump back to the matching [ if the current cell is nonzero
|
Examples
A program that prints "Hello World!":
++++++++[|++++>[|++>|+++<<|+++|>|+>|-<]|+>|+<<|->|+>|-<<]|>|.>|---.+++++++..+++.<|.|<|-.|.+++.------.--------.>|+.<|++.