Brainf_cker

Type some text in the form below, then hit "F_ck it!" to generate its representation in the Brainfuck programming language. Then, head on over to this Brainfuck Interpreter to see if it works. It should work, though the code Brainf_cker generates is far from optimized. Diffs welcome!

[clear]

[clear]

Example of the non-optimized nature of Brainf_cker

The following samples demonstrate the non-optimized nature of Brainf_cker-generated code. Basically, Brainf_cker resets the pointer and slot to 0 after executing each line, whereas the Wikipedia entry computes the next position relative to the previous.

Brainf_cker’s “Hello world.” Code

++++++++
[
>+
>++
>+++
>++++
>+++++
>++++++
>+++++++
>++++++++
>+++++++++
>++++++++++
>+++++++++++
>++++++++++++
>+++++++++++++
>++++++++++++++
>+++++++++++++++
>++++++++++++++++
<<<<<<<<<<<<<<<<-
]
>>>>>>>>>.<<<<<<<<<
>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<
>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<
>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<
>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<
>>>>.<<<<
>>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<
>>>>>>>>>>>>>>++.--<<<<<<<<<<<<<<
>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<
>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<
>>>>>>--.++
<<<<<<.

Wikipedia’s “Hello world.” Code

++++++++++
[
>+++++++
>++++++++++
>+++
>+
<<<<-
]
>++.
>+.
+++++++.
.
+++.
>++.
<<+++++++++++++++.
>.
+++.
------.
--------.
>+.
>.

 

Was this page useful to you? Loading...