DoubleFuck

From Esolang

Jump to: navigation, search

DoubleFuck is a modification of BF that operates on two tapes, rather than one. In addition to the normal BF commands, there is a second set of commands for working with this second tape and pointer. The accepted abbreviation for Doublefuck is DBF.

Contents

[edit] Language overview

DBF works with two data arrays, each with an independent pointer. Both pointers are initialized to the first cell in their respective array. The commands are:

Command Description
> Move the first pointer to the right
< Move the first pointer to the left
+ Increment the memory cell in the first array under the first pointer
- Decrement the memory cell in the first array under the first pointer
. Output the character signified by the cell at the first pointer
, Input a character and store it in the cell at the first pointer
[ Jump past the matching ] if the cell under the pointer is 0
] Jump back to the matching [ if the cell under the first pointer is not 0
v Move the second pointer to the right
^ Move the second pointer to the left
/ Increment the memory cell in the second array under the second pointer
\ Decrement the memory cell in the second array under the second pointer
: Output the character signified by the cell at the second pointer
; Input a character and store it in the cell at the second pointer
{ Jump past the matching } if the cell under the second pointer is 0
} Jump back to the matching { if the cell under the second pointer is not 0

[edit] History

Currently, little information regarding DoubleFuck is available on the web- a failing this article hopes to rectify. If the original language author finds this page, it is hoped that more historical information can be added.

[edit] Examples

(coming soon)

[edit] Computational class

DoubleFuck is Turing-complete by a trivial isomorphism from Brainfuck, and in fact can be compiled into normal BF by converting DBF commands into their respective BF commands, storing the second array's cell at an offset location in BF memory, and inserting an appropriate number of > and < commands to move between referenced cells.

[edit] See also

[edit] Implementations

The only currently known implementation is part of User:RodgerTheGreat's java-based BrainMachine

Personal tools