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

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

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

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

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

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

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:09 PM,

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 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: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 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?] 8:123

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 a

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 people

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

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

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?] 8:123

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

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 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? Maybe it's $a

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

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.

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 ! $b ! $c? You

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: : But the

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

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

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

2002-10-27 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-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 the same

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,

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

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

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

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 this does: : :

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 there's

Learning curve (was Re: Perl6 Operator List)

2002-10-26 Thread Michael Lazzaro
Chris Dutton wrote: So many operators... Well, this seems a good as time as any to jump in with what's been sticking in my brain for a while now. Last June, Simon C. wrote a little philosophical thing, Half measures all around, which generated the appropriate amount of good discussion. I want

Re: Perl6 Operator List, Take 2

2002-10-26 Thread Simon Cozens
[EMAIL PROTECTED] (Michael Lazzaro) writes: | ! - superpositional all any one (none?) I don't understand this, on several levels. The lowest level on which I don't understand it is that testing whether an array is full of threes: @array 3 makes

Re: Learning curve (was Re: Perl6 Operator List)

2002-10-26 Thread Simon Cozens
[EMAIL PROTECTED] (Michael Lazzaro) writes: But our version of understandable still means a steep, steep learning curve. It's worse than that; for practitioners of many languages, the learning curve has a 180 degree turn. Quick: what are the bitwise operators in Java, JavaScript, C, C++, C#,

Re: Learning curve (was Re: Perl6 Operator List)

2002-10-26 Thread Philippe 'BooK' Bruhat
On Sat, 26 Oct 2002, Michael Lazzaro wrote: So lets have _lots_ of operators, and _lots_ of two-to-four-letter barewords, so long as they each do something Big, or something Universal. And let's locale-ize them, so that non-english-speakers can use 'umu' to mean 'bool', etc. Hey, why the

Re: Perl6 Operator List, Take 2

2002-10-26 Thread Nicholas Clark
On Fri, Oct 25, 2002 at 04:10:31PM -0700, Michael Lazzaro wrote: Here's try #2. Things that are not true operators or have other caveats are marked, where known. LMKA. methods and listops, uncategorized: my our map grep sqrtlogsin cos tan

Re: Perl6 Operator List

2002-10-26 Thread Nicholas Clark
On Sat, Oct 26, 2002 at 10:33:04AM +1000, Damian Conway wrote: Brent Dax wrote: Which would create a superposition of all strings besides the given one, right? (Oh crap, I think I gave Damian an idea... :^) ) H. Maybe Cnone is starting to grow on me. Bwah-ha-ha-ha-hah! ;-) I'm worried.

Re: Perl6 Operator List

2002-10-26 Thread Nicholas Clark
On Sat, Oct 26, 2002 at 01:59:46AM +0200, Paul Johnson wrote: On Fri, Oct 25, 2002 at 06:28:28PM -0400, Miko O'Sullivan wrote: From: Larry Wall [EMAIL PROTECTED] : ? - force to bool context : ! - force to bool context, negate : + - force to numeric context :

Re: Perl6 Operator List, Take 2

2002-10-26 Thread Damian Conway
Simon Cozens wrote: I don't understand this, on several levels. The lowest level on which I don't understand it is that testing whether an array is full of threes: array 3 Err...that's not what that does. What you wrote creates a scalar value that superimposes the scalar values C

Re: Perl6 Operator List

2002-10-26 Thread Damian Conway
Larry mused: Now I'm wondering whether these should be split into: ++|+! - bitwise operations on int += +|= +!= ~~|~! - bitwise operations on str ~= ~|= ~!= I think this is UME (Unnecessary Multiplication of Entities),

Re: Perl6 Operator List, Take 2

2002-10-26 Thread Simon Cozens
[EMAIL PROTECTED] (Damian Conway) writes: Err...that's not what that does. What you wrote creates a scalar value that superimposes the scalar values C \@array and C 3 . To test if an array is full of 3's you'd write: all(@array) == 3 Ah, I see. So (x y) is equivalent to all(x,y) ?

Re: Perl6 Operator List

2002-10-26 Thread Paul Johnson
On Sat, Oct 26, 2002 at 11:24:23AM +0100, Nicholas Clark wrote: On Sat, Oct 26, 2002 at 01:59:46AM +0200, Paul Johnson wrote: On Fri, Oct 25, 2002 at 06:28:28PM -0400, Miko O'Sullivan wrote: From: Larry Wall [EMAIL PROTECTED] : ? - force to bool context : ! - force to

Re: Perl6 Operator List

2002-10-26 Thread Larry Wall
On Sat, 26 Oct 2002, Damian Conway wrote: : Larry mused: : : : Now I'm wondering whether these should be split into: : : ++|+! - bitwise operations on int : += +|= +!= : : ~~|~! - bitwise operations on str : ~= ~|=

Re: Learning curve (was Re: Perl6 Operator List)

2002-10-26 Thread Larry Wall
On 26 Oct 2002, Simon Cozens wrote: : [EMAIL PROTECTED] (Michael Lazzaro) writes: : But our version of understandable still means a steep, steep learning : curve. : : It's worse than that; for practitioners of many languages, the learning : curve has a 180 degree turn. : : Quick: what are the

RE: Perl6 Operator List, Take 2

2002-10-26 Thread fearcadi
References: [EMAIL PROTECTED] Questions : * are stream separators ; | in the for loop - operators in the usual sence ( like , ) or they are pure grammar ? * is prototype of the subrotine more regexp then expression ? to what extent it is a regexp ? where it is stored , can we inspect it

