Brainfuck

More obfuscated programming

Brainfuck is a minimalistic programming language, described elsewhere. Its beauty lies in its simplicity, and trying to use it is a truly fascinating experience.

Here is a little something from me:

Here is an example of some typical output generated by this program. The user first enters some data for an eight generation oscillator, and then the program calculates the rest.

New world record in BF Quine size...

Discuss this page Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls. Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna. Anonymous

Wed 11-Mar-2009 18:48 get a Life ;) Anonymous

Sat 4-Jul-2009 15:37 That's amazing! Did you write it from the scratch or did you use some kind of compiler?

Thx,lord. Anonymous

Sun 5-Jul-2009 20:26 That's amazing! Did you write it from the scratch or did you use some kind of compiler?

Thx,lord.

What's amazing is when you posted. What's amazing is when you posted. lft

Linus Åkesson

Wed 8-Jul-2009 18:29 That's amazing! Did you write it from the scratch or did you use some kind of compiler?

Thx,lord.

I wrote it from scratch, but with plenty of comments and whitespace to keep everything straight in my poor head. =) I wrote it from scratch, but with plenty of comments and whitespace to keep everything straight in my poor head. =) Anonymous

Tue 3-Aug-2010 00:58 OMFG!! (even though god has nothing to do with it) I can't believe this! That is the stuff heroes of our time are made of. Seriously! Anonymous

Sun 8-May-2011 18:48 Nice!! But it didnt work in my homemade Interpreter :/ I had to download another one. Anonymous

Fri 17-Jun-2011 15:27 WOW!!! Looks cool, works cool ;)



Must be a pretty piece of work! I once tried Conways Life too but I gave up ;) Anonymous

Tue 28-Jun-2011 21:48 OH. MY. GOD.

My Head already starts exploding and overheating when just THINKING about GOL. If I would have to program it... oh my god.

You didn't just program/code it, you f*cking did it in BRAINFUCK!!

This _literally_ fucks my brain!

I love you.

I just hope to become a good C++ Coder and maybe create some demos or sth like that... But I don't think I will ever achieve what you achieved.

You are a larger-than-life. Keep up the good work! Anonymous

Wed 7-Nov-2012 16:36 Awesome ;).

And the implementation is so simple! I changed the output to stdout instead of stderr. This is my brainfuck interpreter for stdout in one line :



char m[9999],*n[99],*r=m,*p=m+5000,**s=n,d,c; main(){for(read(0,r,4000);c=*r;r++)c-']'||(d>1||(r=*p?*s:(--s,r)),!d||d--),c-'['||d++||(*++s=r),d||(*p+=c=='+',*p-=c=='-',p+=c=='>',p-=c=='<',c-'.'||write(1,p,1),c-','||read(1,p,1));}



Hehe works with your game of life. Honestly that must have taken ages to implement. I get a headache after the first line in your life.bf file ;).



Greets and keep up all your awesome work,

Walter Schreppers Anonymous

Fri 13-Sep-2013 18:32 The first line is easy, well the first two and a half actually; after that it gets more interesting. :)



What I'd love to do is use this as a benchmark program; only problem is it doesn't take very long to run...



"real 0m0.049s"



That's for your example script.



Any chance of a larger array ?

Dynamic would be sooooo wonderful but 26x26 should give me enough space to draw a nice pattern. Anonymous

Wed 9-Oct-2013 23:27 Hi.

It seems like the [elsewhere] link above is not valid anymore. Or at least not just now...

"De pagina is niet gevonden"

/Ron Anonymous

Fri 11-Oct-2013 11:19 The new location for that link is http://www.iwriteiam.nl/Ha_BF.html Anonymous

Tue 4-Feb-2014 23:15 Are you ready for the next challenge? Implement some brain fuck interpreter using the game of life. It's turing complete after all ;-) Anonymous

