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

Pages: 1-4041-

I'm Mister Satori

Name: !MhMRSATORI 2008-01-20 0:50

ITT: Give me a program, and I'll tell you if it terminates.

Name: Anonymous 2008-01-20 1:04

Unpossible.

Name: Anonymous 2008-01-20 1:04

#include <stdlib.h>
¡nt main(){
 if(arc4random())
  for(;;);
 return 0;
}

Name: Anonymous 2008-01-20 1:53

>>3
It will terminate if arc4random() returns zero, otherwise it will not.
Next.

Name: sheela 2008-01-20 2:10

DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS
DICKS
DICKS
DICKS DICKS DICKS

Name: Anonymous 2008-01-20 6:46

while no6.feels_like_it {
  print "DICKS\n";
} else {
  terminate;
}


HA HA YOU'RE SCREWED NOW

Name: Anonymous 2008-01-20 6:59

function searchForOddPerfectNumber()
     var int n = 1     // arbitrary-precision integer
     loop {
         var int sumOfFactors = 0
         for factor from 1 to n - 1 {
             if factor is a factor of n then
                 sumOfFactors = sumOfFactors + factor
         }
         if sumOfFactors = n then
             exit loop
         n = n + 2
     }
     return


>>3
Wtf is an ¡nt?

Name: Anonymous 2008-01-20 7:26

>>7
It will terminate if there is an odd perfect number. Next!

Name: Anonymous 2008-01-20 7:27

function Q(S, I) {
  if (terminates(S, I))
     loop infinitely;
  else S(I);
}

Name: Anonymous 2008-01-20 7:29

>>9
It will terminate if it will terminate. Next!

Name: Anonymous 2008-01-20 8:04

<>

Name: Anonymous 2008-01-20 8:40

>>11
It will terminate at EOF of all files in ARGV. Next!

Name: Anonymous 2008-01-20 8:53

>>12
Ha!  Scalar context.  Terminates if there's a line of input or EOF on ARGV/STDIN.

Name: Anonymous 2008-01-20 9:05

>>6
 It will terminate if you feel like it.

Name: Anonymous 2008-01-20 9:33

>>13
Thanks, I just remembered why I hate Perl.

Name: Anonymous 2008-01-20 13:21

>>15
Syntactic diabetes.

Name: Anonymous 2008-01-20 15:52

int main(){
 for(;main(););
 return 0;
}

Name: Anonymous 2008-01-20 16:05

>>16
Cancer of the semicolon.

Read SICP.

Name: Anonymous 2008-01-20 16:28

>>17
Will not terminate. Next!

Name: Anonymous 2008-01-20 16:36


int main()
{
    if (this_program_terminates())
        for(;;);
    return 0;
}

Name: Anonymous 2008-01-20 16:36

setXPa [] = []
setXPa (s:xs) = setXPa [x|x <- xs,x < s] ++ [s] ++ setXPa [x|x <- xs,x >= s]

Name: Anonymous 2008-01-20 16:41

>>21
HASKELL GTFO

Name: Anonymous 2008-01-20 16:44

>>21
it's a quicksort

Name: Anonymous 2008-01-20 16:47

>>23
I wondered if anyone would notice. Well done.

Name: Anonymous 2008-01-20 16:52

>>22 If you don't want Haskell, you can have this:

quicksort([], []).
quicksort([HEAD | TAIL], SORTED) :- partition(HEAD, TAIL, LEFT, RIGHT),
                                    quicksort(LEFT, SORTEDL),
                                    quicksort(RIGHT, SORTEDR),
                                    append(SORTEDL, [HEAD | SORTEDR], SORTED).

partition(PIVOT, [], [], []).
partition(PIVOT, [HEAD | TAIL], [HEAD | LEFT], RIGHT) :- HEAD @=< PIVOT,
                                                         partition(PIVOT, TAIL, LEFT, RIGHT).
partition(PIVOT, [HEAD | TAIL], LEFT, [HEAD | RIGHT]) :- HEAD @> PIVOT,
                                                         partition(PIVOT, TAIL, LEFT, RIGHT).

append([], LIST, LIST).
append([HEAD | LIST1], LIST2, [HEAD | LIST3]) :- append(LIST1, LIST2, LIST3).

Name: Anonymous 2008-01-20 17:00

>>25
what language is that, FIOC or something?

Name: Anonymous 2008-01-20 17:17

>>26
Prolog.

Name: Anonymous 2008-01-20 17:38

>>27
Well, damn, you got the spoiler tags the other way around.

Name: Anonymous 2008-01-20 19:59

