Near-Brainfuck

From Esolang
Jump to navigation Jump to search

Near-Brainfuck is not an example of near turing machines, but instead user:tommyaweosmes take at trying to understand it.

commands

+
-
<
>
} face near-pointer to right
| face near-pointer to middle
{ face near-pointer to left
.
,
[
]

near-ponter

the near-pointer follows the pointer.

in its right, position, all +-.,[] commands apply to the cell to the pointers direct right.

}+ on this case:

0156
  ^

would result in this:

0157
  ^
   ^

the second row is the near-pointer, and it always stays in the same place relative to the regular pointer.

doing } will do it to the right, | will align it to the center, and { will do it to the left.

i believe you understand but here is a table anyways:

{ : 123
     ^
      ^
| : 123
     ^
     ^
} : 123
     ^
    ^

ascii loop

as with tradition, i will show an ascii loop using at least one of the new features:

{+[|+.{]

this abuses the near-pointer to point at an always-1 value to loop, while pointing back to the always-increasing value to print.

therefore, unlike some of my other ascii loops, this prints infinitely.

this CAN be recreated in brainfuck by this:

>+<[>+.<]

but its really not that fun and also everyones sick and tired of seeing the same 8 god-damn symbols over and over