Re: Perl6 Operator List

2002-10-26 Thread Michael Lazzaro
Larry Wall wrote: : Now I'm wondering whether these should be split into: : : ++|+! - bitwise operations on int : += +|= +!= : : ~~|~! - bitwise operations on str : ~= ~|= ~!= Well, wait, these might have some

RE: Perl6 Operator List, Take 2

2002-10-26 Thread Larry Wall
On Sat, 26 Oct 2002, fearcadi wrote: : * are stream separators ; | in the for loop - operators : in the usual sence ( like , ) or they are pure grammar ? If ;, probably operator, though behaving a bit differently on the left of - than on the right, since the right is essentially a signature.

RE: Perl6 Operator List

2002-10-26 Thread fearcadi
In-reply-to: [EMAIL PROTECTED] my Pet @list = qm : name type breed { fido dog collie fluffy cat siamese }; That's still a lot easier to type than some of the alternatives I've had to do for larger structures. why ? my @attrs=qw{ name type breed } ;

Re: Perl6 Operator List

2002-10-26 Thread Larry Wall
On Sat, 26 Oct 2002, Michael Lazzaro wrote: : Date: Sat, 26 Oct 2002 10:57:01 -0700 : From: Michael Lazzaro [EMAIL PROTECTED] : To: Larry Wall [EMAIL PROTECTED] : Cc: Damian Conway [EMAIL PROTECTED], : [EMAIL PROTECTED] [EMAIL PROTECTED] : Subject: Re: Perl6 Operator List : : Larry Wall

RE: Perl6 Operator List

2002-10-26 Thread fearcadi
In-reply-to: [EMAIL PROTECTED] my Pet @list = qm : name type breed { fido dog collie fluffy cat siamese }; That's still a lot easier to type than some of the alternatives I've had to do for larger structures. on the second thought : my @attrs= ; my Pet

Re: Perl6 Operator List

2002-10-26 Thread Larry Wall
On Sat, 26 Oct 2002, Damian Conway wrote: : I suspect disjunctive superpositions will get a great deal : of use as sets, and so the ability to add an element to an : existing set: : : $set |= $new_element; : : might be appreciated. But it's no big thing. Or maybe it is a big thing.

RE: Perl6 Operator List

2002-10-26 Thread Larry Wall
On Sat, 26 Oct 2002, fearcadi wrote: : In-reply-to: [EMAIL PROTECTED] : : : my Pet @list = qm : name type breed { : fido dog collie : fluffy cat siamese : }; : : That's still a lot easier to type than some of the alternatives I've : had to do for larger

Re: Perl6 Operator List

2002-10-26 Thread Larry Wall
On Sat, 26 Oct 2002, Larry Wall wrote: : $union{a} # A | ant Of course, the interesting question at this point is what $union{a} = axiomatic; does if there's more than one hash in the superposition. Larry

Re: Learning curve (was Re: Perl6 Operator List)

2002-10-26 Thread Smylers
Michael Lazzaro wrote: Here's my own argument for using like/unlike, and none, and a bunch of other english-sounding things we haven't even talked about yet. ... I don't think we've put much of a dent in the readability complaints ... I think we need to care about these concerns a _lot_

Re: Perl6 Operator List, Take 2

2002-10-26 Thread Smylers
Damian Conway wrote: ~~ !~ - smartmatch and/or perl5 '=~' (?) like unlike- (tentative names) Do we *really* need the alphabetic synonyms here? Me no like! I agree with Damian. Clike wouldn't've been a bad name for the Perl 5 C=~ operator;

Re: Perl6 Operator List

2002-10-26 Thread Luke Palmer
Date: Sat, 26 Oct 2002 09:16:41 -0700 (PDT) From: Larry Wall [EMAIL PROTECTED] We're also missing the actual C operators that are guaranteed to return 0 or 1: $x ? $y # C's $x $y $x ?| $y # C's $x || $y $x ?! $y # C's, er, !!$x ^ !!$y And we need those... why? Wouldn't:

Re: Perl6 Operator List

2002-10-26 Thread Smylers
Larry Wall wrote: I think we also need to fix this: print (length $a), \n; The problem with Perl 5's rule, If it looks like a function, it *is* a function, is that the above doesn't actually look like a function to most people. Yup, definitely. This is one of the things that is

Re: Learning curve (was Re: Perl6 Operator List)

2002-10-26 Thread Paul Johnson
On Sat, Oct 26, 2002 at 09:23:19PM -, Smylers wrote: Michael Lazzaro wrote: Here's my own argument for using like/unlike, and none, and a bunch of other english-sounding things we haven't even talked about yet. ... I don't think we've put much of a dent in the readability

Re: Perl6 Operator List, Take 2

2002-10-26 Thread Damian Conway
Simon Cozens wrote: Ah, I see. So (x y) is equivalent to all(x,y) ? Yes. Cany, Call, and Cone are the n-ary prefix versions of binary infix C|, C, C! respectively. One might imagine others of this ilk too, perhaps: BinaryN-ary +sum *prod

Re: Perl6 Operator List

2002-10-26 Thread Luke Palmer
You know, \ and friends as xor is appealing to me. There's no problem with \\ or \=, so that works. It's got nothing to do with references, but unary | has nothing to do with anything. Plus, it's parallel (er, perpendicular) to // as err, being logical and all. Just to clarify: \

  1   2   >