<s>
Brainfuck	B-Language
is	O
an	O
esoteric	O
programming	O
language	O
created	O
in	O
1993	O
by	O
Urban	O
Müller	O
.	O
</s>
<s>
Notable	O
for	O
its	O
extreme	O
minimalism	O
,	O
the	O
language	O
consists	O
of	O
only	O
eight	O
simple	O
commands	B-Application
,	O
a	O
data	O
pointer	O
and	O
an	O
instruction	B-General_Concept
pointer	I-General_Concept
.	O
</s>
<s>
While	O
it	O
is	O
fully	O
Turing	B-Algorithm
complete	I-Algorithm
,	O
it	O
is	O
not	O
intended	O
for	O
practical	O
use	O
,	O
but	O
to	O
challenge	O
and	O
amuse	O
programmers	B-Application
.	O
</s>
<s>
Brainfuck	B-Language
requires	O
one	O
to	O
break	O
commands	B-Application
into	O
microscopic	O
steps	O
.	O
</s>
<s>
The	O
language	O
's	O
name	O
is	O
a	O
reference	O
to	O
the	O
slang	O
term	O
brainfuck	B-Language
,	O
which	O
refers	O
to	O
things	O
so	O
complicated	O
or	O
unusual	O
that	O
they	O
exceed	O
the	O
limits	O
of	O
one	O
's	O
understanding	O
,	O
as	O
it	O
was	O
not	O
meant	O
or	O
made	O
for	O
designing	O
actual	O
software	O
but	O
to	O
challenge	O
the	O
boundaries	O
of	O
computer	B-General_Concept
programming	I-General_Concept
.	O
</s>
<s>
Müller	O
designed	O
Brainfuck	B-Language
with	O
the	O
goal	O
of	O
implementing	O
the	O
smallest	O
possible	O
compiler	B-Language
,	O
inspired	O
by	O
the	O
1024-byte	O
compiler	B-Language
for	O
the	O
FALSE	O
programming	O
language	O
.	O
</s>
<s>
Müller	O
's	O
original	O
compiler	B-Language
was	O
implemented	O
in	O
machine	B-Language
language	I-Language
and	O
compiled	B-Language
to	O
a	O
binary	O
with	O
a	O
size	O
of	O
296	O
bytes	B-Application
.	O
</s>
<s>
He	O
uploaded	O
the	O
first	O
Brainfuck	B-Language
compiler	B-Language
to	O
Aminet	O
in	O
1993	O
.	O
</s>
<s>
A	O
second	O
version	O
of	O
the	O
compiler	B-Language
used	O
only	O
240	O
bytes	B-Application
.	O
</s>
<s>
Except	O
for	O
its	O
two	O
I/O	B-General_Concept
commands	B-Application
,	O
Brainfuck	B-Language
is	O
a	O
minor	O
variation	O
of	O
the	O
formal	O
programming	O
language	O
P′′	B-Application
created	O
by	O
Corrado	O
Böhm	O
in	O
1964	O
,	O
which	O
is	O
explicitly	O
based	O
on	O
the	B-Architecture
Turing	I-Architecture
machine	I-Architecture
.	O
</s>
<s>
In	O
fact	O
,	O
using	O
six	O
symbols	O
equivalent	O
to	O
the	O
respective	O
Brainfuck	B-Language
commands	B-Application
+	O
,	O
-	O
,	O
<, >	O
,	O
[	O
,	O
]	O
,	O
Böhm	O
provided	O
an	O
explicit	O
program	O
for	O
each	O
of	O
the	O
basic	O
functions	O
that	O
together	O
serve	O
to	O
compute	O
any	O
computable	O
function	O
.	O
</s>
<s>
So	O
the	O
first	O
"	O
Brainfuck	B-Language
"	O
programs	O
appear	O
in	O
Böhm	O
's	O
1964	O
paper	O
–	O
and	O
they	O
were	O
sufficient	O
to	O
prove	O
Turing	B-Algorithm
completeness	I-Algorithm
.	O
</s>
<s>
The	O
language	O
consists	O
of	O
eight	O
commands	B-Application
.	O
</s>
<s>
A	O
brainfuck	B-Language
program	O
is	O
a	O
sequence	O
of	O
these	O
commands	B-Application
,	O
possibly	O
interspersed	O
with	O
other	O
characters	O
(	O
which	O
are	O
ignored	O
)	O
.	O
</s>
<s>
The	O
commands	B-Application
are	O
executed	O
sequentially	O
,	O
with	O
some	O
exceptions	O
:	O
an	O
instruction	B-General_Concept
pointer	I-General_Concept
begins	O
at	O
the	O
first	O
command	O
,	O
and	O
each	O
command	O
it	O
points	O
to	O
is	O
executed	O
,	O
after	O
which	O
it	O
normally	O
moves	O
forward	O
to	O
the	O
next	O
command	O
.	O
</s>
<s>
The	O
program	O
terminates	O
when	O
the	O
instruction	B-General_Concept
pointer	I-General_Concept
moves	O
past	O
the	O
last	O
command	O
.	O
</s>
<s>
The	O
brainfuck	B-Language
language	I-Language
uses	O
a	O
simple	O
machine	O
model	O
consisting	O
of	O
the	O
program	O
and	O
instruction	B-General_Concept
pointer	I-General_Concept
,	O
as	O
well	O
as	O
a	O
one-dimensional	O
array	O
of	O
at	O
least	O
30,000	O
byte	B-Application
cells	O
initialized	O
to	O
zero	O
;	O
a	O
movable	O
data	O
pointer	O
(	O
initialized	O
to	O
point	O
to	O
the	O
leftmost	O
byte	B-Application
of	O
the	O
array	O
)	O
;	O
and	O
two	O
streams	O
of	O
bytes	B-Application
for	O
input	B-General_Concept
and	I-General_Concept
output	I-General_Concept
(	O
most	O
often	O
connected	O
to	O
a	O
keyboard	O
and	O
a	O
monitor	O
respectively	O
,	O
and	O
using	O
the	O
ASCII	B-Protocol
character	I-Protocol
encoding	I-Protocol
)	O
.	O
</s>
<s>
The	O
eight	O
language	O
commands	B-Application
each	O
consist	O
of	O
a	O
single	O
character	O
:	O
</s>
<s>
Character	O
Meaning>	O
Increment	O
the	O
data	O
pointer	O
by	O
one	O
(	O
to	O
point	O
to	O
the	O
next	O
cell	O
to	O
the	O
right	O
)	O
.	O
<	O
Decrement	O
the	O
data	O
pointer	O
by	O
one	O
(	O
to	O
point	O
to	O
the	O
next	O
cell	O
to	O
the	O
left	O
)	O
.	O
+	O
Increment	O
the	O
byte	B-Application
at	O
the	O
data	O
pointer	O
by	O
one.	O
-	O
Decrement	O
the	O
byte	B-Application
at	O
the	O
data	O
pointer	O
by	O
one	O
..	O
Output	O
the	O
byte	B-Application
at	O
the	O
data	O
pointer.	O
,	O
Accept	O
one	O
byte	B-Application
of	O
input	O
,	O
storing	O
its	O
value	O
in	O
the	O
byte	B-Application
at	O
the	O
data	O
pointer	O
.	O
</s>
<s>
[	O
If	O
the	O
byte	B-Application
at	O
the	O
data	O
pointer	O
is	O
zero	O
,	O
then	O
instead	O
of	O
moving	O
the	O
instruction	B-General_Concept
pointer	I-General_Concept
forward	O
to	O
the	O
next	O
command	O
,	O
jump	B-General_Concept
it	O
forward	O
to	O
the	O
command	O
after	O
the	O
matching	O
]	O
command.	O
]	O
</s>
<s>
If	O
the	O
byte	B-Application
at	O
the	O
data	O
pointer	O
is	O
nonzero	O
,	O
then	O
instead	O
of	O
moving	O
the	O
instruction	B-General_Concept
pointer	I-General_Concept
forward	O
to	O
the	O
next	O
command	O
,	O
jump	B-General_Concept
it	O
back	O
to	O
the	O
command	O
after	O
the	O
matching	O
[	O
command	O
.	O
</s>
<s>
As	O
the	O
name	O
suggests	O
,	O
Brainfuck	B-Language
programs	O
tend	O
to	O
be	O
difficult	O
to	O
comprehend	O
.	O
</s>
<s>
This	O
is	O
partly	O
because	O
any	O
mildly	O
complex	O
task	O
requires	O
a	O
long	O
sequence	O
of	O
commands	B-Application
and	O
partly	O
because	O
the	O
program	O
's	O
text	O
gives	O
no	O
direct	O
indications	O
of	O
the	O
program	O
's	O
state	B-Application
.	O
</s>
<s>
These	O
,	O
as	O
well	O
as	O
Brainfuck	B-Language
's	O
inefficiency	O
and	O
its	O
limited	O
input/output	B-General_Concept
capabilities	O
,	O
are	O
some	O
of	O
the	O
reasons	O
it	O
is	O
not	O
used	O
for	O
serious	O
programming	O
.	O
</s>
<s>
Nonetheless	O
,	O
like	O
any	O
Turing	B-Algorithm
complete	I-Algorithm
language	O
,	O
Brainfuck	B-Language
is	O
theoretically	O
capable	O
of	O
computing	O
any	O
computable	O
function	O
or	O
simulating	O
any	O
other	O
computational	O
model	O
,	O
if	O
given	O
access	O
to	O
an	O
unlimited	O
amount	O
of	O
memory	O
.	O
</s>
<s>
A	O
variety	O
of	O
Brainfuck	B-Language
programs	O
have	O
been	O
written	O
.	O
</s>
<s>
Although	O
Brainfuck	B-Language
programs	O
,	O
especially	O
complicated	O
ones	O
,	O
are	O
difficult	O
to	O
write	O
,	O
it	O
is	O
quite	O
trivial	O
to	O
write	O
an	O
interpreter	O
for	O
Brainfuck	B-Language
in	O
a	O
more	O
typical	O
language	O
such	O
as	O
C	O
due	O
to	O
its	O
simplicity	O
.	O
</s>
<s>
There	O
even	O
exist	O
Brainfuck	B-Language
interpreters	O
written	O
in	O
the	O
Brainfuck	B-Language
language	I-Language
itself	O
.	O
</s>
<s>
Brainfuck	B-Language
is	O
an	O
example	O
of	O
a	O
so-called	O
Turing	O
tarpit	O
:	O
It	O
can	O
be	O
used	O
to	O
write	O
any	O
program	O
,	O
but	O
it	O
is	O
not	O
practical	O
to	O
do	O
so	O
,	O
because	O
Brainfuck	B-Language
provides	O
so	O
little	O
abstraction	O
that	O
the	O
programs	O
get	O
very	O
long	O
or	O
complicated	O
.	O
</s>
<s>
Brainfuck	B-Language
ignores	O
all	O
characters	O
except	O
the	O
eight	O
commands	B-Application
+-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1[],	O
.	O
</s>
<s>
This	O
program	O
enciphers	O
its	O
input	O
with	O
the	O
ROT13	B-Algorithm
cipher	O
.	O
</s>
<s>
To	O
do	O
this	O
,	O
it	O
must	O
map	O
characters	O
A-M	O
(	O
ASCII	B-Protocol
65	O
–	O
77	O
)	O
to	O
N-Z	O
(	O
78-90	O
)	O
,	O
and	O
vice	O
versa	O
.	O
</s>
