• (cs) in reply to ted
    ted:
    FFS:
    another unoriginal hipster doofus:
    ted:
    renewest:
    Reminds me of this XKCD comic:

    http://imgs.xkcd.com/comics/random_number.png

    I didn't even click on the link and knew it was some fag linking xkcd.

    Yes, well done. It's not like he explicitly said "Reminds me of this XKCD comic". You must be very proud of that deduction.

    test:
    It's not clever. It's not funny. Just the word "random_number" with a link under it and the short, useless, one sentence post shows the kind of unoriginal, uninspired, idiot is making the post.

    It was funny to read when it came out. It's even funny when clicking on the Random button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered xkcd.

    Did you consider that perhaps it was intended not for you, but for people who have yet to read that particular xkcd comic?

    I'm surprised that such a simple statement ("this reminds me of ...") would provoke such vitriol. Maybe avoiding the comments section altogether would make you happier.

    IO'm sure 18 people beat me to this, but did you ever consider his vitriolic reply might have been a common meme on this site?
    Did you ever consider that if I wanted to read xkcd, I would, I don't know, GO TO THEIR SITE!?!?!!?

    Do you also turn the TV off when you see a trailer for another program? Actually I can see you now, with your woolly blanket over your knees as your carer hands you your eggnog, carefully making sure that your walking-stick is placed safely in its holder behind your auto-relax armchair, and the remote control placed just within reach of your arthritic, liver-spotted right hand (GOLDARN IT, TANEIYSHIA! I'M LEFT-HANDED! HOW MANY MORE TIMES?) ...

  • (cs) in reply to Schweppes
    Schweppes:
    HoHoHo and a bottle of rum:
    Uncle Al:
    Ah yes -- shuffle for randomization since, after all, more shuffles are guaranteed to increase randomization. Just like shuffling a deck of cards with eight perfect riffle shuffles instead of one (for those who happen not to know this result, eight perfect shuffles of a deck of 52 playing cards returns it to the original state).
    Wouldn't 2 perfect riffle shuffles return the deck to the original state?

    Assuming, of course, that either both are in shuffles or both are out shuffles....

    Uhm, no. Although I'm not convinced about 8 either...the OP may have been a troll

    Not sure but I think it's 8 out-shuffles or 52 in-shuffles. Martin Gardner knew, but we can't ask him, the fucker's dead.

  • (cs) in reply to Bob
    Bob:
    jverd:
    ted:
    Did you ever consider that if I wanted to read xkcd, I would, I don't know, GO TO THEIR SITE!?!?!!?

    Going on the theory that you are actually this big a dicktard, and not just trolling, did you ever consider that, I don't know, PEOPLE POST FOR REASONS OTHER THAN TO CATER TO YOUR IMMEDIATE PERSONAL WHIMS AND DON'T GIVE A FUCK IF YOU LIKE IT OR NOT!?!?!?!?!?!!!?

    But yeah, you're right, the whole concept of links is retarded. Why would anybody ever want a reference to a site other than the one they're on right now?

    Fucking tool.

    Please attempt some sensitivity. I had a son who was retarded, and let me tell you: it is no laughing matter.
    This whole comment run has felt a bit like an avant-garde symphony. It's got drama and humour, variations on a theme, with a seriously Mahleresque heavy bit in the middle, point and counterpoint, and as it is supposed to be, a de rigueur return to the original theme. My evening is complete. Thx guys.

    Fuck, this weed is strong.

  • (cs) in reply to ted
    ted:
    ted:
    jverd:
    ted:
    Did you ever consider that if I wanted to read xkcd, I would, I don't know, GO TO THEIR SITE!?!?!!?

    Going on the theory that you are actually this big a dicktard, and not just trolling, did you ever consider that, I don't know, PEOPLE POST FOR REASONS OTHER THAN TO CATER TO YOUR IMMEDIATE PERSONAL WHIMS AND DON'T GIVE A FUCK IF YOU LIKE IT OR NOT!?!?!?!?!?!!!?

    But yeah, you're right, the whole concept of links is retarded. Why would anybody ever want a reference to a site other than the one they're on right now?

    Read the original damn post. You don't see people linking to Google or Wikipedia at every dumbass opportunity and thinking they discovered some site noone had ever heard of.
    As a side note, did anyone know that we have had a new President since 2008? And the weird thing is: he's a black guy! I bet no one had heard of that either.

    What? You voted a nieblank for a boss? Get away! That proves you're trolling.

  • Jules (unregistered) in reply to Matt Westwood
    Matt Westwood:
    Schweppes:
    HoHoHo and a bottle of rum:
    Uncle Al:
    Ah yes -- shuffle for randomization since, after all, more shuffles are guaranteed to increase randomization. Just like shuffling a deck of cards with eight perfect riffle shuffles instead of one (for those who happen not to know this result, eight perfect shuffles of a deck of 52 playing cards returns it to the original state).
    Wouldn't 2 perfect riffle shuffles return the deck to the original state?

    Assuming, of course, that either both are in shuffles or both are out shuffles....

    Uhm, no. Although I'm not convinced about 8 either...the OP may have been a troll

    Not sure but I think it's 8 out-shuffles or 52 in-shuffles. Martin Gardner knew, but we can't ask him, the fucker's dead.

    Wouldn't matter if it were in or out, surely....

  • (cs)
    And from Corey Richardson, a triply-random way to get a double.

    ...and absolutely, singlely random. Directly replaceable by:

        Public Function RandDouble() As Double
            Randomize(Rnd)
            For i = 0 To 20
                x = Rnd()
            Next
            Return Rnd()
        End Function
    
  • (cs) in reply to Jules
    Jules:
    Matt Westwood:
    Not sure but I think it's 8 out-shuffles or 52 in-shuffles. Martin Gardner knew, but we can't ask him, the fucker's dead.
    Wouldn't matter if it were in or out, surely....
    It does matter. With out-shuffles, the top stays on top and bottom stays on bottom. Not so with in-shuffles. But surprisingly, 26 in-shuffles reverses the order of the deck. 26 more will reverse it back to the original order.

    And don't call him Shirley.

  • (cs)

    Yo, ted! Get thee posthaste to www.Get-A-Goddamned-Life.com.

    (Although I must admit to being, to some degree, amused by your pathetic screeds, they also grow quickly tiresome. Just keep telling yourself, "I can do better. I really can. I believe in myself; and, someday, I just know that I'll no longer be the laughingstock of TDWTF.")

  • M (unregistered) in reply to YF

    XKCD, Dilbert and Daily WTF - the daily habit of successful programmers.

  • (cs) in reply to M
    M:
    XKCD, Dilbert and Daily WTF - the daily habit of successful programmers.

    Hmm ... wondered where I was going wrong. I use xkcd as an occasional treat, hitting "random" a few times when I do.

  • · (unregistered) in reply to YF
    YF:
    renewest:
    Reminds me of this XKCD comic:

    http://imgs.xkcd.com/comics/random_number.png

    99% of our daily WTF situations can be found in either XKCD or Dilbert.

    It's not at all unusual for them to occur in both: http://dilbert.com/strips/comic/2001-10-25/

  • nag-geoff (unregistered) in reply to Matt Westwood
    Matt Westwood:
    nag-geoff:
    I breath a sigh of relief as we reach page 3 of this train wreck.

    I don't agree - a burst of unrestrained nutcasery was just what I needed to cheer me up on a pretty fucking miserable day at the arse end of the shittiest year I've had for a long time. So, nag-geoff, with love and best wishes, fuck you.

    Fuck you too, British cunt!

  • Luiz Felipe (unregistered)

    array.shuffle

    I wonder if this is an extension method to random order the array.

  • (cs) in reply to _
    _:
    Wow, that actually crashed my tab in IE8...
    Mine too. FF was happy with it though.
    Bldsquirrel:
    envelope:
    TRWTF is VB
    I've been using Visual Basic 6, and it's awesome! It combines the lack of flexibility of explicit variable declarations with the logic errors that implicit decelerations can lead to!
    TRWTF is someone using VB and not setting Option Explicit in every module.
  • iMalc (unregistered)

    So few programmers know how to actually use a random number generator properly. It's kinda sad really.

  • Jeremy Friesner (unregistered) in reply to The poop of DOOM
    The poop of DOOM:
    If evolution were true, how come we haven't evolved to not having to wipe our ass?

    We evolved a different method for dealing with big, toothy animals: namely, we evolved clever brains that enable us to make weapons that can kill them.

    (A lifetime of ass-wiping is just the price we have to pay for choosing the alternate route)

  • Kasper (unregistered) in reply to trtrwtf
    trtrwtf:
    Just remember to put your money on '7' and wait it out. And never bet on 'S'
    You'll get S if temp mod 36 isn't in the range 0-35. Depending on the language, that may happen if temp is negative.
  • Kasper (unregistered) in reply to Mike
    Mike:
    I will never for the life of me understand why people feel that they will get a "better" random number by calling a rand() function a rand() number of times, or some variation of that idea.
    Calling rand() a rand() number of times is actually bad for randomness. In reality you don't just get a less random number that way, you even reduce the entropy of the seed.

    The seed goes through a cycle of some length. If you were in a uniformly random position in that sequence before calling rand() a rand() number of times, then you will no longer be in uniformly random position afterwards. The reason is that there will be some starting positions that will end up in the same end position, and due to the pigeon hole principle, that means certain positions will no longer be possible.

    I'm not sure how much entropy you lose this way, but I estimate that if you lose 1 bit of entropy.

    Mike:
    For 99% of what you are doing, the built in rand() functions of most languages are fine. If you are working in the 1%, you probably already know what you are doing and your code wont wind up here anyway.
    And then there is Debian.
  • Kasper (unregistered) in reply to ted
    ted:
    It's even funny when clicking on the Random button on the site and seeing it.
    I tried, but I could not reproduce that. I got http://xkcd.com/583/ instead.
  • (cs) in reply to Bob
    Bob:
    ted:
    QJo:
    another unoriginal hipster doofus:
    ted:
    renewest:
    Reminds me of this XKCD comic:

    http://imgs.xkcd.com/comics/random_number.png

    I didn't even click on the link and knew it was some fag linking xkcd.

    Yes, well done. It's not like he explicitly said "Reminds me of this XKCD comic". You must be very proud of that deduction.

    test:
    It's not clever. It's not funny. Just the word "random_number" with a link under it and the short, useless, one sentence post shows the kind of unoriginal, uninspired, idiot is making the post.

    It was funny to read when it came out. It's even funny when clicking on the Random button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered xkcd.

    Did you consider that perhaps it was intended not for you, but for people who have yet to read that particular xkcd comic?

    I'm surprised that such a simple statement ("this reminds me of ...") would provoke such vitriol. Maybe avoiding the comments section altogether would make you happier.

    Cool down, fellows. This is an old "meme" which someone gets out and dusts down whenever xkcd is invoked. It catches loads of people.

    f- you. What makes you think I'm not dead damn serious? It's a retarded practice and it needs to stop!

    Please attempt some sensitivity. I had a son who was retarded, and let me assure you: it is no laughing matter.

    Hey! I have a son who watches Seinfeld too, and let me assure you it is no laughing matter.

  • Simon N (unregistered) in reply to The poop of DOOM
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

  • (cs) in reply to Simon N
    Simon N:
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    A candiru!

    Oh, and a cockroach. Throw a nuke on it and they'll still live!

  • Jibble (unregistered) in reply to YF

    Yes, and the point of XKCD is to read the rollover text. Linking to the image is only half a link at best.

  • Jibble (unregistered) in reply to Simon N
    Simon N:
    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    Coral Reef

  • (cs) in reply to Zylon
    Zylon:
    Oh boy, the DWTF comments are now at sub-YouTube quality. I didn't even think that was possible.
    Justin Bieber sings way better then u!!!111!!1!1 LOLOLOL VOTE UP!
  • SCB (unregistered) in reply to Socio
    Socio:
    Donald Knuth discussed how random numbers should be generated in Art of Computer Programming (Volume 1).

    It boiled down to this:

    Law RNG3: One should not use a random method to generate random numbers.

    And now you know.

    That site is so full of wrong. The linear congruence generator produces terms in the range 0 to m-1, not 1 to m-1. It can produce m different numbers, not m-1 different numbers. 2^16 = 65237? Seriously? For a .edu site it's shocking.
  • (cs) in reply to Jim
    Jim:
    Arrgggg! The Bells!:
    Jim:
    You know we're getting toward the end of the year, when all the bored little skool kiddies appear online and think it's exciting to be wankers...

    Maybe someone needs to start a toolieschoolie.com playground where they can have fun showing their l33t skills....

    You know we're getting toward the end of the year, when all the bored little skool kiddies appear online and think it's exciting to be wankers...

    Maybe someone needs to start a toolieschoolie.com playground where they can have fun showing their l33t skills....

    Point proved.

    Hope Alex IP bans everyone who has posted anything nested more than some random number deep...

    Where random number turns out to be 0...

  • Jens Glad Balchen (unregistered)

    OK, so I tried wading through the flame war and the quoting super happy fun party to find out if someone had actually commented on this yet, but a cursory glance revealed nothing, so here goes. Feel free to flame and/or super happy fun party quote me.

    The Rnd function in VB returns the same number sequence if you do not call Randomize first. I don't remember the exact sequence now, but the sequence is fixed.

    This means if neither Randomize nor Rnd has been called before we enter this method, the call to Randomize will effectively use the first number of the Rnd sequence to randomize. The first number of the fixed sequence is of course constant. So calling Randomize(Rnd) is equal to Randomize(0.5), if 0.5 were the first number in the sequence.

    Having seeded the randomizer with a constant, our programmer probably discovered that simply returning Rnd was also constant. No big surprise there. So how does a resourceful programmer enforce some randomness, apparently believing in earnest that he has already exhausted the seeding option?

    He proceeds by taking the next 10 (still constant) values of the Rnd sequence, shuffling them (perhaps using the 12th constant random value) and picking one "randomly" based on the 12th/13th constant value.

    So every time you start the application, the function will return the same number on first invocation. It will return the same second number on second invocation. And so on.

  • Chuck Lester (unregistered)

    The "Random article" feature in http://thedailywtf.com is implemented pretty the same way...

  • too lazy to log in (unregistered) in reply to Jibble
    Jibble:
    Yes, and the point of XKCD is to read the rollover text. Linking to the image is only half a link at best.

    Are you saying Murroe is a lousy cartoonist who can't get the job done with his chosen medium and needs to explain his jokes to make them "funny"?

  • ted (unregistered) in reply to Jibble
    Jibble:
    Yes, and the point of XKCD is to read the rollover text. Linking to the image is only half a link at best.
    For real? You just blew my fucking mind! The next thing, you'll tell me Remy Martin puts comments in the html of his stories!
  • Nagesh (unregistered) in reply to Simon N
    Simon N:
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    I have never been killing bull for eating.

  • (cs) in reply to Jens Glad Balchen
    Jens Glad Balchen:
    OK, so I tried wading through the flame war and the quoting super happy fun party to find out if someone had actually commented on this yet, but a cursory glance revealed nothing, so here goes. Feel free to flame and/or super happy fun party quote me.

    The Rnd function in VB returns the same number sequence if you do not call Randomize first. I don't remember the exact sequence now, but the sequence is fixed.

    This means if neither Randomize nor Rnd has been called before we enter this method, the call to Randomize will effectively use the first number of the Rnd sequence to randomize. The first number of the fixed sequence is of course constant. So calling Randomize(Rnd) is equal to Randomize(0.5), if 0.5 were the first number in the sequence.

    Having seeded the randomizer with a constant, our programmer probably discovered that simply returning Rnd was also constant. No big surprise there. So how does a resourceful programmer enforce some randomness, apparently believing in earnest that he has already exhausted the seeding option?

    He proceeds by taking the next 10 (still constant) values of the Rnd sequence, shuffling them (perhaps using the 12th constant random value) and picking one "randomly" based on the 12th/13th constant value.

    So every time you start the application, the function will return the same number on first invocation. It will return the same second number on second invocation. And so on.

    If you are using random numbers in the guts of a monte carlo simulation of a real-world process, it makes sense to be able to reproduce the precise series of random numbers for any paricular run of the simulation, in order to be able to repeat a run for the purposes of validation / QA / etc. So the use of a fixed seed to commence a run with is a standard practice. However, I don't think this is the way to do it...

  • nag-geoff (unregistered) in reply to iMalc
    iMalc:
    So few programmers know how to actually use a random number generator properly. It's kinda sad really.

    If you think that's sad, ask everyone in your team, how quickly can they code Fizz-Buzz.

    The industry is filled with wankers who think all you need to develop a programming skill is a reliable search engine.

  • (cs) in reply to Simon N
    Simon N:
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    Tyrannosaurus Rex, Hallucigenia, and the Tully Monster to name a few.

  • (cs) in reply to nag-geoff
    nag-geoff:
    Anketam:
    For those who are wondering I can confirm that you can break Internet Explorer with all those nested quotes specially when you resize to a narrow width.
    What kind of narrow sighted moron uses Internet Explorer in 2011? The only good use for Internet Explorer is to download another browser.
    I never said that it was my primary browser. My primary browser if Firefox. I was just pointing out more evidence against Internet Explorer. Also Internet Explorer is still commonly used so I guess that makes a ton of people morons, but we already knew that.
  • (cs) in reply to frits
    frits:
    Simon N:
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    Tyrannosaurus Rex, Hallucigenia, and the Tully Monster to name a few.
    Also I doubt anyone has tried Box Jellyfish, Marbled Cone Snail, or Poison Dart Frog.

  • TK (unregistered) in reply to too lazy to log in
    too lazy to log in:
    Jibble:
    Yes, and the point of XKCD is to read the rollover text. Linking to the image is only half a link at best.
    Are you saying Murroe is a lousy cartoonist who can't get the job done with his chosen medium and needs to explain his jokes to make them "funny"?
    I thought that was obvious...
  • (cs) in reply to Anketam
    Anketam:
    frits:
    Simon N:
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    Tyrannosaurus Rex, Hallucigenia, and the Tully Monster to name a few.
    Also I doubt anyone has tried Box Jellyfish, Marbled Cone Snail, or Poison Dart Frog.
    Sounds like a good premise for a Japanese game show to me.

  • (cs) in reply to frits
    frits:
    Anketam:
    frits:
    Simon N:
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    Tyrannosaurus Rex, Hallucigenia, and the Tully Monster to name a few.
    Also I doubt anyone has tried Box Jellyfish, Marbled Cone Snail, or Poison Dart Frog.
    Sounds like a good premise for a Japanese game show to me.
    There aren't enough genitals involved for it.

  • Simply Zunesis (unregistered) in reply to The poop of DOOM
    The poop of DOOM:
    frits:
    Anketam:
    frits:
    Simon N:
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    Tyrannosaurus Rex, Hallucigenia, and the Tully Monster to name a few.
    Also I doubt anyone has tried Box Jellyfish, Marbled Cone Snail, or Poison Dart Frog.
    Sounds like a good premise for a Japanese game show to me.
    There aren't enough genitals involved for it.
    I'll host! I have more than my fair share, let me tell you.

  • (cs) in reply to Simply Zunesis
    Simply Zunesis:
    The poop of DOOM:
    frits:
    Anketam:
    frits:
    Simon N:
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    Tyrannosaurus Rex, Hallucigenia, and the Tully Monster to name a few.
    Also I doubt anyone has tried Box Jellyfish, Marbled Cone Snail, or Poison Dart Frog.
    Sounds like a good premise for a Japanese game show to me.
    There aren't enough genitals involved for it.
    I'll host! I have more than my fair share, let me tell you.

    Gee, Zunesis, how many genitals do you have anyway?

  • (cs) in reply to Anketam
    Anketam:
    nag-geoff:
    Anketam:
    For those who are wondering I can confirm that you can break Internet Explorer with all those nested quotes specially when you resize to a narrow width.
    What kind of narrow sighted moron uses Internet Explorer in 2011? The only good use for Internet Explorer is to download another browser.
    I never said that it was my primary browser. My primary browser if Firefox. I was just pointing out more evidence against Internet Explorer. Also Internet Explorer is still commonly used so I guess that makes a ton of people morons, but we already knew that.
    Wake up! Do you know exactly how much of a fucking social pariah you make of yourself by merely acknowledging the fact that you even know what Intershit Exposer even *is*?
  • (cs) in reply to Anketam
    Anketam:
    frits:
    Simon N:
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    Tyrannosaurus Rex, Hallucigenia, and the Tully Monster to name a few.
    Also I doubt anyone has tried Box Jellyfish, Marbled Cone Snail, or Poison Dart Frog.

    They must have done, otherwise how would we know they're poisonous?

  • (cs) in reply to Jules
    Jules:
    Matt Westwood:
    Schweppes:
    HoHoHo and a bottle of rum:
    Uncle Al:
    Ah yes -- shuffle for randomization since, after all, more shuffles are guaranteed to increase randomization. Just like shuffling a deck of cards with eight perfect riffle shuffles instead of one (for those who happen not to know this result, eight perfect shuffles of a deck of 52 playing cards returns it to the original state).
    Wouldn't 2 perfect riffle shuffles return the deck to the original state?

    Assuming, of course, that either both are in shuffles or both are out shuffles....

    Uhm, no. Although I'm not convinced about 8 either...the OP may have been a troll

    Not sure but I think it's 8 out-shuffles or 52 in-shuffles. Martin Gardner knew, but we can't ask him, the fucker's dead.

    Wouldn't matter if it were in or out, surely....

    It does matter, and don't call me Shirley

    Deck of 8 cards, 1-8 1, 2, 3, 4, 5, 6, 7, 8 In Shuffle 1: 5, 1, 6, 2, 7, 3, 8, 4 In Shuffle 2: 7, 5, 3, 1, 8, 6, 4, 2 In Shuffle 3: 8, 7, 6, 5, 4, 3, 2, 1 In Shuffle 4: 4, 8, 3, 7, 2, 6, 1, 5 In Shuffle 5: 2, 4, 6, 8, 1, 3, 5, 7 In Shuffle 6: 1, 2, 3, 4, 5, 6, 7, 8

    6 in shuffles required

    Out Shuffle 1: 1, 5, 2, 6, 3, 7, 4, 8 Out Shuffle 2: 1, 3, 5, 7, 2, 4, 6, 8 Out Shuffle 3: 1, 2, 3, 4, 5, 6, 7, 8

    3 out shuffles required

  • John (unregistered)

    For those wanting the shuffle extension method.

    <Extension()> Public Function shuffle(ByVal arrayToBeShuffled As Array, ByVal numberOfTimesToShuffle As Integer) As Array
        Dim ReturnArray = arrayToBeShuffled
        Dim rndPosition As New Random(DateTime.Now.Millisecond)
        For i As Integer = 1 To numberOfTimesToShuffle
            For i2 As Integer = 1 To ReturnArray.Length
                swap(ReturnArray(rndPosition.Next(0, ReturnArray.Length)), ReturnArray(rndPosition.Next(0, ReturnArray.Length)))
            Next
        Next
        Return ReturnArray
    End Function
    
    Private Sub swap(ByRef arg1 As Object, ByRef arg2 As Object)
        Dim strTemp As Object
        strTemp = arg1
        arg1 = arg2
        arg2 = strTemp
    End Sub
    
  • Sadly, I've Seen This (unregistered) in reply to Toon
    Toon:
    Not being familiar with VB, I assume that no "break" statements are needed?

    You confuse VB with C. break is a low-level control transfer, like asm JuMP or such.

    C: A low-level language with high-level features. VB: A high-level language with low-level features.

  • Sadly, I've Seen This (unregistered) in reply to Matt Westwood
    Matt Westwood:
    Anketam:
    frits:
    Simon N:
    The poop of DOOM:
    Just like having to wipe your ass! If it was purely God's work, and he designed us intelligently, he'd make us dispose our waste without any "restants" that need to be cleaned up.

    Same thing goes for evolution, really. If evolution were true, how come we haven't evolved to not having to wipe our ass?

    Big, toothy animal: "I smell shit! Someone must be around!" Smart-ass at stinky shitbutt: "If only you could shit cleanly!"

    Because in the evolutionary sense we are "Big, toothy animal" well, rock-tied-to-a-sticky. As evidence - I challenge you to name an animal man has not killed and eaten.

    Tyrannosaurus Rex, Hallucigenia, and the Tully Monster to name a few.
    Also I doubt anyone has tried Box Jellyfish, Marbled Cone Snail, or Poison Dart Frog.

    They must have done, otherwise how would we know they're poisonous?

    Just because WE can't eat them doesn't mean they have no predators.

    Super Poisonous: http://en.wikipedia.org/wiki/Rough-skinned_newt

    This Oregon animal is eaten by local garter snakes, who are full for weeks (if not months) after eating one. The snake just slows down, but doesn't die.

  • (cs) in reply to iMalc
    iMalc:
    So few programmers know how to actually use a random number generator properly. It's kinda sad really.
    But they all tend toward using them wrong differently, so considering all those poorly-written programs as a group, the net entropy remains high.

    SCIENCE!

  • Jeff (unregistered)

    My guess is that the extra randomization was added to rectify the fact that by seeding Rnd with a call to Rnd, calls to this function will produce the same series of numbers. Having ten possible values for each call is an amazing improvement.

Leave a comment on “Random Char and Triply-Random Double”

Log In or post as a guest

Replying to comment #:

« Return to Article