Mouses, keyboards, laptops, mobile phones, pads, all belong on a table. As we used to read in paper format, during a meal, we now use them. Rather than removing them, instead make them easier to clean. Not that food is the only source of dirt and bacteria, they get extra dirty because we spend the most time in contact with them. I would love to wash my keyboard, mouse, and pad, in a sink.
You can wash a keyboard and mouse in a dishwasher. Lots of site out there describing that. Seen colleagues doing after a coffee spill. You just have to make sure the heat is off, and give them days to dry off.
Laptops are problematic because of batteries inside that are difficult to remove, and that we don't want to be deprived of our laptops for several days.
Lenovo Thinkpads have drain holes as part of the keyboard and chassis design. Liquids should travel straight through the machine. https://www.youtube.com/watch?v=d7cvi00OZDM
They don't warrant the machine will survive, but at least the design makes a good effort.
I was just researching PCG, and I didn't find anything relevant apart from the the author's paper and website. I was trying to find out if it has been peer reviewed since its release last year. I'm really curious, how did you check if this paper was peer reviewed?
MT only fails LinearComp systematically. It is not a bad generator, it is a very good generator. The biggest problem is the "escape from zero-land" stuff where it's biased towards zero for a while if its seed is mostly zeros, but other generators have the same problem (though not to the same extent) and it's still statistically very unlikely to be a problem and it self corrects as the sequence runs.
Comparing to ChaCha20, which is a CSPRNG, is a little apples/oranges.
Just familiarity. Mostly I just can't recommend something I don't know much about. The SIMD variant of MT is architecture specific, I thought? Other newer variants of MT/WELL generators and PCG are probably all good options. Also xorshift*.
But I know that MT is a very good algorithm and using it has a certain pragmatic appeal - you make a lot of people's lives easier because when they Google to learn more about your generator they'll find good information quickly.
I thought you were interested to find the tests. The tests that fail are there. MT doesn't fail all, far from it. But there are RNGs that don't fail these that MT fails that are faster. PCG was mentioned here.
The only information on PCG I can find is the author's own paper which also fails some TestU01 tests. I am much more inclined to trust an established generator than an unproved one.
PCG is a family of PRNGs. Any sensible member of the family will trivially pass TestU01 BigCrush. If you use a 32-bit PCG it's going to necessarily fail BigCrush.
PRNG design is an empirical science. We can implement a generator and throw it into a statistical battery. If one passes, we've got a constructive proof of goodness. Any of us can run BigCrush and verify the results. Unlike CSPRNGs, we don't need to sit around and wait for the results of cryptanalysis.
Can someone explain how the following calculation was done?
With 2¹³² possible values, if identifiers were randomly generated at the rate of one million per second for the next 300 years the chance of a collision would be roughly 1 in six billion.
I tries using the formula for the Birthday problem, but the values are too large.
I'm not sure about their numbers, but with a little trick it can be estimated as 1-e^(-2^(n-x-1)), where x is the number of bits and n is log_2 of the number of random draws. When n and x are relatively close, you should be able to calculate this without numbers getting too big or too small.
Not only is it acceptable, it is necessary. How do you think our ancestors determined what was safe to eat? As the saying goes, sometimes you need to break some eggs. Now don't get me wrong, I'm neither condoning, nor encouraging, wanton negligence concerning human safety, obviously all possible efforts should be made to ensure it, but sometimes, such as in cases like this, the rewards far outweigh the risks.
Yes. And thousands have died in death camps to bootstrap our modern cariology. We should be grateful to all people who died in the past providing us data and knowledge, and to honor them we should use it in the best way we can, so that no one else has to die.
Second expression in the for loop and ||, both behave as conditionals, i.e. are equivalent to an if statement and the generated instruction will be a branch.
At least it would in C. Of course I'm ignoring the fact that JS is interpreted as will cause a lot of additional bloat, but were not counting that.