2010/4/13 Aaron Sherman :
> On Mon, Apr 12, 2010 at 1:55 PM, Larry Wall wrote:
>
>> On Mon, Apr 12, 2010 at 07:24:37PM +0200, Moritz Lenz wrote:
>> : > 1. do all implementations of Perl6 generate the same sequence, given
>> the
>> : > same initial seed.
>> :
>> : I don't think they should. If you
On Tue, Apr 13, 2010 at 01:29:59AM -0400, Aaron Sherman wrote:
: PRNGs are often misrepresented as frivolous, but as I'm sure you know from
: your work at JPL, high quality random sequences are much-prized, and any
: language that starts off with some poor assumptions will ultimately pay for
: it.
On Mon, Apr 12, 2010 at 1:55 PM, Larry Wall wrote:
> On Mon, Apr 12, 2010 at 07:24:37PM +0200, Moritz Lenz wrote:
> : > 1. do all implementations of Perl6 generate the same sequence, given
> the
> : > same initial seed.
> :
> : I don't think they should. If you want that, use confuse a RNG with a
On Mon, Apr 12, 2010 at 07:24:37PM +0200, Moritz Lenz wrote:
: Dave Whipp wrote:
: > masak wrote:
: >> Modified:
: >>docs/Perl6/Spec/S32-setting-library/Numeric.pod
: >> Log:
: >> [S32/Numeric] removed method form of srand
: >>
: >> Overwhelming consent on #perl6 about this.
: >>
: >> - multi
Moritz Lenz wrote:
1) A RNG class (don't really care what the name is, for now)
2) An instance of that in $*RAND (which you can temp())
3) rand() and srand() act on $*RAND
4) It should be easy to create instances of the RNG to use in your own
class.
The sounds reasonable. The one thing I'd add
Tangentially, I'm a little surprised there isn't a random stream
factory in the core. They're useful for reproducible testing. With a
global random number generator, even if you seed it, another module
can call "rand" and alter the sequence you get from your "rand" calls.
I think something like "sr
Dave Whipp wrote:
> masak wrote:
>> Modified:
>>docs/Perl6/Spec/S32-setting-library/Numeric.pod
>> Log:
>> [S32/Numeric] removed method form of srand
>>
>> Overwhelming consent on #perl6 about this.
>>
>> - multi method srand ( Real $seed: )
>> multi srand ( Real $seed = default_seed_algori
On Mon, Apr 12, 2010 at 12:59 PM, Dave Whipp wrote:
> 2a. If I spawn two threads (implicitly or explicitly), how do their RNGs
> interact? I.e. are C and C thread-safe?
>
I've noticed that this is a potentially-surprising source of lock contention
in Java - all threads share common RNG state, ac
masak wrote:
Modified:
docs/Perl6/Spec/S32-setting-library/Numeric.pod
Log:
[S32/Numeric] removed method form of srand
Overwhelming consent on #perl6 about this.
- multi method srand ( Real $seed: )
multi srand ( Real $seed = default_seed_algorithm())
Seed the generator C uses. C<$seed>