[RELEASE] Parrot 0.0.5 is out of its cage.

2002-04-16 Thread Jeff
It was the dawning of the second age of parrotkind, ten weeks after the great GC war. The Parrot Project was a dream given form. Its goal: To prevent language wars by creating an interpreter where perl and other languages could reside peacefully... It can be a dangerous place, but it's our last

Re: C loop variations

2002-04-16 Thread Luke Palmer
> Now, I love that the for loop can do both of these things, but the subtlety > of the difference in syntax is likely, IMO, to lead to very difficult- > to-find bugs. It's very easy to miss that I've used a comma when I meant to > use a semicolon, and vice versa. And what's the mnemonic again? We

C loop variations

2002-04-16 Thread David Wheeler
In Exegesis 4, Damian writes: It's important to note that writing: for @a; @b -> $x; $y {...} # in parallel, iterate @a one-at-a-time as $x, and @b one-at-a-time as $y is not the same as writing: for @a, @b -> $x, $y {...} # sequentially iterate @a then @b, two-at-a-time as

Re: Tagmem* (was Unary dot)

2002-04-16 Thread Damian Conway
Juanma Barranquero wrote: > On _THE SELFISH GENE_ Dawkins says he coined the term, which was a more > euphonic version of "mimeme": On quickly scanning that message I read the last word as "mini-me", which brought up some *very* unlikely associations! :-) Damian -- "So, Mr. Evil..." "It's Dr. E

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Aaron Sherman
On Tue, 2002-04-16 at 14:57, Piers Cawley wrote: > Aaron Sherman <[EMAIL PROTECTED]> writes: > > I suspect it would involve: > > > > 1. Copying the key (which might be a reference) on insertion. > > 2. Hashing once, and caching the hash. > > > > This means a minimum of overhead, so it's a good th

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Piers Cawley
David Wheeler <[EMAIL PROTECTED]> writes: > On 4/16/02 11:57 AM, "Piers Cawley" <[EMAIL PROTECTED]> claimed: > >> Personally I'd like the default hash to return some immutable, unique >> and probably opaque object id (something the like >> 'Foo=HASH(0x81e2a3c)' you get from unoverloaded objects i

Re: Unary dot

2002-04-16 Thread Larry Wall
Piers Cawley writes: : Andy Wardley <[EMAIL PROTECTED]> writes: : > Hang on, now I'm a little confused - I thought that hashes were supposed : > to keep their % sigil. So shouldn't that be %foo.keys or %foo.{keys}? : > But then that would then violate the uniform access principle because : > hash

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread David Wheeler
On 4/16/02 12:27 PM, "Larry Wall" <[EMAIL PROTECTED]> claimed: > You guys are thinking in terms of a single $obj.hash method. I think > there will be more than one hashish (er...) method available, and each > hash will be able to choose at least whether it wants to hash by $obj._ > (the default)

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Larry Wall
Piers Cawley writes: : Aaron Sherman <[EMAIL PROTECTED]> writes: : : > On Tue, 2002-04-16 at 14:00, Mike Lambert wrote: : >> Speaking of which, how do we ensure the immutability of keys being put : >> into the hash? I think Perl copied the string, so that: : >> : >> $b = "aa"; : >> $a{$b} = 1; :

Re: Scary things

2002-04-16 Thread Larry Wall
Buddha Buck writes: : It's weirder when you allow multiple guard conditions to be true with no : guarantee of evaluation order. But I see no reason to disallow it. Well, Perl would guarantee the order. I can see situations where it'd be better to force a random pick to avoid starvation proble

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Steve Fink
On Tue, Apr 16, 2002 at 02:00:33PM -0400, Mike Lambert wrote: > Speaking of which, how do we ensure the immutability of keys being put > into the hash? I think Perl copied the string, so that: RFC266 talks about these issues, though it was just really my take on the problem at the time. http://de

Re: Scary things

