sans-docs/src/brainfuck.gmi

20 lines
934 B
Plaintext

# brainfuck
Brainfuck is sort of the poster child for [[esolangs]].
Brainfuck operates on an array of memory cells, each initially set to zero. There is a pointer, initially pointing to the first memory cell. You then increment and decrement along the memory cells, and are able to preform limited actions on cells.
* move the pointer right, >
* move the pointer left, <
* increment the memory cell at pointer, +
* decrement the memory cell at pointer, -
* output character signified by the memory cell at pointer, .
* input character and store it in the memory cell at 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, ]
All characters other than ><+-.,[] are typically considered comments and ignored.
=> https://esolangs.org/wiki/Brainfuck esolangs.org/wiki/Brainfuck
=> https://git.sr.ht/~sircmpwn/bfbot irc bot written in brainfuck