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

Pages: 1-

prog challenge [PART XVII]

Name: Anonymous 2010-09-16 13:11

Write a program which takes a Brainfuck1 program with unbounded memory as an input and outputs 1 if the Brainfuck ever halts and 0 otherwise.

Deadline is 2010-10-16 at 00:00 GMT.

One last thing: DON'T HELP THEM!!!
_____________________________
1 as defined in http://en.wikipedia.org/wiki/Brainfuck

Name: Anonymous 2010-09-16 13:36

I wrote something, but I cannot post it due to Shiichan's input limit.

Name: Anonymous 2010-09-16 13:44

outputs 1 if the Brainfuck ever halts and 0 otherwise
When do we output the 0?

Name: Anonymous 2010-09-16 13:45

>>3
You're not supposed to actually run the program.

Name: Anonymous 2010-09-16 13:46

>>3
You need to read up on the halting problem.

Name: Anonymous 2010-09-16 13:49

Not brainfuck, but ABC
(define (halts? abc-program)
  (call-with-input-file abc-program
    (lambda (in)
      (let loop ((char (read-char in)))
        (cond ((eof-object? char) #t)
              ((char=? char #\l) #f)
              (else (loop (read-char in))))))))

[spoiler]While I'm at it, the Scheme implementation of the ABC language is both wrong and not portable. And the specification of ABC is ambiguous[/code]

Name: Anonymous 2010-09-16 13:50

>>5
Damn you, you broke my beautiful state-of-art concept thread!

You should feelkindofbadaboutthat:(

Name: Anonymous 2010-09-16 15:02

>>7
It's still moderately functional. Much like Javascript.

Name: Anonymous 2010-09-16 15:19

>>8
Much like MY ANUS

Name: Anonymous 2010-09-16 15:21

>>3
Lol'd

Name: Anonymous 2010-12-06 9:35

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2011-02-04 18:37


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