On 5/15/05, Juerd <[EMAIL PROTECTED]> wrote:
> How does [EMAIL PROTECTED] know the difference between &postcircumfix:
> and
> &postcircumfix:?
Perhaps it checks how many different variations are actually
defined--if it finds only one, it can DWIM, and if it finds more than
one it can barf with an
On Sat, 2005-05-14 at 22:06 +1000, Damian Conway wrote:
> Luke wrote:
>
> > If the alternatives are:
> >
> > * declare $self, use $self.method, and .method for calling on $_
> > * use .method, and use $_.method for calling on $_
> >
> > I'd say the former has no case.
>
> I, for one
On 5/14/05, Rod Adams <[EMAIL PROTECTED]> wrote:
> Jonathan Worthington wrote:
>
> > "Brent 'Dax' Royal-Gordon" <[EMAIL PROTECTED]> wrote:
> >
> >> Like the decision about which side of the road cars should drive on,
> >> it really doesn't matter *which* choice is taken, as long as
> >> *something
Juerd wrote:
Rod Adams skribis 2005-05-14 19:21 (-0500):
o.
O.
this.
self.
me.
Not special syntax, meaning you can no longer use these identifiers for
your own class. Bad style to use single-letter identifiers, but we know
what trouble $a and $b in Perl 5 cause, and the B:: namespace.
I bel
Rod Adams skribis 2005-05-14 19:21 (-0500):
> $?SELF, and nothing else by default.
Wrong because it's inconsistent. Nothing else defaults to $?SELF.
> $_ bound to $?SELF at start of method.
Current spec.
> o.
> O.
> this.
> self.
> me.
Not special syntax, meaning you can no longer use these id
Jonathan Worthington wrote:
"Brent 'Dax' Royal-Gordon" <[EMAIL PROTECTED]> wrote:
Like the decision about which side of the road cars should drive on,
it really doesn't matter *which* choice is taken, as long as
*something* is decided.
The only thing is, there already is a decided way to do it so f
Larry wrote:
Actually, I think Damian's original formulation is sufficiently clear.
Me too! ;-)
I think that a standard [.] abbreviation for all
postcircumfix operators within [op] reductions would be a useful bit of dwimmery.
Damian
"Brent 'Dax' Royal-Gordon" <[EMAIL PROTECTED]> wrote:
Like the decision about which side of the road cars should drive on,
it really doesn't matter *which* choice is taken, as long as
*something* is decided.
The only thing is, there already is a decided way to do it so far as I can
see...
I've s
On Sat, 2005-05-14 at 16:22 +0200, Eirik Berg Hanssen wrote:
> I suppose the first must just make sure not to flatten the %hash:
>
> $leaf_value = [.{}] \%hash, @keys; # %hash .{$key1} . {$key2} ...
Side point on the whole topic: I just LOVE \ as an explosive list-
context flattening preventer
Larry wrote:
I don't think we can allow this situation to stand. Either we have
to make != and !~ and ne transform themselves via "not raising", or
we have to disallow negative comparisons on junctions entirely.
Opinions?
Making them DWIM here would be a mistake, since the dwimmery would disappear
Larry Wall skribis 2005-05-14 9:45 (-0700):
> : OTOH, reduce probably just needs to be smart enough to understand
> : postcircumfix. Perhaps whitespace helps, [{ }], in parallel with
> : &postcircumfix:<{ }>, to avoid a conflict with an infix {}.
> Erm, I don't like tokens with spaces in the middl
Damian Conway <[EMAIL PROTECTED]> wrote:
> [an extremely well-thought-out explanation]
Thank you, Dr. Conway. That was very enlightening, and I think I
agree with all of it.
Larry Wall <[EMAIL PROTECTED]> wrote:
> You guys are all ignoring that I said it could be set via pragma or macro.
> If yo
Damian Conway <[EMAIL PROTECTED]> wrote:
> 3. To drill down a hierarchical data structure, following the path
> specified by a list of keys:
>
> $leaf_value = [.{}] %hash, @keys;
When I saw this, the following happened.
*pause for a second*
"Wow."
*a few more seconds*
"H
On Fri, May 13, 2005 at 01:07:20PM -0700, Larry Wall wrote:
> On Fri, May 13, 2005 at 11:54:47AM -0500, Patrick R. Michaud wrote:
> : $r1 = rx / abc :: def | ghi :: jkl | mn :: op /;
> : $r2 = rx / abc ::: def | ghi ::: jkl | mn ::: op /;
> : $r3 = rx / [ abc :: def | ghi :: jkl | mn ::
Rob Kinyon wrote:
So, does this mean that I can do something like:
@a = [ 1 .. 4 ];
$x = @a{2};
and have $x == 3? If so, is there any reason (other than clarity) to
use the @a[] notation? The @ already indicates you have an array vs.
the % which indicates hash. Is there a reason to have the subsc
On 5/14/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> On Sat, May 14, 2005 at 01:36:22PM -0500, Rod Adams wrote:
> : Larry Wall wrote:
> :
> : >On Sat, May 14, 2005 at 12:51:32PM -0500, Rod Adams wrote:
> : >
> : >: Unless, of course, there is some subtle difference between a 3-d hash
> : >: and a ha
On Sat, May 14, 2005 at 01:36:22PM -0500, Rod Adams wrote:
: Larry Wall wrote:
:
: >On Sat, May 14, 2005 at 12:51:32PM -0500, Rod Adams wrote:
: >
: >: Unless, of course, there is some subtle difference between a 3-d hash
: >: and a hash of hashes of hashes that invalidates this.
: >
: >No differ
Larry Wall wrote:
On Sat, May 14, 2005 at 12:51:32PM -0500, Rod Adams wrote:
: Unless, of course, there is some subtle difference between a 3-d hash
: and a hash of hashes of hashes that invalidates this.
No difference, I hope. The multidimensional notation is meant
to extend to HoH and AoA tran
On Sat, May 14, 2005 at 12:51:32PM -0500, Rod Adams wrote:
: Larry Wall wrote:
:
: >On Sat, May 14, 2005 at 06:41:35PM +0200, Juerd wrote:
: >: Larry Wall skribis 2005-05-14 9:20 (-0700):
: >: > Possibly. Or we just define infix .{}. and .[]. variants, or some
: >such.
: >:
: >: The problem is
Larry Wall wrote:
We have a bit of a problem with negative operators applied to junctions,
as illustrated recently on PerlMonks. To wit, when a native English
speaker writes
if $a != 1 | 2 | 3 {...}
they really mean one of:
if not $a == 1 | 2 | 3 {...}
if $a == none(1, 2, 3) {...}
or, e
Larry Wall wrote:
On Sat, May 14, 2005 at 06:41:35PM +0200, Juerd wrote:
: Larry Wall skribis 2005-05-14 9:20 (-0700):
: > Possibly. Or we just define infix .{}. and .[]. variants, or some such.
:
: The problem is that we already have @foo[] meaning the same as @foo, and
: an always allowed . th
On Sat, May 14, 2005 at 03:31:21PM +0200, Leopold Toetsch wrote:
> Jerry Gay <[EMAIL PROTECTED]> wrote:
> > with parrot revision 8086, i'm running the following:
>
> > .sub main @MAIN
> > load_bytecode 'PGE.pbc'
> > .local pmc p6rule, rulesub, match
> > p6rule= find_global 'PGE', 'p6ru
On Sat, May 14, 2005 at 09:31:29AM -0700, Larry Wall wrote:
> I don't think we can allow this situation to stand. Either we have
> to make != and !~ and ne transform themselves via "not raising", or
> we have to disallow negative comparisons on junctions entirely.
I'm of the opinion that disallow
On Sat, May 14, 2005 at 06:41:35PM +0200, Juerd wrote:
: Larry Wall skribis 2005-05-14 9:20 (-0700):
: > Possibly. Or we just define infix .{}. and .[]. variants, or some such.
:
: The problem is that we already have @foo[] meaning the same as @foo, and
: an always allowed . that also allows you
On Fri, May 13, 2005 at 04:21:25PM +0200, "TSa (Thomas Sandlaß)" wrote:
: And I hope that it is not possible to accidentially
: mess up the internals of the compiler because code
: in a BEGIN hits compiler data.
Whereas I hope that it *is* possible to intentionally
mess up the internals of the com
Larry Wall skribis 2005-05-14 9:20 (-0700):
> Possibly. Or we just define infix .{}. and .[]. variants, or some such.
The problem is that we already have @foo[] meaning the same as @foo, and
an always allowed . that also allows you to put whitespace around it.
This means that %foo.{}.$kv should
On Sat, May 14, 2005 at 11:36:30AM -0400, Dino Morelli wrote:
> Changes:
>
> -Added the same set of tests for :w to be performed without :w
>
> -Added a couple of tests for both that include tabs, spaces and newlines
>
> -Added C to the test script. Is this a good
> idea? I had gotten feedback f
On Sat, May 14, 2005 at 09:20:21AM -0700, Larry Wall wrote:
> On Sat, May 14, 2005 at 10:55:43AM -0500, Jonathan Scott Duff wrote:
> : But perhaps the reduce operator is some of that sufficiently advanced
> : technology that "knows" how the operator it wraps is slotted and does
> : something approp
We have a bit of a problem with negative operators applied to junctions,
as illustrated recently on PerlMonks. To wit, when a native English
speaker writes
if $a != 1 | 2 | 3 {...}
they really mean one of:
if not $a == 1 | 2 | 3 {...}
if $a == none(1, 2, 3) {...}
or, expressed in
On Sat, May 14, 2005 at 10:55:43AM -0500, Jonathan Scott Duff wrote:
: But perhaps the reduce operator is some of that sufficiently advanced
: technology that "knows" how the operator it wraps is slotted and does
: something appropriate.
Possibly. Or we just define infix .{}. and .[]. variants,
Larry Wall skribis 2005-05-14 8:29 (-0700):
> : say [x];
> : Is it a repeating metaoperator on an empty list, or a single-element
> : array reference that contains the return value of calling &x()?
> Always the first. [x] doesn't have to do lookahead.
Does this mean that [x] is just an inter
On Sat, May 14, 2005 at 05:05:10PM +0200, Juerd wrote:
> Jonathan Scott Duff skribis 2005-05-14 9:49 (-0500):
> > Then surely $leaf = [.{}] %hash, $k1, $k2, $k3
> > is the same as $leaf = %hash .{} $k1 .{} $k2 .{} $k3
>
> Then perhaps the easy way out is to make .{} $key and
On Sat, May 14, 2005 at 04:22:44PM +1000, Adam Kennedy wrote:
: >The obvious way to do it is to declare the invocant.
:
: Wasn't one of the original headline features for Perl 6 not having to do
: that any more for basic normal code? Or at least from a couple of damian
: talks it was one of the
On Sat, May 14, 2005 at 02:17:38PM +0200, Juerd wrote:
: Firstly, thanks for writing the message out so clearly that it cannot be
: misunderstood.
:
: Damian Conway skribis 2005-05-14 22:06 (+1000):
: > .{width} //= 80;
: > .{height}//= 24;
: > .{gutter}
Changes:
-Added the same set of tests for :w to be performed without :w
-Added a couple of tests for both that include tabs, spaces and newlines
-Added C to the test script. Is this a good
idea? I had gotten feedback from Coke and pjcj on #parrot about warnings
requiring a late-model Perl5.
-Ad
On Sat, May 14, 2005 at 02:57:53PM +0200, Leopold Toetsch wrote:
: If we want some interoperbility with Python dicts, hashing will not be
: done on ids but on the hash function of the type.
Which Perl could default to id.
Larry
On Sat, May 14, 2005 at 10:53:38PM +0800, Autrijus Tang wrote:
: On Sat, May 14, 2005 at 10:56:29PM +1000, Damian Conway wrote:
: > 8. To verify the monotonicity of a sequence:
: >
: >$is_monotonic = [<] @numbers;
:
: Hey. Does this mean that the [] metaoperator folds with the
:
Juerd skribis 2005-05-14 17:23 (+0200):
> Markus Laire skribis 2005-05-14 18:07 (+0300):
> > [>>+^=<<] (@a, @b, @c)
> These arrays flatten first (otherwise [+] @foo could never calculate the
> sum of the elements), so imagine that you have
$foo, $bar, $baz, $quux, $xyzzy
to let >>+^=<< op
Markus Laire skribis 2005-05-14 18:07 (+0300):
> [>>+^=<<] (@a, @b, @c)
These arrays flatten first (otherwise [+] @foo could never calculate the
sum of the elements), so imagine that you have
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
ht
On Thu, 12 May 2005, Autrijus Tang wrote:
>On Wed, May 11, 2005 at 06:09:00PM -0400, Dino Morelli wrote:
>> >Feel free to correct 'no_plan'. I'll happily apply any and all
>> >patches to the tests, and those with commit privs are welcome
>> >to directly modify the t/p6rules/*.t files at any time.
Adam Kennedy kirjoitti:
[»+^=«] reminds me of a P5 regex that has a comment saying "This is
black magic. Don't touch!". --That's-- my complaint.
I look at...
>>but the basic operator there is just ^, with a + modifier to indicate
>>numeric XOR, = to indicate an assignment operator, »« to indicate
Jonathan Scott Duff skribis 2005-05-14 9:49 (-0500):
> Then surely $leaf = [.{}] %hash, $k1, $k2, $k3
> is the same as$leaf = %hash .{} $k1 .{} $k2 .{} $k3
Then perhaps the easy way out is to make .{} $key and .[] $index valid
syntax.
Or perhaps [] can play the role of
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes:
DC> Here are a few of the things I'll be using reductions for in Perl 6...
DC> 3. To drill down a hierarchical data structure, following the path
DC> specified by a list of keys:
DC> $leaf_value = [.{}] %has
Eirik Berg Hanssen skribis 2005-05-14 16:22 (+0200):
> > With the precedence of [op] being that of a normal list op, the above
> > are a problem. Perhaps ; or multiple <== can solve this?
> I suppose the first must just make sure not to flatten the %hash:
> $leaf_value = [.{}] \%hash, @keys; # %h
On Sat, May 14, 2005 at 10:56:29PM +1000, Damian Conway wrote:
> 8. To verify the monotonicity of a sequence:
>
>$is_monotonic = [<] @numbers;
Hey. Does this mean that the [] metaoperator folds with the
associativity of the operator inside it?
That is, if the operator inside is
On Sat, May 14, 2005 at 10:56:29PM +1000, Damian Conway wrote:
> 3. To drill down a hierarchical data structure, following the path
>specified by a list of keys:
>
>$leaf_value = [.{}] %hash, @keys;
I think this one needs to be written as:
$leaf_value = [.{}] \%ha
Juerd <[EMAIL PROTECTED]> writes:
> Damian Conway skribis 2005-05-14 22:56 (+1000):
>>$leaf_value = [.{}] %hash, @keys;
>>$propped = [but] $value, @properties;
>
> With the precedence of [op] being that of a normal list op, the above
> are a problem. Perhaps ; or multiple <
Damian Conway skribis 2005-05-14 22:56 (+1000):
>$leaf_value = [.{}] %hash, @keys;
>$propped = [but] $value, @properties;
With the precedence of [op] being that of a normal list op, the above
are a problem. Perhaps ; or multiple <== can solve this?
Juerd
--
http://convol
Jerry Gay <[EMAIL PROTECTED]> wrote:
> with parrot revision 8086, i'm running the following:
> .sub main @MAIN
> load_bytecode 'PGE.pbc'
> .local pmc p6rule, rulesub, match
> p6rule= find_global 'PGE', 'p6rule'
> rulesub= p6rule( '( \\ \. )+ \\' )
> .end
> which, under parrot -t,
On 14/05/05, Damian Conway <[EMAIL PROTECTED]> wrote:
> Here are a few of the things I'll be using reductions for in Perl 6...
>
> 1. To add things up:
>
> $sum = [+] @amounts;
>
> 2. To calculate the probability that I'll need to use a reduction today:
>
> $fi
Autrijus Tang <[EMAIL PROTECTED]> wrote:
> What does unboxed values return for their "id", though?
> 3 =:= 3; # always true?
> 3.id ~~ 3.id; # ditto?
Maybe true or not, that's highly implementation dependent. I'd not touch
these internals:
$ python
Python 2.4 [...]
>>> id(2) ==
Adam Kennedy wrote:
And reduction? I write 25,000+ lines of
Perl a year, and if you are talking about something like
List::Util::reduce, I think I've used it maybe twice?
Which proves what? That you don't (yet) write the sort of code that benefits
from reductions? That you don't (yet) think in t
Firstly, thanks for writing the message out so clearly that it cannot be
misunderstood.
Damian Conway skribis 2005-05-14 22:06 (+1000):
> .{width} //= 80;
> .{height}//= 24;
> .{gutter}//= 4;
> .{justification} //= 'left';
> .{availa
Luke wrote:
> If the alternatives are:
>
> * declare $self, use $self.method, and .method for calling on $_
> * use .method, and use $_.method for calling on $_
>
> I'd say the former has no case.
I, for one, am not nearly so certain of that.
Our original rationale for that choice was not c
On 5/14/05, Adam Kennedy <[EMAIL PROTECTED]> wrote:
> I don't mean to be disrespectful, but what was whoever suggested ^
> thinking?
Well I suggested backtick in the same role *duck*.
> For starters, about the only combination harder to hit with on
> spanned hand might be ctrl-F5.
I've remapped
Autrijus Tang wrote:
Juerd informed me today that .method should still means $_.method.
However, for the OO modules we're writing, there still needs to be a way
to invoke methods on the current invocant, when the invocant name has
been omitted from the method() declaration.
Currently Pugs has:
On Fri, May 13, 2005 at 10:51:56AM +0200, Paul Johnson wrote:
> On Fri, May 13, 2005 at 03:00:39PM +1000, [EMAIL PROTECTED] wrote:
>
> > [EMAIL PROTECTED] wrote:
> >
> > >Covering the XS portion of the code with gcov is possible, and Devel::Cover
> > >will create all kinds of nice webpages and st
The obvious way to do it is to declare the invocant.
Wasn't one of the original headline features for Perl 6 not having to do
that any more for basic normal code? Or at least from a couple of damian
talks it was one of the things that practically _everybody_ wanted.
On the plus side, with explic
[»+^=«] reminds me of a P5 regex that has a comment saying "This is
black magic. Don't touch!". --That's-- my complaint.
Indeed. There's a time and a place for that sort of black magic, and
it's usually about once per 5,000 lines of code, and so deep and well
wrapped in comments and unit tests th
# New Ticket Created by jerry gay
# Please include the string: [perl #35439]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/rt3/Ticket/Display.html?id=35439 >
with parrot revision 8086, i'm running the following:
.sub main @MAIN
load_bytecode '
I don't understand why you think you need the eval here?
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
> There is syntax to define trait and properties
> but is there an API?
>
> my $b = eval '$a but true'; # setting a true property
> # API to do it without an eval?
>
On Thu, May 12, 2005 at 10:31:06PM +0200, Leopold Toetsch wrote:
> Tim wrote:
> >Fresh (and first) checkout and build of parrot (#8075)
>
> first???\ :-)
I know, I know. Real life, real work and all that. I've been "watching
from afar" though at all this great work. I still won't have much
62 matches
Mail list logo