Ivy Zemura yvI oo ii oo Posted March 18, 2014 Report Share Posted March 18, 2014 Brainfuck is the coolest programming language ever. http://esoteric.sange.fi/brainfuck/impl/interp/i.html There are two global variables in every Brainfuck program, a pointer to a byte and an array of 30,000 or more bytes. All values are initialized to 0 in the array > increments the pointer (goes forward 1 cell in the array) < decrements the pointer (goes backward 1 cell in the array) + increments the value at the pointer - decrements the value at the pointer [ begins a loop whose entry condition is while(*ptr>0) ] ends the loop , reads a byte from console into the value at the pointer . writes the value at the pointer to the console Anything other than these characters is considered comments and is ignored print "Hello world!" is: ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++. print "WATMM" is: ++++++++[>++++++++++<-] ++++++++[>>++++++++++<<-] ++++++++[>>>++++++++++<<<-] ++++++++[>>>>++++++++++<<<<-] ++++++++[>>>>>++++++++++<<<<<-] >+++++++ >--------------- >++++ >--- >--- <<<<< .>.>.>.>.>. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/82685-brainfuck/ Share on other sites More sharing options...
Ivy Zemura yvI oo ii oo Posted March 18, 2014 Author Report Share Posted March 18, 2014 print "SEAN PLS" is: ++++++++[>++++++++++<-] ++++++++[>>++++++++++<<-] ++++++++[>>>++++++++++<<<-] ++++++++[>>>>++++++++++<<<<-] +++[>>>>>++++++++++<<<<<-] ++++++++[>>>>>>++++++++++<<<<<<-] ++++++++[>>>>>>>++++++++++<<<<<<<-] ++++++++[>>>>>>>>++++++++++<<<<<<<<-] >+++ >----------- >--------------- >-- >++ >>---- >+++ <<<<<<<< .>.>.>.>.>.>.>.>. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/82685-brainfuck/#findComment-2141719 Share on other sites More sharing options...
Ivy Zemura yvI oo ii oo Posted March 18, 2014 Author Report Share Posted March 18, 2014 QUITE GOOD ++++++++[>++++++++++<-]>+.> ++++++++[>++++++++++<-]>+++++.> +++++++[>++++++++++<-]>+++.> ++++++++[>++++++++++<-]>++++.> +++++++[>++++++++++<-]>-.> ++++++++++++++++++++++++++++++++.> +++++++[>++++++++++<-]>+.> ++++++++[>++++++++++<-]>-.> ++++++++[>++++++++++<-]>-.> ++++++[>++++++++++<-]>++++++++. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/82685-brainfuck/#findComment-2141725 Share on other sites More sharing options...
zkom Posted March 18, 2014 Report Share Posted March 18, 2014 I've been doing some brainfuck programming. I've also made genetic algorithms that try to optimize brainfuck code size. They generate some weird ass code. This one is generated from scratch by the genetic algorithm. It writes "Hi!" ++++++[++>+>+]>-------------.<<+++++++++++++++++++.<++++++++++++++++++++++++++. If I remember correctly it took about 2000 generations with population of 100 brainfuck programs in each generation to generate this. It started with totally randomly generated code and used ASCII distance and program length as scoring methods to measure fitness. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide zkom's signature Hide all signatures electro mini-album Megacity Rainfall "cacas in igne, heus" - Emperor Nero, AD 64 Link to comment https://forum.watmm.com/topic/82685-brainfuck/#findComment-2141742 Share on other sites More sharing options...
usagi Posted March 18, 2014 Report Share Posted March 18, 2014 how do you print "I hate women and darkies"? Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide usagi's signature Hide all signatures On 4/17/2013 at 2:45 PM, Alcofribas said: afaik i usually place all my cum drops on scientifically sterilized glass slides which are carefully frozen and placed in trash cans throughout the city labelled "for women alco" with my social security and phone numbers. Link to comment https://forum.watmm.com/topic/82685-brainfuck/#findComment-2141772 Share on other sites More sharing options...
Ivy Zemura yvI oo ii oo Posted March 19, 2014 Author Report Share Posted March 19, 2014 On 3/18/2014 at 12:19 PM, usagi said: how do you print "I hate women and darkies"? The code is steganographically hidden in this picture Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/82685-brainfuck/#findComment-2142022 Share on other sites More sharing options...
Ivy Zemura yvI oo ii oo Posted March 20, 2014 Author Report Share Posted March 20, 2014 lol Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/82685-brainfuck/#findComment-2142512 Share on other sites More sharing options...
Guest A/D Posted March 20, 2014 Report Share Posted March 20, 2014 Can it do anything besides print? Quote Link to comment https://forum.watmm.com/topic/82685-brainfuck/#findComment-2142520 Share on other sites More sharing options...
Candiru Posted March 20, 2014 Report Share Posted March 20, 2014 (edited) Me no understand this sheeit Edited March 20, 2014 by Candiru Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/82685-brainfuck/#findComment-2142555 Share on other sites More sharing options...
Ivy Zemura yvI oo ii oo Posted March 20, 2014 Author Report Share Posted March 20, 2014 No it can only traverse the 30KB+ array ("tape") by incrementing and decrementing the global pointer, and increment and decrement the values at the pointer. Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Link to comment https://forum.watmm.com/topic/82685-brainfuck/#findComment-2142557 Share on other sites More sharing options...
mcbpete Posted March 20, 2014 Report Share Posted March 20, 2014 I only program in LOLCODE: HAI CAN HAS STDIO? IM IN YR LOOP UPPIN YR VAR TIL BOTH SAEM VAR AN 10 VISIBLE SUM OF VAR AN 1 IM OUTTA YR LOOP KTHXBYE Thanks Haha Confused Sad Facepalm Burger Farnsworth Big Brain Like × Quote Hide all signatures I haven't eaten a Wagon Wheel since 07/11/07... ilovecubus.co.uk - 25ml of mp3 taken twice daily. Link to comment https://forum.watmm.com/topic/82685-brainfuck/#findComment-2142618 Share on other sites More sharing options...
Recommended Posts