MasterDuke timotimo: so it knows the method doesn't exist, but ^methods and ^private_method_table don't return anything. any other way to get the methods that are known? 00:04
timotimo i'd have to look through the roles that are mixed together for all the HOWs to figure that out 00:07
but now i'll go to bed
MasterDuke later... 00:09
BenGoldberg ===SORRY!===␤QAST::Block with cuid 1 has not appeared 01:39
Oops.
m: gist.github.com/BenGoldberg1/d0764...549f4bc359
camelia ===SORRY!===
QAST::Block with cuid 9 has not appeared
Geth rakudo/nom: aa3684218b | (Zoffix Znet)++ | src/core/Junction.pm
Fix crash when Junctioning empty array after .elems'ing it

  `my @a; say +@a; say @a.all` crashes with
  `This type (Scalar) does not support elems` because the `.elems`
call touches $!reified attr, making it nqp::attrinited. Then, when we go to make a shiny new Junction, we check if the
  $!reified is inited and use it if it is. However, it's inited because
  .elems touched it, not because it got stuff up in it.
Fix by checking concreteness of $!reified instead of initness.
02:01
roast: 932eb4c444 | (Zoffix Znet)++ | S03-junctions/misc.t
Test Junctions on touched empty array don't crash

Rakudo fix: github.com/rakudo/rakudo/commit/aa...218b1f668b
02:02
rakudo/nom: 61ecfd5117 | (Zoffix Znet)++ | src/core/Junction.pm
Fix crashes/LTA errors in Junction.new w/wrong args

Add a proto so we don't go into Mu.new's candidates.
02:13
roast: beea798132 | (Zoffix Znet)++ | S03-junctions/misc.t
Test Junction.new with wrong args has sane errors

Rakudo fix: github.com/rakudo/rakudo/commit/61...72b0e3cf20
02:14
MasterDuke interesting. i get different errors for missing methods depending on whether optimization is on or not 02:29
`perl6 -e 'class C { method foo { self!bar }; method bar { say "hi" } }; C.new.foo'` gives `No such private method 'bar' for invocant of type 'C'`
`perl6 --optimize=0 -e 'class C { method foo { self!bar }; method bar { say "hi" } }; C.new.foo'` gives `No such private method '!bar' for invocant of type 'C'. Did you mean 'bar'? in method foo at -e line 1 in block <unit> at -e line 1` 02:31
nine ugexe: the CORE dist is always force installed because back then, we knew as little about versioning the CORE dist as we do now :) 06:22
[Tux] This is Rakudo version 2017.05-347-g61ecfd511 built on MoarVM version 2017.05-25-g62bc54e9 08:40
csv-ip5xs 2.863
test 13.064
test-t 4.400 - 4.427
csv-parser 13.238
dogbert17 I'm trying to update some docs and stumbled upon this text in the traps ducument 11:20
"(Note that BUILDALL is a method, not a submethod. That's because by default, there is only one such method per class hierarchy, whereas BUILD is explicitly called per class. Which also explains why you need the nextsame inside BUILDALL, but not inside BUILD)."
isn't the mention on nextsame here incorrect, shouldn't it be callsame? (in the example above it actually says callsame): github.com/perl6/doc/blob/master/d....pod6#L129 11:21
s/on/of/
jnthn Yes, it needs to be callsame there; were it nextsame, then the $!y = 18 would be dead code 11:24
That really that should talk about TWEAK 11:25
dogbert17 thx, I'll update it immediately
jnthn Since TWEAK is a better solution to that problem than overriding BUILDALL
dogbert17 yeah, I have noticed that some parts of the Lnaguage docs are a bit old in the tooth, probably written before TWEAK made an appearance I guess 11:26
jnthn Yeah, it surely was
dogbert17 here's another callsame part that looks a bit old; github.com/perl6/doc/blob/master/d....pod6#L240 11:28
I'll see if I can improve that a tiny bit 11:32
MasterDuke jnthn: did you notice my comments from last night about turning off optimizing and getting different errors for missing methods? 11:33
jnthn MasterDuke: Yes, but you missed the important part of the output. 11:35
MasterDuke yeah, one's compile time one isn't
jnthn Right :)
That's 'cus the optimizer looks to try and produce better code for missing methods, and as a side-effect detects they are missing and can complain about it 11:36
MasterDuke yep, i noticed that in Mu.pm's dispatch<!>
in there, if i iterate over `type`'s methods and private_method_table i see the user-defined methods (e.g., foo and bar) 11:37
so i tried sending `type` to the X::Method::NotFound.new instead of `SELF`, but that didn't seem to work 11:38
jnthn Hm, odd. I dunno why; by the time we're in the optimizer the types are fully composed 11:39
MasterDuke wait, in the optimizing case dispatch<!> isn't called at all
oh, hm, need to re-compile to confirm that 11:40
jnthn Yes, exactly
It looks at the private_method_table directly 11:41
lunch & 11:42
MasterDuke ah, i see optimize_private_method_call() in Optimizer.pm 11:58
hm, i still don't understand why what becomes the $.invocant in X::Method::NotFound doesn't have any of the local methods 12:03
Geth rakudo/nom: 77d3c5465c | (Zoffix Znet)++ | src/core/operators.pm
Fix infix:<orelse> calling .defined one too many times

