esolang

ArrowFuck

Brainfuck on a sheet instead of a strip. Two more arrows move the pointer up and down.

Mipinggfxgbtftybfhfyhfn · Turing complete: yes · ●○○ easy · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: cba

The idea

ArrowFuck keeps all eight brainfuck commands and adds ^ and v, which move the memory pointer up and down. Memory is a plane of byte cells with no edge in any direction. The specification calls it 100% backwards compatible with brainfuck, which holds for every brainfuck program without a ^ or v in its comments.

The machine

CommandDoes
> <Move the pointer right or left
^ vMove the pointer up or down
+ -Add or take 1, wrapping at 256
. ,Print the cell as a byte; read a byte, 0 at the end
[ ]Loop while the cell is not 0

The specification's interpreter is written in Common Lisp. It keeps only the cells that were written, in a hash table keyed by x and y.

Example

The reverse cat from the specification reads each byte into a fresh cell one row further down.

The reverse cat from the specification reads each byte into a fresh cell one row further down. At the end of the input it climbs back up and prints them on the way.

Nine rows of eight make 72, an H, one cell below the counter.

Expected: H
Expected: Hello World!

Patterns it teaches

  • Turing tarpit: brainfuck with one more dimension, and no more power.

Further

ArrowFuck builds on Brainfuck.

Brainfuck derivatives

Write your own in Run Convert a program from ArrowFuck

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: arrowfuck.

Command line

shib run arrowfuck -e ',[v,]^[.^]' --input 'abc'
shib manual arrowfuck

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/arrowfuck.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org