lua-users home
lua-l archive

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


One solution: remove any assertion of quality from the reference; put that instead in the release notes or documentation of the provided default implementation, adding all information needed so that developers can choose the implementation or tune their application as needed, using this implementation or writing their own.

At least this is documented somewhere in the appropriate place. The reference will be updated only when there's agreement about the minimum level that implementations must be conforming to.

And an application having strict requirements on random generators, or that depend on a specific algorithm (for long term reproducibility, e.g. in puzzle-like games where each challenge in the game is fed by an initial seed that can be reproduced at any time and anywhere) should provide their own RNG (if they want higher security than the minimum set in specifications) or their own PRNG (if they want reproductibility).


Le mer. 20 mai 2020 à 16:37, Lorenzo Donati <lorenzodonatibz@tiscali.it> a écrit :
On 20/05/2020 15:24, Ahmed Charles wrote:
>
>
>> On May 19, 2020, at 5:09 AM, Lorenzo Donati
>> <lorenzodonatibz@tiscali.it> wrote:

[snip]

>>
>> 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.
>

The problem here is that I think the manual is giving either too much or
too little information.

If you want to completely hide implementation details you don't state:

"The results from this function have good statistical qualities,"

because this sentence has meaning only for people who /do/ want some
more info about the quality of implementation.

So, IMO, you either expunge that reference about quality altogheter, or
provide at least some /precise/ reference. And I don't think people
/using/ Lua should all be able to search for that info in the C source.

BTW, Lua could be embedded in an application who only provide a link to
the user manual. A interested user (which could not even be a
programmer) should be able to "follow the link" and discover at least
the name of the algorithm used, without the need to even think of
downloading the source just to see if they can find something somewhere
in a cryptic C file comment!

Otherwise, as I said, just avoid mentioning the quality issue at all,
because as it stands that sentence is useless except for a very narrow
category of people, i.e. Lua developers that are also expert C
programmers AND that have interest in random number generator quality.

Anyway, I would much prefer that little bit of added information. After
all it is Lua /Reference/ Manual, it should give references to a Lua
programmer/user without forcing him to learn C.

-- Lorenzo