brainfucκ

A brainfucκ interpreter written in JS! Due to some computers having curse-word detection systems, I have replaced the end character of brainfucκ with the small kappa HTML numeric code: κ.

- If you want more information on brainfucκ, please visit: wikipedia.org/wiki/Brainfucκ.
- If you want to have some examples, please visit: brainfucκ.org.








information

Overview:
Brainfucκ is an esoteric, extremely limiting, turing complete programming language developed by Urban Muller. He was inspired by the old smallest possible 1024-byte compiler for FALSE, he created a 296-byte (and a later 240-byte) compiler in 1993 with 8 commands and a 1-byte per cell 'infinite' ribbon of memory.

Brainfucκ is not practical and can be called a Turing Carpet as it is intended to amuse and break down complicated functions into small instructions. Its name comes from is a slang term which refers to something that is complicated or so unusual it exceeds the limits of one's poor mind. Some substitutes of the name can be: brainfsck, branflakes, brainoof, brainf or bf.

Language:
The language consists of 8 commands:

> - Move the data pointer by 1 cell to the right
< - Move the data pointer by 1 cell to the left
+ - Adds 1 to the byte at the data pointer
- - Negates 1 to the byte at the data pointer
. - Outputs the ASCII equivalent of the byte at the data pointer
, - Accepts 1 byte of input, stores it in the data pointer cell
[ - If the byte at the data pointer is 0, jump forward to the matching closing bracket
] - If the byte at the data pointer is non-0, jump backwards to the matching opening bracket


For example, this script: ++++++++[>++++++++<-]>+. outputs 'A' as it is setting cell 0 (where the data pointer is) to 8, moving the data pointer left and adding 8 to cell 1 (where the data pointer is) and then reducting 1 from the previous cell so it does not go in an infinite loop. After that repeats 8 times, 1 is added to produce 65. In reality it is just doing: 8*8+1

I love this esoteric programming language. It is both a challenge and is a real weird thing to know, so if you want more pages like this with JS demos and some information at the bottom:

Buy me a coffee!