# Is Brainfuck considered a serious contender

Brainf*** is far from a terse language. A (partially) golfed solution may be 1000's of bytes long. Similar to JSF***, these submissions are often autogenerated and will require significant work to create a valid submission which is competitive. My question is what constitutes a serious brainf*** contender?

• The question seems to start out asking "Is the language a serious contender?", and end up asking "What makes a specific program in this language a serious contender?". These seem unrelated questions. Did you intend to ask only one of them? Jul 31 '16 at 22:00
• Java is far from terse, but people still have fun golfing it. The challenge is to do the best that you can with the language you choose to work with. I won't make this an answer until it's clear which question is intended. Jul 31 '16 at 22:02
• I don't think it's a good idea to censor brainfuck in discussions or answers. While I'm not a fan of the language's name, censoring it hurts searchability. Question titles on the main site are an exception since they might show up on the Hot Network Questions list. Jul 31 '16 at 22:10
• @Dennis uncesnored by request Jul 31 '16 at 22:17

We had a related discussion a few month ago, and I like the wording of the answer I linked to.

A serious contender is a submission which makes a serious effort towards optimizing the submission's score within the chosen language(s) and other choices (such as algorithm choice or optional restrictions/bonuses taken).

That's unfortunately still subjective, which is why I worded my comment like I did. (emphasis mine)

I don't think this is a serious contender for the winning criteria, which is a requirement for all solutions.

From this question:

Similar to JSF***, these submissions are often autogenerated and will require significant work to create a valid submission which is competitive.

That's the problem right there. You expect to just paste the desired output into a brainfuck generator and post it as an answer, without doing the required significant work. That's in direct contrast with the proposed definition I cited above, which requires submissions to make a serious effort towards optimizing the submission's score. For outputs with a pattern that is easily recognizable by humans, most automated generators do rather poorly.

Since it my comment on it is what prompted this discussion I'll take your answer as an example of a post that – in my opinion – is not a serious contender for a code golf challenge.

>++++++++++<+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+.
+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.>.<------------------------..+.+
.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.>.<-----------------------...+.+.+.
+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.>.<----------------------....+.+.+.+.+.+
.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.>.<---------------------.....+.+.+.+.+.+.+.+.+.
+.+.+.+.+.+.+.+.+.+.+.+.>.<--------------------......+.+.+.+.+.+.+.+.+.+.+.+.+.+
.+.+.+.+.+.+.>.<-------------------.......+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.
>.<------------------........+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.>.<------------
-----.........+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.>.<----------------..........+.+
.+.+.+.+.+.+.+.+.+.+.+.+.+.+.>.<---------------...........+.+.+.+.+.+.+.+.+.+.+.
+.+.+.+.>.<--------------............+.+.+.+.+.+.+.+.+.+.+.+.+.+.>.<------------
-.............+.+.+.+.+.+.+.+.+.+.+.+.+.>.<------------..............+.+.+.+.+.+
.+.+.+.+.+.+.>.<-----------...............+.+.+.+.+.+.+.+.+.+.+.>.<----------...
.............+.+.+.+.+.+.+.+.+.+.>.<---------.................+.+.+.+.+.+.+.+.+.
>.<--------..................+.+.+.+.+.+.+.+.>.<-------...................+.+.+.
+.+.+.+.>.<------....................+.+.+.+.+.+.>.<-----.....................+.
+.+.+.+.>.<----......................+.+.+.+.>.<---.......................+.+.+.
>.<--........................+.+.>.<-.........................+.>.<.............
.............


While you made some improvements over the score you initially claimed (without making the programs public), there are many relatively straightforward ways to improve your score.

• The 65 + characters at the start can be replaced with any of these algorithms.

• There's no need to write .+ 26 six times. Create a loop instead.

• The same remarks apply to the long runs of - and . in your answer.

• Most importantly, the twenty-six lines of output are very similar. Instead of hardcoding each line separately, try wrapping your logic in a loop.

This is by far the most difficult step, but it's ultimately what saves the greatest amount of bytes. In its current form, your program is comparable to the Python answer

print'''ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ'''


which does what it's supposed to, but it's certainly not well golfed.

For comparison's sake, my own brainfuck answer is 95 bytes long, and thus over 93% shorter than your answer (1453 bytes). I'm not saying you shouldn't post an answer unless it is close to being optimal (my own answer might also not be optimal), but if it is 15 times longer than another answer in the same language, I wouldn't consider it a serious contender.

• In my defense I did do serious work on my generator. My generator was all written by myself, and I worked with Leaky Nun on optimizing it. I had posted mine before I saw yours, so I did not know what a great submission looked like. However I do see where you are coming from and I guess it does not seem like the best entry to kolmogrov complexity challenge. I will accept your answer. Jul 31 '16 at 22:14
• Automated brainfuck generators can do rather well for strings without too much redundancy (this one compresses Hello, World! into 128 bytes, and the current record appears to be 78 bytes), but for outputs with a pattern, they usually fail to recognize the pattern and thus do not take advantage of it. The generator I linked to even fails to do something reasonable for an input of 1000 A's. Jul 31 '16 at 22:26
• never mind It doesn't use a loop Jul 31 '16 at 22:29
• Exactly. ----[---->+<]>++ to generate A is not bad (although still suboptimal), but the following 1000 dots are bad. Using the same algorithm to generate A, ----[---->+<]>++>>++++[<------[<.>-]>-] saves 977 bytes. Jul 31 '16 at 22:37

TL;DR: You're asking the wrong question. Being "a serious contender" is about the answer, not the language.

Code-Golf is not about having the absolute lowest byte-count at all costs and everything else is off-topic. Otherwise we would have banned non-golfing languages a long time ago, and everybody would answer exclusively in jelly.

Code-Golf is about using a language in new and unusual ways to make the program shorter. Sometimes, intentionally using a language that isn't ideal makes the challenge more fun. I'd rather see a well-golfed 300 byte brainfuck solution than a language that does exactly what the challenge asks for in 0 bytes.

I assume your question is about the text in the help-center that says

All solutions to challenges should be a serious contender for the winning criteria in use.

This doesn't mean that all solutions must use a language that might possibly be the shortest. It just means that you must make effort to get the best score possible in whatever language you choose. For example, a brainfuck solution filled with comments and NOPs is clearly not a serious contender, but that has nothing to do with the language of choice. The same is true about a J or Perl or pyth answer.

Look at this brainfuck answer to the 'Hello world' catalogue. It's one of the longest answers on there, but I would say it's definitely the most impressive.