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

Pages: 1-

Quantum Bogosort

Name: Anonymous 2011-06-16 11:16

I need help implementing quantum bogosort. So far I got the following:

shuffle(list);
if(isntSorted(list))DestroyUniverse();


Particularly I need help implementing the DestroyUniverse() function.

Name: Anonymous 2011-06-16 11:17

The implementation of DestroyUniverse() is left as an exercise to the reader.

Name: Anonymous 2011-06-16 11:21

let DestroyUniverse = 1 / 0 in if isntSorted shuffle list then destroyUniverse else list

Name: Anonymous 2011-06-16 11:23

>>1
This is not funny outside reddit, sorry.

Name: Anonymous 2011-06-16 11:24

>>3
But 1/0 simply returns inf in the standard C floating point library.

>>4
It isn't meant for your entertainment. Stop being such an egocentric spoiled brat. Also, I've never been to reddit.

Name: Anonymous 2011-06-16 11:27

>>5
I'm >>3 and I was clearly using C, floating point numbers and the standard C floating point library in the code I posted. Go choke on a niggers big black cock.

Name: Anonymous 2011-06-16 11:30

>>6
Fucking faggot.

Name: Anonymous 2011-06-16 11:32

>>7
celibate faggot

Name: Anonymous 2011-06-16 11:38

>>8
Autist

Name: Anonymous 2011-06-16 11:40

the standard C floating point library
how can people be this incredibly thick

Name: Anonymous 2011-06-16 11:42

>>10
Yeah, they take seriously bullshit that I pull out of my ass.

Name: Anonymous 2011-06-16 12:05

>>11
That's what GNU said.

Name: Anonymous 2011-06-16 13:10

void DestroyUniverse() {
  void * v = NULL;
 *(float*)v = 1/0;
}

Name: Anonymous 2011-06-16 16:16

Have people completely forgotten how to use code tags or are they just trying to annoy me?

Name: Anonymous 2011-06-16 16:45

>>14
Both.

Name: Anonymous 2011-06-16 21:33

#!/usr/bin/perl

use Quantum::Superpositions;
use Random::Quantum;
use feature 'say';

sub destroy_universe {
  # heavy wizardry
  print''x(new Random::Quantum(user => 'admiran', password => 'admiran'))->int4
    while 1; # repeat until successful
}

sub bogosort(@) { while($#_) { destroy_universe unless (shift) <= all @_ } }

bogosort @ARGV;
say for @ARGV;

Name: Anonymous 2011-06-16 21:51

>>16
VALID PERL CODE

Name: Anonymous 2011-10-24 16:43

You need true quantom randomness in shuffle(list) for this algorithm to work.

Name: Anonymous 2011-10-24 17:33

>>18
Yes, also, I don't think the universe would allow you to write code for DestroyUniverse() because then you'd be able to write this program:

main()
{
  DestroyUniverse();
}

So my guess is that you'd fall over dead half way through writing the algorithm.

Name: Anonymous 2011-10-24 18:48

>>1,2
just keep flipping bits. eventually the universe will reach maximum entropy

Name: Anonymous 2011-10-24 20:37

>>20
Total entropy is not the death of the universe. Total absence of entropy is.

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