prog challenge [PART XVII]
1
Name:
Anonymous
2010-09-16 13:11
Write a program which takes a Brainfuck
1 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
2
Name:
Anonymous
2010-09-16 13:36
I wrote something, but I cannot post it due to Shiichan's input limit.
3
Name:
Anonymous
2010-09-16 13:44
outputs 1 if the Brainfuck ever halts and 0 otherwise
When do we output the 0?
4
Name:
Anonymous
2010-09-16 13:45
>>3
You're not supposed to actually run the program.
5
Name:
Anonymous
2010-09-16 13:46
>>3
You need to read up on the halting problem.
6
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]
7
Name:
Anonymous
2010-09-16 13:50
>>5
Damn you, you broke my beautiful state-of-art concept thread
!
You should feelkindofbadaboutthat:(
8
Name:
Anonymous
2010-09-16 15:02
>>7
It's still moderately functional. Much like Javascript.
9
Name:
Anonymous
2010-09-16 15:19
10
Name:
Anonymous
2010-09-16 15:21
12
Name:
Anonymous
2010-12-06 9:35
B a c k t o / b / , ` ` G N A A F a g g o t ' '
13
Name:
Anonymous
2011-02-04 18:37