Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-06-03

| Channels | #perl6-dev index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 lizmat joined #perl6-dev
00:04 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:07 timotimo i'd have to look through the roles that are mixed together for all the HOWs to figure that out
00:07 timotimo but now i'll go to bed
00:09 MasterDuke later...
00:58 BenGoldberg joined #perl6-dev
01:39 BenGoldberg ===SORRY!===␤QAST::Block with cuid 1 has not appeared
01:39 BenGoldberg Oops.
01:39 BenGoldberg m: https://gist.github.com/BenGoldberg1/d0764293ed61d1635056ed549f4bc359
01:39 camelia rakudo-moar ef9872: OUTPUT: «===SORRY!===␤QAST::Block with cuid 9 has not appeared␤»
01:49 ilbot3 joined #perl6-dev
01:49 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
02:01 Geth ¦ rakudo/nom: aa3684218b | (Zoffix Znet)++ | src/core/Junction.pm
02:01 Geth ¦ rakudo/nom: Fix crash when Junctioning empty array after .elems'ing it
02:01 Geth ¦ rakudo/nom:
02:01 Geth ¦ rakudo/nom: `my @a; say +@a; say @a.all` crashes with
02:01 Geth ¦ rakudo/nom: `This type (Scalar) does not support elems` because the `.elems`
02:01 Geth ¦ rakudo/nom: call touches $!reified attr, making it nqp::attrinited.
02:01 Geth ¦ rakudo/nom: Then, when we go to make a shiny new Junction, we check if the
02:01 Geth ¦ rakudo/nom: $!reified is inited and use it if it is. However, it's inited because
02:01 Geth ¦ rakudo/nom: .elems touched it, not because it got stuff up in it.
02:01 Geth ¦ rakudo/nom:
02:01 Geth ¦ rakudo/nom: Fix by checking concreteness of $!reified instead of initness.
02:01 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aa3684218b
02:02 Geth ¦ roast: 932eb4c444 | (Zoffix Znet)++ | S03-junctions/misc.t
02:02 Geth ¦ roast: Test Junctions on touched empty array don't crash
02:02 Geth ¦ roast:
02:02 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/aa3684218b1f668b
02:02 Geth ¦ roast: review: https://github.com/perl6/roast/commit/932eb4c444
02:13 Geth ¦ rakudo/nom: 61ecfd5117 | (Zoffix Znet)++ | src/core/Junction.pm
02:13 Geth ¦ rakudo/nom: Fix crashes/LTA errors in Junction.new w/wrong args
02:13 Geth ¦ rakudo/nom:
02:13 Geth ¦ rakudo/nom: Add a proto so we don't go into Mu.new's candidates.
02:13 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/61ecfd5117
02:14 Geth ¦ roast: beea798132 | (Zoffix Znet)++ | S03-junctions/misc.t
02:14 Geth ¦ roast: Test Junction.new with wrong args has sane errors
02:14 Geth ¦ roast:
02:14 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/61ecfd51172b0e3cf20
02:14 Geth ¦ roast: review: https://github.com/perl6/roast/commit/beea798132
02:25 MasterDuke joined #perl6-dev
02:29 MasterDuke interesting. i get different errors for missing methods depending on whether optimization is on or not
02:29 MasterDuke `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'`
02:31 MasterDuke `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:59 Ben_Goldberg joined #perl6-dev
06:22 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 :)
07:19 lizmat joined #perl6-dev
08:40 [Tux] This is Rakudo version 2017.05-347-g61ecfd511 built on MoarVM version 2017.05-25-g62bc54e9
08:40 [Tux] csv-ip5xs        2.863
08:40 [Tux] test            13.064
08:40 [Tux] test-t           4.400 - 4.427
08:40 [Tux] csv-parser      13.238
09:19 TimToady joined #perl6-dev
09:22 AlexDaniel joined #perl6-dev
10:21 lizmat joined #perl6-dev
10:43 dogbert17_ joined #perl6-dev
11:20 dogbert17 I'm trying to update some docs and stumbled upon this text in the traps ducument
11:20 dogbert17 "(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)."
11:21 dogbert17 isn't the mention on nextsame here incorrect, shouldn't it be callsame? (in the example above it actually says callsame): https://github.com/perl6/doc/blob/master/doc/Language/traps.pod6#L129
11:21 dogbert17 s/on/of/
11:24 jnthn Yes, it needs to be callsame there; were it nextsame, then the $!y = 18 would be dead code
11:25 jnthn That really that should talk about TWEAK
11:25 dogbert17 thx, I'll update it immediately
11:25 jnthn Since TWEAK is a better solution to that problem than overriding BUILDALL
11:26 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
11:28 dogbert17 here's another callsame part that looks a bit old; https://github.com/perl6/doc/blob/master/doc/Language/5to6-nutshell.pod6#L240
11:32 dogbert17 I'll see if I can improve that a tiny bit
11:33 MasterDuke jnthn: did you notice my comments from last night about turning off optimizing and getting different errors for missing methods?
11:35 jnthn MasterDuke: Yes, but you missed the important part of the output.
11:35 MasterDuke yeah, one's compile time one isn't
11:35 jnthn Right :)
11:36 jnthn 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<!>
11:37 MasterDuke 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:38 MasterDuke so i tried sending `type` to the X::Method::NotFound.new instead of `SELF`, but that didn't seem to work
11:39 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
11:40 MasterDuke oh, hm, need to re-compile to confirm that
11:40 jnthn Yes, exactly
11:41 jnthn It looks at the private_method_table directly
11:42 jnthn lunch &
11:58 MasterDuke ah, i see optimize_private_method_call() in Optimizer.pm
12:03 MasterDuke hm, i still don't understand why what becomes the $.invocant in X::Method::NotFound doesn't have any of the local methods
12:27 Geth ¦ rakudo/nom: 77d3c5465c | (Zoffix Znet)++ | src/core/operators.pm
12:27 Geth ¦ rakudo/nom: Fix infix:<orelse> calling .defined one too many times
12:27 Geth ¦ rakudo/nom:
12:27 Geth ¦ rakudo/nom: Check if we're at the last arg *before* we check definedness,
12:27 Geth ¦ rakudo/nom: otherwise we accidentally disarm Failures when we shouldn't
12:27 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/77d3c5465c
12:27 Geth ¦ roast: a215d2e021 | (Zoffix Znet)++ | S03-operators/orelse.t
12:27 Geth ¦ roast: Test infix:<orelse> calls .defined exact number of times
12:27 Geth ¦ roast:
12:27 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/77d3c5465c771387bf
12:27 Geth ¦ roast: review: https://github.com/perl6/roast/commit/a215d2e021
12:29 Geth ¦ rakudo/nom: 64e898f9ba | (Zoffix Znet)++ | src/core/Failure.pm
12:29 Geth ¦ rakudo/nom: Re-arm Failures when `fail`ing with them
12:29 Geth ¦ rakudo/nom:
12:29 Geth ¦ rakudo/nom: Maintain consistent interface that a call to &fail returns an
12:29 Geth ¦ rakudo/nom: explosive Failure, even if the arg was a handled Failure.
12:29 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/64e898f9ba
12:29 Geth ¦ roast: 6c06e3c123 | (Zoffix Znet)++ | S04-exceptions/fail.t
12:29 Geth ¦ roast: Test &fail re-arms handled Failures
12:29 Geth ¦ roast:
12:29 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/64e898f9baa159e201
12:29 Geth ¦ roast: review: https://github.com/perl6/roast/commit/6c06e3c123
12:50 geekosaur joined #perl6-dev
13:36 mst joined #perl6-dev
13:45 Geth ¦ roast: 53bb278ccf | (Zoffix Znet)++ | 3 files
13:45 Geth ¦ roast: Spec andthen/orelse/notandthen must not call .defined on last arg
13:45 Geth ¦ roast: review: https://github.com/perl6/roast/commit/53bb278ccf
14:00 committable6 joined #perl6-dev
14:04 MasterDuke Zoffix: is this expected? https://gist.github.com/Whateverable/760a547cace4e8a8ce6fcbbbe71b6445
14:09 MasterDuke jnthn: ^^^ the most recent change in behavior is because of https://github.com/rakudo/rakudo/commit/8ef538f79c75f48c5125f2cefb2e2801eccdc7d7
14:12 bisectable6 joined #perl6-dev
14:14 MasterDuke lizmat: ^^^ and '-'.IO.slup actually breaking is because of https://github.com/rakudo/rakudo/commit/b4d80c06d7d9a497559e15f44bc7077725fa53f3
14:14 MasterDuke s/slup/slurp
14:20 rightfold joined #perl6-dev
14:44 dogbert17 m: https://gist.github.com/dogbert17/63f8150589a4381c9860c7d718f9bcc8
14:44 camelia rakudo-moar 64e898: OUTPUT: «False␤»
14:44 dogbert17 commit: 2016.07 https://gist.github.com/dogbert17/63f8150589a4381c9860c7d718f9bcc8
14:44 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.
14:45 dogbert17 WAT
14:46 mst commit: 2016.07 https://gist.githubusercontent.com/dogbert17/63f8150589a4381c9860c7d718f9bcc8/raw/b614a3521d6b1a7f712dbbab5b66ba47c771563c/test.pl6
14:46 committable6 mst, Successfully fetched the code from the provided URL.
14:46 committable6 mst, ¦2016.07: «False»
14:50 dogbert17 mst, thx
14:50 mst *thanks
14:51 dogbert17 commit: 2016.01 https://gist.githubusercontent.com/dogbert17/63f8150589a4381c9860c7d718f9bcc8/raw/b614a3521d6b1a7f712dbbab5b66ba47c771563c/test.pl6
14:51 committable6 dogbert17, Successfully fetched the code from the provided URL.
14:51 committable6 dogbert17, ¦2016.01: «False»
14:51 dogbert17 commit: 2015.06 https://gist.githubusercontent.com/dogbert17/63f8150589a4381c9860c7d718f9bcc8/raw/b614a3521d6b1a7f712dbbab5b66ba47c771563c/test.pl6
14:52 committable6 dogbert17, Successfully fetched the code from the provided URL.
14:52 committable6 dogbert17, ¦2015.06: «False»
14:52 lizmat .
15:00 dogbert17 commit: 2015.01 https://gist.githubusercontent.com/dogbert17/63f8150589a4381c9860c7d718f9bcc8/raw/b614a3521d6b1a7f712dbbab5b66ba47c771563c/test.pl6
15:00 committable6 dogbert17, Successfully fetched the code from the provided URL.
15:00 committable6 dogbert17, ¦2015.01: «False»
15:01 dogbert17 anyone good at regexes here
15:02 dogbert17 the example on line 514, should it return 'True' as the text claims or 'False'? https://github.com/perl6/doc/blob/master/doc/Language/regexes.pod6#L504
15:12 timotimo the example may want a .chomp
15:17 dogbert17 timotimo: will test
15:18 AlexDani` joined #perl6-dev
15:18 dogbert17 timotimo: you mean like 'my $str = chomp q:to/EOS/; ...'
15:18 dogbert17 that seems to work :) timotimo++
15:20 jnthn MasterDuke: That looks like IO::Handle.open isn't repsecting :bin
15:20 jnthn MasterDuke: In the case of '-' I mean
15:34 dogbert17 m: my $str = "string with newline\n"; say so $str ~~ / line $$/;
15:34 camelia rakudo-moar 64e898: OUTPUT: «True␤»
15:34 dogbert17 commit: 2015.11 my $str = "string with newline\n"; say so $str ~~ / line $$/;
15:34 committable6 dogbert17, ¦2015.11: «True»
15:35 dogbert17 the last part of this doc piece must be incorrect:
15:35 dogbert17 "$$ 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."
15:36 dogbert17 feels as if the last part 'when the last character is not a newline character' should be dropped
15:37 BenGoldberg joined #perl6-dev
15:43 dogbert17 hmm, according to S05 the above code should return false
15:45 yoleaux Zoffix: Future-Zoffix: https://github.com/perl6/doc/issues/401
15:51 robertle joined #perl6-dev
16:03 TimToady m: say "\n" ~~ m:g/$$/
16:03 camelia rakudo-moar 64e898: OUTPUT: «(「」)␤»
16:03 TimToady m: say " " ~~ m:g/''/
16:03 camelia rakudo-moar 64e898: OUTPUT: «(「」 「」)␤»
16:03 TimToady m: say " " ~~ m:g/$$/
16:03 camelia rakudo-moar 64e898: OUTPUT: «(「」)␤»
16:03 TimToady looks truish to me
16:05 TimToady we don't want the null string after a \n to match, since \n is generally construed as a terminator, not a separator
16:17 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:23 moritz which part of this statement do you think is not true?
16:23 moritz sorry, missing a bit of context here
16:24 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:25 moritz which seems to agree with S05
16:25 moritz or am I missing something?
16:26 dogbert17 well, my brain is probably mushy, but to me the texts implies that this code should return false
16:26 dogbert17 m: my $str = "string with newline\n"; say so $str ~~ / line $$/;
16:26 camelia rakudo-moar 64e898: OUTPUT: «True␤»
16:27 moritz it matches before the newline character
16:27 moritz which is exactly what both S05 and the docs say
16:27 moritz m: say "string without newline" ~~ /line $$/
16:27 camelia rakudo-moar 64e898: OUTPUT: «「line」␤»
16:28 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
16:31 dogbert17 thanks for trying to help
19:04 MasterDuke timotimo: does $foo.^methods get compiled to $foo.HOW.methods($foo)? is there any difference between those?
19:19 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) } };
19:19 camelia rakudo-moar 64e898: OUTPUT: «X::Method::NotFound exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
19:19 MasterDuke i'm trying to fix that ^^^ no message
19:20 MasterDuke it's dying here https://github.com/rakudo/rakudo/blob/nom/src/core/Exception.pm#L180
19:21 MasterDuke the nqp::can succeeds, but something about the ^methods call goes horribly wrong
19:22 MasterDuke the message before it gets there is `No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'`
19:23 MasterDuke i stuck a note() in ParametricRoleGroupHOW's methods(), but it's not printing
19:24 timotimo perhaps have to look into CurriedRoleHOW?
19:25 MasterDuke hm, it doesn't have a methods()
19:25 MasterDuke might that be the problem?
19:26 timotimo you looked through all the roles it assembles, too?
19:26 MasterDuke which it?
19:27 timotimo CurriedRoleHOW
19:27 timotimo all of the HOWs are made up of many roles usually
19:27 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
19:27 jnthn Well, on something whose .HOW is a CurriedRoleHOW, I mean
19:28 jnthn Hm, but it's doing it on the .HOW which should be OK
19:28 jnthn m: use nqp; say nqp::can(CurriedRoleHOW, 'methods')
19:28 camelia rakudo-moar 64e898: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    CurriedRoleHOW used at line 1␤␤»
19:28 jnthn m: use nqp; say nqp::can(Metamodel::CurriedRoleHOW, 'methods')
19:28 camelia rakudo-moar 64e898: OUTPUT: «0␤»
19:28 MasterDuke but ParametricRoleGroupHOW isn't/doesn't CurriedRoleHOW. why would i look there?
19:29 jnthn m: use nqp; say nqp::can(Metamodel::ParametricRoleGroupHOW, 'methods')
19:29 camelia rakudo-moar 64e898: OUTPUT: «1␤»
19:30 jnthn m: role R { }; say R.HOW.^name
19:30 camelia rakudo-moar 64e898: OUTPUT: «Perl6::Metamodel::ParametricRoleGroupHOW␤»
19:30 jnthn m: role R { }; say R.^methods
19:30 camelia rakudo-moar 64e898: OUTPUT: «()␤»
19:30 jnthn Hm, that looks OK
19:30 jnthn m: role R { }; say R.^methods(:all)
19:30 camelia rakudo-moar 64e898: OUTPUT: «()␤»
19:31 timotimo i was guessing about the involvement of CurriedRoleHOW, because they are kinda related
19:32 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:33 MasterDuke hm. let me see...
19:37 MasterDuke i changed it to: for $!invocant.^methods(:all) -> $method {                 note("public method"); my $method_name = $method.name;
19:37 MasterDuke "public method" does not get printed
19:40 jnthn Hm, ok
19:40 jnthn Can you put a CATCH block in to see how it breaks?
19:42 MasterDuke building that...
19:44 MasterDuke `Unexpected named argument 'all' passed`
19:54 MasterDuke ParametricRoleGroupHOW's methods() just passes on a capture of the named parameters
19:56 jnthn Hm, where do?
19:56 jnthn *where to
19:57 jnthn I guess grep for the methods methods and throw a *%ignore on them
19:57 jnthn to slurp up any unknown ones
19:58 MasterDuke huh. i have a note() as the first line in ParametricRoleGroupHOW's methods(), why doesn't that get printed?
19:59 MasterDuke there are only two 'method methods'
20:00 MasterDuke src/Perl6/Metamodel/MethodContainer.nqp:45:    method methods($obj, :$local, :$excl, :$all) {
20:00 MasterDuke src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp:170:    method methods($obj, *@pos, *%name) {
20:04 jnthn MasterDuke: Huh, indeed...
20:14 MasterDuke jnthn: yeah. i guess i could always try() with :all and then do without if that throws, but that's not pretty
20:17 MasterDuke any more debugging ideas?
20:17 timotimo maybe it passes %name on to something else?
20:23 MasterDuke `$c.HOW.methods($c, |@pos, |%name);` in ParametricRoleGroupHOW.nqp
20:23 MasterDuke `for self.parents($obj, :all($all), :excl($excl)) {` in MethodContainer.nqp
20:24 MasterDuke only places they're used in those methods()
20:38 MasterDuke huh. that `Unexpected named argument 'all' passed` is from https://github.com/MoarVM/MoarVM/blob/master/src/core/args.c#L386-L388 not https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Metamodel/BOOTSTRAP.nqp#L885
20:39 MasterDuke any extra debug info i could get from an MVMArgProcContext?
20:39 Ben_Goldberg joined #perl6-dev
20:42 MasterDuke here's a MVM_dump_backtrace when i broke at that line https://gist.github.com/MasterDuke17/2a92c2dc130938f4a800ade7b8e2bbee
20:43 jnthn Oh, wow, it's making it all the way to calling .methods on knowhow...
20:43 jnthn oh wait, or is it
20:44 jnthn Oh, no
20:44 jnthn but
20:44 jnthn (/home/dan/Source/perl6/install/share/nqp/lib/nqpmo.moarvm:methods)
20:44 jnthn That's the giveaway
20:44 jnthn It's a method methods somewhere in src/how/ in NQP that likely wants a look
20:44 MasterDuke ?
20:44 jnthn The nqpmo being the cldue
20:44 jnthn *clue
20:44 MasterDuke ah, there are three in NQP
20:45 MasterDuke and none have :$all
20:45 MasterDuke just :$local
20:45 jnthn Well, problem found :)
20:45 jnthn So far as NQP's MOP is concerned, :$all being true or false would give the same results anyway
20:46 jnthn So can just add :$all in the signature for compat, and ignore its value
20:47 MasterDuke ok, trying that now
20:50 lizmat joined #perl6-dev
20:53 MasterDuke making progress, didn't die right away, now to take out some of my debugging prints...
20:55 MasterDuke 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:56 MasterDuke jnthn++
20:58 jnthn MasterDuke++ # actually fixing it :)
21:09 Geth ¦ nqp: c4af44b05b | MasterDuke17++ | 3 files
21:09 Geth ¦ nqp: Add :$all to methods() for Perl 6 compatability
21:09 Geth ¦ nqp:
21:09 Geth ¦ nqp: For some types, calling .^methods(:all) in Rakudo would end up in NQP.
21:09 Geth ¦ nqp: None of the NQP methods() had a :$all parameter, so they would die with
21:09 Geth ¦ nqp: `Unexpected named argument 'all' passed`. Per
21:09 Geth ¦ nqp: https://irclog.perlgeek.de/perl6-dev/2017-06-03#i_14681666 :$all doesn't
21:09 Geth ¦ nqp: have any effect, so this commit adds them only for compatability.
21:09 Geth ¦ nqp:
21:09 Geth ¦ nqp: BenGoldberg++ for the find, timotimo++ and jnthn++ for the debugging
21:09 Geth ¦ nqp: help.
21:09 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/c4af44b05b
21:11 BenGoldberg You're welcome :)
21:12 timotimo 4ice
21:12 timotimo ... nice.
21:12 MasterDuke m: class C { method foo { self!bar }; method bar { say "hi" } }; C.new.foo
21:12 camelia rakudo-moar 64e898: OUTPUT: «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.␤»
21:13 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
21:14 timotimo 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...
21:14 MasterDuke heh. your past self disagrees. https://rt.perl.org/Ticket/Display.html?id=123078
21:14 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
21:15 timotimo i'm smarter now :)
21:15 jnthn Or more optimistic then :P
21:17 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:18 MasterDuke any thoughts on when/how to suggest public vs private?
21:34 BenGoldberg If there's an exact name match.
21:38 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?
21:39 BenGoldberg No, I'm just saying that that's what I think *ought* to happen :)
21:47 MasterDuke i feel i should get some votes from @LARRY
21:50 lizmat joined #perl6-dev
21:55 MasterDuke timotimo: i'm getting the private methods via ^private_method_table, so i believe they should only be for the same class
21:56 yoleaux AlexDaniel: Future-AlexDaniel: Fix all 103 whateverable issues
22:00 timotimo that's right
22:00 timotimo well, i hope that it is
22:00 timotimo you could look at dispatch:<!>
22:04 MasterDuke that calls find_private_method(), which just looks in %!private_methods, which is what private_method_table() returns
22:19 AlexDaniel yoleaux fffuuuuuuu
23:01 Geth ¦ roast: 6a78d5ddf1 | (Zoffix Znet)++ (committed using GitHub Web editor) | packages/Test/Util.pm
23:01 Geth ¦ roast: Remove duplicate .resolve
23:01 Geth ¦ roast:
23:01 Geth ¦ roast: The Win32 fix seems to have been untested[^1] as a duplicate .resolve was
23:01 Geth ¦ roast: still in use.
23:01 Geth ¦ roast:
23:01 Geth ¦ roast: [1] https://github.com/perl6/roast/commit/b5b975b7d8fe7ce31a4ef6160e87c9ada0f32ccd
23:01 Geth ¦ roast: review: https://github.com/perl6/roast/commit/6a78d5ddf1
23:46 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: https://gist.github.com/BenGoldberg1/d0764293ed61d1635056ed549f4bc359
23:46 Zoffix 'cause I found a security bug
23:48 Zoffix 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
23:50 ugexe policy is... policy
23:51 ugexe in other words: any security policy I would imagine would be rakudo specific
23:51 Zoffix poor attempt fails
23:51 Zoffix Sure. But lizmat mentioned it would be a topic for PTS before PTS happened.
23:53 ugexe heh, it was for perl5 at least
23:54 Zoffix heh

| Channels | #perl6-dev index | Today | | Search | Google Search | Plain-Text | summary