Re: Are .key and .value right for Pairs?

2001-10-05 Thread Damian Conway
> Can I get a .car and a .cdr please? In my limited mind "key" and "value" > are specific to hashes and their wimpy brother associative lists. Sure. Roll-you-own with: module PAIR; method car { return .key } method cdr { return .value } or, if you're really

Re: General Feelings on Exegesis 3

2001-10-05 Thread Damian Conway
> Well, my head is definitely spinning. :) Thanks, Damian. Just doing my job, Citizen. ;-) > One oversight (on one of our parts - you either didn't put it in or I > didn't see it. :)): it looks like the example uses the new ";" operator > (between the mandatory and option argum

Re: Another Exegesis 3 Question

2001-10-05 Thread Damian Conway
> When you say Unary here: > > Binary (low) | Binary (high) |Unary > > Don't you mean "bitwise"? If not then I'm confused :-) Looks like *I'm* the one who was confused! ;-) Yes, indeed, they should be: s/Binary/Boolean/g s/Unary/

Re: Exegesis 3 Question

2001-10-05 Thread Damian Conway
> OK, I have a question. > > On page 3 you say: > > > Because the Perl 6 "diamond" operator can take an arbitrary expression > > as its argument, it's possible to set a filehandle to read an entire > > file and do the actual reading, all in a single statement: > > > >

Re: Hyper concat ^_ ?

2001-10-05 Thread Damian Conway
> > my @images = qw( pic1 pic2 pic3) ^_ ('.jpg'); > > Doesn't that clash with the default currying argument? No. The DCA is: $^_ Damian

Re: := The bind

2001-10-05 Thread Damian Conway
> Is the following correct for := : > > left side is like function in the respect that the right side is treated > differently depending on the left-side-types i.e. left side is like > prototype!! for the right side. Yep. > (@a ,@b) := (@b,@a) > is the same as : > (\

Re: Hyper concat ^_ ?

2001-10-05 Thread Damian Conway
> Will Hyper operators work on strings as well ? Yes. You can "hype" *any* operator (except ^) Damian

Re: Are .key and .value right for Pairs?

2001-10-05 Thread Mark J. Reed
On Fri, Oct 05, 2001 at 06:59:52PM -0400, Sam Tregar wrote: > > But you can always define your own accessor methods with whatever > > names you like. :) > > I can? How do I do that? My understanding is that there won't be anything terribly magical about the built-in datatypes/classes. So if you

Re: Are .key and .value right for Pairs?

2001-10-05 Thread Sam Tregar
On Fri, 5 Oct 2001, Mark J. Reed wrote: > Well, "car" and "cdr" don't really fit; the key and value of a pair can be any > type of object, unlike the Lisp case where the cdr is always a list > (while the car can be either a list or an atom). Incorrect - "cdr" can be anything at all, just like

Re: Are .key and .value right for Pairs?

2001-10-05 Thread Mark J. Reed
Well, "car" and "cdr" don't really fit; the key and value of a pair can be any type of object, unlike the Lisp case where the cdr is always a list (while the car can be either a list or an atom). But you can always define your own accessor methods with whatever names you like. :) What's an assoc

Are .key and .value right for Pairs?

2001-10-05 Thread Sam Tregar
Can I get a .car and a .cdr please? In my limited mind "key" and "value" are specific to hashes and their wimpy brother associative lists. -sam Can I get a what what?

Re: General Feelings on Exegesis 3

2001-10-05 Thread Mark J. Reed
Well, my head is definitely spinning. :) Thanks, Damian. One oversight (on one of our parts - you either didn't put it in or I didn't see it. :)): it looks like the example uses the new ";" operator (between the mandatory and option arguments in the function declaration?), but it's not mentione

Re: sloppy midrash 3

2001-10-05 Thread David Nicol
Damian Conway wrote: > David Nicol wrote: >> Hear ye, hear ye, Ming of Mongo has declared! > > I really hope I'm just missing the implicit smiley there. What you're missing is me wracking my memory to remember what Dr. Zharkov called his tunneling craft that the hyperbinding operator

Another Exegesis 3 Question

2001-10-05 Thread David M. Lloyd
When you say Unary here: Binary (low) | Binary (high) |Unary __|___|_ | | or | || | |

RE: Exegesis 3 Question

