Re: Perl6 Operator List (REMAINING ISSUES)

2002-11-06 Thread Peter Haworth
[Apologies for late reply, but it takes a long time to read this many messages] On Wed, 30 Oct 2002 16:37:09 -0800, Michael Lazzaro wrote: 1) Need a definitive syntax for hypers, ^[op] and «op» have been most seriously proposed -- something that keeps a bracketed syntax, but

Re: Perl6 Operator List (REMAINING ISSUES)

2002-11-06 Thread fearcadi
Peter Haworth writes: a ^[alpha_op] +3 You can parse this in two ways: * array a, hyperop alpha_op, unary plus, literal 3 * array a, binary xor, call alpha_op and put result in arrayref, binary plus, literal 3 I think this was already discusse dbefore . ^ - xor and ^[]

Re: [RFC] Perl6 Operator List, Take 5

2002-11-05 Thread Peter Haworth
On Wed, 30 Oct 2002 15:31:24 -0800, Michael Lazzaro wrote: Meaning that the list: +^- force to numeric context, complement ~^- force to string context, complement simply becomes: ^ - complement (type-specific) Does this include booleans? I really liked the idea

Re: [RFC] Perl6 Operator List, Take 5

2002-11-05 Thread Michael Lazzaro
On Tuesday, November 5, 2002, at 06:51 AM, Peter Haworth wrote: On Wed, 30 Oct 2002 15:31:24 -0800, Michael Lazzaro wrote: Meaning that the list: +^- force to numeric context, complement ~^- force to string context, complement simply becomes: ^ - complement (type-specific)

Re: [RFC] Perl6 Operator List, Take 5

2002-11-02 Thread Philippe 'BooK' Bruhat
On Thu, 31 Oct 2002, Damian Conway wrote: Larry mused: Of course, Real Mathematicians will want [1..10) and (1..10] instead. Forgive me but is this syntax really necessary. Does it buy us enough over +1 and -1? And for what it's worth, Real Mathematicians do not use open intervals for

Re: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Mark J. Reed
On 2002-10-30 at 12:47:17, Larry Wall wrote: (Anybody know of a version of pine that does UTF-8?) Yes - it's called mutt. ☺ Seriously, I do highly recommend switching from pine to mutt. It's not a completely painless transition, since mutt is more ELMlike than PINElike, but I know many who have

