-
Notifications
You must be signed in to change notification settings - Fork 13
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
Use the system time to seed the default RNG #92
base: master
Are you sure you want to change the base?
Conversation
This gives us a simple way to have `lipsum` return random output without depending on `thread_rng`. This is a followup to #91.
Hi @reknih and @laurmaedje, can you tell me if this is a terribly idea from the point of view of dependencies? We discussed in #74 that a dependency on |
It just tried it and while it compiles fine on WASM, it will panic with |
Thanks a lot for the info! I just tried it myself with a local build of https://mgeisler.github.io/textwrap/ and it crashes when I call |
Alternatively, there seems to be some code here which we could use rust-lang/rust#48564. I'll have to test this in the next few days. |
The two snippets in that thread use
I'm not sure either about the way forward here, the |
Yeah, it should be more than enough :-) We're not after cryptographic randomness here, we just need a value which changes over time, so that calling It just occurred to me that I can add a conditional dependency on wasm-bindgen for the |
This gives us a simple way to have
lipsum
return random output without depending onthread_rng
.This is a followup to #91.