FYI - Raku grammar compile speedup with preceding surrounder syntax

2020-12-26 Thread Darren Duncan

FYI,

So I don't know the factors determining how fast Raku can compile ("perl6 -c 
filename") a grammar, but:


Anecdotally I have just seen that using the surrounder syntax "left ~ right 
middle" rather than "left middle right" makes my 16KB MUON-defining grammar 
compile in 1 second rather than 6-7 seconds on my 2013 machine.


See 
https://github.com/muldis/Muldis_Object_Notation/commit/568713257c474ad393d2dd6777e2147432cf6ec5 
for the exact diff in question that led to this speedup.


-- Darren Duncan


Re: I need help understanding ".contains" method construction

2020-12-26 Thread Ralph Mellor
> >> What kind of variable is .value?
> >
> > I don't see a `.value`, only a `$!value`.
>
> Is this .self with a better name?

No.

I know you've been progressing in your understanding of
OO in general, and Raku's in particular, since you wrote
this email. So I won't explain it for now, but rather just try
to confirm you now know what that bit of code is doing.

So, would you say you now understand that `.value` is a
method call on an "invocant" that is either explicitly written
to the left of the `.` or is implicitly whatever the current topic
is where the `.value` appears?

> >> 3) the first "Str:D" goes to what on line 337?  To .value?
> >
> > No, to the invocant.
>
> Would you define "invocant" so I stop guessing?

Would you say you now understand what "invocant" means?

love, raiph