Check if we're at the last arg *before* we check definedness, otherwise we accidentally disarm Failures when we shouldn't
12:27
roast: a215d2e021 | (Zoffix Znet)++ | S03-operators/orelse.t
Test infix:<orelse> calls .defined exact number of times

Rakudo fix: github.com/rakudo/rakudo/commit/77...5c771387bf
rakudo/nom: 64e898f9ba | (Zoffix Znet)++ | src/core/Failure.pm
Re-arm Failures when `fail`ing with them

Maintain consistent interface that a call to &fail returns an explosive Failure, even if the arg was a handled Failure.
12:29
roast: 6c06e3c123 | (Zoffix Znet)++ | S04-exceptions/fail.t
Test &fail re-arms handled Failures

Rakudo fix: github.com/rakudo/rakudo/commit/64...baa159e201
roast: 53bb278ccf | (Zoffix Znet)++ | 3 files
Spec andthen/orelse/notandthen must not call .defined on last arg
13:45
MasterDuke Zoffix: is this expected? gist.github.com/Whateverable/760a5...bbe71b6445 14:04
jnthn: ^^^ the most recent change in behavior is because of github.com/rakudo/rakudo/commit/8e...01eccdc7d7 14:09
lizmat: ^^^ and '-'.IO.slup actually breaking is because of github.com/rakudo/rakudo/commit/b4...7725fa53f3 14:14
s/slup/slurp
dogbert17 m: gist.github.com/dogbert17/63f81505...d718f9bcc8 14:44
camelia False
dogbert17 commit: 2016.07 gist.github.com/dogbert17/63f81505...d718f9bcc8
committable6 dogbert17, It looks like a URL, but mime type is ‘text/html; charset=utf-8’ while I was expecting something with ‘text/plain’ or ‘perl’ in it. I can only understand raw links, sorry.
dogbert17 WAT 14:45
mst commit: 2016.07 gist.githubusercontent.com/dogbert...c/test.pl6 14:46
committable6 mst, Successfully fetched the code from the provided URL.
mst, ¦2016.07: «False»
dogbert17 mst, thx 14:50
mst *thanks
dogbert17 commit: 2016.01 gist.githubusercontent.com/dogbert...c/test.pl6 14:51
committable6 dogbert17, Successfully fetched the code from the provided URL.
dogbert17, ¦2016.01: «False»
dogbert17 commit: 2015.06 gist.githubusercontent.com/dogbert...c/test.pl6
committable6 dogbert17, Successfully fetched the code from the provided URL. 14:52
dogbert17, ¦2015.06: «False»
lizmat .
dogbert17 commit: 2015.01 gist.githubusercontent.com/dogbert...c/test.pl6 15:00
committable6 dogbert17, Successfully fetched the code from the provided URL.
dogbert17, ¦2015.01: «False»
dogbert17 anyone good at regexes here 15:01
the example on line 514, should it return 'True' as the text claims or 'False'? github.com/perl6/doc/blob/master/d....pod6#L504 15:02
timotimo the example may want a .chomp 15:12
dogbert17 timotimo: will test 15:17
timotimo: you mean like 'my $str = chomp q:to/EOS/; ...' 15:18
that seems to work :) timotimo++
jnthn MasterDuke: That looks like IO::Handle.open isn't repsecting :bin 15:20
MasterDuke: In the case of '-' I mean
dogbert17 m: my $str = "string with newline\n"; say so $str ~~ / line $$/; 15:34
camelia True
dogbert17 commit: 2015.11 my $str = "string with newline\n"; say so $str ~~ / line $$/;
committable6 dogbert17, ¦2015.11: «True»
dogbert17 the last part of this doc piece must be incorrect: 15:35
"$$ matches only at the end of a logical line, that is, before a newline character, or at the end of the string when the last character is not a newline character."
feels as if the last part 'when the last character is not a newline character' should be dropped 15:36
hmm, according to S05 the above code should return false 15:43
yoleaux Zoffix: Future-Zoffix: github.com/perl6/doc/issues/401 15:45
TimToady m: say "\n" ~~ m:g/$$/ 16:03
camelia (「」)
TimToady m: say " " ~~ m:g/''/
camelia (「」 「」)
TimToady m: say " " ~~ m:g/$$/
camelia (「」)
TimToady looks truish to me
we don't want the null string after a \n to match, since \n is generally construed as a terminator, not a separator 16:05
dogbert17 TimToady: so does that mean that this no longer applies "^^ and $$ match line beginnings and endings. (The /m modifier is gone.) They are both zero-width assertions. $$ matches before any \n (logical newline), and also at the end of the string if the final character was not a \n." 16:17
moritz which part of this statement do you think is not true? 16:23
sorry, missing a bit of context here
dogbert17 moritz: in our docs, we have the following text "$$ matches only at the end of a logical line, that is, before a newline character, or at the end of the string when the last character is not a newline character." 16:24
moritz which seems to agree with S05 16:25
or am I missing something?
dogbert17 well, my brain is probably mushy, but to me the texts implies that this code should return false 16:26
m: my $str = "string with newline\n"; say so $str ~~ / line $$/;
camelia True
moritz it matches before the newline character 16:27
which is exactly what both S05 and the docs say
m: say "string without newline" ~~ /line $$/
camelia 「line」
moritz and that's the second case: at the end of the string when there's no final newline character 16:28
dogbert17 gah, I need to wrap my brain around this
thanks for trying to help 16:31
MasterDuke timotimo: does $foo.^methods get compiled to $foo.HOW.methods($foo)? is there any difference between those? 19:04
jnthn MasterDuke: Pretty sure that's exactly how it's compiled now; in the past there was a Mu.dispatch:<.^> helper but that caused issues aside from being a performance hit 19:19
MasterDuke m: use NativeCall; my \compar_t = Callable but role :: { method sub_signature { :(Pointer,Pointer --> int) } };
camelia X::Method::NotFound exception produced no message
in block <unit> at <tmp> line 1
MasterDuke i'm trying to fix that ^^^ no message
it's dying here github.com/rakudo/rakudo/blob/nom/...on.pm#L180 19:20
the nqp::can succeeds, but something about the ^methods call goes horribly wrong 19:21
the message before it gets there is `No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'` 19:22
i stuck a note() in ParametricRoleGroupHOW's methods(), but it's not printing 19:23
timotimo perhaps have to look into CurriedRoleHOW? 19:24
MasterDuke hm, it doesn't have a methods() 19:25
might that be the problem?
timotimo you looked through all the roles it assembles, too? 19:26
MasterDuke which it?
timotimo CurriedRoleHOW 19:27
all of the HOWs are made up of many roles usually
jnthn I suspect nqp::can on a CurriedRoleHOW is about worthless in so far as .^find_method will always return a closure that will pun the role and then delegate the method to the pun
Well, on something whose .HOW is a CurriedRoleHOW, I mean
Hm, but it's doing it on the .HOW which should be OK 19:28
m: use nqp; say nqp::can(CurriedRoleHOW, 'methods')
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
CurriedRoleHOW used at line 1
jnthn m: use nqp; say nqp::can(Metamodel::CurriedRoleHOW, 'methods')
camelia 0
MasterDuke but ParametricRoleGroupHOW isn't/doesn't CurriedRoleHOW. why would i look there?
jnthn m: use nqp; say nqp::can(Metamodel::ParametricRoleGroupHOW, 'methods') 19:29
camelia 1
jnthn m: role R { }; say R.HOW.^name 19:30
camelia Perl6::Metamodel::ParametricRoleGroupHOW
jnthn m: role R { }; say R.^methods
camelia ()
jnthn Hm, that looks OK
m: role R { }; say R.^methods(:all)
camelia ()
timotimo i was guessing about the involvement of CurriedRoleHOW, because they are kinda related 19:31
jnthn Is methods actually the problem, or is the problem that you end up doing .^methods on an NQPClass and it gives back an NQP routine? 19:32
MasterDuke hm. let me see... 19:33
i changed it to: for $!invocant.^methods(:all) -> $method { note("public method"); my $method_name = $method.name; 19:37
"public method" does not get printed
jnthn Hm, ok 19:40
Can you put a CATCH block in to see how it breaks?
MasterDuke building that... 19:42
`Unexpected named argument 'all' passed` 19:44
ParametricRoleGroupHOW's methods() just passes on a capture of the named parameters 19:54
jnthn Hm, where do? 19:56
*where to
I guess grep for the methods methods and throw a *%ignore on them 19:57
to slurp up any unknown ones
MasterDuke huh. i have a note() as the first line in ParametricRoleGroupHOW's methods(), why doesn't that get printed? 19:58
there are only two 'method methods' 19:59
src/Perl6/Metamodel/MethodContainer.nqp:45: method methods($obj, :$local, :$excl, :$all) { 20:00
src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp:170: method methods($obj, *@pos, *%name) {
jnthn MasterDuke: Huh, indeed... 20:04
MasterDuke jnthn: yeah. i guess i could always try() with :all and then do without if that throws, but that's not pretty 20:14
any more debugging ideas? 20:17
timotimo maybe it passes %name on to something else?
MasterDuke `$c.HOW.methods($c, |@pos, |%name);` in ParametricRoleGroupHOW.nqp 20:23
`for self.parents($obj, :all($all), :excl($excl)) {` in MethodContainer.nqp
only places they're used in those methods() 20:24
huh. that `Unexpected named argument 'all' passed` is from github.com/MoarVM/MoarVM/blob/mast...#L386-L388 not github.com/rakudo/rakudo/blob/nom/...P.nqp#L885 20:38
any extra debug info i could get from an MVMArgProcContext? 20:39
here's a MVM_dump_backtrace when i broke at that line gist.github.com/MasterDuke17/2a92c...e7b8e2bbee 20:42
jnthn Oh, wow, it's making it all the way to calling .methods on knowhow... 20:43
oh wait, or is it
Oh, no 20:44
but
(/home/dan/Source/perl6/install/share/nqp/lib/nqpmo.moarvm:methods)
That's the giveaway
It's a method methods somewhere in src/how/ in NQP that likely wants a look
MasterDuke ?
jnthn The nqpmo being the cldue
*clue
MasterDuke ah, there are three in NQP
and none have :$all 20:45
just :$local
jnthn Well, problem found :)
So far as NQP's MOP is concerned, :$all being true or false would give the same results anyway
So can just add :$all in the signature for compat, and ignore its value 20:46
MasterDuke ok, trying that now 20:47
making progress, didn't die right away, now to take out some of my debugging prints... 20:53
ah ha! now `use NativeCall; my \compar_t = Callable but role :: { method sub_signature { :(Pointer,Pointer --> int) } };` just dies with `No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'. Did you mean 'min'?` 20:55
jnthn++ 20:56
jnthn MasterDuke++ # actually fixing it :) 20:58
Geth nqp: c4af44b05b | MasterDuke17++ | 3 files
Add :$all to methods() for Perl 6 compatability

For some types, calling .^methods(:all) in Rakudo would end up in NQP. None of the NQP methods() had a :$all parameter, so they would die with
  `Unexpected named argument 'all' passed`. Per
  irclog.perlgeek.de/perl6-dev/2017-...i_14681666 :$all doesn't
have any effect, so this commit adds them only for compatability.
  BenGoldberg++ for the find, timotimo++ and jnthn++ for the debugging
help.
21:09
BenGoldberg You're welcome :) 21:11
timotimo 4ice 21:12
... nice.
MasterDuke m: class C { method foo { self!bar }; method bar { say "hi" } }; C.new.foo
camelia 5===SORRY!5=== Error while compiling <tmp>
No such private method 'bar' for invocant of type 'C'
at <tmp>:1
------> 3class C { method foo { self!7⏏5bar }; method bar { say "hi" } }; C.new.
MasterDuke next thing on the list, how to get ^^^ to suggest the public 'bar'? 21:13
timotimo i'm not really sure it should, as private and public methods are so strongly different
you may need to also check what class the method belongs to because private methods are only valid in the same class 21:14
jnthn So long as it indicates clearly that it's public, not private...
MasterDuke heh. your past self disagrees. rt.perl.org/Ticket/Display.html?id=123078
timotimo if you only check if "self" is the right one, you may end up suggesting private methods that don't exist in the actual class
i'm smarter now :) 21:15
jnthn Or more optimistic then :P
MasterDuke yeah, i think what i just did (the way i added suggesting public/private methods, not the the NQP commit) is a little wrong, or less that optimal 21:17
any thoughts on when/how to suggest public vs private? 21:18
BenGoldberg If there's an exact name match. 21:34
timotimo (at least i hope i'm smarter) 21:38
MasterDuke for both cases? you tried to call a non-existing private method, only suggest a public one if it's exact? and if you tried to call a non-existing public method, only suggest a private one if it's exact?
BenGoldberg No, I'm just saying that that's what I think *ought* to happen :) 21:39
MasterDuke i feel i should get some votes from @LARRY 21:47
timotimo: i'm getting the private methods via ^private_method_table, so i believe they should only be for the same class 21:55
yoleaux AlexDaniel: Future-AlexDaniel: Fix all 103 whateverable issues 21:56
timotimo that's right 22:00
well, i hope that it is
you could look at dispatch:<!>
MasterDuke that calls find_private_method(), which just looks in %!private_methods, which is what private_method_table() returns 22:04
AlexDaniel yoleaux fffuuuuuuu 22:19
Geth roast: 6a78d5ddf1 | (Zoffix Znet)++ (committed using GitHub Web editor) | packages/Test/Util.pm
Remove duplicate .resolve

The Win32 fix seems to have been untested[^1] as a duplicate .resolve was still in use.
  [1] github.com/perl6/roast/commit/b5b9...ada0f32ccd
23:01
Zoffix Did we come up with security bug policy at the Toolchain Summit? 23:46
yoleaux 01:40Z <BenGoldberg> Zoffix: There is no whatever-anything in the code: gist.github.com/BenGoldberg1/d0764...549f4bc359
Zoffix 'cause I found a security bug
And so like.. do I just fix it? Do we notify someone first? Do we notify users via some channels? 23:48
Zoffix don't yet got a fix, but is compiling a poor attempt
ugexe policy is... policy 23:50
in other words: any security policy I would imagine would be rakudo specific 23:51
Zoffix poor attempt fails
Sure. But lizmat mentioned it would be a topic for PTS before PTS happened.
ugexe heh, it was for perl5 at least 23:53
Zoffix heh 23:54