RE: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Dyck, David
-Original Message- From: Austin Hastings [mailto:austin_hastings;yahoo.com] How do you write a in a Windows based environment? (Other than by copying them from Larry's emails or loading MSWord to do insert-symbol) You could use the Character Map accessory to put the character

Re: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Iain 'Spoon' Truskett
* Dyck, David ([EMAIL PROTECTED]) [31 Oct 2002 19:21]: [...] You could use the Character Map accessory to put the character into the clipboard, or press the alt and hold the alt key while typing 0171 (or 0187) alt+0171 alt+0187 To be honest, as easy as it is to type ^a^v or ^k,[1] it's

Perl6 Operator List (REMAINING ISSUES)

2002-10-31 Thread fearcadi
Michael Lazzaro writes: OK, by my count -- after editing to reflect Larry's notes -- only a few issues remain before the ops list can be completed. 1) Need a definitive syntax for hypers, ^[op] and «op» have been most seriously proposed -- something that keeps a

RE: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Austin Hastings
--- Dyck, David [EMAIL PROTECTED] wrote: -Original Message- From: Austin Hastings [mailto:austin_hastings;yahoo.com] How do you write a in a Windows based environment? (Other than by copying them from Larry's emails or loading MSWord to do insert-symbol) You could use

Re: Perl6 Operator List (REMAINING ISSUES)

2002-10-31 Thread Larry Wall
On Thu, 31 Oct 2002 [EMAIL PROTECTED] wrote: : %a ^[op]= @b # hash v array : @a ^[op]= %b # array v hash What would those mean? Are you thinking only of hashes with numeric keys? Larry

Re: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Larry Wall
On Thu, 31 Oct 2002, Iain 'Spoon' Truskett wrote: : To be honest, as easy as it is to type ^a^v or ^k,[1] it's still Thanks, I didn't know it was that «easy» in vim. :-) : typing an awful lot just to get a character. Surely the Perl operator : Huffman encoding should take into account the

Re: Perl6 Operator List (REMAINING ISSUES)

2002-10-31 Thread fearcadi
Larry Wall writes: On Thu, 31 Oct 2002 [EMAIL PROTECTED] wrote: : %a ^[op]= @b # hash v array : @a ^[op]= %b # array v hash What would those mean? Are you thinking only of hashes with numeric keys? Larry no but hash can have property that tells how to turn its

Perl6 Operator List (REMAINING ISSUES)

2002-10-31 Thread fearcadi
Michael Lazzaro writes: OK, by my count -- after editing to reflect Larry's notes -- only a few issues remain before the ops list can be completed. 1) Need a definitive syntax for hypers, ^[op] and «op» have been most seriously proposed -- something that keeps a

RE: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Brent Dax
Larry Wall: # Perl 6 is written in Unicode. Great. That's a wonderful policy. But it *shouldn't influence routine coding in any way*. I have no problem with user-defined Unicode operators. I have a *huge* problem with built-in Unicode operators, and a gargantuan problem with built-in Unicode

RE: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Erik Steven Harrison
-- On Thu, 31 Oct 2002 11:26:13 Brent Dax wrote: I can honestly say at this point that I'd rather give up $iterator than lose hyperops. I was thinking the same thing not long ago. But now that I think about it, is operator ever going to be confused for $File_Handle? The vector operation

RE: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread fearcadi
Erik Steven Harrison writes: All that said, can anyone come up with a case to confuse op with $File_Handle? it seems that parser cannot confuse them because op is operator and parser expect operator, while $File_Handle is a term . but human can confuse . I personally also like

RE: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Brent Dax
Erik Steven Harrison: # All that said, can anyone come up with a case to # confuse op with $File_Handle? If you assume infinite lookahead, it's fine, but if not... something ... Is that a call to sub something() returns(IO::Handle) or a hypered sub

Re: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Luke Palmer
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Date: Thu, 31 Oct 2002 14:45:16 -0800 From: Erik Steven Harrison [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] X-Sent-Mail: off Reply-To: [EMAIL PROTECTED] X-Sender-Ip: 152.18.50.63 Organization: Angelfire

Re: Perl6 Operator List

2002-10-31 Thread fearcadi
Larry Wall writes: sub postfix:! (num $x) { $x 2 ?? $x :: $x * ($x - 1) ! } which could be fixed with the _: sub postfix:! (num $x) { $x 2 ?? $x :: $x * ($x - 1) _! } Weird, but it's all consistent with the distinction we're already making on curlies, which gave a

RE: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Larry Wall
On Fri, 1 Nov 2002 [EMAIL PROTECTED] wrote: : Erik Steven Harrison writes: : : : All that said, can anyone come up with a case to : confuse op with $File_Handle? : : : : it seems that parser cannot confuse them because op is operator and : parser expect operator, while

Re: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Dave Storrs
On Wed, 30 Oct 2002, Larry Wall wrote: If no one saw them then it could well be a problem on my end. I'm trying to use a mailer (pine) that doesn't know about UTF-8 in a «+» b I'm using Pine 4.33 on FreeBSD 4.3, and I see these fine. --Dks

Re: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Larry Wall
On Thu, 31 Oct 2002, Dave Storrs wrote: : On Wed, 30 Oct 2002, Larry Wall wrote: : : If no one saw them then it could well be a problem on my end. : I'm trying to use a mailer (pine) that doesn't know about UTF-8 in : : a «+» b : : I'm using Pine 4.33 on FreeBSD 4.3, and I see

Re: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Iain 'Spoon' Truskett
* Larry Wall ([EMAIL PROTECTED]) [31 Oct 2002 08:22]: [...] This is currently running in a window that does Latin-1 rather than UTF-8. Do these French quotes come through? @a «+» @b The window may say Latin-1, but the mail header said UTF-8. As it happens, I couldn't see them until I

Re: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Larry Wall
On Fri, 1 Nov 2002, Iain 'Spoon' Truskett wrote: : This is currently running in a window that does Latin-1 rather than : UTF-8. Do these French quotes come through? : : a «+» b : : The window may say Latin-1, but the mail header said UTF-8. : : As it happens, I couldn't see them until I

Re: [RFC] Perl6 Operator List, Take 5

2002-10-31 Thread Iain 'Spoon' Truskett
* Larry Wall ([EMAIL PROTECTED]) [01 Nov 2002 15:59]: [...] I was misconfigured here. My pine was marking it as UTF-8 even though the window was Latin-1. So you ought to be able to see this: @a «*» @b. That appeared perfectly. I'm definitely going to look into mutt though...gotta have

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Graham Barr
On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michael Lazzaro wrote: unary (prefix) operators: \ - reference to * - list flattening ? - force to bool context ! - force to bool context, negate not - force to bool context, negate + - force to numeric

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Michael Lazzaro
[.]foo() # What does this mean? One could argue that several ways, depending on what's in the current topic. It's the exact same thing as the binary form of dot, but with the left side being implied, as 'the current topic': topic is a scalar: hyperdot does nothing (scalar hyperop

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Austin Hastings
--- Jonathan Scott Duff [EMAIL PROTECTED] wrote: On Wed, Oct 30, 2002 at 09:13:02AM -0800, Austin Hastings wrote: --- Jonathan Scott Duff [EMAIL PROTECTED] wrote: Maybe we've gone over this before but, if so, I don't remember ... On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michael

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Austin Hastings wrote: : No, no. I'm talking about the unary . prefix : : method blah { : .foo() : [.]foo() # What does this mean? : } : : Vector of invocations of the foo methods of the current topic. Except that the topic is by

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Austin Hastings
--- Larry Wall [EMAIL PROTECTED] wrote: On Wed, 30 Oct 2002, Austin Hastings wrote: : No, no. I'm talking about the unary . prefix : :method blah { : .foo() : [.]foo() # What does this mean? :} : : Vector of invocations of the foo methods of the

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Michael Lazzaro
On Wednesday, October 30, 2002, at 11:58 AM, Larry Wall wrote: I'd even be willing to give up ´foo bar bazª meaning qw(foo bar baz) for this. I can't see that right (MacOSX Jaguar) in the email; to me it looks like a forwardtick and an, um, underlined 'a' -- but in spite of that, I'm game.

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread David Wheeler
On Wednesday, October 30, 2002, at 12:17 PM, Michael Lazzaro wrote: I can't see that right (MacOSX Jaguar) in the email; to me it looks like a forwardtick and an, um, underlined 'a' -- but in spite of that, I'm game. It's just so pretty (when it works!) On my Mac, it's spelled «op» -- can

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Mark J. Reed
On 2002-10-30 at 12:23:53, David Wheeler wrote: This tells me that Mail.app, for some reason, didn't know that it was supposed to use UTF-8 when showing Larry's mail. When I pasted his mail into a UTF-8 document in Emacs, it looked fine. Given that it's probably UTF-8 that Perl 6 source

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Brian Ingerson
On 30/10/02 15:33 -0500, Mark J. Reed wrote: On 2002-10-30 at 12:23:53, David Wheeler wrote: This tells me that Mail.app, for some reason, didn't know that it was supposed to use UTF-8 when showing Larry's mail. When I pasted his mail into a UTF-8 document in Emacs, it looked fine.

RE: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Markus Laire
On 29 Oct 2002 at 22:29, Larry Wall wrote: Of course, Real Mathematicians will want [1..10) and (1..10] instead. That seems familiar, I like it ;) There's also an issue of what (1..10) - 1 would or should mean, if anything. Does it mean (1..9)? Does 1 + (1..10) mean (2..10)? And what

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Nicholas Clark
On Wed, Oct 30, 2002 at 03:33:57PM -0500, Mark J. Reed wrote: On 2002-10-30 at 12:23:53, David Wheeler wrote: This tells me that Mail.app, for some reason, didn't know that it was supposed to use UTF-8 when showing Larry's mail. When I pasted his mail into a UTF-8 document in Emacs, it

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Mark J. Reed wrote: : Larry's mail was *marked* as UTF-8, but by the time I got it it : had no French quotes in it in UTF-8, Latin-1, or any other encoding anymore. : My mailer understand UTF-8 just fine, and so does vim (which I used to : look at my spool file to check for

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Jonathan Scott Duff
On Wed, Oct 30, 2002 at 11:10:54PM +0200, Markus Laire wrote: If we are going to do math with ranges, we definitely need non- discreet ranges also. Or at least make sure it's easy enough to implement as a class. (1.9 .. 2.1) + (5..7) * (72.49 .. 72.51); I don't think that non-discrete

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Austin Hastings
--- Larry Wall [EMAIL PROTECTED] wrote: Do these French quotes come through? @a «+» @b Oui, M'sieu! __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread David Wheeler
On Wednesday, October 30, 2002, at 12:47 PM, Larry Wall wrote: This is currently running in a window that does Latin-1 rather than UTF-8. Do these French quotes come through? @a ´+ª @b Nope. But given that I don't even know where to go to type them in, and doing so will likely be a

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Graham Barr
On Wed, Oct 30, 2002 at 01:25:44PM -0800, Austin Hastings wrote: --- Larry Wall [EMAIL PROTECTED] wrote: Do these French quotes come through? @a «+» @b Odd, I see them in this message. But In the message from Larry I see ?'s Graham.

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Michael Lazzaro
On Wednesday, October 30, 2002, at 01:28 PM, David Wheeler wrote: But given that I don't even know where to go to type them in, and doing so will likely be a PITA...even though I *love* the idea of using these characters, might it be better to abandon them for now? Oh, don't say that! I

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread David Wheeler
On Wednesday, October 30, 2002, at 01:35 PM, Graham Barr wrote: On Wed, Oct 30, 2002 at 01:25:44PM -0800, Austin Hastings wrote: --- Larry Wall [EMAIL PROTECTED] wrote: Do these French quotes come through? @a «+» @b Odd, I see them in this message. But In the message from Larry I see

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread David Wheeler
On Wednesday, October 30, 2002, at 01:43 PM, Michael Lazzaro wrote: Oh, don't say that! I already know what all of these should mean! :-) ≈ … ∫ § ¿ ∆ ∑ Ω ø ¶ º ≠ ≤ ≥ ‹ › ‡ Ø ˇ ¬ Ç Œ ∞ ¡ • Nice, I can see all of those. Your mailer is the same as mine, Apple Mail, and the headers are:

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Michael Lazzaro
On Wednesday, October 30, 2002, at 01:46 PM, David Wheeler wrote: But let me ask you -- how did you input those characters? Applications/Utilities/Key Caps (Again, OSX) which shows you where they all are. The «» quotes, for example, are option-\ and shift-option-\ :-) MikeL

