Re: Ruby iterators

2002-07-03 Thread Allison Randal
On Tue, Jul 02, 2002 at 07:32:00PM -0600, Luke Palmer wrote: On Tue, 2 Jul 2002, Michael G Schwern wrote: * Yes, Perl 6 will have named arguments to subroutines. What I can remember from the Perl 6 BoF is it will look something like this: sub foo ($this, $that) {

Re: Reflection...

2002-07-03 Thread Dan Sugalski
At 8:32 AM +0100 7/3/02, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] writes: Just a thought, I hope that we're going to be able to do things like: my $sub = {$^a + $^b}; $sub.arity; # 2 $sub.prototype; # ('$^a', '$^b') Getting access to this sort of thing will make the

Perl 6, The Good Parts Version

2002-07-03 Thread Michael G Schwern
I've just submitted a short talk to the Scandinavian Conference on Java And Object Orientation (JAOO.org) [1] entitled Perl 6, The Good Parts. This talk will be given to an audience of mostly Java, Python and Ruby programmers with a smattering of XP Agile methodology folks and OO and Pattern

Re: Perl 6, The Good Parts Version

2002-07-03 Thread Trey Harris
In a message dated Wed, 3 Jul 2002, Michael G Schwern writes: Attributes Transcending mere objects and classes, Perl 6 introduces adverbs. confused Attributes are adjectives, not adverbs. Aren't they? Trey

Re: Perl 6, The Good Parts Version

2002-07-03 Thread Dave Mitchell
On Wed, Jul 03, 2002 at 01:23:24PM -0400, Michael G Schwern wrote: Hopefully the Cabal [2] can debunk that. [snip] [2] Of which there is none. and http://www.perlcabal.com/ doesn't exist, right? ;-) -- I do not resent critisism, even when, for the sake of emphasis, it parts for the time

Re: Perl 6, The Good Parts Version

2002-07-03 Thread Tim Bunce
On Wed, Jul 03, 2002 at 01:23:24PM -0400, Michael G Schwern wrote: I'm also trying to think of more bits to throw in. Particularly in terms of the OO system, this being a conference about OO. From what I've heard so far, Perl 6's OO system will be largely playing catch up with other

Re: Perl 6, The Good Parts Version

2002-07-03 Thread Janek Schleicher
Trey Harris wrote at Wed, 03 Jul 2002 19:44:45 +0200: In a message dated Wed, 3 Jul 2002, Michael G Schwern writes: Attributes Transcending mere objects and classes, Perl 6 introduces adverbs. confused Attributes are adjectives, not adverbs. Aren't they? Attributes describe the

Re: Perl 6, The Good Parts Version

2002-07-03 Thread Dan Sugalski
At 9:20 PM +0100 7/3/02, Dave Mitchell wrote: On Wed, Jul 03, 2002 at 01:23:24PM -0400, Michael G Schwern wrote: Hopefully the Cabal [2] can debunk that. [snip] [2] Of which there is none. and http://www.perlcabal.com/ doesn't exist, right? ;-) Of course not. Otherwise it wouldn't 404, now

Re: Perl 6 Summary

2002-07-03 Thread Thom Boyer
On Tue, 02 Jul 2002 10:36:45 -0700, Erik Steven Harrisan wrote: ESH my $a = 'foo'; ESH ESH pass_by_name ( sub { print $a} ); ESH ESH sub pass_by_name { ESH my $a = 'bar'; ESH _[0]; ESH } ESH ESH Now, I have trouble keeping Perl 6 and 5 straight, but what I think

Re: Perl 6, The Good Parts Version

2002-07-03 Thread Michael G Schwern
On Wed, Jul 03, 2002 at 09:20:01PM +0100, Dave Mitchell wrote: On Wed, Jul 03, 2002 at 01:23:24PM -0400, Michael G Schwern wrote: Hopefully the Cabal [2] can debunk that. [snip] [2] Of which there is none. and http://www.perlcabal.com/ doesn't exist, right? ;-) Not Found The

Re: Perl 6, The Good Parts Version

2002-07-03 Thread Larry Wall
On Wed, 3 Jul 2002, Janek Schleicher wrote: : Trey Harris wrote at Wed, 03 Jul 2002 19:44:45 +0200: : : In a message dated Wed, 3 Jul 2002, Michael G Schwern writes: : Attributes : Transcending mere objects and classes, Perl 6 introduces adverbs. : : confused Attributes are adjectives,

XML escaping, etc..

2002-07-03 Thread Josh Wilmes
I've been meaning to ask- is there any plan to add special support for XML features such as string escaping? It would be very useful, IMHO, to have something analogous to the \Q feature in perl5 for escaping regexps, but which would do XML-style and escaping. I'm specifically interested