Wed 27-Aug-2014 20:09 ++++++++[>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++>+++++++++++++>++++++++++++++>+++++++++++++++>++++++++++++++++<<<<<<<<<<<<<<<<-]>>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<>>>>>>>>>>>>+++.---<<<<<<<<<<<<>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>--.++<<<<<<>>>>>>>>>>>>>.<<<<<<<<<<<<<>>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<<>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<. Anonymous

Sat 24-Oct-2015 19:42 >>>++++++++++[>++++++++++[>+<-]<-]>>++.++++++.-----------.++++++.<<++++[>++++[>+<-]<-]>>++++.<<+++++++[>+++++++[>-<-]<-]>>--------.<<++++++[>++++++[>+<-]<-]>>++++++++++++.<<++++[>++++[>-<-]<-]>>-.<<++++++[>++++++[>-<-]<-]>>------------.<<+++++++[>+++++++[>+<-]<-]>>++++++++++++.---------------.+++++++.<<++++[>++++[>-<-]<-]>>-.++++++++++++++.++++++++.........<<++++[>++++[>+<-]<-]>>++. Anonymous

Thu 21-Jan-2016 23:04 get a Life ;)

YOU SON OF A BITCH !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I'LL KILL YA !!!!!!!!!!!!!!!!!!!!!! YOU SON OF A BITCH !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!I'LL KILL YA !!!!!!!!!!!!!!!!!!!!!! Anonymous

Thu 21-Jan-2016 23:06 Lol this doesnt work you so bad lolololol ^^ Anonymous

Tue 26-Jan-2016 21:22 Wow. You're amazing. Is there an online interpreter Anonymous

Thu 11-Feb-2016 14:11 OH. MY. GOD.

My Head already starts exploding and overheating when just THINKING about GOL. If I would have to program it... oh my god.

You didn't just program/code it, you f*cking did it in BRAINFUCK!!

This _literally_ fucks my brain!

I love you.

I just hope to become a good C++ Coder and maybe create some demos or sth like that... But I don't think I will ever achieve what you achieved.

You are a larger-than-life. Keep up the good work! Anonymous

Sat 22-Oct-2016 07:11 +++++ +++++ [->++ +++++ +++<] >++.+ +++++ .<+++ [->-- -<]>- -.+++ +++.<++++[ ->+++ +<]>+ +++.- ---.< +++[- >---< ]>--- -.<++ ++[-> ----< ]>------.< ++++[ ->+++ +<]>. <+++[ ->--- <]>-- ----. <++++ +[->+ ++++< ]>+.<+++++ +[->- ----- <]>-- ----- ---.< +++++ +[->+ +++++ <]>++ .<+++ [->+++<]>+ .++++ +++++ .--.. <+++[ ->--- <]>-. ----. ----. ----- .<+++ +++[->---- --<]> ----. <++++ +++[- >++++ +++<] >+.<+ ++[-> ---<] >-.<+ ++[->+++<] >++++ .<+++ [->++ +<]>+ +++++ .< Anonymous

Sun 18-Dec-2016 15:10 +++++ +++++ [->++ +++++ +++<] >++.+ +++++ .<+++ [->-- -<]>- -.+++ +++.<

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

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

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

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

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

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

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

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

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

<!----><!--]--><!--+++--><!--]--> Anonymous

Fri 10-Mar-2017 05:23 [-]>[-]>[-]++++[<+++++>-]<+++[<+++++>-]<. >++[<----->-]<-. ---. Anonymous

Mon 3-Apr-2017 00:35 How come the download link doesn't work? Anonymous

Sun 13-Aug-2017 17:08 I bring grave news from the future... MS-DOS IS DEPRECATED!!! Anonymous

Sun 27-Aug-2017 15:43 I just found this website. 2009! Wow, it's still impressive that this was not cross compiled.



~Coolq Anonymous

Thu 5-Oct-2017 16:15 MS-DOS Is alive and well Anonymous

