Announcement

Collapse
No announcement yet.

Politness Costs Nothing but Can Pay Dividends

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    It wouldn't be a fair fight. I am a Monte Carlo expert
    12-17-10 Mohamed Bouazizi NEVER FORGET
    Stadtluft Macht Frei
    Killing it is the new killing it
    Ultima Ratio Regum

    Comment


    • #47
      He's referring to the fact that the dead simplest way to generate random numbers in any programming language is going to be some variant of the following pseudocode:

      Code:
      rng = new random(now());
      ...
      x = rng.next();
      ...
      y = rng.next();
      ...
      etc.

      (and, additionally, that some people may be so lazy as to just always say "x = new random(now()).next();")

      Comment


      • #48
        I recently spotted and fixed a RNG bug buried deep in our codebase that had been causing intermittent failures for years.

        That may be the most impressively technical thing I've done since I've been there.
        12-17-10 Mohamed Bouazizi NEVER FORGET
        Stadtluft Macht Frei
        Killing it is the new killing it
        Ultima Ratio Regum

        Comment


        • #49
          Originally posted by Kuciwalker View Post
          He's referring to the fact that the dead simplest way to generate random numbers in any programming language is going to be some variant of the following pseudocode:

          Code:
          rng = new random(now());
          ...
          x = rng.next();
          ...
          y = rng.next();
          ...
          etc.

          (and, additionally, that some people may be so lazy as to just always say "x = new random(now()).next();")
          It is quite possible that somebody did the latter, but there is no reason to assume that they did. Also, the former appears to be what I was saying...
          12-17-10 Mohamed Bouazizi NEVER FORGET
          Stadtluft Macht Frei
          Killing it is the new killing it
          Ultima Ratio Regum

          Comment


          • #50
            Originally posted by KrazyHorse View Post
            It wouldn't be a fair fight. I am a Monte Carlo expert
            I don't care about the algos behind them. Let some masochist figure that out, the details are inconsequential to me. It doesn't matter what kind of fancy **** you're doing behind the scenes when the Indian programmer who designed those things just piped it the time as a seed.
            "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
            Ben Kenobi: "That means I'm doing something right. "

            Comment


            • #51
              Originally posted by KrazyHorse View Post
              It is quite possible that somebody did the latter, but there is no reason to assume that they did. Also, the former appears to be what I was saying...
              If you meant the former, your question made no sense in the context of any quasi-sensible app design.

              It's highly likely that each number picked for a single user is from that stream, but I would think a new instance would be generated each time the program is told to enter a new set of numbers...
              "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
              Ben Kenobi: "That means I'm doing something right. "

              Comment


              • #52
                Again, you CAN pipe in the time as the seed. That DOESN'T MEAN that the ****ing thing declares a new stream every time somebody asks for a number.
                12-17-10 Mohamed Bouazizi NEVER FORGET
                Stadtluft Macht Frei
                Killing it is the new killing it
                Ultima Ratio Regum

                Comment


                • #53
                  Originally posted by Asher View Post
                  If you meant the former, your question made no sense in the context of any quasi-sensible app design.

                  It's highly likely that each number picked for a single user is from that stream, but I would think a new instance would be generated each time the program is told to enter a new set of numbers...
                  a) So now you know what a stream is?
                  b) I have no idea why you think this is necessarily the case...
                  12-17-10 Mohamed Bouazizi NEVER FORGET
                  Stadtluft Macht Frei
                  Killing it is the new killing it
                  Ultima Ratio Regum

                  Comment


                  • #54
                    Originally posted by KrazyHorse View Post
                    Again, you CAN pipe in the time as the seed. That DOESN'T MEAN that the ****ing thing declares a new stream every time somebody asks for a number.
                    The hell are you talking about?

                    It won't declare a new stream every time someone asks for a number using "next" or something equivalent. I'm assuming they do a "new rand(time)" for each new user. And if they're not doing that, they're dumber than the dumbest Indian programmer I've ever met.
                    "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                    Ben Kenobi: "That means I'm doing something right. "

                    Comment


                    • #55
                      I take it back. You still don't know what a stream is.
                      12-17-10 Mohamed Bouazizi NEVER FORGET
                      Stadtluft Macht Frei
                      Killing it is the new killing it
                      Ultima Ratio Regum

                      Comment


                      • #56
                        Originally posted by KrazyHorse View Post
                        a) So now you know what a stream is?
                        Of course I know what a stream is. I do understand RNGs and have taken cryptography courses where they play an integral role...

                        I just couldn't put that in context for what you were saying. It would not make any sense to me to not re-seed the RNG for each user, so it never even crossed my mind that there'd be some singleton RNG seeded god-knows-when and then constantly reusing numbers off the stream.

                        b) I have no idea why you think this is necessarily the case...
                        It's the most obvious (and probably optimal) solution to the problem. Otherwise every user in the store is working off the same seed, which is not very desirable...
                        "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                        Ben Kenobi: "That means I'm doing something right. "

                        Comment


                        • #57
                          Originally posted by KrazyHorse View Post
                          I take it back. You still don't know what a stream is.
                          What's far more likely is you're not using the correct terminology to describe what you're thinking.

                          The stream from an API/programmer's POV is the set of numbers you can retrieve from a RNG after it's seeded.

                          Considering it's extremely unlikely the lotto companies wrote their own RNG lib, it makes no sense to dive into the number theory behind the libraries.
                          "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                          Ben Kenobi: "That means I'm doing something right. "

                          Comment


                          • #58
                            Originally posted by Asher View Post
                            It's the most obvious (and probably optimal) solution to the problem. Otherwise every user in the store is working off the same seed, which is not very desirable...
                            Good ****ing god, Asher. Why the **** is "working off the same seed" not ****ing desirable? That is, in fact, the most desirable solution...

                            Also, "next" doesn't ****ing declare a new stream. new rand does that.
                            12-17-10 Mohamed Bouazizi NEVER FORGET
                            Stadtluft Macht Frei
                            Killing it is the new killing it
                            Ultima Ratio Regum

                            Comment


                            • #59
                              Originally posted by KrazyHorse View Post
                              Good ****ing god, Asher. Why the **** is "working off the same seed" not ****ing desirable? That is, in fact, the most desirable solution...
                              You can't be serious? The point is to be random, not predictable.

                              Also, "next" doesn't ****ing declare a new stream. new rand does that.
                              That's what I just said.
                              "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                              Ben Kenobi: "That means I'm doing something right. "

                              Comment


                              • #60
                                Asher, from a pure crypto perspective using the same seed is the correct solution.

                                From a practical implementation perspective, inasmuch as this is vulnerable to any kind of attack re-seeding should make it more secure.

                                Comment

                                Working...
                                X