Jump to content

Recommended Posts

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:

++++++++[>++++++++++<-]
++++++++[>>++++++++++<<-]
++++++++[>>>++++++++++<<<-]
++++++++[>>>>++++++++++<<<<-]
++++++++[>>>>>++++++++++<<<<<-]
>+++++++
>---------------
>++++
>---
>---
<<<<<
.>.>.>.>.>.
Link to comment
https://forum.watmm.com/topic/82685-brainfuck/
Share on other sites

print "SEAN PLS" is:

++++++++[>++++++++++<-]
++++++++[>>++++++++++<<-]
++++++++[>>>++++++++++<<<-]
++++++++[>>>>++++++++++<<<<-]
+++[>>>>>++++++++++<<<<<-]
++++++++[>>>>>>++++++++++<<<<<<-]
++++++++[>>>>>>>++++++++++<<<<<<<-]
++++++++[>>>>>>>>++++++++++<<<<<<<<-]
>+++
>-----------
>---------------
>--
>++
>>----
>+++
<<<<<<<<
.>.>.>.>.>.>.>.>.
Link to comment
https://forum.watmm.com/topic/82685-brainfuck/#findComment-2141719
Share on other sites

QUITE GOOD

 

++++++++[>++++++++++<-]>+.>
++++++++[>++++++++++<-]>+++++.>
+++++++[>++++++++++<-]>+++.>
++++++++[>++++++++++<-]>++++.>
+++++++[>++++++++++<-]>-.>
++++++++++++++++++++++++++++++++.>
+++++++[>++++++++++<-]>+.>
++++++++[>++++++++++<-]>-.>
++++++++[>++++++++++<-]>-.>
++++++[>++++++++++<-]>++++++++.
Link to comment
https://forum.watmm.com/topic/82685-brainfuck/#findComment-2141725
Share on other sites

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.

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

how do you print "I hate women and darkies"?

  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

  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

 

Strawman.jpg

Link to comment
https://forum.watmm.com/topic/82685-brainfuck/#findComment-2142022
Share on other sites

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.

Link to comment
https://forum.watmm.com/topic/82685-brainfuck/#findComment-2142557
Share on other sites

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

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

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   1 Member

×
×