Sun 29-Oct-2017 10:15 +++++ +++[- >++++ ++++< ]>+++ ++++. ++++. ----- ---.< ++++[ ->+++ +<]>+

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

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

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

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

Wed 24-Jan-2018 14:09 ++++++++[>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++>+++++++++++++>++++++++++++++>+++++++++++++++>++++++++++++++++<<<<<<<<<<<<<<<<-]>>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<>>>>>>>>>>>>+++.---<<<<<<<<<<<<>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>--.++<<<<<<>>>>>>>>>>>>>.<<<<<<<<<<<<<>>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<<>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<. Anonymous

Thu 1-Mar-2018 23:55 This is amazing. I actually play with this :) Anonymous

Wed 20-Jun-2018 10:51 ++++++++[>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++>+++++++++++++>++++++++++++++>+++++++++++++++>++++++++++++++++<<<<<<<<<<<<<<<<-]>>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<>>>>>>>>>>>>+++.---<<<<<<<<<<<<>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>--.++<<<<<<>>>>>>>>>>>>>.<<<<<<<<<<<<<>>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<<>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<. Anonymous

Tue 31-Jul-2018 10:10 http://nazo.one-story.cn/brainfuck?

I know the answer is "she". Anonymous

Sun 5-Aug-2018 16:42 >>>++++++++++[>++++++++++[>+<-]<-]>>++.++++++.-----------.++++++.<<++++[>++++[>+<-]<-]>>++++.<<+++++++[>+++++++[>-<-]<-]>>--------.<<++++++[>++++++[>+<-]<-]>>++++++++++++.<<++++[>++++[>-<-]<-]>>-.<<++++++[>++++++[>-<-]<-]>>------------.<<+++++++[>+++++++[>+<-]<-]>>++++++++++++.---------------.+++++++.<<++++[>++++[>-<-]<-]>>-.++++++++++++++.++++++++.........<<++++[>++++[>+<-]<-]>>++. Anonymous

Fri 19-Oct-2018 15:11 That's amazing! Did you write it from the scratch or did you use some kind of compiler?

Thx,lord.

What's amazing is when you posted. What's amazing is when you posted. Anonymous

Mon 22-Oct-2018 04:10 lft wrote: That's amazing! Did you write it from the scratch or did you use some kind of compiler?

Thx,lord.

I wrote it from scratch, but with plenty of comments and whitespace to keep everything straight in my poor head. =) I wrote it from scratch, but with plenty of comments and whitespace to keep everything straight in my poor head. =)

Did you type the comments? When I write bf code I have to write it on paper due to the difficulty of commenting and then type it onto the computer Did you type the comments? When I write bf code I have to write it on paper due to the difficulty of commenting and then type it onto the computer lft

Linus Åkesson

Thu 25-Oct-2018 10:05 Did you type the comments? When I write bf code I have to write it on paper due to the difficulty of commenting and then type it onto the computer

The bf interpreter I used simply ignores any invalid characters. So it's just a matter of avoiding <>+-[],. The bf interpreter I used simply ignores any invalid characters. So it's just a matter of avoiding <>+-[],. Anonymous

Tue 6-Nov-2018 04:27 ..... ..... ..... ..... !?!!. ?.... ..... ..... ..... .?.?! .?... .!...

..... ..... !.?.. ..... !?!!. ?!!!! !!?.? !.?!! !!!.. ..... ..... .!.?.

..... ...!? !!.?. ..... ..?.? !.?.. ..... .!.?. ..... ..... !?!!. ?!!!!

!!!!! !?.?! .?!.? ..... ....! ?!!.? ..... ...?. ?!.?. ..... !.?.. .....

!?!!. ?!!!! !!?.? !.?!! !!!!! !!!!. ..... ...!. ?.... ...!? !!.?. .....

?.?!. ?..!. ?.... ..... !?!!. ?!!!! !!!!? .?!.? !!!!! !!!!! !!!.? .....

