On Tue, Dec 1, 2015 at 1:45 PM, David Bruant wrote:
> Le 01/12/2015 20:20, Michał Wadas a écrit :
>
>>
>> As we all know, JavaScript as language lacks builtin randomness related
>> utilities.
>> All we have is Math.random() and environment provided RNG - window.crypto
>> in browser and crypto mod
On 12/01/2015 01:45 PM, David Bruant wrote:
Le 01/12/2015 20:20, Michał Wadas a écrit :
As we all know, JavaScript as language lacks builtin randomness
related utilities.
All we have is Math.random() and environment provided RNG -
window.crypto in browser and crypto module in NodeJS.
Sadly,
>
> -- Forwarded message --
> From: "Michał Wadas"
> To: es-discuss@mozilla.org
> Cc:
> Date: Tue, 1 Dec 2015 20:20:34 +0100
> Subject: PRNG - currently available solutions aren't addressing many use
> cases
>
...
> - not seedable
If you port the example code from the Wikipedia Mersenne Twister page
(and add a float interface), you end up with around 80 lines of code.
See here:
http://pastebin.com/KiKUcBpH
It works extremely well and is quite fast (I've not noticed any
performance difference with Math.random, which on V8 i
Le 01/12/2015 20:20, Michał Wadas a écrit :
As we all know, JavaScript as language lacks builtin randomness
related utilities.
All we have is Math.random() and environment provided RNG -
window.crypto in browser and crypto module in NodeJS.
Sadly, these APIs have serious disadvantages for man
node crypto is asynchronous or sync and it returns a buffer of binary data
uint8's are just the default way of that node buffers represent data
On Tue, Dec 1, 2015, 2:20 PM Michał Wadas wrote:
> As we all know, JavaScript as language lacks builtin randomness related
> utilities.
> All we have is
As we all know, JavaScript as language lacks builtin randomness related
utilities.
All we have is Math.random() and environment provided RNG - window.crypto
in browser and crypto module in NodeJS.
Sadly, these APIs have serious disadvantages for many applications:
Math.random
- implementation depe
7 matches
Mail list logo