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: labeled if blocks

2002-10-28 Thread Larry Wall
On 27 Oct 2002, Marco Baringer wrote: : why not use - to create a sub which you can return from? : : if $foo - { : ... : return if $bar; : ... : } Except that by the current rule you can only Creturn from something that is declared with the word sub. -{...} is still just a fancy block

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: labeled if blocks

2002-10-28 Thread Austin Hastings
How about leave? leave SURROUNDING | [SURROUNDING]IDENTIFIER [ [result] VALUE-SPEC ]; Aliases: = return - leave sub exit - leave program (or is it thread?) break - leave loop (this is shaky: does it deserve to be here?) last - leave block Extensions (these are WAY!

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: labeled if blocks

2002-10-28 Thread Steve Canfield
From: Larry Wall [EMAIL PROTECTED] last almost works, except it's specific to loops But last also works for anonymous blocks, which aren't loops. (Aren't they? Don't know about you tovarisch, but my anonymous blocks execute just once.) In fact, that's why I asked. I have a lot of code that

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: labeled if blocks

2002-10-28 Thread Brent Dax
Larry Wall: # last almost works, except it's specific # to loops, at least in Perl 5 semantics. I keep thinking of # ret as a little return, but that's mostly a placeholder # in my mind. I've got a lot of those... I don't see why Clast has to work only on loops, or why there can't be an

Re: labeled if blocks

2002-10-28 Thread Larry Wall
On Mon, 28 Oct 2002, Austin Hastings wrote: : How about leave? Right, that brings back some memories. : leave : SURROUNDING | [SURROUNDING]IDENTIFIER : [ [result] VALUE-SPEC ]; : : Aliases: : = : return - leave sub Right. : exit - leave program (or is it thread?) Hmm.

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

Fwd: Re: labeled if blocks

2002-10-28 Thread Austin Hastings
Sorry, forgot to hit reply-all. --- Austin Hastings [EMAIL PROTECTED] wrote: Date: Mon, 28 Oct 2002 12:58:16 -0800 (PST) From: Austin Hastings [EMAIL PROTECTED] Subject: Re: labeled if blocks To: Larry Wall [EMAIL PROTECTED] --- Larry Wall [EMAIL PROTECTED] wrote: On Mon, 28 Oct 2002,

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

Perl6 Operator List, TAKE 4

2002-10-28 Thread Michael Lazzaro
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 wondering if we're going about this wrong way -- perhaps we need to go to more effort to save ^ as xor, and use

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: labeled if blocks

2002-10-28 Thread Angel Faus
And maybe: A bitwise operator is just a logic operator scoped to a set of bits. That's why I can't accept a characterization of ++|+X - bitwise operations on int += +|= +X= ~~|~X - bitwise operations on str ~= ~|=

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: labeled if blocks

2002-10-28 Thread Larry Wall
On Tue, 29 Oct 2002, Angel Faus wrote: : Could we please, please, please have bitwise operators be out of the : core. We expect that they are not going to be used by the average : user, so it looks fair to apply the ultimate negative huffman : enconding: they need to be specially required. : :

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: labeled if blocks

2002-10-28 Thread Me
And that's also why we need a different way of returning from the innermost block (or any labelled block). last almost works, except it's specific to loops, at least in Perl 5 semantics. I keep thinking of ret as a little return, but that's mostly a placeholder in my mind. I've got a lot

Re: labeled if blocks

2002-10-28 Thread Marco Baringer
Larry Wall [EMAIL PROTECTED] writes: On 27 Oct 2002, Marco Baringer wrote: : why not use - to create a sub which you can return from? : : if $foo - { : ... : return if $bar; : ... : } Except that by the current rule you can only Creturn from something that is declared with 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

average perl users? was: labeled if blocks

2002-10-28 Thread David Dyck
On Mon, 28 Oct 2002 at 14:50 -0800, Larry Wall [EMAIL PROTECTED] wrote: On Tue, 29 Oct 2002, Angel Faus wrote: : Could we please, please, please have bitwise operators be out of the : core. We expect that they are not going to be used by the average : user, so it looks fair to apply the

Re: labeled if blocks

2002-10-28 Thread Larry Wall
On 29 Oct 2002, Marco Baringer wrote: : Larry Wall [EMAIL PROTECTED] writes: : : On 27 Oct 2002, Marco Baringer wrote: : : why not use - to create a sub which you can return from? : : : : if $foo - { : : ... : : return if $bar; : : ... : : } : : Except that by the current rule

Re: average perl users? was: labeled if blocks

2002-10-28 Thread Larry Wall
On Mon, 28 Oct 2002, David Dyck wrote: : I admit that I use pack, bitwise operators, as well as 0x constants : in many of my scripts. I'm not sure what Angel means by taking : some of these things out of the core, but if my short perl5 scripts : start to grow to python length I'll have less

RE: average perl users? was: labeled if blocks

2002-10-28 Thread Brent Dax
Larry Wall: # I have historically preferred that approach. Certainly it's # something that could be enforced by a policy file too. An # intro to programming class is likely to have such a policy # file anyway: # # $ perl6 # use CS_101; # if $a | $b { # Prof. Roberts says you

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

Re: labeled if blocks

2002-10-28 Thread Piers Cawley
Larry Wall [EMAIL PROTECTED] writes: We could make return a method as well as a built-in sub. That gives us Loop.return($x) Sub.return($x) Topic.return($x) Thread.return($x) Block.return($x) There.return($x) or return Loop: $x return Sub: $x

Wh[ie]ther Infix Superposition ops

2002-10-28 Thread Piers Cawley
Whilst I don't wish to get Medieval on your collective donkey I must say that I'm really not sure of the utility of the proposed infix superposition ops. I'm a big fan of any/all/one/none, I just think that one(any($a, $b, $c), all($d, $e, $f)) Is a good deal more intention revealing than