..!?! !.?.. ....? .?!.? ....! .!!!. !!!!! !!!!! !!!!! !!.?. ..... .!?!!

.?... ...?. ?!.?. ..... !.!!! !!!!! !.?.. ..... ..!?! !.?.. ..... .?.?!

.?... ..... !.?. Anonymous

Mon 19-Nov-2018 03:11 ..... ..... ..... ..... !?!!. ?.... ..... ..... ..... .?.?! .?... .!...

..... ..... !.?.. ..... !?!!. ?!!!! !!?.? !.?!! !!!.. ..... ..... .!.?.

..... ...!? !!.?. ..... ..?.? !.?.. ..... .!.?. ..... ..... !?!!. ?!!!!

!!!!! !?.?! .?!.? ..... ....! ?!!.? ..... ...?. ?!.?. ..... !.?.. .....

!?!!. ?!!!! !!?.? !.?!! !!!!! !!!!. ..... ...!. ?.... ...!? !!.?. .....

?.?!. ?..!. ?.... ..... !?!!. ?!!!! !!!!? .?!.? !!!!! !!!!! !!!.? .....

..!?! !.?.. ....? .?!.? ....! .!!!. !!!!! !!!!! !!!!! !!.?. ..... .!?!!

.?... ...?. ?!.?. ..... !.!!! !!!!! !.?.. ..... ..!?! !.?.. ..... .?.?!

.?... ..... !.?. Anonymous

Sun 25-Nov-2018 12:13 ..... ..... ..... ..... !?!!. ?.... ..... ..... ..... .?.?! .?... .!...

..... ..... !.?.. ..... !?!!. ?!!!! !!?.? !.?!! !!!.. ..... ..... .!.?.

..... ...!? !!.?. ..... ..?.? !.?.. ..... .!.?. ..... ..... !?!!. ?!!!!

!!!!! !?.?! .?!.? ..... ....! ?!!.? ..... ...?. ?!.?. ..... !.?.. .....

!?!!. ?!!!! !!?.? !.?!! !!!!! !!!!. ..... ...!. ?.... ...!? !!.?. .....

?.?!. ?..!. ?.... ..... !?!!. ?!!!! !!!!? .?!.? !!!!! !!!!! !!!.? .....

..!?! !.?.. ....? .?!.? ....! .!!!. !!!!! !!!!! !!!!! !!.?. ..... .!?!!

.?... ...?. ?!.?. ..... !.!!! !!!!! !.?.. ..... ..!?! !.?.. ..... .?.?!

.?... ..... !.?. Anonymous

Tue 26-Feb-2019 12:31 ..... ..... ....! ?!!.? ..... ..... ....? .?!.? ....! .?... ..... .....

..!?! !.?.. ..... ..... ..?.? !.?.. ..... ..... ..... ..... !.?.. .....

..... .!?!! .?!!! !!!!! !!!!? .?!.? !!!!! !!!!! !!!!! .?... ....! ?!!.?

!!!!! !?.?! .?!!! !!!!! !!!!! .!!!. ?.... ..... ..... .!?!! .?... .....

..... .?.?! .?!.? . Anonymous

Tue 23-Apr-2019 05:37 Are you ready for the next challenge? Implement some brain fuck interpreter using the game of life. It's turing complete after all ;-) I could probably do that, but it would take a long time. It’s a simple language after all. Caveat: Input will be a royal pain. Still, won’t be doing it anytime soon. To give you an idea of how it will look, it will look a little like the Spartan Universal Computer Constructor or the Life Pi Calculator. I could probably do that, but it would take a long time. It’s a simple language after all. Caveat: Input will be a royal pain. Still, won’t be doing it anytime soon. To give you an idea of how it will look, it will look a little like the Spartan Universal Computer Constructor or the Life Pi Calculator. Anonymous

