Re: augment again

2018-10-20 Thread Elizabeth Mattijsen
> On 20 Oct 2018, at 17:50, Joseph Brenner wrote: > > By the way, I'd really like to know what the vertical bar is here in > front of "CORE": > >> for (|CORE::) .grep({ .key eq .value.^name }) .map( *.value ) -> $class { > > It's not the "any" junction, is it? How would that make sense

Re: augment again

2018-10-20 Thread Joseph Brenner
By the way, I'd really like to know what the vertical bar is here in front of "CORE": > for (|CORE::) .grep({ .key eq .value.^name }) .map( *.value ) -> $class { It's not the "any" junction, is it? How would that make sense here? On 10/19/18, Joseph Brenner wrote: > Okay, good enough... if

Re: augment again

2018-10-20 Thread Joseph Brenner
I think I see, but, just to be clear I'm planning on doing an augment on the command-line via -M when going into the repl. Things that happen *after* I've initialized the repl don't need to be recomposed, because they'll happen after the augment anyway. I also don't particularly need the methods

Re: augment again

2018-10-20 Thread Elizabeth Mattijsen
It is a good start, but you will only see classes that have been bound to a pad somewhere. There are many classes that are just created on the fly that won’t be seen, as the parents do not know about their children. For example, a little bit contrived, but hopefully gets the point across:

Re: augment again

2018-10-19 Thread Joseph Brenner
Okay, good enough... if I can't slip my changes in ahead of everything then reinitializing everything viz ^compose sounds workable. And so, my next question would be "Can I get a list of all the built-in classes?" and I see brian d foy got there a little over a year ago:

Re: augment again

2018-10-19 Thread Elizabeth Mattijsen
See also: https://stackoverflow.com/questions/52718499/how-to-correctly-augment-any > On 19 Oct 2018, at 03:52, Joseph Brenner wrote: > > I've got another question about aug--yes, I know--ment. > > I've got a module ides_of_augment.pm6: > > use MONKEY-TYPING; > augment class Any { >

Re: augment again

2018-10-18 Thread Brandon Allbery
pyanfar Z$ 6 'use MONKEY-TYPING; augment class Any {method hic { say "hoc" }}; my @a = ; @a.hic' No such method 'hic' for invocant of type 'Array'. Did you mean 'hic'? in block at -e line 1 zsh: exit 1 pyanfar Z$ 6 'use MONKEY-TYPING; augment class Any {method hic { say "hoc" }};