+.*

From Esolang
Jump to navigation Jump to search

+.* is a Brainfuck derivative where the [ and ] commands are replaced with *, which moves execution back to the beginning of the program if the current cell's value is 0. It was created by User:3xcpy.

Overview

Instructions
Command Description
> Move the tape head to the right (like in Brainfuck)
< Move the tape head to the left (like in Brainfuck)
+ Increment the value in the current cell by 1 (like in Brainfuck)
- Decrement the value in the current cell by 1 (like in Brainfuck)
* Move execution to the beginning of the program if the current cell's value is 0
. Print the current cell's value as an ASCII character (like in Brainfuck)
, Read a byte from stdin into the current cell (like in Brainfuck)

Turing-completeness

+.* is Turing-complete, because Brainpocalypse can be compiled into it. +, <, and > can be compiled directly, and - can become *-.

Notes

  • I came up with this while making +-.%*, where I noticed that the * instruction could be used for flow control on its own, if it was conditional (kind of like Fractran). 3xcpy (talk)
  • The title was originally meant to be a little program that would loop through all the ASCII codes and print them, over and over again. It later occurred to me that the program would not work like that because the * instruction is conditional. Oh well, now I have to live with the consequences of knowing I have made such a terrible mistake. 3xcpy (talk)
  • This seems pretty fundamental and simple, so it is possible that somebody else has already made something like this. If so, please let me know on my discussion page or something. 3xcpy (talk)