Re: Apocalypse Two

2001-05-05 Thread Damian Conway

 I suppose you'll want me to put that on the CPAN now. ;-)

Yes. Didn't we sponsor you for this ;-)

I hear and obey, O Mighty Sponsor!

Though I suspect I'll hold off until Larry makes A3 public. Then I'll
release a module that rearranges *all* the operators to their new Perl
6 bindings:

use Operators::Perl6ish;

package MyClass;

sub new { bless [$_[1], 1..10], $_[0] }
sub next { my ($self) = @_; return next is:  ~ shift(@$self) ~ \n }

package main;

my ($str1, $str2) = ('a','z');
my $obj = MyClass.new($str1 ~ $str2);

print $obj.next() for 1..10;

print $obj.[0] ~ \n;

my $next = 'next';
print $obj.$next;

#etc.


Damian





Re: Apocalypse Two

2001-05-04 Thread Piers Cawley

Richard Clamp [EMAIL PROTECTED] writes:

 On Fri, May 04, 2001 at 09:48:46AM +0100, Jonathan Peterson wrote:
  
   And much, much more!
  
  we'll switch to using . instead of -
  
  Yay!!
 
 p6-languageBut then what do you use to concatenate?/ :) 
 
 Don't miss the smiley, I don't actually care.
 
 I'm really looking forward to apoc9, multi-dimensional slices makes my
 brain water.

Properties are already looking pretty scary.

-- 
Piers Cawley
www.iterative-software.com




Re: Apocalypse Two

2001-05-04 Thread Richard Clamp

On Fri, May 04, 2001 at 10:25:07AM +0100, Struan Donald wrote:
 i kind of like - from a visual point of view.

Your eyes will be adapted to server perl6.
/borg

-- 
Richard Clamp [EMAIL PROTECTED]



Re: Apocalypse Two

2001-05-04 Thread Struan Donald

* at 04/05 10:22 +0100 Dave Hodgkinson said:
 Struan Donald [EMAIL PROTECTED] writes:
 
  i kind of like - from a visual point of view.
 
 much more like APL... ;-)

i'd not know about that. seem to recall seeing an example of APL in a
book once and it looked very scary. or it might have been ADA. 

still, if damian gets his way we'll no doubt be able to have
modules/filters that mean we can still use - :) 

struan



Re: Apocalypse Two

2001-05-04 Thread Damian Conway

 
still, if damian gets his way we'll no doubt be able to have
modules/filters that mean we can still use - :) 

I *guarantee* it!

It will definitely be possible in Perl 6, because even with our primitive
earth technology we can do the reverse today:


###
# in line DotsForArrows.pm:

package DotsForArrows;
use Filter::Simple;
FILTER { s/\b\.(?=[a-z_\$({[])/-/gi };



###
# then in your code:

use DotsForArrows;

package MyClass;

sub new { bless [$_[1], 1..10], $_[0] }
sub next { my ($self) = @_; return next is:  . shift(@$self) . \n }

package main;

my ($str1, $str2) = (a, z);
my $obj = MyClass.new($str1 . $str2);

print $obj.next() for 1..10;

print $obj.[0] . \n;

my $next = 'next';
print $obj.$next;

#etc.


I suppose you'll want me to put that on the CPAN now. ;-)

Damian





Re: Apocalypse Two

2001-05-04 Thread Simon Cozens

On Fri, May 04, 2001 at 08:14:47PM +1000, Damian Conway wrote:
   package DotsForArrows;
   use Filter::Simple;
   FILTER { s/\b\.(?=[a-z_\$({[])/-/gi };

That's BORING. Obviously the right way to do it is to allow lvalue
overloaded operators, and overload . for everything.

-- 
The man who sees, on New Year's day, Mount Fuji, a hawk, and an eggplant
is forever blessed.
-- Old Japanese proverb



Re: Apocalypse Two

2001-05-04 Thread Jonathan Stowe

On Fri, 4 May 2001, Robin Szemeti wrote:

 On Fri, 04 May 2001, you wrote:

  The man who sees, on New Year's day, Mount Fuji, a hawk, and an eggplant
  is forever blessed.
  -- Old Japanese proverb

 The man who sees, on New Year's day, Mount Fuji, a hawk, and an eggplant
 is extremely drunk.
   -- Old Yorkshire proverb


The man who sees, on New Year's Day, Mount Fuji, a hawk, and an eggplant
is :

   A) In need of a short stint in the Betty Ford clinic

   B) someone who needs to book back into The Priory PDQ

   C) someone who has been rifling in my stash box ...

BTW that is Aubergine not Egg plant :)

/J\




Re: Apocalypse Two

2001-05-04 Thread Leon Brocard

Damian Conway sent the following bits through the ether:

 I suppose you'll want me to put that on the CPAN now. ;-)

Yes. Didn't we sponsor you for this ;-)

Leon
-- 
Leon Brocard.http://www.astray.com/
Iterative Software..http://yapc.org/Europe/

... Remember when we said there was no future? Well, this is it



Apocalypse Two

2001-05-03 Thread Robin Houston

http://www.perl.com/pub/2001/05/03/wall.html

Some quite exciting stuff in there. Array dereferencing will be
@foo[23] rather than $foo[23]. Everything will be an object (or at
least work like one). No more typeglobs. User-definable quoting
operators.

And much, much more!

 .robin.

-- 
I dreamt the other night that my nose had fallen off --john melesky