Re: Perl6 Operator List, Damian's take

2002-10-30 Thread John Williams
On Tue, 29 Oct 2002, Austin Hastings wrote: Any of you OO guys know of a case where $a = $a + $b; # A [+]= B; -- A = A [+] B; and $a += $b; # A [+=] B; should be different? They are different in the scalar [op] list case, as explained here:

Re: Perl6 Operator List, Damian's take

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, John Williams wrote: : They are different in the scalar [op] list case, as explained here: : http://archive.develooper.com/perl6-language%40perl.org/msg10961.html : : ($a = 0) [+=] b; # sum : ($a = 1) [*=] b; # product : ($a ='') [~=] b; # cat That's almost

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Markus Laire
On 30 Oct 2002 at 15:24, Jonathan Scott Duff wrote: On Wed, Oct 30, 2002 at 11:10:54PM +0200, Markus Laire wrote: If we are going to do math with ranges, we definitely need non- discreet ranges also. Or at least make sure it's easy enough to implement as a class. (1.9 .. 2.1) + (5..7)

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Damian Conway
Larry mused: On Tue, 29 Oct 2002, David Whipp wrote: : Larry Wall [mailto:larry;wall.org] wrote: : : unary (postfix) operators: : :... - [maybe] same as ..Inf [Damian votes Yes] : : I wonder if we can possibly get the Rubyesque leaving out of : endpoints by saying something like

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Damian Conway
Graham Barr wrote: Now that we have gained ^ back from being a hyeroperator, could we not have ^ as a polymorphic complement operator. It can always be combined with ~ or + to force context, eg $a = ^ +$b; $a = ^ ~$b; We would then have a complement operator that I would assume objects

RE: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Brent Dax
Larry Wall: # This is currently running in a window that does Latin-1 # rather than UTF-8. Do these French quotes come through? # # @a + @b No, but I'm running Outlook, so it's probably a bug on my end. :^) (It does show up in that annoying variable-width font it switches to for

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Simon Cozens
[EMAIL PROTECTED] (Damian Conway) writes: Forgive me but is this syntax really necessary. If you're going for user-definable operators, most of this syntax is entirely unnecessary. Take all the hairy stuff out of core and be done with it! This won't stop people arguing about it, though. :) --

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Simon Cozens
[EMAIL PROTECTED] (Michael Lazzaro) writes: ⠉ˆ  ⠀ ¦Â â ˆ «Â Â§Â Â¿Â â ˆ†  ⠈‘  Ω ø ¶ º ⠉  Â â ‰ ¤Â â ‰ ¥Â â € ¹Â â € ºÂ â € ¡Â Ã ˜ Â Ë ‡  ¬ à ‡  Š’  ⠈ž  ¡ ⠀ ¢ How does that translate to Perl 5? -- Almost any animal is capable learning a

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Michael Lazzaro
On Wednesday, October 30, 2002, at 03:07 PM, Damian Conway wrote: In creating my operator list I deliberated shied away from the unary and binary multimorphic forms. But I do see Graham's point and would favour retaining polymorphic unary C^ at least. Meaning that the list: + - force

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Damian Conway
Michael Lazzaro wrote: Meaning that the list: + - force to numeric context - - force to numeric context, negate +^- force to numeric context, complement ~ - force to string context ~^- force to string context, complement simply becomes: ^ - complement

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Damian Conway
Larry elucidated: In general, for any type, how do you write [$min .. $max - $step : $step] when you don't even necessarily have subtraction defined? We don't know how to do z - 1 in Perl 5, for instance. Okay. I buy that. Damian

