We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

accufuck

From Esolang
Jump to navigation Jump to search

accufuck is a brainfuck derivative by User:Win7HE with an accumulator.

It is totally very cool.

Commands

The commands are:

Command Description
> Move the pointer to the right
< Move the pointer to the left
+ Increment the memory cell at the pointer
- Decrement the memory cell at the pointer
. Output the character signified by the cell at the pointer
, Input a character and store it in the cell at the pointer
[ Jump past the matching ] if the cell at the pointer is 0
] Jump back to the matching [ if the cell at the pointer is nonzero
@ Swap the memory cell at the pointer with the accumulator
* Increment the accumulator
/ Decrement the accumulator

There is also a # command which dumps the memory. I am planning to add halting, sleeping, and copying.

Examples

Clear the accumulator

 @[-]@

Move the pointer right accumulator times

 @[-@>@]@

You can replace the > with a < if you want to move left, or remove the @ at the start to use the cell at the pointer instead.

Swap 2 cells

 @b@a@

If "a" is designated to be cell 1, "b" is cell 4, and the pointer is currently at "a", then:

 @>>>@<<<@

Example thats very cool

  -[+>+[+<]>+]>-<--[*--]/,[->.@.@<]>+++.

Input d, put output in calculator, get 100.

See more

The Javascript implementation, a modified version of the Interpret Esolangs Online brainfuck implementation