Re: Perl 6 Summary

2002-07-03 Thread Ashley Winters
On Wednesday 03 July 2002 12:54 pm, Thom Boyer wrote: To get a better feel for the weirdness that happens with pass-by-name, consider this example: sub check_it_out { $_[0] = 0; #step 1 $_[1] = 7; #step 2 } my a = (0,1,2,3,4); my $i = 2; check_it_out($i, $a[$i]);

Re: Perl 6, The Good Parts Version

2002-07-03 Thread Tim Bunce
On Wed, Jul 03, 2002 at 05:13:01PM -0400, Michael G Schwern wrote: On Wed, Jul 03, 2002 at 09:20:01PM +0100, Dave Mitchell wrote: On Wed, Jul 03, 2002 at 01:23:24PM -0400, Michael G Schwern wrote: Hopefully the Cabal [2] can debunk that. [snip] [2] Of which there is none. and

Re: what's new continued

2002-07-03 Thread Damian Conway
Comments (otherwise you have things pretty much right): Every subrotine or variable or method or object can have a notes (out of bound data) out-of-band data we can even have hyper-assignment : my ($a, $b) ^= new Foo; This is unlikely to do what you wanted. It creates a new Foo object

Re: Perl 6 Summary

2002-07-03 Thread Peter Scott
At 01:54 PM 7/3/02 -0600, Thom Boyer wrote: I'm personally MUCH more interested in Python's generators http://www.python.org/peps/pep-0255.html. A generator is like an iterator in that it can produce a series of values. But unlike iterators, when you ask a generator for the next value, it picks

Re: Perl 6 Summary

2002-07-03 Thread Dan Sugalski
At 5:07 PM -0700 7/3/02, Peter Scott wrote: At 01:54 PM 7/3/02 -0600, Thom Boyer wrote: I'm personally MUCH more interested in Python's generators http://www.python.org/peps/pep-0255.html. A generator is like an iterator in that it can produce a series of values. But unlike iterators, when you

Re: what's new continued

2002-07-03 Thread Luke Palmer
case2 - hyperoperator : my $result = 0; for ($a,$b,$c) { if ($x == $_) { $result =1; last} } Not correct. The second case is the same as: ($x == $a, $x == $b, $x == $c) which reduces in effect to: $x == $c Hold on---something's awry here. I thought C

Re: Perl 6 Summary

2002-07-03 Thread Erik Steven Harrison
But unlike iterators, when you ask a generator for the next value, it picks up execution exactly where it left off when it returned the last value -- i Aren't these what The Damien calls coroutines? Are we getting coroutines (RFC 30, as I recall . . .)? I'm also big on seeing these. Also,

Re: Perl 6 Summary

2002-07-03 Thread Larry Wall
On Wed, 3 Jul 2002, Ashley Winters wrote: : Creepy. Here's my creepy thought for the day: is there a possibility for a : prototype which would implicitly wrap a sub{} around a passed-in argument? : i.e. lazy evaluation via sub prototype? : : sub check_it_out ($idx is rw, $val is rw) { :

Re: what's new continued

2002-07-03 Thread Larry Wall
On Wed, 3 Jul 2002, Damian Conway wrote: : Date: Wed, 03 Jul 2002 19:33:33 -0400 : From: Damian Conway [EMAIL PROTECTED] : To: [EMAIL PROTECTED] [EMAIL PROTECTED] : Subject: Re: what's new continued : : Comments (otherwise you have things pretty much right): I didn't see the original here. :

Re: Perl6 grammar (take III)

2002-07-03 Thread Sean O'Rourke
Here's a later, greater version of the parser. It hopefully addresses all the limitations listed for the previous parser. New limits: - While I haven't specified argument contexts for the builtin functions, it should be possible to do so in the same way as for control structures). - Error

Re: what's new continued

2002-07-03 Thread Damian Conway
: we can even have hyper-assignment : : : my ($a, $b) ^= new Foo; : : This is unlikely to do what you wanted. It creates a new Foo object and then : assigns a reference to that one object to both $a and $b. It doesn't create two : Foo objects. (But maybe one object referenced twice is

Re: what's new continued

2002-07-03 Thread Ashley Winters
On Wednesday 03 July 2002 06:39 pm, Larry Wall wrote: On Wed, 3 Jul 2002, Damian Conway wrote: : Date: Wed, 03 Jul 2002 19:33:33 -0400 : From: Damian Conway [EMAIL PROTECTED] : To: [EMAIL PROTECTED] [EMAIL PROTECTED] : Subject: Re: what's new continued : : Comments (otherwise you have