. But keep in mind, these are draft documents
on how things should work. We have the opportunity to fix our mistakes
before we cast them in stone and I fully believe that we will.
This message of optimism brought to you by the
future-perl-6-users-society. :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
d be right now.
Hrm. I think it must be 8. Since foo3() flattens it's parameters, we
get this:
foo3(1, 2, 3, [1,2,3], [1,2,3], 1, 2, 3);
and since the two [1,2,3] are scalar things, we have 8 scalar things
in our list. Splat doesn't "look inside" the thing it flatt
On Tue, Sep 24, 2002 at 12:14:10PM -0400, Trey Harris wrote:
> In a message dated Tue, 24 Sep 2002, Jonathan Scott Duff writes:
>
> > On Tue, Sep 24, 2002 at 11:14:04AM -0400, Aaron Sherman wrote:
> > > Again, we're wading into the waters of over
t constructors? If so, then why wouldn't +$b == 3?
$a = 10; $b = 7,6,5;
$c = $a + $b; # what happens here? Is $c == 28?
Anyway, this is most bizarre. My little perl 5 brain can't intuit.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
assertion:
/+/
Although I don't know what that means exactly. Does it match 5
characters at a time that aren't "union" or does it match one
character at a time as long as the string "union" isn't matched at
that point?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
> "protected" vs. "public", or just private/public? (In other words,
> does "private" permit access by subclasses?) Not recommending it, just
> wondering if anyone thinks we need it.)
I don't think we should be actively reproducing C++'s mistakes :-)
With the constructs shown so far, I can guess that it should be
possible for someone to implement "protected" if they wanted it.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
s.
> * Does this make it harder to write overloaded bitwise ops for your
> classes?
No harder than it was before especially given that you can warp the
syntax however you please.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
method .Wag () {...}
> :
> : to match?
>
> Yes, that's part of it, presuming you actually meant:
>
> method .snout () {...}
Actually, I think he meant
method &.Wag () { ... }
"Attribute declarations have their dots, why not methods?" or
something to that effect.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ion
rather than an error.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
e I
expect we should be able to define a policy for what to do in these
situations.
use Policy DivideByZero => Nan;
use Policy DivideByZero => Inf;
use Policy DivideByZero => DivideByZeroException;
I'm sure someone else can pick a better syntax than I.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
whole crop of unanticipated bit operators might come
into play.
> I like the notion that binary ! means that the two sides are sharing
> one "not". That's the definition of XOR in a nutshell.
>
> I also like the idea that ~ is entirely freed up for some other
> nefarious use.
Neat x 2
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ere a reason I to? Or should I not go
> there?
Off hand, it sounds expensive. I don't see a way to only let the people
who use it incur the penalty, but my vision isn't the best in the world.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
/bar/); # perform subst, assign result to $str2
>$str ~= /foo/bar/; # perform subst, assign result to $str
I like it even though the naked ~ always makes me think of awk.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
f \.
Does xor really need the punctuation? Does xor really need to be a
primitive?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
e could go away if could just count the
eigenstates.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
nce xor
^+X $a# hyper int complement
^~X $a# hyper str complement
Sometimes when I look at stuff like this I start to Cozenify and ask
myself "what language is this again?"
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
oh no! You've said "nor", so now I have have to ask about "nand" ...
and the next thing you know perl takes over the world of circuit
design. :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
values as well, in which cases it would just return a list containing
> the value itself.
Sure, but I'd leave the name "eigenstates" just so the casual
programmer knows they're dealing with something from another
universe if they happen to run across it :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
Perl is stepping away from being a direct derivative of C;
> rather, a derivative of Perl. And it doesn't seem that the bitwise
> ops are used enough anymore to get a single character. If they get a
> single character, surely =~ (~~) should have one.
I agree.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
n't really something new and
amazing, but something old and comfortable but with a funny name and
more power.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
t; operators outside the "collapsing" dynamics they allow.
I like the eigen- prefix. It adds to the unique flavor of perl jargon
(where else will you see the term "sigil" bandied about?). If we called
yadda*3 "gedanken code" that wouldn't bother me either. :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Tue, Oct 29, 2002 at 11:12:28AM -0800, Brian Ingerson wrote:
> On 29/10/02 09:58 -0800, Larry Wall wrote:
> > On Tue, 29 Oct 2002, Jonathan Scott Duff wrote:
> > : On Tue, Oct 29, 2002 at 10:13:39AM +0200, Markus Laire wrote:
> >
> > So I would look favorably o
ble
"flexops" (unless someone wants to take a stab at relating
superpositions to tree people :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
(correct, if that's WYM)
That's how I would write it if that's what I meant.
> meaning that (1..10)-1 almost always does The Wrong Thing(!)
Indeed.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
nd disjunctions.
The only thing this inspires in my brain is Schoolhouse Rock
flashbacks.
o/~ Conjuction Junction, what's your function? o/~
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
bably want it to return undef or something.
Perhaps where you have "die" there should be something like
$src.collapse or maybe just "return undef".
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
c[1], ...) ???
@a = $b[..]@c # @a = ($b..$c[0], $b..$c[1], ...) ???
@a = @b[..]$c # @a = ($b[0]..$c, $b[1]..$c, ...) ???
I know that this stuff probably seems obvious to everyone, but I'd
rather have it explicit just in case :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Oct 30, 2002 at 11:26:01AM -0500, Buddha Buck wrote:
> How would you parse:
>
> @a = @b[[5]];
>
> (My intent: for @a; @b -> $x is rw; $y { $x = $y[5] }; # I think... )
I'd write that as @a [=] @b[5];
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Oct 30, 2002 at 04:03:55PM +, Piers Cawley wrote:
> Jonathan Scott Duff <[EMAIL PROTECTED]> writes:
> > Hey, that's neat. Although it looks like it returns the $src when there
> > isn't a path. You probably want it to return undef or something.
>
&
On Wed, Oct 30, 2002 at 09:13:02AM -0800, Austin Hastings wrote:
> --- Jonathan Scott Duff <[EMAIL PROTECTED]> wrote:
> > Maybe we've gone over this before but, if so, I don't remember ...
> >
> > On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michae
t form. It overloads square
> brackets too heavily.
@a x+ @b
@a `+ @b
@a ^+ @b# I like this one best ;-)
if we did go back to using ^ for hyper I have no clue what to do about
xor. I'd suggest % but I use the modulus too much.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ltaneously loop over @b, aliasing its elements to $z (which is r)."
>
> Suggested:for @a -> $x, $y> __ @b -> $z> { ...stuff... };
Just as a data point, I find yours harder to read.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
on't think that "non-discrete ranges" is what you mean. Perhaps
you just want ranges whose step size is something other than 1
(1.9 .. 2.1 : 0.1) + (5..7) * (72.49 .. 72.51 : 0.01)
?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ee = &take.assuming(n=>3);
>
> for three(@x), three(@y), three($z) -> $x, $y, $z { ... }
Or if we generalized zip() a little:
for weave(@a,2,@b,1) -> $x,$y,$z { ... }
Which would take 2 elements from @a, and one from @b, until both
arrays were exhausted.
I'm just casting for alternatives to the punctuative versions in case
I hit something that's really good :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
only
recourse to use the "named" versions? Or will there be some sort of
digraph/trigraph/whatever sequence that always gives us the operator
we need? Something like \x[263a] but in regular code and not just
quote-ish contexts:
$campers = $a \x[263a] $b # make $a and
ions" from python. I've used the concept in
other languages as well but never was it named.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Nov 06, 2002 at 12:54:12PM -0500, Mark J. Reed wrote:
>
> On 2002-11-06 at 11:43:20, Jonathan Scott Duff wrote:
> >
> > Will there be some shorter-hand way to say these?
> >
> > @a = @grades[grep $_ >= 90, @grades];
> > @b = @grades[g
s the map of the onion and its associated
documentation, I don't know. It should be a small group of people
(perhaps only one) though. Right now, I guess it's just Allison.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Nov 06, 2002 at 11:36:50AM -0800, Larry Wall wrote:
> You know, guys, I already discussed this one in A4 or thereabouts.
> It's the use of an explicit boolean operator as a subscript that
> triggers selection.
I thought so, but I couldn't find it.
thanks,
-Scott
--
s.
>
> I thought:
>
> 'attributes' :Perl5 == 'properites' isa Perl6
Yeah. Where the Apocalyses and Exegeses say "attributes" they are
referring to data members of an object:
class Foo {
has $.bar is friendly;
}
$.bar is an attr
t; > > is more appropriate.
> >
> > We're looking for a word that tersely expresses
>has_no_side_effects_and_can_safely_have_its_results_cached_based_on_parameter_types_and_values_and_calling_context
> ?
>
> The functional programmers will tell you that word would be "pure".
I like "memoize" only because perl has made me used to the term.
But "pure" works too.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
one of
> the "when" clauses comes up true, it increments truecount; whenever one comes
> up false, it increments $falsecount. The blocks below the given get evaluated
> under the following conditions
>
> all: $falsecount == 0
> any: $truecount > 0
> some: $falsecount > 0
> none: $truecount == 0
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
So ... what are the email addresses of your wife's various family
members so that we may ask them to play the appropriate games? ;-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
a really good argument for requiring
the parentheses.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Tue, Dec 10, 2002 at 01:17:22PM -0800, Brent Dax wrote:
> Jonathan Scott Duff:
> # > Where we can see *at runtime* that $quux is too many
> # arguments, we can
> # > just append it to the end of bar()'s return value. (This
> # would only
> # > happe
st disambiguating rule is to require the
parentheses on methods.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
x27;t need parentheses except in the case that
you're doing something unusual" or "you always need parentheses"
Surely the latter.
It seems to me that requiring the parens will cause less confusion in
the long run. But, I'm just waiting to see what brilliant ideas Larr
hat can't work as methods of the list, unless we're wildly
> > redefining how lists work, which I don't think we're going to do.
>
> I don't know enough to see why this is a problem. Can you explain it?
So, the above would be written a little punctuatively different:
@b = (*@a, *@b, foobar()).grep({}).map({}).sort({});
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ly different. (2) and (3) (auto)instantiate a Foo, but (1)
> does not.
Um ... ick. I'd hope that "autoinstantiation" wouldn't happen without
some clear syntactical clue. (I don't think "is" that clue. To me
all three of those look like they should just earmark $a to contain a
Foo and this Foo-thing can/will be instantiated later)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
words
~| grep $_%2==0 ~> @evennumbers;
:-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
cides. He always seems to
apply the appropriate discriminator in his synthesis of ideas.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
a $b;
be illegal?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Thu, Jan 16, 2003 at 10:07:13PM +, Nicholas Clark wrote:
> The headers I received make no mention of character set - does your mailer
> mark the message in any way? If not, then STMP will assume it's good old
> 7 bit ASCII
Thus we are back to using uuencode :-)
-Scott
--
le concept isn't worth the hassle or
can be accomplished another way and then we don't have to worry about
syntax any more.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
but I'd be happier if I had the option to construct the pipeline in a
L2R manner.
> But even so I dare say it'll go in because Damian likes it.
Was this some of that stealth sarcasm, or do you really believe this?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
lar
> xyzzy(bar((1))); # List?
> xyzzy(bar(list(1))); #List
> xyzzy(bar(scalar(1))); # Scalar
Strange. I think parameters to subroutines are in list context unless
stated otherwise.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
;s up to you to make it work, if you
> want it to.
Sounds good to me.
> 3b) Does an "infinite" array still get an exception thrown when trying
> to access an infinite [Inf] or [-Inf] index?
>
> STRAWMAN ANSWER: Yes, it does.
Based on 3a, I'd say that the closure should get Inf (or -Inf) and
do the appropriate thing. In your example above, Inf**2 would be Inf,
so the closure would return Inf (assuming I've got the Inf math right
and it's not really NaN)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Tue, Jan 28, 2003 at 01:30:54PM -0600, Jonathan Scott Duff wrote:
> On Tue, Jan 28, 2003 at 11:15:26AM -0800, Michael Lazzaro wrote:
> > 2) Assume the default value is a simple value, e.g. 'foo'.
> >
> > my @a is Array( default => 'foo' )
n't know what goes there (how do you know when you don't know? Easy:
if it's undef, you don't know)
my int @a is default(5);# "int" could be *any* type
@a[3] = 3;
print @a[2];# prints 5, exists but undefined
@a[3] = undef;
print @a[3];# again, prints 5
Why would you want to put a "real undef" in your array of default
values? The whole point of defaulting is to change what "undef"
means for the array/hash/whatever.
MHO,
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
urns 5
> @a[4]; # doesn't exist, so returns 5
>
> @a[2] = undef; # set to undef, so returns undef
Can someone give me a realish world example of when you would want an
array that can store both undefined values and default values and those
values are different?
-Scot
On Wed, Jan 29, 2003 at 11:32:53AM -0800, Michael Lazzaro wrote:
>
> On Wednesday, January 29, 2003, at 11:02 AM, Jonathan Scott Duff wrote:
> >> So you can't set something to its type's own empty value, because it
> >> will, by definition, thereafter re
appear is if an undef of the element is done.
Exactly!
> Any other way to handle things, like some of the other ways
> proposed will only lead to mysterious bugs and programmer
> missunderstandings.
Exactly! * 2
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Jan 29, 2003 at 09:07:37PM +0100, Juergen Boemmels wrote:
> Jonathan Scott Duff <[EMAIL PROTECTED]> writes:
> > Can someone give me a realish world example of when you would want an
> > array that can store both undefined values and default values and those
>
On Wed, Jan 29, 2003 at 03:29:57PM -0500, Aaron Sherman wrote:
> On Wed, 2003-01-29 at 14:54, Jonathan Scott Duff wrote:
>
> > Can someone give me a realish world example of when you would want an
> > array that can store both undefined values and default values and those
> &
On Wed, Jan 29, 2003 at 03:48:18PM -0500, Dan Sugalski wrote:
> (Though do please, everyone, pay attention when we tell you that what
> you want is slow or awkward)
Just be sure to reiterate in case we miss it the first time :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
uck's comments aside, I think thread-summaries would be a
useful thing. But probably only if we continue to have these long
seemingly endless threads. Better might be someone who's there to
shout "LET'S WRAP IT UP PEOPLE!" every now and then. And maybe that
someone is Miko :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
better to me.
I don't think that junctions make sense here. Besides, the "is" is
optional:
class Foo {
method bar is public rw const frob knob { ... }
}
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
that
> won't work with regexes)
Are you implying that
$fred = rx/fred/;
$string ~~ m:w/ <$fred> { $fred = rx/barney/; } rubble /
won't match "barney rubble"?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
.
ENTER? Possibly with a corresponding LEAVE?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
er $x given
Depending on how you're bent, the default() property starts to look
pretty good at this point. :-) (with the others relegated to be the
body of the sub)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
oogle groups and search for "Perl Operator List".
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Tue, Mar 25, 2003 at 01:47:32PM -0800, Michael Lazzaro wrote:
>
> On Tuesday, March 25, 2003, at 11:08 AM, Jonathan Scott Duff wrote:
>
> > On Tue, Mar 25, 2003 at 10:42:39AM -0800, Michael Lazzaro wrote:
> >> But it is certainly possible to extend the initialization
print "you've called me $($count++) times\n";
}
Boy am I glad Larry is the language designer. :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ares a lexical alias to a package var, how
> do we initialize package vars?
The first time they are assigned to, it's an initialization :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
d to be a stdlib mailing list for discussing this
stuff?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
perspective on why, I'll post "me too and here's
why". (This doesn't happen often for me because by the time I've
read the messages, usually the idea space has been well explored)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
cial for some
> common algorithms.
Can you give some examples?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
_ when true;
> }
Personally I'd just use
return big_calculation();
and make sure that big_calculation() returns the right thing.
If you *really* needed the exactly semantics given above, you could put
big_calculation() in a wrapper that does it for you.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ing
Luke knows something I don't) and having some difficulty until I read
these links.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ttle better)
I like =:= as identity operator if we want one. If not, as long as .id
returns something that compares properly with both == and eq, I'm
happy.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
on is how you parallelize them at
differing times, then I think the syntax would be horrid. Besides *I*
don't want to have to keep track of the junction, I just want my threads
to execute.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
ultaneous execution with (possible) data
sharing. These are separate "primitive" concepts in my brain and
merging them into one cothread thing just seems wrong.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
to
understand threads, I have to first understand coroutines, I think
that's a loss because it throws away (or at least morphs into an
unrecognizable form) all of collect CS knowledge of what "threading"
usually means. In other words, I think the idea of fork-like
behaviour is important to threads.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Sun, Jul 11, 2010 at 12:56 PM, wrote:
> Author: Kodi
> Date: 2010-07-11 19:56:33 +0200 (Sun, 11 Jul 2010)
> New Revision: 31627
>
> Modified:
> docs/Perl6/Spec/S32-setting-library/Temporal.pod
> Log:
> [S32/Temporal] Changed to use a different way of specifying time zones,
> which is hopeful
What you want is OUTER ...
my $v = "original";
> {
> my $v = OUTER::<$v>;
> say $v;
> $v = "new one";
> say $v;
> }
> say $v;
It's how you access the outer scope from an inner scope.
-Scott
On Wed, Oct 3, 2018 at 1:10 AM yary wrote:
> Reading and playing with https://docs.p
401 - 485 of 485 matches
Mail list logo