> I don't think so; just a stylistic choice
well ... i tested ===> once because i'll choose any syntax that can
spare me parenthesis especially in raku because i feel they are in
the wrong place (scheme makes parenthesis right).
Raku behaves better than perl in this regard because
say (f 12)
On Friday, November 22, Marc Chantreux wrote:
> hello,
>
> > You could also use the feed operator
>
> is there a reason to do so? i see none.
I don't think so; just a stylistic choice -- though the
documentation lists some potential benefits at the end of
the section here
https://docs.raku.o
hello,
> You could also use the feed operator
is there a reason to do so? i see none.
regards
marc
On Friday, November 22, Marc Chantreux wrote:
> so it becames:
>
> fix () perl6 -e '
> lines.map( *.split(",") )
> .classify( { .[0] }, :as{ .[1] } )
> .map: { say .key; say "\t$_" for .value.unique }
> '
You could also use the feed operator
perl6 -e '
lines() ==> map({split(","
hello,
> Hi Marc, I tried the first solution you posted and the "subheaders"
> are returned out of order (e.g. "2,1,3" and not "1,2,3"):
you're right but it doesn't matter in this usecase.
> mbook:~ homedir$ cat p6_chunk_csv.p6
> lines.classify(*.split(",").head(2)).pairs.map: {
>
hello,
> FWIW, I would make %section an HoA, which would be a less compact
> structure in memory, but allows more succinct manipulation, like so:
> my %section = lines()
> .map( *.split(",") )
> .classify( { .[0] }, :as{ .[1] } );
> for %section.sort {
> say .key;
>
> which led me to this solution:
> fix () perl6 -e '
> lines.classify(*.split(",").head(2)).pairs.map: {
> .say for .key, |.value.map({ "\t" ~ .key });
> }
> '
Hi Marc, I tried the first solution you posted and the "subheaders"
are returned out of order (e.g. "2
hello Timo,
> lines()>>.trim-leading.classify(*.split(",").head(2)); say to-json %foo'
which led me to this solution:
fix () perl6 -e '
lines.classify(*.split(",").head(2)).pairs.map: {
.say for .key, |.value.map({ "\t" ~ .key });
}
'
fix () perl6 -e '
inline:
On Fri, Nov 22, 2019 at 7:20 AM Bruce Gray wrote:
>
>
>
> > On Nov 22, 2019, at 9:06 AM, Marc Chantreux wrote:
> >
> > hello,
> >
> > On Fri, Nov 22, 2019 at 03:07:28PM +0100, Patrick Spek via perl6-users
> > wrote:
> >> Could you post some input and expected output? That would make it
>
hello Bruce,
> The first key of each second level is missing, which differs from your sample
> output above.
> Have I corrupted your Awk code, or have I misunderstood something, or what?
you just spotted a bug: the first subkey *is* indeed required. actually
fixing the bug makes the awk version
> On Nov 22, 2019, at 9:57 AM, Marc Chantreux wrote:
>
> On Fri, Nov 22, 2019 at 06:20:51AM -0800, William Michels via perl6-users
> wrote:
>> Hi Marc, I did a search for 'semicolon' on the following page and
>> found the interesting text below. Semicolons are used to create
>> multidimension
On Fri, Nov 22, 2019 at 06:20:51AM -0800, William Michels via perl6-users wrote:
> Hi Marc, I did a search for 'semicolon' on the following page and
> found the interesting text below. Semicolons are used to create
> multidimensional lists, maybe that's what's going on in your code?
indeed! i trie
Hi Marc,
here's a one-liner based on the classify method, which you may find to
be an interesting jumping-off-point, or centerpiece:
perl6 -e 'use JSON::Fast; my %foo =
lines()>>.trim-leading.classify(*.split(",").head(2)); say to-json %foo'
A,1,garbage .
A,2,garbage .
A,2,gar
> On Nov 22, 2019, at 9:06 AM, Marc Chantreux wrote:
>
> hello,
>
> On Fri, Nov 22, 2019 at 03:07:28PM +0100, Patrick Spek via perl6-users wrote:
>> Could you post some input and expected output? That would make it
>> easier for me (and perhaps others) to see what exactly you're trying to
>>
> From a quick look through ``Perl6/Grammar.nqp`` and
> ``Perl6/Actions.nqp``, I think that the semicolon is special-cased by
> the compiler, so the slightly ugly way above (call the operator
> directly) is probably the only way that works.
*this* is the level of expertise i miss :) thanks for you
hello,
On Fri, Nov 22, 2019 at 03:07:28PM +0100, Patrick Spek via perl6-users wrote:
> Could you post some input and expected output? That would make it
> easier for me (and perhaps others) to see what exactly you're trying to
> accomplish, in practical terms.
sorry ... i'm so confortable with aw
1) print "\t"$2;
> else { seen = $1; print $1 }
> }'
> }
>
> and i got this:
>
> fix () perl6 -e '
> my %section;
> lines.map: {
> my ($s,$ss) = .split(",");
> %section{$s;$ss} =
On 2019-11-22 Marc Chantreux wrote:
> ";" to walk in the hoh is really awesome but i don't know even know
> from where i know it and what's the object underneath.
> it isn't listed in the list of operators
It's mentioned in the page about subscripts:
htt
;
> else { seen = $1; print $1 }
> }'
> }
>
> and i got this:
>
> fix () perl6 -e '
> my %section;
> lines.map: {
> my ($s,$ss) = .split(",");
> %section{$s;$ss} = 1;
>
quot;\t"$2;
else { seen = $1; print $1 }
}'
}
and i got this:
fix () perl6 -e '
my %section;
lines.map: {
my ($s,$ss) = .split(",");
%section{$s;$ss} = 1;
}
%section.keys.map:
{ .say
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #68252]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=68252 >
rakudo: 1.WALK(:name,:descendant)
rakudo 6ba717: OUTPUT«Parameter type
Hi,
I've just checked in a test file for .WALK as spec'd in S12.
http://svn.pugscode.org/pugs/t/spec/S12-introspection/walk.t
While I'm happy :canonical, and :super are correct (the first is just C3
by default and the second just those from the superclass) and I think
:breadth
ill exist, calling them will segfault
* as the segment is destroyed now.
*
* TODO walk the fixups for this segment, locate globals
* and nullify the Sub PMC.
* This probably needs a pointer into the globals.
*
* OTOH - if the global exi
XME - walk mro */
I think this means that instead of directly returning (which is what these
methods currently do) one should do some form of method resolution and
determine which method should actually be called in this instance.
KEN - it doesn't walk up the scopes yet - TODO
Brad Bowman wrote:
> Mark Stosberg wrote:
>> In the Objects chapter, a WALK pseudo-class is spec'ed for using
>> when calling sets of methods:
>>
>> http://feather.perl6.nl/syn/S12.html#Calling_sets_of_methods
>>
>> These are the arguments listed that
Mark Stosberg wrote:
In the Objects chapter, a WALK pseudo-class is spec'ed for using
when calling sets of methods:
http://feather.perl6.nl/syn/S12.html#Calling_sets_of_methods
These are the arguments listed that can be used with WALK:
:canonical # canonical dispatch
In the Objects chapter, a WALK pseudo-class is spec'ed for using
when calling sets of methods:
http://feather.perl6.nl/syn/S12.html#Calling_sets_of_methods
These are the arguments listed that can be used with WALK:
:canonical # canonical dispatch order
:ascendant #
(and hence PARROT_PTR_ALIGNMENT = 1), but IIRC a push
or pop will always change the SP by 2 or 4, therefore the stack walk code
can do the same. In a quick test, using a hardcoded value of 2 in the
stack walk code, 5000 lives dropped down to 112 seconds.
--
Peter Gibbs
EmKel Systems
On Sat, Aug 17, 2002 at 10:23:32PM +0200, Peter Gibbs wrote:
> If you want to get some improvement at the cost of some duplicated
> code, you can remove the * direction logic, and write two copies of the
> loop. (patch attached, but not fully tested)
> I'm sure there is more that can be done, b
Mike Lambert wrote:
> As Peter has pointed out, our stackwalk code is rather slow.
> Anyone feeling adventuresome and want to attempt to speed this up?
If you want to get some improvement at the cost of some duplicated
code, you can remove the * direction logic, and write two copies of the
loo
that pool.
Currently, this is a linear walk over the header pools. I imagine there
are many better algorithms for determing a root set from a stack. The
boehm collector probably has decent code in this regard. However, given
that we have O(N) with size of stack, I'm not sure how we'll
32 matches
Mail list logo