This thread is about the halting problem, try not to derail it with your sorting algorithms implemented in esoteric toy languages.

Name: Anonymous 2008-01-20 21:06

>>17 will terminate unless your OS is complete shit.

Name: Anonymous 2008-01-20 21:16

>>1 You can get a tarball of my source here:

http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.14.tar.bz2

Name: Anonymous 2008-01-20 21:17

>>31
Terminates upon shutdown

Name: Anonymous 2008-01-20 21:42

Suppose you had a function, foo, which takes in as it's input a function, and returns 1 or 0, depending on whether that function terminates or not (1 if it does, else 0)

Consider the following program:


int main()
{
    int x = foo(main);
    return 0;
}


Since main terminates, x is assigned 1
Now consider


int main()
{
    int x = foo(main);
    while (x) {}
    return 0;
}


If foo returned 1, implying main terminates, we would enter this infinite loop, hence main doesn't terminate.
If main is self-terminating, then it isn't self-terminating

Suppose then, foo returned 0, implying main wasn't self-terminating, we would skip pass the infinite loop, and hence main would become self-terminating.
If main isn't self-terminating, it terminates

The conclusion is that the problem of determinating whether a proposed function (which may be extended to a program) terminates or not is beyond the power of current computational models, and hence this thread is a complete sham.

Name: Anonymous 2008-01-20 22:04

EVERY PROGRAM WILL TERMINATE ONCE THE UNIVERSE DIES

Name: Anonymous 2008-01-21 1:00

>>34

 23:59:50 up 17 universes,  3:56,  1 user,  load average: 0.02, 0.01, 0.00

Name: Anonymous 2008-01-21 2:18

>>35
FUCK

Name: Anonymous 2008-01-21 5:04

>>33
We all knew that already. YHBT.

Name: Anonymous 2008-01-21 6:33

>>11
Infinite loop in befunge.

>>17
Undefined behaviour. Exits when the user terminates the towers of Hanoi simulation, or the nasal demons are exterminated.

Name: Anonymous 2008-01-21 12:53

>>38
nasal demons
LOL

Name: Anonymous 2008-05-12 16:35

>>33
I suspect I'm being trolled, but the first example doesn't terminate.

Name: Anonymous 2008-05-12 16:43

>>40
No, it does.

Name: Anonymous 2008-05-12 17:58

allowing our "does it halt" function to specify conditions in the return value (it will halt ... if there is an even number over 2 which is not the sum of the prime numbers), instead of a mere boolean seems like a good idea

so i want O: given a program P, O returns a program Q that (when ran) tells me if P halts. if P is one of the corner cases, i would imagine Q simply not halting (i'll just time it, it doesn't need to be perfectly accurate and i can keep track of the ones that need more investigation).

make me O or tell me why you can't do it. and remember: if a student would be able to prove something about P, i want O to be able to write me a program Q that tells me that.

anyway, my question for >>1:


AAAAAAABBBBBBAAAAAAAAAAACCCCCCCCAAAAAAAAAAAAAABBBBBBAAAAA
BAAAAAAAAABBBBBBBBBBAAAAAAAAAAAAAAAAAABBBAAAAAAAAAAAABBBB
AAAAAAAABABAAAAAAAAAAAAABBBBBBBBAAAAAAAAACCCCCCCCCCCCCCBB
ABACCCCCCCCCCCAAAAAAAAAAAAAAAAAAABABABAAAAAAAAAAAAAAAAAAA
AAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Name: Anonymous 2009-07-12 7:28

is  comet can capable browser HTTPXMLRequest in in Four language. configuration setup a the irrelevant. posts, used   irrelevant.    Yyyecyeyey

Name: Anonymous 2009-07-12 7:28

Turning it off right, the thing interferes with my browsing.

Name: Anonymous 2009-07-12 9:09

[~/codans/haskal/abc] ./abc
The ABC interpreter, version 0.1.7
Type `:c' for ABC commands, `:q' to quit
abc> AAAAAAABBBBBBAAAAAAAAAAACCCCCCCCAAAAAAAAAAAAAABBBBBBAAAAABAAAAAAAAABBBBBBBBBBAAAAAAAAAAAAAAAAAABBBAAAAAAAAAAAABBBBAAAAAAAABABAAAAAAAAAAAAABBBBBBBBAAAAAAAAACCCCCCCCCCCCCCBBABACCCCCCCCCCCAAAAAAAAAAAAAAAAAAABABABAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
abc> :q
[~/codans/haskal/abc]


NO OUTPUT I think that you forgot something.

Name: Anonymous 2011-02-04 16:13


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