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
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
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
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
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
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!
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
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
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
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
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.
| \
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
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.
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
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)
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
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,
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
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
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
$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
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
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,
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
~= ~|=
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
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
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
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
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
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
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
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
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
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
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?)
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.
:
:
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
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
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.
[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
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
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
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
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
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
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
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
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
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
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
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
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
52 matches
Mail list logo