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

Compose modifies the global RNG #198

Closed
cstjean opened this issue Mar 30, 2016 · 1 comment
Closed

Compose modifies the global RNG #198

cstjean opened this issue Mar 30, 2016 · 1 comment

Comments

@cstjean
Copy link

cstjean commented Mar 30, 2016

In Julia 0.4, in a Jupyter notebook, these two scripts yield different results.

srand(23)
display(compose(context()))
rand(1:1000)
srand(23)
rand(1:1000)

Most likely because of this line generating a random ID. Is there any reason for the ID to be random? Can we use a counter, or a private RNG that does not modify the global RNG?

@tlnagy
Copy link
Member

tlnagy commented Sep 27, 2018

I could reproduce with the latest version, #311 introduces a private RNG so we don't modify global state.

@tlnagy tlnagy closed this as completed in f85d605 Oct 1, 2018
tlnagy added a commit that referenced this issue Oct 1, 2018
use local rng for uuid generation, fixes #198
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