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

Turn Random::System into a module (+docs) #4542

Merged
merged 2 commits into from Jun 20, 2017

Conversation

oprypin
Copy link
Member

@oprypin oprypin commented Jun 10, 2017

Fixes #4505

Copy link
Contributor

@ysbaddaden ysbaddaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To shuffle a deck, I think I would only use system random to initialize a seed for a statistically correct PRNG (e.g. ISAAC or PCG32), which are much much faster; along with an unbiased shuffling technique (swap all cards at least once, if I remember correctly) :-)

@oprypin
Copy link
Member Author

oprypin commented Jun 16, 2017

I just can't come up with a better example, but I feel that it's important to show how to pass this module as as if it's an instance. I removed the comment from it...

@ysbaddaden
Copy link
Contributor

This is 👍 for me. If @mverzilli or @bcardiff agrees, please merge :)

@Sija
Copy link
Contributor

Sija commented Jun 19, 2017

@matiasgarciaisaia osx build failed again, just FYI.

@mverzilli
Copy link

Restarted the OSX job that had failed. I know it passed in CircleCI but it feels weird to merge a PR that's red in Travis. Probably OCD, you name it!

@oprypin
Copy link
Member Author

oprypin commented Jun 19, 2017

It passed BTW

@mverzilli mverzilli merged commit c0b2e33 into crystal-lang:master Jun 20, 2017
@mverzilli
Copy link

Thanks!

@mverzilli mverzilli added this to the Next milestone Jun 20, 2017
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

Successfully merging this pull request may close these issues.

None yet

4 participants