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

[New] ITT We determine if your programs halt

Name: Anonymous 2010-06-18 2:22

Give us your programs, and we'll tell you if they halt!

Bring em on!

Name: Anonymous 2010-06-18 2:25

(loop)

Name: Anonymous 2010-06-18 2:25

start:
  hlt

Name: Anonymous 2010-06-18 2:42

#include <stdint.h>
#include <stdlib.h>

int main(void)
{ for(uint32_t i = arc4random_uniform(2); i;);
  return 0; }

Name: Anonymous 2010-06-18 2:42

#!/bin/sh
yes That does not halt.

Name: Anonymous 2010-06-18 2:54

#!/bin/sh
man yes

Name: Anonymous 2010-06-18 3:07


pushl $3
pushl $2       
call power       
addl $8, %esp       
pushl %eax                   
pushl $2       
pushl $5           
call power   
addl $8, %esp   
popl %ebx       
addl %eax, %ebx                   
movl $1, %eax       
int $0x80
 .type power, @function
power:
 pushl %ebp       
 movl %esp, %ebp   
 subl $4, %esp       
 movl 8(%ebp), %ebx   
 movl 12(%ebp), %ecx   
 movl %ebx, -4(%ebp)                   
power_loop_start:
 cmpl $1, %ecx   
 je end_power
 movl -4(%ebp), %eax   
 imull %ebx, %eax   
 movl %eax, -4(%ebp)   
 decl %ecx       
 jmp power_loop_start   
end_power:
 movl -4(%ebp), %eax   
 movl %ebp, %esp   
 popl %ebp       
 ret

Name: Anonymous 2010-06-18 3:08

main = print=<<($[0..])=<<(return.([return.return.head,return.tail]!!)=<<randomRIO(0,1))

>>7-9
wrong. read ISO/IEC 9899:1999 and the arc4random(3) man page.

Name: Anonymous 2010-06-18 3:22

main = print $ cycle "LO"

Name: >>2 2010-06-18 3:23

What about this

(defun does-this-halt (n x) 
  (labels ((f (n)
             (if (< n 2) t                  
                 (multiple-value-bind (div mod)
                     (truncate n x)                
                   (if (zerop mod)
                       (f div)
                       (f (+ (1- x) (* n (1+ x)))))))))
    (f n)))

(let* ((state (make-random-state))
       (n (random (ash 1 32) state))
       (x (random n state)))
  (does-this-halt n x))

Name: Anonymous 2010-06-18 3:46

SET x TO 0;
SET y TO 1;
LABEL l;
IF x THEN GOTO l;
SET x TO 1;
SEND x TO 1~0~{y}=1;


The name of the language is TwoDucks.

Name: Anonymous 2010-06-18 4:19

SEND x TO MY ANUS

Also, this in FIOC:

def foo():
    foo()

Name: Anonymous 2010-06-18 6:54

Name: Anonymous 2010-06-18 8:07

#!/bin/sh
halt

Name: Anonymous 2010-06-18 9:26

?@#

Name: Anonymous 2010-06-18 9:54

while (halt());

Name: Anonymous 2010-06-18 11:31

((call/cc call/cc) (call/cc call/cc))

Name: Anonymous 2010-06-18 11:49

while (1) { fork() };

Name: Anonymous 2010-06-18 12:19

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
   srand(time(NULL));
   float a, b, c, d;
   while(true)
   {
      a = (float)rand();
      b = (float)rand();
      c = (float)rand();
      d = (float)rand();
      if((a/b) == (c/d))
      {
         break;
      }
   }
   printf("Halt!")
   return 0;
}

Actually, I don't think this will work ...

Name: Anonymous 2010-06-18 16:50

int main(int argc, char *argv[]) {
    while (0 == 1 == 0) ;
}

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