News for hackers. Stuff that matters.
Re:Evolution of Random Number Generators by TekMol on Sunday May 02, 2021 @07:11AM (#27014140)
This seems to use an external random number generator.

I want the code to be complete and reproducible. So gimmeTheNumberAtPosition(x) will always return the same for the same x.

Also, FYShuffle is much more complex than I would like the algo to be.

Re:Evolution of Random Number Generators by jhgb on Sunday May 02, 2021 @10:44AM (#27015715)
Fisher-Yates is one of the simplest things out there IMO.

Isn't the Lehmer code the thing that you want? Then you can specify your permutation with an integer and extract the individual digits from it repeatedly.

Re:Evolution of Random Number Generators by TekMol on Sunday May 02, 2021 @02:06PM (#27017378)

    Fisher-Yates is one of the simplest
    things out there IMO
Just using "$n xor $something" would be simpler. I am just not sure yet, what a good "$something" is.
Re:Evolution of Random Number Generators by jhgb on Sunday May 02, 2021 @02:22PM (#27017524)
How does this guarantee the desired property of the output being a permutation?
Re:Evolution of Random Number Generators by jimktrains2 on Sunday May 02, 2021 @09:12AM (#27014991)
If you seed your random number generator, then it is reproducible.
Re:Evolution of Random Number Generators by miked85 on Sunday May 02, 2021 @12:19PM (#27016453)
Are you saying you want a reproducible random number generator?