Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default random source on Linux #17

Open
leonbaum opened this issue Apr 23, 2014 · 1 comment
Open

Default random source on Linux #17

leonbaum opened this issue Apr 23, 2014 · 1 comment

Comments

@leonbaum
Copy link

According to the docs, the sample function should use the default random source for the monad, which according to the Data.Random.Source.IO docs is DevRandom for the IO monad on Linux.

That can't be right, can it? If I run sampleFrom DevRandom, the performance is terrible (as expected), but sample seems similar to sampleFrom mwc. Is MWC actually the default on Linux?

@mokus0
Copy link
Collaborator

mokus0 commented Apr 23, 2014

The comment could stand to be clearer. It's referring to the "DevRandom" type, which includes constructors that reference both /dev/random and /dev/urandom. It uses the one corresponding to /dev/urandom. When I get a bit more time (hopefully this weekend) I'll clarify the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants