Re: [Chicken-hackers] random numbers for CHICKEN 5

2017-11-04 Thread felix . winkelmann
> I believe that the scaling done in `C_random_fixnum` is indeed dangerous as it > may lead to badly-distributed results. > Using a 64bit PRNG with the "proper" reduction procedure (avoid using the > modulo, have a look at OpenBSD `arc4random_uniform`) is, IMO, the way to go: > you > can easily re

Re: [Chicken-hackers] random numbers for CHICKEN 5

2017-11-04 Thread lemonboy
Hello hackers, Thanks for working on the implementation, Felix! Here's a few notes I jotted down while going trough the diff. I believe that the scaling done in `C_random_fixnum` is indeed dangerous as it may lead to badly-distributed results. Using a 64bit PRNG with the "proper" reduction proced

[Chicken-hackers] random numbers for CHICKEN 5

2017-11-03 Thread felix . winkelmann
Hello! I have pushed a branch with a new implementation and API for obtaining random numbers in CHICKEN 5 to the git repository. The API design resulted mostly by ideas from Kooda and me, together with a lot of bikeshedding on #chicken. The implementation in the "randomness" branch is by me, inc