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

seed explicitly MersenneTwister(0) #525

Merged
merged 2 commits into from
Apr 4, 2017
Merged

seed explicitly MersenneTwister(0) #525

merged 2 commits into from
Apr 4, 2017

Conversation

rfourquet
Copy link
Member

@rfourquet rfourquet commented Apr 2, 2017

The default constructor MersenneTwister() will be deprecated, cf. JuliaLang/julia#16984 (comment).

src/init.jl Outdated
@@ -4,7 +4,7 @@ include(depfile) # generated by Pkg.build("IJulia")

# use our own random seed for msg_id so that we
# don't alter the user-visible random state (issue #336)
const IJulia_RNG = MersenneTwister()
const IJulia_RNG = MersenneTwister(0)
Copy link
Member

@stevengj stevengj Apr 2, 2017

Choose a reason for hiding this comment

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

I think we want srand(MersenneTwister(0))

Copy link
Member Author

Choose a reason for hiding this comment

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

IIUC, you added this IJulia_RNG as a replacement to GLOBAL_RNG in uuid4 to solve an issue, so indeed it seems that it should be randomly seeded as GLOBAL_RNG is.

@stevengj stevengj merged commit 843fdb0 into master Apr 4, 2017
@stevengj stevengj deleted the rf/MT-seed branch April 4, 2017 17:26
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.

2 participants