It wouldn't be a fair fight. I am a Monte Carlo expert
Announcement
Collapse
No announcement yet.
Politness Costs Nothing but Can Pay Dividends
Collapse
X
-
12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
-
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(); ...
(and, additionally, that some people may be so lazy as to just always say "x = new random(now()).next();")
Comment
-
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
-
Originally posted by Kuciwalker View PostHe'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(); ...
(and, additionally, that some people may be so lazy as to just always say "x = new random(now()).next();")12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
Comment
-
Originally posted by KrazyHorse View PostIt wouldn't be a fair fight. I am a Monte Carlo expert"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
-
Originally posted by KrazyHorse View PostIt 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...
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
-
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
-
Originally posted by Asher View PostIf 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...
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
-
Originally posted by KrazyHorse View PostAgain, 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.
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
-
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
-
Originally posted by KrazyHorse View Posta) So now you know what a stream is?
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..."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
-
Originally posted by KrazyHorse View PostI take it back. You still don't know what a stream is.
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
-
Originally posted by Asher View PostIt'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...
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
-
Originally posted by KrazyHorse View PostGood ****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."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
Comment