2002-04-16 Thread Larry Wall
Piers Cawley writes: : Also known as constructs you wish you hadn't discovered. : : So, I'm reading through Finkel and I came across the following, which : computes the greatest common divisor of a and b (recast into perl6ish : syntax) : : while { : when $a < $b { $b -= $a } : when $b

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread David Wheeler
On 4/16/02 11:57 AM, "Piers Cawley" <[EMAIL PROTECTED]> claimed: > Personally I'd like the default hash to return some immutable, unique > and probably opaque object id (something the like > 'Foo=HASH(0x81e2a3c)' you get from unoverloaded objects in Perl5, but > probably not identical). This isn'

Re: Scary things

2002-04-16 Thread Buddha Buck
At 05:51 PM 04-16-2002 +0100, Piers Cawley wrote: >Also known as constructs you wish you hadn't discovered. > >So, I'm reading through Finkel and I came across the following, which >computes the greatest common divisor of a and b (recast into perl6ish >syntax) > > while { > when $a < $b { $b

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Tue, 2002-04-16 at 14:00, Mike Lambert wrote: >> Speaking of which, how do we ensure the immutability of keys being put >> into the hash? I think Perl copied the string, so that: >> >> $b = "aa"; >> $a{$b} = 1; >> chop $b; >> print $a{"aa"}; >> >>

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread David Wheeler
On 4/16/02 11:00 AM, "Mike Lambert" <[EMAIL PROTECTED]> claimed: > Speaking of which, how do we ensure the immutability of keys being put > into the hash? I think Perl copied the string, so that: > > $b = "aa"; > $a{$b} = 1; > chop $b; > print $a{"aa"}; > > still works. > > If we start storing

Scary things

2002-04-16 Thread Piers Cawley
Also known as constructs you wish you hadn't discovered. So, I'm reading through Finkel and I came across the following, which computes the greatest common divisor of a and b (recast into perl6ish syntax) while { when $a < $b { $b -= $a } when $b < $a { $a -= $b } } The idea is that

Re: Unary dot

2002-04-16 Thread Piers Cawley
Andy Wardley <[EMAIL PROTECTED]> writes: > On Mon, Apr 15, 2002 at 07:24:13PM -0700, Larry Wall wrote: >> So the main reason that objects can function as hashes is so that the >> user can poke an object into an interface expecting a hash and have it >> "make sense", to the extent that the object i

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Aaron Sherman
On Tue, 2002-04-16 at 14:00, Mike Lambert wrote: > Speaking of which, how do we ensure the immutability of keys being put > into the hash? I think Perl copied the string, so that: > > $b = "aa"; > $a{$b} = 1; > chop $b; > print $a{"aa"}; > > still works. > > If we start storing full thingies in

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Mike Lambert
Speaking of which, how do we ensure the immutability of keys being put into the hash? I think Perl copied the string, so that: $b = "aa"; $a{$b} = 1; chop $b; print $a{"aa"}; still works. If we start storing full thingies into the keys of a hash, we either need to make deep copies of these, or

Re: Tagmem* (was Unary dot)

2002-04-16 Thread Juanma Barranquero
On Tue, 16 Apr 2002 09:34:36 -0700 (PDT), Larry Wall <[EMAIL PROTECTED]> wrote: > Pike predates Dawkins, who I believe made up the term. > (Could be wrong about that.) They are similar concepts, however, in > that a tagmeme is a psychological linguistic construct that propagates > culturally.

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Aaron Sherman
On Tue, 2002-04-16 at 12:21, Larry Wall wrote: > Aaron Sherman writes: > : This allows me to specify separate hashing and stringification methods, > : but retains Perl's original default of combining the two. > > Yes, that's what we intend to do. You can make a man feel so small ;-) Thanks

Re: Tagmem* (was Unary dot)

2002-04-16 Thread Larry Wall
Miko O'Sullivan writes: : > > "Wouldn't Know a Tagmemic if it Bit Him on the Parse" : > : > Ooh, can I steal that as a title? (Though I'll s/Tagmemic/Tagmeme/.) I : > like it! :) : : You got it! : : I hope this isn't too off topic, but... is the word "tagmeme" somehow : related to the urban lege

Re: Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Larry Wall
Aaron Sherman writes: : In this example: : : %hash = ($a=>$b); : : $a can be anything. In fact, since Perl6 promises to retain the original : value of $a, we're rather encouraged to store complex data there. But, : this poses a problem. The key to use for hashing might not ideally be : the

Hashes, Stringification, Hashing and Strings

2002-04-16 Thread Aaron Sherman
In this example: %hash = ($a=>$b); $a can be anything. In fact, since Perl6 promises to retain the original value of $a, we're rather encouraged to store complex data there. But, this poses a problem. The key to use for hashing might not ideally be the string representation. For example

Re: Unary dot

2002-04-16 Thread Andy Wardley
On Mon, Apr 15, 2002 at 07:24:13PM -0700, Larry Wall wrote: > So the main reason that objects can function as hashes is so that the > user can poke an object into an interface expecting a hash and have it > "make sense", to the extent that the object is willing to be viewed like > that. AKA the

Tagmem* (was Unary dot)

2002-04-16 Thread Miko O'Sullivan
> > "Wouldn't Know a Tagmemic if it Bit Him on the Parse" > > Ooh, can I steal that as a title? (Though I'll s/Tagmemic/Tagmeme/.) I > like it! :) You got it! I hope this isn't too off topic, but... is the word "tagmeme" somehow related to the urban legend concept of a cultural "meme"? -Miko

Re: Unary dot

2002-04-16 Thread Allison Randal
On Tue, Apr 16, 2002 at 09:29:21AM -0400, Miko O'Sullivan wrote: > > "Wouldn't Know a Tagmemic if it Bit Him on the Parse" Ooh, can I steal that as a title? (Though I'll s/Tagmemic/Tagmeme/.) I like it! :) Allison

Re: Unary dot

2002-04-16 Thread Aaron Sherman
On Sun, 2002-04-14 at 16:41, Dave Mitchell wrote: > On Sat, Apr 13, 2002 at 05:07:37PM -0700, Larry Wall wrote: [...] > > my $self = invocant; > > > > or some such mummery. But that seems a bit retro. > > But now we have endless possibilities for > $self.ish > $self.less > $self

Re: Unary dot

2002-04-16 Thread Miko O'Sullivan
> Yay, tagmemics! :) Shall I offer an "Intro to Linguistics for Perl 6 > Developers" class? That would be fun! Please!!! -Miko "Wouldn't Know a Tagmemic if it Bit Him on the Parse" O'Sullivan

Re: Unary dot

2002-04-16 Thread Allison Randal
On Mon, Apr 15, 2002 at 11:03:15PM -0400, John Siracusa wrote: > On 4/15/02 10:24 PM, Larry Wall wrote: > > The main point of doing this isn't really the migration from Perl 5, > > but a basic underlying philosophy of linguistics known as tagmemics. > ("tagmemics"? ;) Yay, tagmemics! :) Shall