Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Is brainfuck really turing complete?

Name: shit my brain 2010-06-27 8:50

If brainfuck is turing complete, how would you zero out all its memory? (suppose given memory of N cells of random values from 0 to 255). [[-]>] won't work...

Name: Anonymous 2010-06-27 9:06

Its memory starts out all zeroed anyway. Not that Turing-completeness has anything to do with being able to set a set of cells to a specified value.
[[-]>] will stop at the first zero it finds. Try [-]+[->[-]+].

Name: Anonymous 2010-06-27 10:43

prog considered harmful

Name: Anonymous 2010-06-27 10:50

>>2
genius, thanks. can we possibly generalize to have every cell have n value?

Name: Anonymous 2010-06-27 10:59

>>4
[-]++++[>[-]++++] would set each cell to 4. Both sets of + should be equal in size, unless you want the first cell to have a different value to the rest.
There's probably a nicer-looking way, but whatever.

Name: Anonymous 2010-06-27 13:49

ur gay

Name: Anonymous 2010-06-27 13:53

my homework is to read the first chapter of SICP: Can someone do that for me please so I don't have to??

Name: Anonymous 2010-06-27 14:00

>>7
Sure, I've read it twice, you can have one of my reads.

Name: Anonymous 2010-06-27 14:26

>>8
But then you'll have only read it half as much!

Name: Anonymous 2010-06-27 18:24

READ MY ANUS

Name: Anonymous 2010-06-28 8:35

>>9
But still over than once, so it's fine.
Actually, I'm joking. If you've managed to take my read, >>7, please give it back.

Name: Anonymous 2010-12-26 18:52


Don't change these.
Name: Email:
Entire Thread Thread List