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

brainfuck

Name: Anonymous 2007-11-28 16:27

ITT:  figure out what this code does

++++++++++++++++++++++++++++++++++++++++++++++++>>>>>,>,>,>,>,<<<<<<<<<[->>>>>->->->->-<<<<<<<<<]>>>>>>>>>[->>+<<]<[-<<<<<<+>+>>>>>]<<<<<[->>>>>+<<<<<]<<++++++++++[->[->>>>>>>>>+[-<<<<<<<<+>+>>>>>>>]<<<<<<<<[->>>>>>>>+<<<<<<<<]>>>>>>>>[<->[-]]<<<<<<<[->>>>>>>+<<<<<<<]>>>>>>-><<<<<<<<<]>>>>>>[-<<<<<<+>+>>>>>]<<<<<[->>>>>+<<<<<]<<]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>>>>>[-<<<<<+>+>>>>]<<<<[->>>>+<<<<]<<[->[->>>>>>>>>+[-<<<<<<<<+>+>>>>>>>]<<<<<<<<[->>>>>>>>+<<<<<<<<]>>>>>>>>[<->[-]]<<<<<<<[->>>>>>>+<<<<<<<]>>>>>>-><<<<<<<<<]>>>>>[-<<<<<+>+>>>>]<<<<[->>>>+<<<<]<<]<+++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>>>>[-<<<<+>+>>>]<<<[>>>+<<<]<<<[>[->[->>>>>>>>>+[-<<<<<<<<+>+>>>>>>>]<<<<<<<<[->>>>>>>>+<<<<<<<<]>>>>>>>>[<->[-]]<<<<<<<[->>>>>>>+<<<<<<<]>>>>>>-><<<<<<<<<]>>>>[-<<<<+>+>>>]<<<[->>>+<<<]<<]<->+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<]+++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++>>>>[-<<<+>+>>]<<[->>+<<]<<<[>[->[->>>>>>>>>+[-<<<<<<<<+>+>>>>>>>]<<<<<<<<[->>>>>>>>+<<<<<<<<]>>>>>>>>[<->[-]]<<<<<<<[->>>>>>>+<<<<<<<]>>>>>>-><<<<<<<<<]>>>[-<<<+>+>>]<<[->>+<<]<<]<->+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<]

Name: Anonymous 2007-11-28 18:20

It annoys people that actually understand Brainfuck because it is horribly written.

Other than that, it reads 5 decimal digits and tries compute the number it represents (eg atol). Doing this involves copy-pasting a multiplying loop that also computes -2*x*y for no reason.

The formula he uses is digit[4] + 10*digit[3] + 100*digit[2] + 1000*digit[1] + 10000*digit[3]. Unfortunately he miscalculated 1000 as 235+255*2 (instead of *3).

Of course most Brainfuck implementations use a byte for every memory cell, so anything greater than 255 is going to overflow.

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