Re: Sets vs Junctions

2005-02-13 Thread Jonathan Lang
Rod Adams wrote: > Now that I've gotten some feedback from my original message (on list and > off), and have had some time to think about it some more, I've come to > some conclusions: > >Junctions are Sets. (if not, they would make more sense if they > were.) As pointed out elsewhere, Junc

Re: Pick's randomness (was Re: Fun with junctions (was Sets vs Junctions))

2005-02-13 Thread Damian Conway
David Storrs OOC'd: OOC, will there be a way to control where C gets its randomness from? (e.g. perl's builtin PRNG, /dev/random, egd, etc) Sure: # Use RBR (Really Bad Randomness) algorithm... temp *rand (Num ?$max = 1) { return $max/2; } my $guess = @data.pick; Damian

Re: Extra Operator bits?

2005-02-13 Thread Damian Conway
Timothy S. Nelson wrote: Sorry, I've just worked out that, while I'm not sure I understand your comments on RFC 051 in A2, it looks like there'll be a function where I pass it a filename and it returns the contents, and that's what I want; I presume this closes it after. Yes. The function is

Re: Fun with junctions (was Sets vs Junctions)

2005-02-13 Thread Damian Conway
Rod Adams wrote: However, what if what you're calling a non-Perl Parrot based function? Do we disable junctions from playing with non-PurePerl functions? Or do we autothread over them? How do we tell if a non-Perl function outputs to determine if we should be able to autothread into them or not?

Re: Fun with junctions (was Sets vs Junctions)

2005-02-13 Thread Damian Conway
Jonathan Scott Duff wrote: Perhaps. I'm not so sure it's the rare case that programmers aren't prepared to deal with implicit parallelization. :-) Of course. But I'm saying it's a rare case where they've have to. Or, at least, where it will bite them if they don't. use warnings 'autothreading

Re: Fun with junctions (was Sets vs Junctions)

2005-02-13 Thread Jonathan Scott Duff
On Sun, Feb 13, 2005 at 11:10:20AM -0600, Patrick R. Michaud wrote: > Autothreading, even if enabled by default, doesn't happen until a > junction is created and used somewhere. Thus the only time our hypothetical > new programmer would be forced to become aware of junctions (without > himself/h

Pick's randomness (was Re: Fun with junctions (was Sets vs Junctions))

2005-02-13 Thread David Storrs
On Sat, Feb 12, 2005 at 06:39:01PM +1100, Damian Conway wrote: > pick - select at random from a list, array, or hash OOC, will there be a way to control where C gets its randomness from? (e.g. perl's builtin PRNG, /dev/random, egd, etc) --Dks -- [EMAIL PROTECTED]

Re: Pop a Hash?

2005-02-13 Thread David Storrs
On Fri, Feb 11, 2005 at 05:33:29PM -0800, Ashley Winters wrote: > On Thu, 10 Feb 2005 08:59:04 -0800, David Storrs <[EMAIL PROTECTED]> wrote: > > On Wed, Feb 09, 2005 at 05:13:56AM -0600, Rod Adams wrote: > > > > > > ($k, $v) <== pop %hash; > > > make sense to anyone except me? > > > > ... the onl

Re: Fun with junctions (was Sets vs Junctions)

2005-02-13 Thread Patrick R. Michaud
On Sat, Feb 12, 2005 at 05:24:04PM -0600, Jonathan Scott Duff wrote: > > >Because of this, I'd suggest that autothreading of user-defined routines > > >not be the default, but rather enabled via a pragma of some sort (or, of > > >course, via an "autothreaded" trait). For the built-in routines this

Re: Fun with junctions (was Sets vs Junctions)

2005-02-13 Thread Patrick R. Michaud
On Sat, Feb 12, 2005 at 03:54:57PM -0600, Rod Adams wrote: > >>But, to extract those alternative values from an object, you do > >>something special to it, like call a method. Whenever you evaluate the > >>object as a scalar, you get a single value back. Quite probably a > >>reference to somethi

Re: Extra Operator bits?

2005-02-13 Thread Timothy S. Nelson
On Sat, 12 Feb 2005, Larry Wall wrote: > On Sat, Feb 12, 2005 at 05:55:48PM +1100, Timothy S. Nelson wrote: > : More hyper-operators > : > : > : Incidentally, is there any chance we'll have more than one official > : hyper-operator in Perl6? According to the S3, there's