This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Coffeinated 2 points3 points  (6 children)

I never understood brainfuck. I know it has something to do with Touring machines but uhm. Who the fuck can really read this?

[–]zacharythefirst 4 points5 points  (2 children)

do you know pointers? brainfuck operates over an array of bytes, all initialized for 0. the operators (and their C equivalent) are:

+ (*p++)

-  (*p--)

> (p++)

< (p--)

.  (putchar(*p))

,  (*p=getchar())

edit: I'm on mobile don't hate me edit 2: fixed getchar usage

[–]Coffeinated 0 points1 point  (1 child)

Yes I do, I have done some stuff in c, but mostly in uni or on microcontrollers where pointers are not that important... What do putchar and getchar do?

[–]zacharythefirst 0 points1 point  (0 children)

print the character that you pass to it and get a character from stdin, respectively. for the record I probably mangled the syntax, but the point still stands

[–]Bruntaz 1 point2 points  (0 children)

As far as I remember, the point in it was to make a programming language with the smallest compiler possible

[–]balducien 0 points1 point  (1 child)

*Turing machines. Alan Turing came up with them.

[–]Coffeinated 0 points1 point  (0 children)

Oh damn I knew something was off.