lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



> On May 19, 2020, at 5:09 AM, Lorenzo Donati <lorenzodonatibz@tiscali.it> wrote:
> 
> Hi Lua Team!
> 
> I just noticed that one of the changes from Lua 5.3.0 was an improvement in random number generation.
> 
> 
> The manual is a bit crypitc, besides saying:
> 
> "The results from this function have good statistical qualities, but they are not cryptographically secure. (For instance, there are no guarantees that it is hard to predict future results based on the observation of some previous results.) "
> 
> 
> From an user POV, this doesn't tell much. I think that you should add
> some more detail about the algorithm and the characteristics of the generator.
> 
> Otherwise a user could not tell if the built-in generator is good for their application, bar knowing it's no good for crypto stuff.

I think that if you’re wanting to display a random quote from a list (like fortune), the current info is just fine. And if what you want is more complex than that, you probably want to pick a specific solution or at least read the source. I don’t think Lua benefits much from over specifying the implementation details of random number generation.

Ideally the source would have comments about the algorithm with links to more info, but the manual is better of being vague here, in my opinion.