On 12/03/13 18:32, Raphaël Badin wrote:
>> It's staggering insofar as it's the first language I've used that
>> doesn't preseed the random number generator.
>
> I wasn't really a surprise to me because it reminded me how C works:
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <time.h>
>
> void main(void) {
> /* srand ( time(NULL) ); uncomment this to seed the PRNG */
> printf("Random %d", rand());
> }
>
I don't remember having to do that in C before. Perhaps it's a Gnu libc
thing? Or perhaps I used a different rand. I dunno :)
On 12/03/13 18:32, Raphaël Badin wrote:
>> It's staggering insofar as it's the first language I've used that
>> doesn't preseed the random number generator.
>
> I wasn't really a surprise to me because it reminded me how C works:
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <time.h>
>
> void main(void) {
> /* srand ( time(NULL) ); uncomment this to seed the PRNG */
> printf("Random %d", rand());
> }
>
I don't remember having to do that in C before. Perhaps it's a Gnu libc
thing? Or perhaps I used a different rand. I dunno :)