implicit loop brainfuck

From Esolang
Jump to navigation Jump to search

implicit loop brainfuck is yet another brainfuck derivative by User:Transoptimal.

The original idea that inspired implicit loop brainfuck was:

esolang where the only conditional is smth like "skip next instruction if [condition]" and loops are achieved by the entire code being executed in a loop until an explicit halt

Differences

These are the differences between implicit loop brainfuck and brainfuck.

Command Description
[ Jumps past the next (not the matching) ] if the current cell is 0. Every program that contains a non-zero amount of [ instructions must contain at least 1 ] instruction.
] Does nothing, apart from serving as a target for a [ instruction.
{ Has the same rules as [, except it jumps to and requires } instead of ], and its condition is the current cell not being 0.
} Does nothing, apart from serving as a target for a { instruction.
# Halts execution.

During execution, the source code is treated as if it repeats infinitely; the instruction pointer loops back to the start when reaching the end of the code, and [ & { instructions at the end of the code can correspond to ] & } instructions at the start.

Examples

Note that since there currently does not exist any implementation of implicit loop brainfuck, all of these are untested.

Cat

,{#}.

Truth machine

{,.------------------------------------------------{#}++++++++++++++++++++++++++++++++++++++++++++++++.------------------------------------------------

Count down from number

{,}.-{#

Interpreter

  • Common Lisp implementation of the implicit loop brainfuck programming language.