4 ms·
>>+++++++++++++++++[-<+++++++>]<>>+++++++++++++++++++[-<++++++>]<>>++++++++++++[-<++++++++>]<+>>+++++++++++[-<+++++++++++>]<>>+++++++++++++[-<+++++++++>]<>>++++
by GotAnyMegadeth 13y ago
>>+++++++++++++++++[-<+++++++>]<>>+++++++++++++++++++[-<++++++>]<>>++++++++++++[-<++++++++>]<+>>+++++++++++[-<+++++++++++>]<>>+++++++++++++[-<+++++++++>]<>>+++++++++++++[-<++++++++>]<>>+++++++++++++++++[-<++++++>]<+>>+++++++++++++++[-<+++++++>]<>>+++++++++++++++++++++++++++++[-<++++>]<>>++++++++++[-<++++++++++>]<+>>+++++++++++[-<++++++++++>]<>>++++++++[-<++++>]<>>++++++++++++[-<+++++++++>]<+>>+++++[-<++>]<>>++++++++++++[-<+++++++++>]<>>++++++++++++++[-<++++++++>]<>>+++++++++++[-<+++++++++>]<>>+++++++++[-<++++++++>]<+>>+++++++++++++++++++++++++++++++++++++[-<+++>]<<.<<<<<<.>>>>>.>>.<<<<<<.>>>.<.<<<<<.<.>.>>>>>.<<<<<<<<<<<.>>>>>>>>.<<<<<<<<<.>>>>.<<<<<.>>>>>>>>..>>.<<<<<<<<<<<.>>>>>>>.>.<<<.>>>>>>.<<<<<<<<.>>>>>>>>>>>>>>>.<<<<<<<<<<<<<<.<<<.>>>>>>>>>>.>>>>>.>>.<<<<<<..<<<.>.<<.>>>>>.
- claudius 13y agoPlease do people a favour and either format this as code or add more linebreaks, at the moment it makes stuff rather uncomfortable to read (until one clicks ‘Fit to Width’).
- nfoz 13y agoThat sounds like a flaw in HN moreso than the post.
- GotAnyMegadeth 13y agoYeah sorry, I wrote it like that to make it more confusing... But it's actually not too confusing. A brief explanation: The first 75%ish, the bit with all the +s, is filling up the elements of the BF array with the ASCII value of all of the letters contained in the sentence. And the second 25%ish is just scrolling to the right location and printing out the letters, hence lots of <>s and .s. During the fill up stage each ASCII value is made using two of it's factors, in an attempt to reduce the number of characters. So each ASCII letter looks like this N+[-<M+>] where N and M are the two factors chosen. For example 32, an ASCII space, is ++++++++[-<++++>], N=8, M=4. I'm sure this isn't the most character efficient for short sentences, but it might not be too bad for paragraphs. PS, in analysing that I have noticed there is a pointless extra > at the start.
- 69_years_and 13y agoSeems like a case in point, _is that braintuck or something, what's it do?_
- d4rti 13y agoIt's a brainfuck program - you can run it in your web browser at http://www.iamcal.com/misc/bf_debug/ http://www.iamcal.com/misc/bf_debug/