2001-10-05 Thread Brent Dax
David M. Lloyd: # On Fri, 5 Oct 2001, Garrett Goebel wrote: # # > For those who aren't yet busy reading, you can find it at: # > http://www.perl.com/pub/a/2001/10/03/exegesis3.html # # OK, I have a question. # # On page 3 you say: # # > Because the Perl 6 "diamond" operator can take an arbitrary #

Exegesis 3 Question

2001-10-05 Thread David M. Lloyd
On Fri, 5 Oct 2001, Garrett Goebel wrote: > For those who aren't yet busy reading, you can find it at: > http://www.perl.com/pub/a/2001/10/03/exegesis3.html OK, I have a question. On page 3 you say: > Because the Perl 6 "diamond" operator can take an arbitrary expression > as its argument, it'

General Feelings on Exegesis 3

2001-10-05 Thread Garrett Goebel
Thank you. For those who aren't yet busy reading, you can find it at: http://www.perl.com/pub/a/2001/10/03/exegesis3.html

Re: General Feelings on Apoc 3

2001-10-05 Thread Ted Ashton
Thus it was written in the epistle of David Nicol, > Michael G Schwern wrote: > > > Binary ; > > > > This worries me. Giving ; two meanings makes basic language parsing > > harder, which would be fine if there was a big payoff, but there's > > not. Just making shorthand for [[1,2,3],[4,5,6]] d

Re: Hyper concat ^_ ?

2001-10-05 Thread Piers Cawley
"Richard Nuttall" <[EMAIL PROTECTED]> writes: > Will Hyper operators work on strings as well ? > > e.g. > > ('pic1','pic2','pic3') ^_ ('.jpg') > > or even > > my @images = qw( pic1 pic2 pic3) ^_ ('.jpg'); Doesn't that clash with the default currying argument? -- Piers

Another link [ Re: General Feelings on Apoc 3 ]

2001-10-05 Thread raptor
http://www.perlmonks.org/index.pl?node_id=71319&lastnode_id=71484

:= The bind

2001-10-05 Thread raptor
Is the following correct for := : left side is like function in the respect that the right side is treated differently depending on the left-side-types i.e. left side is like prototype!! for the right side. (@a ,@b) := (@b,@a) is the same as : (\@a, \@b) = (\@b, \@a);#if we had ref-allowed on

Re: General Feelings on Apoc 3

2001-10-05 Thread raptor
I think this would be interesting for U :") http://www.cs.yorku.ca/Courses/3401/lectures/340198-11-27HTML/ http://www.cogs.susx.ac.uk/local/books/nlp-in-prolog/ch04/chapter-04-sh-1.5. html#sh-1.5 | On Thu, 4 Oct 2001, Michael G Schwern wrote: | | > > Backtracking is at the heart of Logic Program

Re: Hyper concat ^_ ?

2001-10-05 Thread Nathan Torkington
Michael G Schwern writes: > my @images = map { $_ _ '.jpg' } qw(pic1 pic2 pic3); > > Hmmm, that's visually unappealing. my @images = map { "$_.jpg" } qw(pic1 pic2 pic3); Now that's sexay. Nat

Re: Hyper concat ^_ ?

2001-10-05 Thread Michael G Schwern
On Fri, Oct 05, 2001 at 09:50:53AM +0100, Richard Nuttall wrote: > my @images = qw( pic1 pic2 pic3) ^_ ('.jpg'); my @images = map { $_ _ '.jpg' } qw(pic1 pic2 pic3); Hmmm, that's visually unappealing. Just thinking out loud. -- Michael G. Schwern <[EMAIL PROTECTED]>http://www.pobox.co

Hyper concat ^_ ?

2001-10-05 Thread Richard Nuttall
Will Hyper operators work on strings as well ? e.g. ('pic1','pic2','pic3') ^_ ('.jpg') or even my @images = qw( pic1 pic2 pic3) ^_ ('.jpg'); R. -- Richard Nuttall

Re: A3: hyper operators with operand of different size

2001-10-05 Thread Damian Conway
Stéphane writes: > Hyper operators with operands of different size are partly covered > in A3: > > Hyper operators will also intuit where a dimension is missing from one > of its arguments, and replicate a scalar value to a list value in that > dimension. That means yo