You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was recently trying to migrate all of our rand dependencies to a single version. I noticed that ReadRng, which we use to implement --random-source in shuf, was deprecated in the newest version of rand. Naturally, I opened an issue in rand to complain: rust-random/rand#1152. There I learned that implementing --random-source is not a very good idea, and that the suggestions in gnu's manual about it are outdated. The only remaining valuable usage of --random-source seems to be to provide reproducibility (two runs involving randomness produce the same result). The suggestion I got was not to implement --random-source, but to add a different flag like --random-seed that takes a string to seed the random number generator.
Introducing a new flag seems like the better option because we'd change the behavior: While --random-source reads all the random bytes from the provided file, --random-seed would only take a string to seed the rng. All random bytes would then be generated by the rng (which is faster than reading from a file).
Before starting to implement this I wanted to see if anybody has opinions on this. This proposal would mean that we'd replace a flag that is present in both gnu and freebsd with our own thing. This flag is used for the sort, shuf and shred commands.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I was recently trying to migrate all of our
rand
dependencies to a single version. I noticed thatReadRng
, which we use to implement--random-source
inshuf
, was deprecated in the newest version ofrand
. Naturally, I opened an issue inrand
to complain: rust-random/rand#1152. There I learned that implementing--random-source
is not a very good idea, and that the suggestions in gnu's manual about it are outdated. The only remaining valuable usage of--random-source
seems to be to provide reproducibility (two runs involving randomness produce the same result). The suggestion I got was not to implement--random-source
, but to add a different flag like--random-seed
that takes a string to seed the random number generator.Introducing a new flag seems like the better option because we'd change the behavior: While
--random-source
reads all the random bytes from the provided file,--random-seed
would only take a string to seed the rng. All random bytes would then be generated by the rng (which is faster than reading from a file).Before starting to implement this I wanted to see if anybody has opinions on this. This proposal would mean that we'd replace a flag that is present in both gnu and freebsd with our own thing. This flag is used for the
sort
,shuf
andshred
commands.The text was updated successfully, but these errors were encountered: