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 d

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

2002-11-01 Thread Larry Wall
On Fri, Nov 01, 2002 at 11:01:34AM -0700, John Williams wrote: > On Thu, 31 Oct 2002, Larry Wall wrote: > > > On Fri, 1 Nov 2002 [EMAIL PROTECTED] wrote: > > : does it mean that *all* postfix operators have to be "attached" > > : without space to their operand or used with space eater modifyer > >

Re: Perl6 Operator List

2002-11-01 Thread Luke Palmer
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > Date: Fri, 1 Nov 2002 11:01:34 -0700 (MST) > From: John Williams <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > X-OriginalArrivalTime: 01 Nov 2002 18:01:34.0398 (UTC) FILETIME=[B70BCDE0:01C281D0] > X-SMTPD: qpsmtpd/0.12

Re: Perl6 Operator List

2002-11-01 Thread John Williams
On Thu, 31 Oct 2002, Larry Wall wrote: > On Fri, 1 Nov 2002 [EMAIL PROTECTED] wrote: > : does it mean that *all* postfix operators have to be "attached" > : without space to their operand or used with space eater modifyer > : > : or > : > : only those for which parser ( or we ) knows that they may

Re: Perl6 Operator List

2002-10-31 Thread Larry Wall
On Fri, 1 Nov 2002 [EMAIL PROTECTED] wrote: : does it mean that *all* postfix operators have to be "attached" : without space to their operand or used with space eater modifyer : : or : : only those for which parser ( or we ) knows that they may be confused : with binary op or term ? I think

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, whic

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

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: 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 propose

Re: Perl6 Operator List, Damian's take

2002-10-30 Thread Larry Wall
On Thu, 31 Oct 2002, Damian Conway wrote: : 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

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 bein

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: : : : ($a = 0) [+=] @b; # sum : ($a = 1) [*=] @b; # product : ($a ='') [~=] @b; # cat That's

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-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

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 superpositio

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 o

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 g

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 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: 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 t

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 s

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 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

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread fearcadi
Michael Lazzaro writes: > > Any ideas on what > > { $^a op $^b } > > would become? > > MikeL maybe { $_a op $_b } { _ op _ } and we have simple ( ? ) rules to distinguish it from "space-eater" _ * _ surrounded by spaces is placeholder if term is ex

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, 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 val

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 s

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 Luke Palmer
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > Date: Tue, 29 Oct 2002 11:36:20 -0800 > Cc: [EMAIL PROTECTED] > From: Michael Lazzaro <[EMAIL PROTECTED]> > X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/ > > > On Tuesday, October 29, 2002, at 11:21 AM, Damian Conway wrote: >

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 Uri Guttman
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes: DC> Oh boy, I just *hate* the idea of C for xor. DC> Hate it, hate it, hate it! Yuck, yuck, yuck! tell us how you _really_ feel! :-) DC> My personal favorite solution is to use square brackets (for their dual DC> array and indexing

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, 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

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

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Jonathan Scott Duff
On Tue, Oct 29, 2002 at 03:58:57PM +1100, Damian Conway 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 c

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Damian Conway
Scott Duff asked: How do we get at the eigenstates of a superposition? We obviously need another operator! 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

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Richard Nuttall
explicit radix specifications for integers: 0123- decimal 2:0110- binary [also b:0110?] 8:123 - octal [also o:123?] 16:123- hex[also h:123?] 256:192.168.1.0 - base 256 (...etc...) Could this be used to do explicit

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Austin Hastings
Didn't I see an operator list a while back that featured sign-extending shift? If not, I apologize. But on the other hand, we could make a ~>>> operator that was a "case-preserving indent" :-) =Austin --- Larry Wall <[EMAIL PROTECTED]> wrote: > On Mon, 28 Oct 2002, Austin Hastings wrote: > : B

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Simon Cozens
[EMAIL PROTECTED] (Larry Wall) writes: > : 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 ! $

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Larry Wall
On Mon, 28 Oct 2002, Austin Hastings wrote: : But the presence of the >>> operator Er, *what* >>> operator? : (and speaking of low-frequency operators, what about bitwise rotation? : Will that be the (( and )) operators?) I think those will be rejected by anyone who uses either vi or emacs. Seri

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Dan Sugalski
At 12:37 AM +0200 10/29/02, Markus Laire wrote: On 28 Oct 2002 at 16:42, Dan Sugalski wrote: At 4:39 PM -0500 10/28/02, brian wheeler wrote: >On Mon, 2002-10-28 at 16:25, Michael Lazzaro wrote: > >> explicit radix specifications for integers: >> 0123- decimal >> 2:01

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Graham Barr
On Mon, Oct 28, 2002 at 03:30:54PM -0600, Jonathan Scott Duff wrote: > On Mon, Oct 28, 2002 at 01:19:05PM -0800, Michael Lazzaro wrote: > > > > 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"? M

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Austin Hastings
I think that endian issues are abstracted from literals. The place it's going to be an issue is the specifiers for pack/unpack or whatever replaces them. But the presence of the >>> operator (and speaking of low-frequency operators, what about bitwise rotation? Will that be the (( and )) operators

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Mark J. Reed
> What about specifying endiannes also, or would that be too low-level > to even consider? Currently I don't have any examples for where it > might even be used... Literals are the wrong place to put that; they represent values, not storage. Endianness should generally not be visible at the lan

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Markus Laire
On 28 Oct 2002 at 16:42, Dan Sugalski wrote: > At 4:39 PM -0500 10/28/02, brian wheeler wrote: > >On Mon, 2002-10-28 at 16:25, Michael Lazzaro wrote: > > > >> explicit radix specifications for integers: > >> 0123- decimal > >> 2:0110- binary [also b:0110?] >

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Dan Sugalski
At 2:21 PM -0800 10/28/02, Michael Lazzaro wrote: Dan Sugalski wrote: While we're at it, maybe we can add in 0rMCM to allow roman numerals too... OK, see, the sad thing is that I really have no idea whether you're joking or not. That's how wiggy this thread has gotten. I am joking--it's defi

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Michael Lazzaro
On Monday, October 28, 2002, at 01:57 PM, Austin Hastings wrote: If we're going to kill the alternate radix literals, better to do something like hex:123 or hex "123". I'd hate to try to comprehend $a = -x:123; more than a week from now. That x:123 part was my placeholder -- my bad, I forgot th

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Mark J. Reed
On 2002-10-28 at 16:54:26, Dan Sugalski wrote: > >The post that started this thread was a complaint about > >leading 0 meaning octal - which is counterintuitive to everyone the > >first time they come across it in C or Perl or Java or wherever. > > That's not entirely true. Granted the set of the

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Austin Hastings
0x14 is questionably defined. 0X14 currently is an expression whose value is 14. If we're going to kill the alternate radix literals, better to do something like hex:123 or hex "123". I'd hate to try to comprehend $a = -x:123; more than a week from now. (Is it a negative hexadecimal number, or

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread brian wheeler
On Mon, 2002-10-28 at 16:44, Mark J. Reed wrote: > On 2002-10-28 at 16:39:10, brian wheeler wrote: > > [The below is actually from Larry, not Michael] > > > explicit radix specifications for integers: > > > 0123- decimal > > >2:0110- binary [also b:0110?] > > >

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Dan Sugalski
At 4:44 PM -0500 10/28/02, Mark J. Reed wrote: On 2002-10-28 at 16:39:10, brian wheeler wrote: [The below is actually from Larry, not Michael] > explicit radix specifications for integers: > 0123- decimal >2:0110- binary [also b:0110?] >8:123

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Mark J. Reed
On 2002-10-28 at 16:39:10, brian wheeler wrote: > [The below is actually from Larry, not Michael] > > explicit radix specifications for integers: > > 0123- decimal > >2:0110- binary [also b:0110?] > >8:123 - octal [also o:123?] > >16:123

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Dan Sugalski
At 4:39 PM -0500 10/28/02, brian wheeler wrote: On Mon, 2002-10-28 at 16:25, Michael Lazzaro wrote: explicit radix specifications for integers: 0123- decimal 2:0110- binary [also b:0110?] 8:123 - octal [also o:123?] 16:123

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Austin Hastings
If you guys start trying to reserve punctuation for XNOR, the next perl cruise is going to be through the Bermuda Triangle... =Austin --- Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > On Mon, Oct 28, 2002 at 01:19:05PM -0800, Michael Lazzaro wrote: > > > > On Monday, October 28, 2002, at 01:0

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread brian wheeler
On Mon, 2002-10-28 at 16:25, Michael Lazzaro wrote: > explicit radix specifications for integers: > 0123- decimal >2:0110- binary [also b:0110?] >8:123 - octal [also o:123?] >16:123- hex[also h:123?] >256:192.168

Re: Perl6 Operator List, TAKE 4

2002-10-28 Thread Austin Hastings
$accumulator += +X10; Looks like hex arithmetic. =Austin --- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > Okay, take 4, with 'X' meaning xor, so you can see it in context. I > warn ya, I'm gonna keep doing this until there's a "Final" version, > for > some value of "Final". ;-) Again, I

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Jonathan Scott Duff
On Mon, Oct 28, 2002 at 01:19:05PM -0800, Michael Lazzaro wrote: > > 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"? oh no! You've said "nor", so now I have have to ask abou

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

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?

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 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 Config

Re: Perl6 Operator List, Take 3

2002-10-28 Thread Jonathan Scott Duff
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(), but > exclusive-or can certainly use the punctuation. Or, actually, I'm currently > thinking, non-punctuation. I kept thinking to myself that it's a shame > that x

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 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 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 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 punc

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 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 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 beca

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

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: Perl6 Operator List

2002-10-27 Thread Michael Lazzaro
Simon Cozens wrote: > I just see code like > ~~ sub (@x) { map { _ => _ } @attrs x Inf ^, @x } > and get the screaming heaves. I agree, it's like the punchline to a perl-haters joke. We're supposed to explain _that_ to people? :-/ NORMAL people? 8-/ And not get punched in the face? Maybe t

RE: Perl6 Operator List, Take 2

2002-10-27 Thread fearcadi
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 only one argument. : : That's right. But th

Re: Radix (was Re: Perl6 Operator List)

2002-10-27 Thread Mark J. Reed
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 your colon below), and I seem to recall that sy

Re: Perl6 Operator List

2002-10-27 Thread Smylers
Simon Cozens wrote: > However hard it may be to believe, I'm not just saying this to be > snarky; I am excited by Perl 6 and want to see good things come out of > it. I just want to make sure that the various creative processes are > kept in check. :) Simon, please keep doing this! I think it's

Re: Perl6 Operator List

2002-10-27 Thread Smylers
Larry Wall wrote: > On 26 Oct 2002, Smylers wrote: > > : Larry Wall wrote: > : > : > print(length $a), "\n"; > : > print (length $a), "\n"; > : > : Those look to me like they should do the same thing as each other. > > Sorry, they don't look that way to me. Having slept on it, I'm not

Re: Perl6 Operator List

2002-10-27 Thread Simon Cozens
[EMAIL PROTECTED] (Larry Wall) writes: > : I hope you're not buying any of this crap > : about Perl 6 being more "regular" or removing the "inconsistencies" of > : Perl 5. It simply isn't true. > > Hey, sounds like it'd make a great column. Go for it. I'll expect > a little more than an argumen

Re: XOR vs. Hyper (was Re: Perl6 Operator List)

2002-10-27 Thread Luke Palmer
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > Date: Sat, 26 Oct 2002 23:01:31 -0700 > From: Michael Lazzaro <[EMAIL PROTECTED]> > X-Accept-Language: en,pdf > Cc: Damian Conway <[EMAIL PROTECTED]>, > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > X-SMTPD: qpsmtpd/0.12-dev, http://develo

Re: Perl6 Operator List

2002-10-27 Thread Piers Cawley
Michael Lazzaro <[EMAIL PROTECTED]> writes: > John Siracusa wrote: >> Larry's just thinking out loud, right? > > Yes, and so is everyone else. Most posts here, including Larry's, > are stream-of-conciousness. Heck, in one of the last ones I swear > there were, what, 6 or 7 possible ways to say t

XOR vs. Hyper (was Re: Perl6 Operator List)

2002-10-26 Thread Michael Lazzaro
FWIW, if people are really eager to keep ^ for xor (I don't think anything's clicking great as a replacement), we could of course switch hyper to ~. That would give us, in part: ? ! + - _ # unary prefixes + - * / % ** x xx# binary +=-=

RE: Perl6 Operator List

2002-10-26 Thread Brent Dax
Larry Wall: # Besides, Windows programmers would continually be writing # # $a / $b *rolls eyes* (Yes, I know that's a joke. (It is, isn't it? :^) )) --Brent Dax <[EMAIL PROTECTED]>, Windows Perl and Parrot hacker @roles=map {"Parrot $_"} qw(embedding regexen Configure) Wire telegraph is

Re: Perl6 Operator List

2002-10-26 Thread Michael Lazzaro
John Siracusa wrote: > Larry's just thinking out loud, right? Yes, and so is everyone else. Most posts here, including Larry's, are stream-of-conciousness. Heck, in one of the last ones I swear there were, what, 6 or 7 possible ways to say the same "binary op" things. 90% of everything proposed

Re: Perl6 Operator List

2002-10-26 Thread John Siracusa
On 10/26/02 8:18 PM, Larry Wall wrote: > On 27 Oct 2002, Simon Cozens wrote: > : To the innocent bystanders, > > I'm afraid you're preaching to the null set here. :-) I don't know whether to be flattered that you think I'm not just a bystander, or insulted that you think I'm not innocent ;) -Jo

RE: Perl6 Operator List

2002-10-26 Thread fearcadi
but what about placeholders ? arcadi .

Re: Perl6 Operator List

2002-10-26 Thread John Siracusa
On 10/26/02 7:24 PM, Simon Cozens wrote: > To the innocent bystanders, I hope you're not buying any of this crap > about Perl 6 being more "regular" or removing the "inconsistencies" of > Perl 5. It simply isn't true. I was buying that right up until about a week or two ago when Larry emerged fro

RE: Perl6 Operator List

2002-10-26 Thread fearcadi
_ as space eating grammar rule . just beautifull! this is in harmony with $x = 123_567 ; and we can use it as explicite space $x =_$a++_+_++$a ; or even as separator in *ugly* looking operators @x ^_~~ s/.../.../ arcadi

Radix (was Re: Perl6 Operator List)

2002-10-26 Thread Michael Lazzaro
> Larry wrote: > > If one were going to generalize that, one would be tempted to go the Ada > > route of specifying the radix explicitly: > > > > 0123# decimal > > 2:0110 # binary > > 8:123 # octal > > 16:123 # hex > > 256:192.16

RE: Perl6 Operator List

2002-10-26 Thread fearcadi
> I think it would be cool if there were a way to pull the arguments out > to the front, because then we really could write in Japanese word order: > > @args wa $*OUT de print yo! > > : also , is here the following DWIMmery in place > : > : sub pairs ( $x,$y ){ $x => $y } ; > : sub tripl

Re: Perl6 Operator List

2002-10-26 Thread Larry Wall
On 27 Oct 2002, Simon Cozens wrote: : [EMAIL PROTECTED] (Larry Wall) writes: : > : Distinguishing them sounds scary, much scarier than having C<$a _ 1> : > : being different from C<$a_1>. : > : > But we already have exactly the same distinction with : > : > $foo{ $bar } : > $foo { $bar }

RE: Perl6 Operator List

2002-10-26 Thread Larry Wall
On Sun, 27 Oct 2002 [EMAIL PROTECTED] wrote: : : my @attrs = qw{ name type breed } : : my Pet @list=qw{ : :fido dog collie : :fluffy cat siamese : : } ~~ sub (@x) { map { _ => _ } @attrs x Inf ^, @x } : :~~ sub (@x) { map { {

Re: Perl6 Operator List

2002-10-26 Thread Damian Conway
Larry wrote: : H. I quite like that too. :-) Except what about unary xor, i.e. 1's complement? I was carefully ignoring that. ;-) Besides, Windows programmers would continually be writing $a / $b and wonder why they don't get one($a,$b); : > Also, a question about superpos

Re: Perl6 Operator List

2002-10-26 Thread Larry Wall
On Sun, 27 Oct 2002, Damian Conway wrote: : Luke Palmer wrote: : : > You know, \ and friends as xor is appealing to me. : : H. I quite like that too. :-) Except what about unary xor, i.e. 1's complement? Besides, Windows programmers would continually be writing $a / $b and wonder why

Re: Perl6 Operator List

2002-10-26 Thread Simon Cozens
[EMAIL PROTECTED] (Larry Wall) writes: > : Distinguishing them sounds scary, much scarier than having C<$a _ 1> > : being different from C<$a_1>. > > But we already have exactly the same distinction with > > $foo{ $bar } > $foo { $bar } > > not to mention > > $a ?? $foo::bar > $

RE: Perl6 Operator List

2002-10-26 Thread fearcadi
Larry Wall writes: > sub term:qa (str $quotestr) is parsed /qa/ { ... } Michael Lazzaro writes : > my Pet @list = qm : << name type breed >> { > fido dog collie > fluffy cat siamese > }; doesnt it have to be my Pet @list = qm << name type breed >> : { ...

Re: Perl6 Operator List

2002-10-26 Thread Larry Wall
On 26 Oct 2002, Smylers wrote: : Larry Wall wrote: : > I'm thinking we need a rule that says you can't put a space before a : > dereferencing (...), : : I'm concerned that making this sensitive to whitespace doesn't simplify : things. : : > print(length $a), "\n"; : > print (length $a), "

Re: Perl6 Operator List

2002-10-26 Thread Damian Conway
Larry wrote: And you get the C || and && for free Yeah, but it's the same sense of "free" in which spam is "free". You pay for it in other ways. But distinguishing int ops from str ops fixes the really nasty rule in Perl 5 that says "If this value (these values) has (have) ever been used in

Re: Perl6 Operator List, Take 2

2002-10-26 Thread Damian Conway
fearcadi wrote: * do we have have an axcess to the signature of the subroutine if we have been passed only its reference . that is , for exemple , can process( @x , &step ) guess how many arguments &step expects ? I'd expect that Code objects would have a C or C method: &subnam

Re: Perl6 Operator List

2002-10-26 Thread Damian Conway
Luke Palmer wrote: You know, \ and friends as xor is appealing to me. H. I quite like that too. :-) Also, a question about superpositions: Is $x = 1 | 2 | 3 equivalent to $x = 1 | 2 $x |= 3 No. The precedence is wrong. or $x = (1 | 2) | 3 Yes. or is there a

RE: Perl6 Operator List

2002-10-26 Thread fearcadi
: my @attrs = qw{ name type breed } : my Pet @list=qw{ :fido dog collie :fluffy cat siamese : } ~~ sub (@x) { map { _ => _ } @attrs x Inf ^, @x } :~~ sub (@x) { map { { _ , _ , _ } } @x ; by the way , ~~ seems to work like u

  1   2   >