📜 ⬆️ ⬇️

Brainfuck quine

After the holiday, the brains were greatly rested and now it would be nice to stretch them.
There is a rather popular puzzle: write a program that displays its own source code in an arbitrary programming language. This entertainment is called quine .
What kind of language is this brainfuck everyone knows, I think.

I propose to arrange a competition Quine on bf. I made 3 options + wrote my own (than I won a bottle of sambuka).
As an interpreter, I used http://brainfuck.progopedia.ru .
my version of quine on bf under the cut


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

(Carry forward for readability)
')
ps. I read a bit: first I wrote the code in C using only pointers and a while loop, and then I wrote a translator from C to brainfuck.

Source: https://habr.com/ru/post/49209/


All Articles