Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on The man who wrote the book on password management regrets the error. Parent comment
$ wc -l /usr/share/dict/words 99156 /usr/share/dict/words
> Math.log(99156,2)*3 => 49.79223735944021
Second, from what I gather from [1],[2] and [3] - you should probably use SecureRandom for cryptographic/security purposes:
$ ruby -e 'require "securerandom"; puts \ File.read("/usr/share/dict/words").lines.sample(4, \ random:SecureRandom).map(&:chomp).join(" ")' remorse's mountaineers said arrival's
[2] https://ruby-doc.org/core-2.4.1/Random.html
[3] https://ruby-doc.org/stdlib-2.4.1/libdoc/securerandom/rdoc/S...
There are no comments on this comment yet.
Second, from what I gather from [1],[2] and [3] - you should probably use SecureRandom for cryptographic/security purposes:
[1] https://ruby-doc.org/core-2.4.1/Array.html#method-i-sample[2] https://ruby-doc.org/core-2.4.1/Random.html
[3] https://ruby-doc.org/stdlib-2.4.1/libdoc/securerandom/rdoc/S...