Re: Perl6 Operator List, Damian's take

2002-10-30 Thread Damian Conway
Larry wrote: That's almost a reduce. Pity you have to include a variable. But since rvalues are illegal on the left side of an assignment, we *could* go as far as to say that 0 [+=] b; # sum 1 [*=] b; # product '' [~=] b; # cat dwim into reduce operators rather than being

Re: Perl6 Operator List (REMAINING ISSUES)

2002-10-30 Thread Erik Steven Harrison
-- On Wed, 30 Oct 2002 16:37:09 Michael Lazzaro wrote: OK, by my count -- after editing to reflect Larry's notes -- only a few issues remain before the ops list can be completed. 1) Need a definitive syntax for hypers, ^[op] and +op; have been most seriously proposed --

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Brian Ingerson
On 30/10/02 13:41 -0800, David Wheeler wrote: On Wednesday, October 30, 2002, at 01:35 PM, Graham Barr wrote: On Wed, Oct 30, 2002 at 01:25:44PM -0800, Austin Hastings wrote: --- Larry Wall [EMAIL PROTECTED] wrote: Do these French quotes come through? @a «+» @b Odd, I see

Re: Perl6 Operator List, Take 3

2002-10-29 Thread Juanma Barranquero
On Mon, 28 Oct 2002 13:09:37 -0800 (PST), Larry Wall [EMAIL PROTECTED] wrote: How do your read $a ! $b ! $c? Neither $a nor $b nor $c. What? Aren't you able to see this invisible neither operator just at the front? ;-) /L/e/k/t/u

Re: Perl6 Operator List, TAKE 4