Tue 23-Apr-2019 05:48 Are you ready for the next challenge? Implement some brain fuck interpreter using the game of life. It's turing complete after all ;-) I could probably do that, but it would take a long time. It’s a simple language after all. Caveat: Input will be a royal pain. Still, won’t be doing it anytime soon. To give you an idea of how it will look, it will look a little like the Spartan Universal Computer Constructor or the Life Pi Calculator. I could probably do that, but it would take a long time. It’s a simple language after all. Caveat: Input will be a royal pain. Still, won’t be doing it anytime soon. To give you an idea of how it will look, it will look a little like the Spartan Universal Computer Constructor or the Life Pi Calculator. Also, it will be incredibly huge, far beyond the capabilities of that poor BrainF program that I call, “The Life Play Button”. It will require a fairly efficient implementation of HashLife, likely beyond anything that can realistically be written in BrainF, at least without “obsessive optimization”. Worse, you probably won’t even get a pattern download anytime soon. Even worse, when you do manage to find the download link (in the future), you will likely still be frustrated by the notable lack of speed and the difficulty of making it “faster”, despite some instructions given in the ZIP file. So, not very good. And, by the way, there are Game of Life interpreters in the Game of Life. They are just incredibly huge, slow, and laggy, just like what I think my interpreter would be like. Let’s end it at that. Bye! Anonymous

Tue 23-Apr-2019 06:02 Are you ready for the next challenge? Implement some brain fuck interpreter using the game of life. It's turing complete after all ;-) I could probably do that, but it would take a long time. It’s a simple language after all. Caveat: Input will be a royal pain. Still, won’t be doing it anytime soon. To give you an idea of how it will look, it will look a little like the Spartan Universal Computer Constructor or the Life Pi Calculator. I could probably do that, but it would take a long time. It’s a simple language after all. Caveat: Input will be a royal pain. Still, won’t be doing it anytime soon. To give you an idea of how it will look, it will look a little like the Spartan Universal Computer Constructor or the Life Pi Calculator. Also, it will be incredibly huge, far beyond the capabilities of that poor BrainF program that I call, “The Life Play Button”. It will require a fairly efficient implementation of HashLife, likely beyond anything that can realistically be written in BrainF, at least without “obsessive optimization”. Worse, you probably won’t even get a pattern download anytime soon. Even worse, when you do manage to find the download link (in the future), you will likely still be frustrated by the notable lack of speed and the difficulty of making it “faster”, despite some instructions given in the ZIP file. So, not very good. And, by the way, there are Game of Life interpreters in the Game of Life. They are just incredibly huge, slow, and laggy, just like what I think my interpreter would be like. Let’s end it at that. Bye! I mean, not involving BrainF. Or, in fact, any other programming language in between, as far as I know. Anonymous

Thu 25-Apr-2019 16:58 *GoL interpreter in GoL*

Hint: It’s called the 0E0P Metacell. It will lag and freeze the flip out of your computer. Hint: It’s called the 0E0P Metacell. It will lag and freeze the flip out of your computer. Anonymous

Tue 16-Jun-2020 23:01 ++++[++++>---<]>.+[--->+<]>+++..---. Anonymous

Thu 25-Jun-2020 00:00 That's amazing! Did you write it from the scratch or did you use some kind of compiler?

Thx,lord.

What's amazing is when you posted. What's amazing is when you posted. hey Anonymous

Wed 9-Sep-2020 10:40 ++++++++++ [> +> +++> +++++++> +++++++++ <<<< -] >>> +++++ +++++++++ .------------. +++++.> ++++++++++++++++++++ +++. << +++++++++++++++++. >> -------------------.--- ------. ++++++++++++++. ++++++++++++. <++++++++++++++ ++++. +++++++++. <+++. +.> ----.> ++++.

The Portable Brainfuck Interpreter (by Urban Mueller, who also created the language) has an undocumented feature: Because the program and its data are kept in the same array, it is possible to write. Regard this simple Quine: