Turing is retarded.
1
Name:
Anonymous
2011-11-05 22:15
The following loops forever:
int main(){
while(1);
return 0;
}
The following does not:
int main(){
return 0;
}
Me: 1
Turing: 0
2
Name:
Anonymous
2011-11-05 22:52
so?
3
Name:
Anonymous
2011-11-05 23:43
export LD_PRELOAD=~/fuckwithmain.so;
4
Name:
Anonymous
2011-11-06 0:58
ok so write two functions then:
* int run(int code, int value) which runs a program with code code and input value value and produces its return value
* int halts(int code, int value) which returns 1if the program with code code and input value value halts, and 0 otherwise.
now let liarcode be the number expressing the following program:
int liar(int liarcode) {
if(!halts(liar(liarcode))) { return 1; } else { while(1) {} }
}
and tell me what does your function give for halts(liarcode,liarcode)?
5
Name:
Anonymous
2011-11-06 0:59
Oops, I should have wrote halts(liarcode,liarcode) not halts(liar(liarcode)). Correction:
int liar(int liarcode) {
if(!halts(liarcode,liarcode)) { return 1; } else { while(1) {} }
}
6
Name:
Anonymous
2011-11-06 1:01
* int run(int code, int value) which runs a program with code code and input value value and produces its return value
not needed
7
Name:
Anonymous
2011-11-06 1:47
I don't get what your message is.
8
Name:
Anonymous
2011-11-06 5:58
>>4
; (halts? f x) => #t if (f x) halts, else #f
(define (g x)
(if (halts? g x) (let l () (l)) #t))
(halts? g g)
Newer Posts