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 wan
Deborah Pickett wrote:
Which looks better?
if ($a == 1|2|3 || $b eq "x"|"y"|"z")
or
if ($a == 1||2||3 | $b eq "x"||"y"||"z"
?
No question thatthe former works better. Lower precedence operators govern
larger chunks, and so should themselves be larger (i.e. more easily detected).
I just n
[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
[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#
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
Simon Cozens <[EMAIL PROTECTED]> writes:
> [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
[EMAIL PROTECTED] (Piers Cawley) writes:
> It rather depends on how common the Superposition operators turn out
> to be doesn't it?
No. No, it doesn't.
--
heh, yeah, but Aretha could be reading out /etc/services and
kick just so much ass :)
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
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 C is starting to grow on me. Bwah-ha-ha-ha-hah! >;-)
I'm worrie
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 c
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< \@
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),
[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
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
> > > > :
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
: > ~&=
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 t
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
Larry Wall wrote:
> : > Now I'm wondering whether these should be split into:
> : >
> : > +&+|+! - bitwise operations on int
> : > +&= +|= +!=
> : >
> : > ~&~|~! - bitwise operations on str
> : > ~&= ~|= ~!=
Well, wait, these mi
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
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
At 9:54 AM -0700 10/25/02, Larry Wall wrote:
Suppose you have a system in which all farm animals are classified
into the same category, and distinguished by one letter in their
name. All farm animals begin with, say, "snarfu". So we get: ...
A similar problem exists with street names. Some ho
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
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 @at
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. People
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
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
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
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. C wouldn't've been a bad name for the Perl 5
C<=~> operato
> 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?
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 t
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 "re
Simon Cozens wrote:
Ah, I see. So (x & y) is equivalent to all(x,y) ?
Yes. C, C, and C 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
~
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:
\ superposi
Paul Johnson wrote:
> On Sat, Oct 26, 2002 at 09:23:19PM -, Smylers wrote:
>
> > I believe that having English aliases would make matters worse.
>
> I agree, in general. I was planning on writing something about this.
> Now I don't have to :-)
Pleased to be of help!
> The only thing I wou
: 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
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
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
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
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), "
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 >> : { ...
[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
> $
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
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
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 { {
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 }
> 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
> 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
Will Perl6 have labeled if blocks? Like this:
BLAH:
if ($foo) {
...
last BLAH if $bar;
...
}
_
Surf the Web without missing calls! Get MSN Broadband.
http://resourcecenter.msn.com/access/plans/freeactivation.asp
_ 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
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
but what about placeholders ?
arcadi .
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
Smylers wrote:
> This is only objecting to having English operators as synonyms for
> symbolic ones. None of the above would apply if where English forms
> were used they were to be the _only_ forms, with no symbolic
> equivalents.
Yes, I think we're basically saying the same thing, but in differ
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
On Sat, 26 Oct 2002, Steve Canfield wrote:
: Will Perl6 have labeled if blocks? Like this:
:
: BLAH:
: if ($foo) {
: ...
: last BLAH if $bar;
: ...
: }
I don't see why we need it offhand. But we might well have something
that returns out of the innermost {...} anyway, so yo
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
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
+=-=
--
On Sat, 26 Oct 2002 21:02:20
Larry Wall wrote:
>On Sat, 26 Oct 2002, Steve Canfield wrote:
>: Will Perl6 have labeled if blocks? Like this:
>:
>: BLAH:
>: if ($foo) {
>: ...
>: last BLAH if $bar;
>: ...
>: }
>
>I don't see why we need it offhand. But we might well h
58 matches
Mail list logo