2002-10-29 Thread Michael Lazzaro
On Monday, October 28, 2002, at 01:25 PM, Michael Lazzaro wrote: Again, I'm wondering if we're going about this wrong way -- perhaps we need to go to more effort to save ^ as xor, and use something different for hypers, like h+ or h[+] or `+ or ~+ or ~~+, etc? OK, I'm calling Warnock's on

Perl6 Operator List, Damian's take

2002-10-29 Thread Damian Conway
Oh boy, I just *hate* the idea of CX for xor. Hate it, hate it, hate it! Yuck, yuck, yuck! But I do like Michael's idea of using C as the hyperoperator marker (the array connotation works well, I think). The only problem is that we end up with too many C's in most expressions: $count = a + b;

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Michael Lazzaro
On Tuesday, October 29, 2002, at 11:21 AM, Damian Conway wrote: My personal favorite solution is to use square brackets (for their dual array and indexing connotations, and because they highlight the operator so nicely): $count = a + b; sums = a [+] b; Any ideas on what { $^a op $^b }

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Damian Conway
Michael Lazzaro wrote: Any ideas on what { $^a op $^b } would become? It would be unchanged. Placeholders have nothing to do with hyperoperators. And never have had. Damian

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Damian Conway
Uri Guttman wrote: what is a string complement? bitwise? i take it the numeric is one's complement. String complement treats the value as a string then bitwise complements every bit of each character. Integer complement treats the value as a int then bitwise complements every bit. DC

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Michael Lazzaro
On Tuesday, October 29, 2002, at 11:47 AM, Luke Palmer wrote: [i.e. this change doesn't make any difference] Doh! You're right, of course. For some reason I was thinking a long while back that it would be confusing to have { $^a op $^b } if ^ went back to meaning xor. But there's the

Re: Perl6 Operator List, Take 3

2002-10-29 Thread Damian Conway
Scott Duff wrote: Actually, I think we need a universal method on scalars that gives the eigenstates of that value. It might be C$val.eigenstates or maybe just C$val.states. The method would work on non-superimposed values as well, in which cases it would just return a list containing the value

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Dave Mitchell
On Wed, Oct 30, 2002 at 06:51:14AM +1100, Damian Conway wrote: String complement treats the value as a string then bitwise complements every bit of each character. Is that the complement of the codepoint or the individual bytes? (I'm thinking utf8 here). -- Nothing ventured, nothing lost.

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Aaron Crane
Damian Conway writes: My personal favorite solution is to use square brackets (for their dual array and indexing connotations, and because they highlight the operator so nicely): $count = a + b; sums = a [+] b; Mmm, yummy. I do have a question though (and apologies if I've

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Damian Conway
Aaron Crane wrote: Mmm, yummy. I do have a question though (and apologies if I've merely missed the answer). We've got two productive operation-formation rules: one saying add a final = to operate-and-assign, and the other saying wrap in [] to vectorise. But no-one's said which order they

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Luke Palmer
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Date: Tue, 29 Oct 2002 21:37:32 + From: Aaron Crane [EMAIL PROTECTED] Content-Disposition: inline X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/ Damian Conway writes: My personal favorite solution is to use square

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Austin Hastings
Interesting point, especially if operator:+= can be overloaded. @a [+=] @b; implies iteratively invoking operator:+=, whereas @a [+]= @b; implies assigning the result of iteratively invoking operator:+ It only matters when they're different. :-| And, of course, if they ARE different then

[RFC] Perl6 Operator List, Take 5

2002-10-29 Thread Michael Lazzaro
Okay, For those of you playing the home game, Take 5, with Damian Larry's latest inputs. ^ means xor again, and a few things have been removed. Comments? Note that I will next post a list of hyperoperators _separately_. If the design team could take a look, esp. at the remaining questions,

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Simon Cozens
[EMAIL PROTECTED] (Dave Mitchell) writes: (I'm thinking utf8 here). I'd strongly advise against that. -- Ermine? NO thanks. I take MINE black. - Henry Braun is Oxford Zippy

Re: [RFC] Perl6 Operator List, Take 5

2002-10-29 Thread Larry Wall
On Tue, 29 Oct 2002, Michael Lazzaro wrote: :(is whitespace allowed inside the brackets, e.g. [ + ] vs. [+] ?) I don't think so. : unary (prefix) operators: :. - method call on current topic I think we have to have unary .= as well, if we're to do the .=replace trick on $_. :

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Larry Wall
On 30 Oct 2002, Simon Cozens wrote: : [EMAIL PROTECTED] (Dave Mitchell) writes: : (I'm thinking utf8 here). : : I'd strongly advise against that. Actually, it works out rather well in practice, because the string abstraction in Perl is that of a sequence of codepoints. But at least in Perl 5,

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Dan Sugalski
At 1:20 AM + 10/30/02, Simon Cozens wrote: [EMAIL PROTECTED] (Dave Mitchell) writes: (I'm thinking utf8 here). I'd strongly advise against that. I'd agree. Thinking UTF-8 is generally a bad idea. If you think anything, think fixed-size code points, since that's what you're ultimately

RE: [RFC] Perl6 Operator List, Take 5

2002-10-29 Thread David Whipp
Larry Wall [mailto:larry;wall.org] wrote: : unary (postfix) operators: :... - [maybe] same as ..Inf [Damian votes Yes] I wonder if we can possibly get the Rubyesque leaving out of endpoints by saying something like 1..!10. Perhaps we could use the less-than symbol: 1 .. 10

RE: Perl6 Operator List, Damian's take

2002-10-29 Thread David Whipp
Luke Palmer [mailto:fibonaci;babylonia.flatirons.org] wrote: for x | y - $x is rw | $y { $x += $y } This superposition stuff is getting to me: I had a double-take, wondering why we were iterating with superpositions (Bitops never entered my mind). Did the C; ever

RE: Perl6 Operator List, Damian's take

2002-10-29 Thread Larry Wall
On Tue, 29 Oct 2002, David Whipp wrote: : Luke Palmer [mailto:fibonaci;babylonia.flatirons.org] wrote: : :for x | y - $x is rw | $y { :$x += $y :} : : This superposition stuff is getting to me: I had a double-take, : wondering why we were iterating with superpositions

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Dave Storrs
On Tue, 29 Oct 2002, Austin Hastings wrote: Hell, we might as well throw in multiple dispatch. Actually, I am really hoping we do. Any of you OO guys know of a case where $a = $a + $b; # A [+]= B; -- A = A [+] B; and $a += $b; # A [+=] B; should be different?

RE: [RFC] Perl6 Operator List, Take 5

2002-10-29 Thread Larry Wall
On Tue, 29 Oct 2002, David Whipp wrote: : Larry Wall [mailto:larry;wall.org] wrote: : : unary (postfix) operators: : :... - [maybe] same as ..Inf [Damian votes Yes] : : I wonder if we can possibly get the Rubyesque leaving out of : endpoints by saying something like 1..!10. : :

Re: [RFC] Perl6 Operator List, Take 5

2002-10-29 Thread Michael Lazzaro
Larry Wall wrote: :... - [maybe] range, exclusive of endpoint [Damian votes No] Could have ^..^ and ^..too, for all that. OK, I just gotta say, that's _d*mn_ clever. Exclusive of endpoint -- It looks like what it is, and vice versa. I guess that's why you're our fearless leader. :-)

Re: [RFC] Perl6 Operator List, Take 5

2002-10-29 Thread Me
: I wonder if we can possibly get the Rubyesque leaving out of : endpoints by saying something like 1..!10. : : Similarly: 1 .. 10 == 2..9 There's also an issue of what (1..10) - 1 would or should mean, if anything. Does it mean (1..9)? Does 1 + (1..10) mean (2..10)? And what

RE: [RFC] Perl6 Operator List, Take 5

2002-10-29 Thread Brent Dax
Larry Wall: # Of course, Real Mathematicians will want [1..10) and (1..10] instead. # # Double ick. Reminds me of the number-line notation you learn about *before* precalculus (or whatever the value of $you.schooling.grade[12].class{math}.name is) confuses everything, with open vs. closed

Re: [RFC] Perl6 Operator List, Take 5

2002-10-29 Thread Michael Lazzaro
Brent Dax wrote: Larry Wall: # There's also an issue of what (1..10) - 1 would or should # mean, if anything. Does it mean (1..9)? Does 1 + (1..10) Actually, I would at first glance think, based on the parens, that: (1..10)-1 means ((1-1)..(10-1)) means (0..9)

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Michael Lazzaro
On Sunday, October 27, 2002, at 12:57 PM, Michael Lazzaro wrote: .= .|= .\= = = - (depending on operants) s/operants/operands/ Sorry bout that. Typing too fast. MikeL

Re: Radix (was Re: Perl6 Operator List)

2002-10-28 Thread Larry Wall
On Sun, 27 Oct 2002, Mark J. Reed wrote: : On 2002-10-26 at 18:10:39, Michael Lazzaro wrote: : Larry wrote: :If one were going to generalize that, one would be tempted to go the Ada :route of specifying the radix explicitly: : Ada and others . . . ksh uses the # for this (in place of

RE: Perl6 Operator List, Take 2

2002-10-28 Thread Larry Wall
On Sun, 27 Oct 2002 [EMAIL PROTECTED] wrote: : Damian Conway wrote: : :or : : : :given ( /home/temp/, $f ) : : - ( str $x , int $n ) { : : $x ~ [one, two, ... , hundreed][$n] : : }; : : : :it seems that the last does not work because given take

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Larry Wall
On Sun, 27 Oct 2002, Michael Lazzaro wrote: : If \ meant xor, and some of the other discussed changes: I mislike \ for xor, primarily because it doesn't fit into the current escape mystique of \. Larry

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Austin Hastings
Since xor is really low frequency, why not make xor mean xor? $zero = $a xor $a; $a xor= $b; $b xor= $a xor= $b xor= $a; # Swap'em @a ^xor= @b; # Is this right? =Austin --- Larry Wall [EMAIL PROTECTED] wrote: On Sun, 27 Oct 2002, Michael Lazzaro wrote: : If \ meant xor, and some of the

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Jonathan Scott Duff
On Mon, Oct 28, 2002 at 09:41:37AM -0800, Larry Wall wrote: On Sun, 27 Oct 2002, Michael Lazzaro wrote: : If \ meant xor, and some of the other discussed changes: I mislike \ for xor, primarily because it doesn't fit into the current escape mystique of \. Does xor really need the

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Michael Lazzaro
On Monday, October 28, 2002, at 09:58 AM, Jonathan Scott Duff wrote: Does xor really need the punctuation? Does xor really need to be a primitive? Though bitwise xor is seldom used for most people, other versions are likely to be more frequent: the 'superpositional' flavor, for example, is

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Jonathan Scott Duff
On Mon, Oct 28, 2002 at 10:11:43AM -0800, Michael Lazzaro wrote: Though bitwise xor is seldom used for most people, other versions are likely to be more frequent: the 'superpositional' flavor, for example, is likely to have significant meaning. Same with 'none', I expect. | \

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Larry Wall
On Mon, 28 Oct 2002, Michael Lazzaro wrote: : On Monday, October 28, 2002, at 09:58 AM, Jonathan Scott Duff wrote: : Does xor really need the punctuation? Does xor really need to be a : primitive? : : Though bitwise xor is seldom used for most people, other versions are : likely to be more

RE: Perl6 Operator List, Take 3

2002-10-28 Thread Brent Dax
Larry Wall: # and then I looked crosseyed at the // vs \\ proposals, and I # realized we have a superposition of / and \ that is spelled X. :-) use Perl::Caseless; print foo x 6;#?!? --Brent Dax [EMAIL PROTECTED] @roles=map {Parrot $_} qw(embedding regexen Configure)

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Paul Johnson
On Mon, Oct 28, 2002 at 11:55:24AM -0800, Larry Wall wrote: Well, I don't believe in none since it's really easy to say !any() Does that have any implications for unless? -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Larry Wall
On Mon, 28 Oct 2002, Paul Johnson wrote: : On Mon, Oct 28, 2002 at 11:55:24AM -0800, Larry Wall wrote: : : Well, I don't believe in none since it's really easy to say !any() : : Does that have any implications for unless? No. unless reads well in English. How do your read $a ! $b ! $c? (When

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Michael Lazzaro
On Monday, October 28, 2002, at 01:09 PM, Larry Wall wrote: No. unless reads well in English. How do your read $a ! $b ! $c? nor? Maybe it's $a nor $b? MikeL

  1   2   >