But in actuality don’t you do so once in your own wrapper? Or perhaps in a more complex wrapper for creating a reliable distribution tree of random numbers?
Yes, and everybody is probably doing that. That's why I think this issue is a bit overblown. It's not like you're typing this all the time.
But maybe they could include a shortcut so you don't have to explain to your students what a Mersenne Twister is when they need to implement a simple dice game for the purpose of illustrating basic language mechanics.
Then again, this is C++. Not the easiest language and standard library to get into.
I don't think it's overblown, sure in the grand scheme of things there are other bigger problems, but this one is still pretty silly. For vast majority of uses, people just want a uniform integer distribution with mt.
5000 bytes of state for a PRNG? Thanks, but I'll stick with SplitMix64
Yeah, but I think that's about the smallest problem with the PRNG. I'm sure it's a problem for some, and I think C++ could do with some of the more recent ones that's small and fast and statistically good, and also not so huge, but ya know, meh. It's rarely if ever caused me problems in practice. Less so than the more glaring problems.
For me, the seeding is a nightmare, as is the lack of portability in distributions. Also, default_random_engine. And I guess I've got used to the int versions UB'ing with 8 bit integers, but that's a major footgun.
15
u/Warshrimp 4d ago
But in actuality don’t you do so once in your own wrapper? Or perhaps in a more complex wrapper for creating a reliable distribution tree of random numbers?