Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-07-02

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:10 dalek perl6-roast-data: dc3fc29 | coke++ | / (4 files):
00:10 dalek perl6-roast-data: today (automated commit)
00:10 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/dc3fc29a0a
00:10 dalek rakudo-star-daily: 3ed1924 | coke++ | log/ (13 files):
00:10 dalek rakudo-star-daily: today (automated commit)
00:10 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/3ed1924efc
00:41 BenGoldberg joined #perl6
00:58 rurban1 joined #perl6
01:01 klapperl joined #perl6
01:35 xenoterracide__ joined #perl6
01:41 rindolf joined #perl6
01:56 FROGGS_ joined #perl6
01:59 rurban1 joined #perl6
01:59 klapperl_ joined #perl6
02:01 lelf joined #perl6
02:08 fhelmberger joined #perl6
02:12 chenryn joined #perl6
02:21 jakesyl_ joined #perl6
02:22 noganex_ joined #perl6
02:28 xenoterracide__ joined #perl6
02:30 gfldex joined #perl6
02:34 SevenWolf joined #perl6
02:39 hoverboard joined #perl6
02:40 btyler joined #perl6
02:46 firefish joined #perl6
03:00 rurban1 joined #perl6
03:06 dayangkun joined #perl6
03:16 lue joined #perl6
03:23 xragnar_ joined #perl6
03:25 rurban1 joined #perl6
03:38 lelf` joined #perl6
04:04 kaare_ joined #perl6
04:17 dalek roast/S26-WHY: 3f19bde | (Rob Hoelz)++ | S26-documentation/why.t:
04:17 dalek roast/S26-WHY: Use #| instead of #= in why.t
04:17 dalek roast/S26-WHY:
04:17 dalek roast/S26-WHY: The current version of why.t is actually broken; it is #| that
04:17 dalek roast/S26-WHY: is supposed to attach to declarations following it, rather
04:18 dalek joined #perl6
04:18 ClarusCogitatio joined #perl6
04:19 chenryn joined #perl6
04:20 lue joined #perl6
04:21 lue Bah. That's the second time syngen has crashed my computer since I updated to latest everything. Not to mention that when it doesn't, shell() calls that should work return exit statuses of -1 :/
04:44 chenryn joined #perl6
04:55 nhayashi joined #perl6
05:09 kurahaupo joined #perl6
05:25 rurban1 joined #perl6
05:32 rurban1 joined #perl6
05:54 colomon_ joined #perl6
06:05 anaeem1 joined #perl6
06:12 darutoko joined #perl6
06:14 kjmjlj joined #perl6
06:27 Isp-sec joined #perl6
06:33 sergot morning o/
06:35 James-YeJ3TE48lO joined #perl6
06:43 erkan joined #perl6
06:43 erkan joined #perl6
06:45 igorsutton joined #perl6
06:47 FROGGS_ joined #perl6
06:50 Tene joined #perl6
06:50 Tene joined #perl6
06:50 djanatyn joined #perl6
06:53 James-YeJ3TE48lO left #perl6
06:58 zakharyas joined #perl6
06:59 mr-foobar joined #perl6
07:03 moritz \o
07:06 FROGGS o/
07:07 slavik joined #perl6
07:11 sqirrel joined #perl6
07:20 earlgreyhot joined #perl6
07:20 earlgreyhot left #perl6
07:20 [Sno] joined #perl6
07:30 yakudza joined #perl6
07:30 pdcawley joined #perl6
07:32 virtualsue joined #perl6
07:34 rurban1 joined #perl6
07:42 ingy joined #perl6
07:48 pdcawley joined #perl6
07:49 dmol joined #perl6
07:59 denis_boyun_ joined #perl6
08:06 slavik joined #perl6
08:19 teodozjan joined #perl6
08:20 FROGGS jnthn: seems like this broke perl6-p (nqp::handle in for loops with labels, probably because of inlining or so)
08:20 FROGGS jnthn: f12ff54... Check for poisoned for trying to inline blocks.
08:22 FROGGS jnthn: this is the last that seems to work: e602e68... Avoid messing up nqp::handle in block inlining.
08:26 dakkar joined #perl6
08:32 jnthn But...what...it makes it inline *less* things...
08:32 jnthn FROGGS: Please try compiling with --optimize=off
08:33 FROGGS k
08:33 * FROGGS is checking out HEAD
08:33 jnthn I'm starting to fear you were relying on an optimization...
08:34 FROGGS probably
08:34 FROGGS I just don't see the connection...
08:34 FROGGS well, perhaps I do, not sure
08:35 FROGGS I guess I rely on it inlining several Q:PIR blocks
08:35 jnthn Are they in the same pair of curlies?
08:35 FROGGS no
08:36 FROGGS if $!label { Q:PIR { ... } } else { Q:PIR { ... } }
08:36 rurban1 joined #perl6
08:36 FROGGS ohh wait, I should have used the 'good' revision to test if it breaks without optimization...
08:39 brrt joined #perl6
08:44 masak good antenoon, #perl6
08:44 FROGGS hi masak
08:44 sjn \o
08:44 FROGGS hi sjn
08:45 masak ahoj FROGGS, sjn
08:45 sjn masak: you wouldn't by any chance still have the slides from that cats & robots talk you did a while back?
08:51 FROGGS jnthn: the 'good' commit also explodes when optimization is turned off....
08:53 FROGGS jnthn: the offending code is in MapIter...
08:53 fhelmberger joined #perl6
08:57 vendethiel m: class A { method foo { state $ = 5.rand } }; my $a = A.new; say $a.foo; $a.foo; say A.new.foo;
08:58 camelia rakudo-moar 77024f: OUTPUT«4.71881256149797␤4.71881256149797␤»
08:58 vendethiel m: class A { method foo { state $ = (1..15).pick } }; my $a = A.new; say $a.foo; say $a.foo; say A.new.foo;
08:58 camelia rakudo-moar 77024f: OUTPUT«4␤4␤4␤»
08:58 vendethiel well, that's certainly c-like-languages-like ...
08:59 vendethiel m: class A { has $!p; method foo { $!p //= (1..15).pick } }; my $a = A.new; say $a.foo; say $a.foo; say A.new.foo;
08:59 camelia rakudo-moar 77024f: OUTPUT«13␤13␤14␤»
09:00 markov joined #perl6
09:00 markov left #perl6
09:05 timotimo o/
09:08 vendethiel o/, timotimo
09:09 vendethiel was there a weekly this week ?
09:09 timotimo yas
09:10 chenryn joined #perl6
09:28 kaleem_ joined #perl6
09:31 masak sjn: I can't find that talk :/
09:31 masak sjn: I save most of them, but I don't know what happened to that one.
09:33 denis_boyun_ joined #perl6
09:34 spider-mario joined #perl6
09:36 rindolf joined #perl6
09:37 sjn masak: aw :-(
09:37 rurban1 joined #perl6
09:38 masak indeed; aw :/
09:39 denis_boyun joined #perl6
09:40 jnthn FROGGS: True using ?? !! instead of if { } else { }
09:41 FROGGS jnthn: tried yesterday too and it compiled, but the spectests failed like I WAT
09:41 FROGGS doing it again now though
09:42 FROGGS I think the problem about ternary is that Q:PIR has no useful return value, and it explodes then for that reason
09:47 brrt joined #perl6
09:49 FROGGS jnthn: Error while compiling op if (source text: "??\n                Q:PIR {\n                    .local int argc, count, NEXT, is_sink\n            ..."): Cannot infer type from ''
10:01 kkul joined #perl6
10:11 pecastro joined #perl6
10:27 Celelibi joined #perl6
10:29 kaleem_ joined #perl6
10:37 krunen_ sjn: You know there's video of that talk? http://www.nuug.no/pub/video/published/goopen2011/
10:37 SamuraiJack joined #perl6
10:42 timotimo o/ krunen :)
10:44 krunen \o timotimo
10:44 timotimo did the nqp and rakudo internals workshop make you more productive in your day-to-day tasks? :)
10:48 krunen Heh. something like that :/. I have been working on perl6 stuff lately, though :) You'll see more of me in the future, I promise!
10:49 timotimo oh, that's way cool :)
10:49 timotimo did you follow the latest improvements?
10:49 timotimo i remember back in the nqp and rakudo internals workshop we had a few slides on "moarvm, this new thing we're building which will eventually do cool stuff" and now we have moarvm doing cool stuff
10:49 krunen yeah, It's exciting!
10:57 timotimo hm
10:58 timotimo didn't we have a perl6-written irclog bot in here once? moritz?
10:58 moritz timotimo: we did have; but iirc it didn't deal gracefully with connection aborts
10:59 timotimo how long ago was that?
10:59 moritz maybe a year? dunno
10:59 timotimo do you think current rakudo could do better?
10:59 moritz it might
10:59 moritz I didn't have r-m to test back then :-)
10:59 timotimo :3
11:06 * timotimo saw masak's cats and robots talk
11:07 timotimo a nice talk :)
11:07 moritz robocat!
11:32 carlin joined #perl6
11:33 teodozjan joined #perl6
11:37 jnthn FROGGS: Just end the PIR blob with %r = something_to_return or so, iirc
11:38 FROGGS jnthn: that sounds promising! will do! :o)
11:39 rurban1 joined #perl6
11:44 carlin the problem with the early (~2010) Perl6 IRC bots was parrot/rakudo leaked memory, so they had to keep being killed and restarted
11:46 firefish joined #perl6
11:46 nwc10 but now we have JVM/Rakudo, so it will all be fine? (Because the JVM would rather fall over than leak if you get your heap size wrong)
11:47 moritz now we still need to catch connection timeouts in userland, and reconnect
11:55 sftp_ joined #perl6
12:02 James-YeJ3TE48lO joined #perl6
12:07 teodozjan joined #perl6
12:12 firefish How might one interpolate methods like .perl or .WHAT ? I tried my $Str = 'hello'; say " { $Str.WHAT } "; and a few variations. (Notes that less special methods like .elems works as expected)
12:13 moritz firefish: .WHAT returns the type object, which stringifies to the empty string plus warning
12:14 moritz firefish: what say() does is call .gist on its arguments, rather than "normal" stringification
12:14 moritz firefish: so you can   say " { $Str.WHAT.gist } ", but that's ugly, IMHO
12:14 moritz firefish: if you just want the type name, $Str.^name is more direct
12:15 firefish Ahh, Thanks! That helps a lot.
12:15 moritz (and .perl returns a normal string, so that's no problem)
12:15 masak .^name is what I use these days.
12:15 moritz another shortcut
12:15 moritz m: my $Str = 'hello'; say "Str is $Str.perl()"
12:15 camelia rakudo-moar 77024f: OUTPUT«Str is "hello"␤»
12:16 moritz if the method call ends in parens, it is interpreted as code
12:16 moritz inside the double-quoted string
12:16 FROGGS yes, either parens after method calls or put it in {}
12:16 FROGGS I tend to prefer the {}, because it looks mire like an interpolation
12:16 FROGGS more*
12:17 jnap joined #perl6
12:20 jnthn m: my $a = 42; say "$a is a $a.^name()"
12:20 camelia rakudo-moar 77024f: OUTPUT«42 is a Int␤»
12:20 jnthn Excuse my grammar... :)
12:22 firefish Ah, .^name is defiantly what i needed (removes the parens from the print as well). It seems I was mistaken about .perl. Thanks again!
12:22 guru joined #perl6
12:36 masak m: constant @vowels = <a e i o u>; sub article($word) { ($word ~~ /^@vowels/ ?? "an " !! "a ") ~ $word }; say article("banana"); say article("apple")
12:36 camelia rakudo-moar 77024f: OUTPUT«a banana␤an apple␤»
12:36 masak m: constant @vowels = <a e i o u>; sub article($word) { ($word ~~ /^@vowels/ ?? "an " !! "a ") ~ $word }; my $a = 42; say "$a is &article($a.^name)"
12:36 camelia rakudo-moar 77024f: OUTPUT«42 is a Int␤»
12:37 masak oh, right.
12:37 masak m: constant @vowels = <a e i o u>; sub article($word) { ($word ~~ m:i/^@vowels/ ?? "an " !! "a ") ~ $word }; my $a = 42; say "$a is &article($a.^name)"
12:37 camelia rakudo-moar 77024f: OUTPUT«42 is an Int␤»
12:37 masak jnthn: ftfy ;)
12:37 smls joined #perl6
12:39 smls lizmat++  # fighting the good fight  (against "explicit itemization being ignored for questionable DWIM purposes" craziness)
12:39 masak hm, clearly I missed some vital backlog :)
12:41 lizmat starting at http://irclog.perlgeek.de/​perl6/2014-07-01#i_8957498
12:41 * masak reads
12:42 rurban1 joined #perl6
12:42 amkrankruleuen joined #perl6
12:42 amkrankruleuen joined #perl6
12:44 masak for once, I don't have a sense of what's right and what's wrong in that discussion.
12:44 masak I just see two smart people (TimToady and lizmat) discussing.
12:46 masak but I do note that there *is* a discontinuity there in the language design, in which the rhs of `my @a = ...` always flattens and the rhs of `my %h = ...` has this extra check for "is it already a hash?"
12:46 masak it makes it slightly trickier to explain to people why `my @a = [1, 2, 3]` gives then an array of *an array* of three items.
12:46 masak (because the corresponding hash assignment gets it right)
12:47 masak a hobgoblin of foolish consistency would require those two types of assignment to work the same, or at least demand to know the reason they don't.
12:47 jnthn m: constant @vowels = <a e i o u>; sub article($word) { ($word ~~ m:i/^@vowels/ ?? "an " !! "a ") ~ $word }; my $a = class User { }; say "$a is &article($a.^name)"
12:47 camelia rakudo-moar 77024f: OUTPUT«use of uninitialized value of type User in string context␤ is an User␤»
12:47 masak I've never quite found out.
12:48 masak jnthn: might need some tweaking ;)
12:48 lizmat re explaining: http://irclog.perlgeek.de/​perl6/2014-07-01#i_8957778
12:49 masak lizmat: I'm... 80% sure I agree that's a gotcha and a WAT.
12:49 masak lizmat: mainly, I'd like to know who the "detect hash" use case really serves.
12:49 masak it certainly doesn't serve me or my code.
12:50 smls people who don't know that {...} itemizes, I guess
12:50 lizmat m: my @a; @a.push:{a=>1}; @a.push:{b=>2}; my %h = @a; say %h.perl  # masak: do you expect this result?
12:50 camelia rakudo-moar 77024f: OUTPUT«("b" => 2, "a" => 1).hash␤»
12:51 smls so they try   %hash = { a => 1, b => 2 }   but making it an error could easily teach them... :)
12:51 smls (error because odd number of items in hash assigment)
12:52 rurban1 joined #perl6
12:53 zengargoyle my Buf $b; $b ~= pack("N",4); say $b; # hangs instead of throwng some sort of error or working.
12:53 masak lizmat: no, certainly not.
12:53 masak lizmat: it feels like Perl 6 is mishandling my containers there.
12:54 masak lizmat: first and foremost, I don't see the logic in it.
12:54 * moritz thinks that those endless discussions about containers mean that we're doing somethinig wrong
12:54 lizmat the Hash.STORE doesn't see a difference between that and my %h = $%a, $%b
12:54 moritz and I don't mean some details where to treat what as a container, but something more fundamental
12:54 smls moritz: I think this one is a pretty localised problem one, actually
12:54 lizmat which, fwiw, I feel is also mishandling my containers  :-)
12:55 masak moritz: I for one greatly prefers Python's container model.
12:55 kurahaupo joined #perl6
12:55 masak moritz: it has a few base types, and it's very clear about what's mutable and what isn't.
12:56 moritz smls: I point people at http://doc.perl6.org/language/containers and they still don't understand if something flattens without trying it out -- I can't blame them
12:56 molaf joined #perl6
12:56 moritz masak: the problem ususally isn't mutability, but flattening
12:56 moritz and our problem with flattening is that both the verbs and the nouns have a say in what flattens and what doesn't
12:56 moritz with two side problems
12:57 moritz 1) it's often not obvious to what degree an operation flattens
12:57 moritz and 2) the specs don't deal with it properly either
12:58 moritz sometimes I feel the flatten / non-flatten distiction is so fundamental that it belongs to the same level as type annotations. Or we find a way to greatly simplify them.
12:58 smls moritz:  yeah but in this case, the problem isn't the normal flattening rules, but rather that hash assignment subverts them by looking at the type of items and unilaterraly decides to decontainerizing it if its of type Hash
12:59 moritz smls: I agree that that's *a* problem, but that's not the problem I'm talking about right
12:59 FROGGS zengargoyle: yes, I seen that too
12:59 moritz smls: just backlog for a month or two, and see how many questions regarding flattening come up here
12:59 FROGGS zengargoyle: happened for me quite a lot when accidently mising up strings and Bufs
12:59 moritz smls: and often we don't have satisfactory/easy answers for why something flattens and something else doesn't
13:00 smls yeah I'm one of the people who complained about the larger problems of P6 flattening before... :)
13:02 moritz smls: so, don't complain that I complain about the bigger picture too :-)
13:02 zengargoyle FROGGS: i'm just not sure if it's a bug or not.  my Buf $b; $b = pack("N",0); $b ~= pack("N",5); ... ; works.
13:02 smls ok :)
13:02 FROGGS zengargoyle: hanging is always a bug
13:02 zengargoyle :)
13:03 FROGGS I guess this works too: my Buf $b.=new; $b ~= pack("N",5);
13:03 FROGGS m: say Buf ~ Buf.new(65)
13:03 camelia rakudo-moar 77024f: OUTPUT«(signal )use of uninitialized value of type Buf in string context␤»
13:04 FROGGS m: say Str ~ "a"
13:04 camelia rakudo-moar 77024f: OUTPUT«use of uninitialized value of type Str in string context␤a␤»
13:04 zengargoyle Cannot modify an immutable Buf
13:04 FROGGS I expect the Str behaviour
13:05 zengargoyle my Buf $b=Buf.new; # works
13:05 FROGGS yeah
13:07 zengargoyle also had: for @offsets // 0 -> $o {...} not do what i wanted, but not sure if it should or not.
13:08 smls moritz: I still feel that the root of the problems of P6 flattening is its dynamic nature, i.e. "flatten or not" is effectively a flag attached to runtime objects and is passed around with them. Whereas in P5, flattening is predictable because it is static: Whether something flattens at any given time, can be decided based on how it appears at the corresponding position in the source code.
13:10 virtualsue joined #perl6
13:11 zengargoyle btw, does anybody have any favorite module/code that is non-trivial but non-way-complicated, and quite pretty idiomatic p6.  i.e. a good place to pick up and learn things.
13:12 tadzik so reasonably advanced thing?
13:14 moritz zengargoyle: I like to recommend my JSON::Tiny module, but I'm biased
13:18 zengargoyle maybe using Sets or Bags or some other data structures, or objects that postcircumfix [], or Xops and hypers...
13:20 smls some Rosetta Code examples maybe?
13:21 zengargoyle basically just not something that looks like p5 translated to p6, but something taking full advantage of p6.
13:22 tadzik I tried translating a couple of things, but it always made more sense to rewrite it from scratch
13:22 tadzik (File::Find and Text::T9)
13:22 tadzik actually, the latter might be translated
13:23 tadzik don't remember
13:26 * zengargoyle is currently trying to put together a Text::Fortune type module.
13:26 zengargoyle which is working but sorta ugly in parts. :)
13:27 masak ship it!
13:28 zengargoyle One of the miseries of life is that everybody names things a little bit wrong. —Feynman
13:29 masak that's "Richard Feynman", you know.
13:29 masak sorry, couldn't resist :P
13:29 moritz masaktroll!
13:30 * masak goes back to trolling his source code
13:30 * moritz wonders if a masaktroll is similar to a moomintroll
13:31 tadzik "One of the miseries of life is that everybody names things a little bit wrong. — Richard Feyneman"
13:32 tadzik deos that qualify as an autopun?
13:35 btyler joined #perl6
13:36 anaeem1 joined #perl6
13:38 zengargoyle panda install File::Find; ==> Successfully installed File::Find ; Segmentation fault; panda install Text::T9; Missing or wrong version of dependency 'lib/File/Find.pm'; *DOH*
13:38 masak tadzik: yes.
13:38 masak tadzik: though it's easy to miss, methinks.
13:38 telex joined #perl6
13:38 masak tadzik: my favorite of that pattern:
13:38 masak tadzik: "All I'm asking for is that posterity remember who I am -- unknown"
13:39 tadzik :D
13:40 tadzik "Don't believe every quote you found on the internet – George Washington"
13:40 hoverboard joined #perl6
13:40 bluescreen10 joined #perl6
13:40 moritz "90% of statistics are actually freely invented"
13:41 tadzik and "80% of people believe everything that contains statistical data"
13:41 moritz "87.24% of all statistics feign greater accuracy than can be mathematically justified"
13:41 masak and "Accodring to the Institute of Incomplete Statistics, 9 out of every 10"
13:42 Akagi201 joined #perl6
13:43 masak rd*
13:43 carlin 104% of people don't understand percentages
13:43 colomon_ joined #perl6
13:43 krunen m: my @a=Array.new(a=>1);say @a.perl
13:43 camelia rakudo-moar 77024f: OUTPUT«Array.new()␤»
13:43 krunen m: my @a=Array.new((a=>1));say @a.perl
13:43 camelia rakudo-moar 77024f: OUTPUT«Array.new("a" => 1)␤»
13:45 krunen is that a known bug?
13:45 masak notabug.
13:45 masak passing named args to anything assumes there's a named param on the other side to match it.
13:45 masak if there isn't, well, too bad.
13:46 masak you need the parens there to turn it from a named param into a Pair.
13:46 krunen m: my @a=(a=>1);say @a.perl
13:46 camelia rakudo-moar 77024f: OUTPUT«Array.new("a" => 1)␤»
13:46 krunen m: my @a=Array.new("a"=>1);say @a.perl
13:46 camelia rakudo-moar 77024f: OUTPUT«Array.new("a" => 1)␤»
13:46 masak or quotes.
13:46 krunen ok
13:48 thou joined #perl6
13:48 rurban1 joined #perl6
13:48 moritz m: multi a(:$a!) { 'named' }; multi a($a) { 'positional' }; say a(a => 1); say a("a" => 1); say a((a=>1));
13:48 camelia rakudo-moar 77024f: OUTPUT«named␤positional␤positional␤»
13:50 smls r: .say for <a b c>.permutations;
13:50 camelia rakudo-{parrot,jvm,moar} 77024f: OUTPUT«a b c␤a c b␤b a c␤b c a␤c a b␤c b a␤»
13:51 smls hm, my r-m REPL complains "Cannot call 'postcircumfix:<[ ]>';"
13:51 smls should probably update :)
13:52 jnthn I think we fixed that over a month ago... :)
13:53 masak keep up! :P
13:54 zakharyas1 joined #perl6
13:55 smls when is the next R* planned?
13:56 masak *gasp* -- we don't have a release manager for July!
13:56 masak hey, any volunteers for release manager this month?
13:56 moritz or for June, for that matter
13:56 moritz (R*, I mean)
13:56 masak oh, I meant R.
13:57 masak who wants the *honor* of releasing Rakudo this month? :) it's on the 17th. a Thursday.
13:57 masak I can make a deal with someone who wants to grab either July or September -- I can grab the other one.
13:58 SamuraiJack joined #perl6
14:00 jnthn Yes, but R* could rather do with release managers too.
14:00 jnthn And the answer to "when do we get one" is "when somebody steps up to do it".
14:01 masak how come that's the bottleneck for R* but almost never for R?
14:01 masak is it to do with the fact that we don't have a regular schedule for R* releases?
14:01 moritz masak: R has spectests, which everybody runs
14:01 moritz masak: R* has lots of module tests that often fail, and cause problems
14:01 moritz masak: and the release manager has to deal with that
14:01 masak :/
14:01 moritz so it's a lot more hassle/work
14:01 smls_ joined #perl6
14:01 teodozjan joined #perl6
14:02 masak and [Coke]++ and others are helping by monitoring the stuff, but it's not enough?
14:02 moritz masak: monitoring alone doesn't fix anything
14:02 masak ah, troo.
14:02 masak is there something we know we could do to make this less of a hassle for a R* release manager?
14:03 warlock_ joined #perl6
14:03 masak I honestly don't know the answer to that question, even if it's obvious.
14:03 moritz well, there are fancy automation schemes you could do
14:03 moritz like, if some tests fails, try again with the last released rakudo
14:03 moritz if they still fail, open a bug report for the module
14:03 moritz if not, open a bug report for rakud
14:03 moritz o
14:04 moritz but *fixing* those things can never be automated, I fear
14:04 masak *nod*
14:04 masak "open a bug report" has some appeal.
14:04 masak I could also envision a (Perl 6) bot flagging things when they break.
14:05 nwc10 that last one is probably the most useful of the "automation" tasks
14:05 masak plus providing a daily report so things don't get forgat.
14:05 masak forgut*
14:05 masak I feel like the problem is partly that these failures are too silent, and don't enter "the community" as something visible.
14:06 moritz agreed
14:06 masak instead it falls on (and risks burning out) silent heroes in the background.
14:06 nwc10 other than this channel, what community is there?
14:06 masak ...I meant the channel :)
14:07 masak ok, I hereby promise some weekend time to build a bot that does this. seeking a collaborator if someone feels so inclined. I also promise to maintain/admin whatever's the result.
14:08 moritz ++masak
14:08 nwc10 ++masak
14:08 * nwc10 apologises for not being able to volunteer to help
14:08 masak I do this because I love you guys. and I want Perl 6 to do well. and R* releases seem a sore spot right now.
14:10 raiph joined #perl6
14:11 raiph .oO ( imagines #| and #= became #> and #< instead and the end delimiter for #< was either newline or > )
14:12 kkul joined #perl6
14:12 krunen masak, I was just about to volunteer. Although I'd much rather work together with you.
14:12 masak \o/
14:12 masak krunen: synchronize watches! let's find a time when we sit down and beat out a bunch of TDD tests during an hour or two.
14:12 krunen seems like a nice way to get a better overview
14:12 masak aye.
14:12 masak suggested name: 'overviewbot' :)
14:13 moritz call it smokeextractor
14:13 moritz :-)
14:14 masak it should emit messages like: "it seems like Bailador just broke after Rakudo commit 7884a. it now fails 3 tests."
14:15 masak and "hey, just wanted to remind you that Bailador is still busted. :/ might want to check out what it was in Rakudo commit 7884a that broke it."
14:15 masak that's for the one-module-broken case.
14:16 masak if there are more modules, it needs to summarize, and probably put up a list of modules and failures somewhere.
14:16 krunen masak: tomorrow or friday evening? sunday?
14:16 carlin I like colomon_++'s module smoke tests page, although it's been down for about the last week :(
14:17 moritz yes, that's another problem; we have a bit of infrastructure, but it's mostly maintained by single individuals, and not linked to from perl6.org
14:17 moritz so if you don't use it every day, you have trouble finding that stuff
14:18 colomon_ The smoke test hasn't run successfully since June 17th.  :(
14:18 moritz :(
14:18 masak krunen: Friday evening oughta work.
14:18 masak still wanting a Rakudo release volunteer, people!
14:18 moritz fwiw I'm locally testing a 2014.06 R*
14:19 masak moritz++
14:19 moritz I can push my changes, but that doesn't (yet?) mean I'm committed to actually doing the release
14:19 masak of course.
14:19 dalek star: 2504edf | moritz++ | tools/star/Makefile:
14:19 dalek star: bump some versions to 2014.06
14:19 dalek star: review: https://github.com/rakudo/star/commit/2504edfe94
14:19 dalek star: c430b44 | moritz++ | modules/ (6 files):
14:19 dalek star: Update submodules
14:19 dalek star: review: https://github.com/rakudo/star/commit/c430b44039
14:19 dalek star: 7377a69 | moritz++ | / (2 files):
14:19 dalek star: bump more versions
14:19 dalek star: review: https://github.com/rakudo/star/commit/7377a69e0c
14:19 colomon_ And the web site is just a port open on my Linux server in the basement, informal enough I haven't set up anything to automatically run it or anything.  So right now every time my  the window on my laptop closes we lose the smoke test site.
14:20 moritz colomon_: I can give you an account on the box that hosts camelia
14:20 moritz colomon_: would you be willing to set up a smoker there?
14:20 moritz colomon_: I can help maintain it, if there's a wee bit of documentation
14:20 masak ooh, someone++ has upgraded the badges on http://modules.perl6.org/
14:20 colomon_ I'd certainly be willing to set up the smoker results site there.
14:21 colomon_ and if it handles p6 okay, setting up the smoker itself there wouldn't be hard either.
14:21 moritz yes, it build rakudo on all backends regularly
14:22 timotimo i wonder how long it'll be until we need to think about someone pwning our infrastructure via the ecosystem
14:22 colomon_ biggest issue really is getting emmentaler working (for parrot again, for jvm and moar for the first time)
14:23 krunen masak: I'll be hanging out here on friday.
14:24 masak krunen: me too. looking forward to this.
14:24 timotimo what "this" are we talking about?
14:24 hoelzro morning #perl6
14:24 masak timotimo: backlog 12 minutes or so.
14:25 timotimo ah, a bunch of tests for the overviewbot
14:25 masak aye.
14:26 masak new suggested names: 'singebot', 'smolderbot', 'kindlebot'.
14:26 carlin overseerbot
14:26 timotimo emberbot?
14:26 masak ooh.
14:26 moritz emmenbot?
14:26 moritz or emmentalerbot
14:27 moritz emmabot!
14:27 masak emmabot!
14:27 moritz or just "emma", with a slight pun on emmentaler
14:27 hoelzro raiph: that would probably be more obvious
14:27 hoelzro I think the idea of a CI-like system for P6 modules
14:27 masak with associations to 'ember', 'emmentaler' and http://strangelyconsistent.org/b​log/the-perl-6-is-not-perl-meme
14:27 jnthn I'm quite sure the nick "emma" will already be taken on freenode :P
14:28 masak ...and I want '-bot' in the name.
14:28 clkao q/win 28
14:28 * masak hugs clkao, good irssi user
14:28 Gothmog_ joined #perl6
14:28 masak clkao: did you know about Alt+A? I just learned about it the other week. it's awesome.
14:29 * hoelzro looks for Alt-A
14:29 timotimo "next buffer with activity in it"
14:29 hoelzro ha
14:30 hoelzro I wrote my own key binding for that a while ago, being ignorant of Alt-a's existence...
14:31 masak :)
14:31 FROGGS joined #perl6
14:31 carlin (E)valuates (M)any (M)odules (A)utomatically
14:31 masak timotimo: not just that, it prefers "red" buffers where you were directly addressed to "white" ones where you weren't.
14:31 clkao masak++
14:31 timotimo aye
14:32 masak while we're on the topics, check out bash and Ctrl+R. it will *blow your mind*.
14:32 masak topic*
14:34 timotimo hah
14:35 timotimo in fish, when you type something and hit the up arrow, it'll do reverse history search and show the matched parts highlighted
14:35 masak krunen: https://github.com/masak/emmabot
14:36 masak krunen: and you just got access.
14:36 masak ...and anyone else who asks will get access, too. though things aren't likely to turn interesting until Friday.
14:37 jnthn aww, dang
14:37 jnthn uh, ww
14:37 hoelzro so I have a bit of a question about extending Rakudo
14:37 hoelzro I'm trying (hopefully not in vain) to implement #=
14:37 timotimo ... don't we have that already?
14:38 colomon_ oh, I missed all the conversation on module borkage reporting.  I've always meant to tie something in with the smoke tester....
14:38 hoelzro timotimo: no; actually the existing impl is wrong
14:38 hoelzro well, tbf, roast is wrong
14:38 timotimo oh damn
14:38 hoelzro I updated roast in my S26-WHY branch
14:38 hoelzro that was the easy part =)
14:38 krunen masak: ok, great.
14:38 hoelzro #= currently implements leading directives
14:38 hoelzro it's supposed to be trailing
14:39 timotimo and #| does the opposite of what it should be doing as well?
14:39 hoelzro I've changed #= to #| (which *is* leading)
14:39 timotimo can't you just switch them? :)
14:39 hoelzro timotimo: #| doesn't work at all
14:39 hoelzro it's NYI
14:39 hoelzro and outside of my branch, not referenced in roast at all =(
14:39 masak colomon_: not too late! any and all suggestions welcome.
14:40 donaldh joined #perl6
14:40 masak colomon_: on Friday I think we'll just write the dependency-independent parts. and then we can think of how to tie it to the smoke tester, and where to deploy it.
14:40 * moritz offers host07 for deployment (that's the host that camelia runs on)
14:41 colomon_ masak: moritz++ has me working on getting the smoker up on host07.perl6.org as we speak
14:41 hoelzro so I'm looking for suggestions on how to properly implement #=
14:41 hoelzro since the rules seem to make it kind of hard
14:42 hoelzro I was thinking of modifying blockoid to take an optional parameter on whether or not to try parsing such a comment
14:42 cognominal joined #perl6
14:42 chenryn joined #perl6
14:43 masak colomon_: ah, excellent.
14:43 masak colomon_: hm, we could either have the bot run there too, or run somewhere else and just ask the smoker for some JSON or sump'n.
14:44 moritz masak: running the bot there too would be fine
14:44 teodozjan joined #perl6
14:44 moritz masak: we're already using a non-personal user account into which you could log in too
14:45 FROGGS moritz: that planeteria thingy does not seem to like my blog :/
14:45 salv0 joined #perl6
14:46 masak moritz: \o/
14:46 masak moritz: I was worried about that part. now I can focus on the fun of implementation instead.
14:46 masak moritz++
14:47 masak I feel I've been relatively absent from #perl6 during the first half of this year. it feels nice to be back. :)
14:48 moritz masak: welcome back :-)
14:48 vike joined #perl6
14:49 moritz so far the R* module tests (on parrot) look clean
14:54 FROGGS the moar tests should also be clean
14:55 FROGGS I'm not sure about the correct module versions though
14:55 moritz I just did a 'make modules-test', and at the end there was no message that anything failed
14:55 moritz I hope that means that everything was OK :-)
14:55 FROGGS hmmm
14:55 moritz if not, we have a tooling problem.
14:55 FROGGS I redirect that usually to a file and then grep for FAIL
14:56 moritz ok, m-spectest was also clean
14:56 FROGGS because it will continue on FAIL, and I don't remember seeing a message at the end
14:56 moritz oh come on
14:56 moritz that's just... sad.
14:56 moritz masak: ^^ another thing that can be improved, and would lift the maintainer's burden
14:57 colomon_ woof, 264 seconds for stage parse
14:57 nwc10 which backend?
14:57 colomon_ parrot
14:57 moritz afk
14:58 masak moritz: indeed.
14:58 FROGGS mine takes 140s
14:58 FROGGS (moar takes 45s)
14:59 colomon_ uh oh
14:59 colomon_ error:imcc:syntax error, unexpected DOT, expecting '(' ('.')
14:59 colomon_ in file 'src/gen/p-CORE.setting.pir' line 147823
15:00 brrt joined #perl6
15:01 FROGGS colomon_: we're trying to fix that right now
15:01 jnthn decommute &
15:02 colomon_ FROGGS: ah, is parrot build broken everywhere?
15:03 FROGGS rakudo HEAD is broken
15:04 colomon_ :(
15:05 virtualsue joined #perl6
15:06 xenowoolfy joined #perl6
15:07 teodozjan anyway is parrot 6_5_0 ok? i've tried to checkout Gdansk tag and it compiled but gone wild with IMHO total random errors in mu script
15:07 teodozjan s/mu/my/
15:09 teodozjan during runtime
15:13 FROGGS teodozjan: 6_5_0 is okay
15:15 teodozjan FROGGS: so I will try again with Gdansk on totally clean sources
15:17 sjn_roadie joined #perl6
15:23 treehug88 joined #perl6
15:35 sqirrel joined #perl6
15:40 FROGGS teodozjan: that really should work
15:42 teodozjan froggs: it doesn't :D I will try again without --jobs option that i discovered today
15:47 psch hi #perl6
15:47 * psch apparently forgot to turn his computer off yesterday.
15:49 colomon_ moritz++
15:52 teodozjan meanwhile (I'm compiling on laptop) I've tried to switch to moar but there is issue with JSON::RPC that I cannot understand so cannot report. Panda installs it, tests pass but when I use JSON::RPC::Client in my code it fails during compilation: 'cannot invoke null object', I guess it's phasers related and optimization
15:52 brrt left #perl6
15:52 FROGGS ewww
15:53 FROGGS I think I've seen that before in JSON::RPC
15:53 FROGGS but I forgot what it was
15:53 teodozjan this one? https://github.com/bbkr/jsonrpc/pull/11
15:54 FROGGS no, it was something else, just seen it like two weeks ago
15:57 TimToady I think I already said that I'm okay with my %hash = { a => 1 } not trying to dwim, but carping instead.
15:58 TimToady (busy helping to run a massive quizzing tournament, so a bit distracted this week)
15:58 FROGGS jnthn: I am sooo stupid I'm trying your suggested Q:PIR fix and i'm using %h instead of %r all the time >.<
15:58 hoelzro I think what I might end up doing is tracking the most recent "first on line" decl, and adding to its WHY when I see #=
15:58 hoelzro does that sound like a feasible approach?
15:59 jnthn FROGGS: It matters that it's a %r I think... r is for result...
15:59 FROGGS jnthn: yes, that is also my impression :o)
16:00 FROGGS it is just silly doing that bloody mistake
16:00 FROGGS dinner &
16:00 jnthn :)
16:00 jnthn enjoy dinner
16:01 teodozjan FROGGS: In google it apperas more than once http://irclog.perlgeek.de/perl6/2014-06-03 enjoy your meal
16:01 virtualsue joined #perl6
16:13 [Sno] joined #perl6
16:13 colomon_ moritz++
16:27 Rotwang joined #perl6
16:27 Akagi201 joined #perl6
16:29 teodozjan bye
16:29 FROGGS hmmm
16:44 SamuraiJack_ joined #perl6
16:49 denis_boyun joined #perl6
17:03 anaeem1_ joined #perl6
17:13 rindolf joined #perl6
17:31 zengargoyle i think i saw this brought up before... how does one test !private methods/attributes of a class from a .t type test?
17:34 dmol joined #perl6
17:37 jnthn Did the answer go something like "there's no easy way because it's a bad idea"? :)
17:37 jnthn Seriously, though, tests that depend on private stuff are more of an impediment to refactoring than they are a supporter of it.
17:38 timotimo no no, things you'd regularly do with private methods, you should really do with lexical subs inside the class!
17:38 timotimo that way you can't get at them at all!
17:38 jnthn Not at all; subs can't get at the attributes, and factoring stuff out into private methods is really useful
17:38 denis_boyun___ joined #perl6
17:39 zengargoyle probably, but when building it seems like it would be nice to test Obj.new.private('foo')
17:39 jnthn But the point of encapsulation is to retrain freedom to refactor what's on the inside; coupling tests to it is a great way to lose that freedom.
17:39 zengargoyle until you worked out any bugs / errors
17:40 zengargoyle other than adding a temporary public wrapper i guess.
17:40 denis_boyun_ joined #perl6
17:40 jnthn Well, you can put the temporary public wrapper in an augment in your tests.
17:40 jnthn So it keeps it together with them.
17:41 jnthn And means it won't accidentally get left behind in the real code.
17:41 jnthn From experience, though, my tests have been more valuable to me since I started considering them as just another client of the public API, and focused on behavioral testing.
17:42 zengargoyle yeah, i probably will agree once i can perl6 well enough to not blow up so often.
17:42 timotimo jnthn: in that case, make the attributes lexical variables! :P
17:43 zengargoyle just looking for something other than leaving public and going back and changing later.
17:43 jnthn timotimo: I still want them to be per instance. :)
17:43 jnthn zengargoyle: OK, then the augment route could well work for you.
17:43 timotimo then you can put the class itself inside the new method
17:43 timotimo and the lexical values next to it :P
17:43 jnthn timotimo: I think you're describing JavaScript :P
17:43 timotimo JS is so popular, obviously they're doing OOP extremely right
17:43 jnthn And yeah, having your privates just be lexicals is cute in a way. :)
17:44 timotimo i'm not that interested in having text on my ... privates ...
17:44 timotimo that joke was kind of in poor taste :|
17:44 jnthn ...wtf :)
17:45 Sqirrel joined #perl6
17:45 jnthn For that, I'm going to set you the task of trying to teach Moar spesh to turn named lexical lookups that the compiler didn't resolve into index ones :P
17:46 timotimo is that related to the new scope you came up with for role attributes?
17:46 timotimo "typevar" scope
17:46 jnthn No, it's just that as I was working on that I realized that we weren't doing the possible name -> index thing.
17:47 jnthn And that it saves some hash lookups perhaps
17:47 jnthn otoh it may be rather rare
17:47 timotimo is that for spesh-time-constant lexical names?
17:47 jnthn Yes.
17:47 timotimo so for example when a constant string is passed as an argument
17:48 jnthn Yeah, though actually:
17:48 jnthn getlex_no           w(obj) str :pure :deoptonepoint :noinline
17:48 jnthn It's always a constant string in that op.
17:48 timotimo ah, okay
17:48 jnthn gee, that's quite an adverbed op too :)
17:48 itz_ joined #perl6
17:48 jnthn Not sure how common it is, as I said, so don't expect mega wins...but it may get something in some cases.
17:49 jnthn Especially as the JIT likes indexy things
17:49 timotimo how do i produce code like that? the code i just built uses PseudoStash.new("MY", "$foo")
17:49 raiph joined #perl6
17:49 jnthn hmmm
17:49 timotimo that has &INDIRECT_NAME_LOOKUP around it, so maybe that'd be a point to hit
17:50 timotimo this was with MY::('$foo')
17:50 timotimo what were you thinking of?
17:50 jnthn tbh I'd disassemble CORE.setting and see where getlex_n* or bindlex_n* show up
17:51 jnthn And if the answer is "about never" then it may not be worth working on...
17:51 jnthn The QAST -> MAST nails a lot of the cases.
17:51 jnthn Certainly, all the variables.
17:52 timotimo getlex       loc_10_obj, lex_Frame_1_&EXHAUST_obj - this is the kind that is efficient, correct?
17:52 timotimo what about getlexstatic_o loc_11_obj, loc_10_str  and   getlexouter  loc_15_obj, loc_14_str ?
17:52 timotimo loc_str seems like it'd be dynamic and *perhaps* spesh-time constant
17:53 jnthn getlexstatic_o is handled by spesh nicely already
17:54 timotimo 2287 times getlexouter
17:54 timotimo does spesh do anything with that at all?
17:54 timotimo or is that already done in ->MAST?
17:54 timotimo (i suspect it probably could)
17:54 prevost joined #perl6
17:54 jnthn oooh
17:55 jnthn getlexouter could be worth speshing for sure
17:55 jnthn as $_ uses that
17:55 jnthn And it's named
17:55 timotimo a-ha!
17:55 jnthn And easily made non-named
17:55 jnthn That's actually more wrothwhlie than my initial suggestion.
17:55 timotimo i'm glad i could point something out :)
17:55 FROGGS timotimo: now you have to do it :o)
17:56 jnthn Well, just looking at the bytecdoe on hot paths (which spesh is good at hutning, so spesh_log is a good place to check) is a good way to find these things.
17:56 timotimo aye
17:56 timotimo i don't have an up-to-date spesh log for setting compilation
17:57 zakharyas joined #perl6
17:57 jnthn In more pressing matters, I don't have any rice or icecream in the appartment... bbiab :)
18:02 dalek rakudo/nom: bf69225 | (Tobias Leich)++ | src/core/MapIter.pm:
18:02 dalek rakudo/nom: unbust rakudo@parrot build
18:02 dalek rakudo/nom:
18:02 dalek rakudo/nom: Q:PIR blocks in the code of MapIter (for loops) relied on an optimization
18:02 dalek rakudo/nom: since the label support was added. Since the optimization creteria has
18:02 dalek rakudo/nom: changed, the blocks don't get inlined anymore and the build breaks. The
18:02 dalek rakudo/nom: build was already broken when optimization was turned off, just nobody
18:02 dalek rakudo/nom: noticed.
18:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bf69225dd1
18:02 FROGGS jnthn: there are many spectest fails :(
18:03 FROGGS but I wanted to push this fix, which is an improvement after all
18:03 FROGGS my guess is that tests that contain for loops fail
18:05 gtodd joined #perl6
18:06 FROGGS this is one of these fails:
18:06 FROGGS Element shifted from empty list
18:06 FROGGS in method Numeric at gen/parrot/CORE.setting:12801
18:06 FROGGS in block  at t/spec/S04-statements/for.rakudo.parrot:253
18:07 FROGGS that is line 12801: method Numeric(Failure:D:)    { $!handled ?? 0e0 !! $!exception.throw; }
18:09 FROGGS perl6-p -e 'say [+] 1, 2'
18:09 FROGGS Element shifted from empty list
18:10 FROGGS hmmm, that doesn't seem related to MapIter...
18:14 troydm joined #perl6
18:15 troydm jnthn: nice presentation on GC!
18:20 * lizmat is back from cycling
18:20 lizmat masak / colomon_ : you do realize there is something like CPAN Testers ?
18:21 lizmat and that mst has graciously offered at the PRS to be working on supporting Perl 6 distributions on CPAN Testers ?
18:22 colomon_ that would be good
18:25 rurban FROGGS++ yes. thanks
18:25 FROGGS rurban: more tweaks are needed though to get the tests clean
18:26 FROGGS will do that in a bit
18:26 FROGGS rurban: thanks for your help btw
18:26 rurban I just wanted to benchmark the new parrot with rakudo :)
18:27 FROGGS rurban: then do not run benchmark that use reduce ops :o)
18:27 FROGGS benchmarks*
18:27 rurban GSOC#2 looks like only max 2% win, even if we fixed the horrible method call implementation
18:28 timotimo aaw
18:28 timotimo so most of the bad performance is our fault?
18:28 FROGGS :/
18:28 timotimo our as in: nqp and rakudo codebase
18:28 rurban no, still parrot from 2.3 to 3.6
18:29 rurban it started getting better with parrot 3.6. moar still 2x faster
18:29 colomon_ just tried rakudobrew build parrot on my home machine, looks like it may have hung testing File::Find (during panda rebootstrap, presumably)
18:30 troydm I still have a 8 sec perl 6 parrot startup time, I can upload strace if anyone interested
18:31 FROGGS 8 seconds... wow
18:31 troydm I takes 8 seconds for perl 6 to startup on my virt machine
18:31 timotimo wow, holy wat.
18:31 FROGGS troydm: just for 'say 1' ?
18:31 rurban rakudo-j, right? (jvm)
18:32 FROGGS either it is perl6-j or the memory is limited to a 1GB or so
18:32 FROGGS troydm: it takes 0.5s here
18:32 troydm http://lpaste.net/106805
18:32 sqirrel joined #perl6
18:32 troydm rurban: no, parrot
18:33 timotimo troydm: can you also use the "perf" tool?
18:33 troydm FROGGS: memory isn't limited
18:33 troydm timotimo: I don't have it installed there
18:34 troydm timotimo: I never used it btw
18:34 rurban troydm: parrot? that's insane. Maybe a wrong rlib path?
18:34 troydm timotimo: is it detailed time measurement tool?
18:34 troydm rurban: what is rlib?
18:34 jnthn FROGGS: Ugh...wonder where the fails come from. But glad you could fix the build...
18:34 rurban run-time path to look for .so's
18:35 timotimo it's extremely detailed; if you have the kernel debug symbols installed, too, it'll also give you times spent in kernel functions and it does per-assembly-instruction-profiling (only probabilistic profiling, though)
18:35 rurban I can only imagine it runs into a loop or network drive to look for shared libs
18:35 timotimo it's also hard to understand the output, IMO :(
18:35 troydm for reference http://lpaste.net/106806
18:35 troydm that's perl 5
18:36 jnthn troydm: Glad you enjoyed the GC talk.
18:36 timotimo well, if system time is very high, that means some system call stuff is taking up lots of time
18:36 rurban troydm: can you file ticket at parrot with a detailled system description? I can followup there
18:36 FROGGS jnthn: next I am switching back to the first bad revision from before the fix, and check the tests
18:37 FROGGS I hope they pass with that revision any my patch
18:38 masak lizmat: CPAN Testers would, long term, be an even better solution, yes.
18:39 colomon_ CPAN testers would be a great short term solution if it was working already.  ;)
18:39 lizmat masak / colomon_ : well, that's really up to *us*
18:39 dalek rakudo-star-daily: 774d855 | coke++ | log/ (13 files):
18:39 dalek rakudo-star-daily: today (automated commit)
18:39 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/774d855a62
18:39 dalek perl6-roast-data: 6bbe79b | coke++ | / (4 files):
18:39 dalek perl6-roast-data: today (automated commit)
18:39 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/6bbe79b8d4
18:40 lizmat FWIW, I don't think we can have a working CPAN Testers setup until we can install from CPAN (which I believe we are on the brink of being able to now)
18:40 lizmat and have S22 implemented (which I'm working on between too much partying)
18:44 jnthn Even if the thing the bot uses as its data source later becomes CPAN testers, it's still useful to have, so we can keep better track of how we stand to ship an R*.
18:45 brrt joined #perl6
18:46 lizmat ok, I just wanted everybody to be on the same page
18:47 lizmat so that we don't get "I wish somebody had told me about CPAN Testers" later  :-)
18:47 PZt joined #perl6
18:47 FROGGS yeah :o)
18:47 FROGGS we'd need to spit out metabase compatible reports at some point
18:47 jnthn nom &
18:49 bluescreen100 joined #perl6
18:50 * [Coke] would love to help with overviewbo
18:51 FROGGS [Coke]: you are on holiday! go away! :P
18:52 FROGGS (was just a joke, really)
18:52 masak lizmat: what you're saying is important. doesn't much change the goal for Friday's hacking, though.
18:52 rurban troydm: posted his strace to http://lpaste.net/2276809923645931520. parrot looks ok, it starts getting slow with perl6. I guess it's too less memory
18:52 masak lizmat: was planning to make the data source injectable anyway :)
18:53 lizmat okidoki, glad to hear that!
18:55 [Coke] FROGGS: excelent point!
18:55 FROGGS meh
18:55 gfldex joined #perl6
18:58 troydm rurban: http://lpaste.net/8624230172146532352
18:58 moritz http://host07.perl6.com:8080/report first interemediate result of colomon_++'s and my efforts to make the smoker avaiable to the public
18:58 troydm rurban: btw the previous strace.log was from like 6 hours ago prior to our talk
19:01 timotimo nothing in particular takes up way too much time on its own ...
19:02 Isp-sec joined #perl6
19:02 rurban checked the stats, look ok. checked the brk: look ok, similar timings
19:03 troydm memory wise Mem:   2061300k total,  1625868k used,   435432k free,   166220k buffers
19:05 rurban the initial .so search path is huge, but the timings for that are not that dramatic
19:07 colomon_ moritz++
19:07 timotimo oh no build failure!
19:07 timotimo (perhaps cairo isn't available on that machine?)
19:07 colomon_ now we just need to fgigure out how to get emmentaler working again...
19:07 timotimo (and gtk3 neither?)
19:08 pecastro joined #perl6
19:08 rurban A big difference is parrot reading a PBC though. I need 0.04 to read Grammar.pbc. he needs 0.4. 10x slower
19:09 FROGGS moritz / colomon_: feature request: I'd like to see my stuff at the top / highlighted by http://host07.perl6.com:8080/report?who=FROGGS
19:10 FROGGS troydm: where is the vmdk/vhd of that vm? on your local hard drive?
19:10 timotimo FROGGS: well, when you go to /report/froggs, you get only your stuff
19:10 timotimo is that good enough?
19:10 FROGGS ohh
19:10 FROGGS \o/
19:11 FROGGS moritz / colomon_: feature request closed :D
19:11 troydm FROGGS: yeah, local zfs mirror drive (raid 1, twice read speed)
19:12 retupmoca moritz, *: that reminds me - I have 5 or so open PR's that fix module builds + tests that have been open for over a month
19:12 dalek ecosystem: 5b83ecd | (Tobias Leich)++ | META.list:
19:12 dalek ecosystem: File::Spec is known as IO::Spec and is in core
19:12 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/5b83ecde2e
19:12 retupmoca do we want to point panda to a fork in the perl6 project, a fork in a new modules project, or just let the PR's sit there?
19:16 teodozjan joined #perl6
19:16 teodozjan hi again
19:16 teodozjan i found that someone made something that I was dreaming of for a long time http://host07.perl6.com:8080/report?who=FROGGS
19:17 teodozjan but I can't see which backend is used
19:17 dalek nqp: 816b281 | (Tobias Leich)++ | src/vm/parrot/6model/reprs/CPointer.c:
19:17 dalek nqp: allow CPointer math for parrot backend
19:17 dalek nqp:
19:17 dalek nqp: The memory address of a CPointer can now be read and set.
19:17 dalek nqp: review: https://github.com/perl6/nqp/commit/816b28176a
19:17 FROGGS teodozjan: parrot I think
19:19 psch https://gist.github.com/pe​schwa/e5aee72dcce9d4b60ec1 # golf'd test failure of compiled URI.pm; where do i go from here...? :)
19:19 psch on jvm, as it happens for star-daily
19:21 rurban nice dancer buttons, very camelia alike
19:22 teodozjan one my module is missing PerlStore
19:22 rurban /project/ does not work yet
19:23 masak "why is perl 6 taking so long" -- http://www.billthelizard.com/2014/01​/why-is-programming-language-so.html
19:23 moritz masak: yes, I saw that
19:23 moritz masak: along with "why is perlmonks so slow", which made me chuckle
19:23 masak :)
19:24 teodozjan i have only 'why perl is used' :)
19:24 lizmat I get popular / ugly / bad
19:25 moritz teodozjan: you have to add 'so'
19:25 teodozjan moritz: why is perl so popular
19:26 teodozjan i think google knows my atitude to perl
19:26 lizmat with duckduckgo, I get only "popular"
19:28 jnthn hah, I love the Erlang one :)
19:29 dalek roast: 6620326 | (Elizabeth Mattijsen)++ | / (12 files):
19:29 dalek roast: Fix %h = { a => 1 } confusion
19:29 dalek roast: review: https://github.com/perl6/roast/commit/6620326069
19:31 jnthn I think Smalltalk comes off best :)
19:32 virtualsue joined #perl6
19:34 itz_ joined #perl6
19:38 rjbs jnthn: I had trouble getting Smalltalk off, but I had to scrub scrub scrub.
19:40 jnthn It's hard to scrub with a mop...
19:42 lizmat especially if it is attached later
19:48 FROGGS aww, common... I cannot create a NULL pointer on the jvm??
19:49 pecastro_ joined #perl6
19:50 avuserow joined #perl6
19:51 dalek rakudo/nom: 7bd2971 | (Elizabeth Mattijsen)++ | lib/Pod/To/Text.pm:
19:51 dalek rakudo/nom: Fix some more %h = { a => 1 } confusion
19:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7bd2971c21
19:53 FROGGS okay, nvm
20:00 teodozjan is rakudo + parrot HEAD usable?
20:03 teodozjan no answer, I assume no then :)
20:03 jnthn teodozjan: I think FROGGS++ was looking into the test fails there.
20:04 FROGGS teodozjan: it builds again, but reducing a list for example fails
20:04 FROGGS m: say [+] 1, 2
20:04 camelia rakudo-moar bf6922: OUTPUT«3␤»
20:04 FROGGS p: say [+] 1, 2
20:04 camelia rakudo-parrot bf6922: OUTPUT«Element shifted from empty list␤  in method Numeric at gen/parrot/CORE.setting:12801␤  in sub infix:<+> at gen/parrot/CORE.setting:4203␤  in sub infix:<+> at gen/parrot/CORE.setting:4201␤  in sub  at gen/parrot/CORE.setting:17577␤  in block  at…»
20:04 FROGGS like this
20:04 FROGGS need to hunt that down
20:05 teodozjan FROGGS: file-find.t takes infinite time
20:05 FROGGS okay, will look at that too
20:06 teodozjan thanks
20:10 brrt joined #perl6
20:12 dalek nqp: 61dbd66 | (Tobias Leich)++ | src/vm/jvm/runtime/org/perl6​/nqp/sixmodel/reprs/CPointer (2 files):
20:12 dalek nqp: allow CPointer math for jvm backend
20:12 dalek nqp:
20:12 dalek nqp: The memory address of a CPointer can now be read and set.
20:12 dalek nqp: review: https://github.com/perl6/nqp/commit/61dbd666f5
20:28 dalek rakudo/nom: 7eaf6c2 | (Elizabeth Mattijsen)++ | src/core/Temporal.pm:
20:28 dalek rakudo/nom: Fix some more %h = { a => 1 } confusion
20:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7eaf6c2ed4
20:28 dalek rakudo/nom: 498480c | (Elizabeth Mattijsen)++ | src/core/Hash.pm:
20:28 dalek rakudo/nom: my %hash = { a => 1 } is now an odd numbered fail
20:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/498480c64a
20:28 FROGGS lizmat++
20:35 FROGGS damn
20:35 dalek roast: 403d070 | (Elizabeth Mattijsen)++ | S26-documentation/10-doc-cli.t:
20:35 dalek roast: Undo unneeded fix
20:35 dalek roast: review: https://github.com/perl6/roast/commit/403d070789
20:35 dalek roast: e7deb5d | (Elizabeth Mattijsen)++ | S02-types/assigning-refs.t:
20:35 dalek roast: Unfudge now passing tests
20:35 dalek roast: review: https://github.com/perl6/roast/commit/e7deb5dcf7
20:35 lizmat FROGGS: pletterpet ?
20:35 FROGGS my patch that unbusts the parrot build really is just a partial fix
20:37 lizmat damn!
20:44 FROGGS okay, I'm going to build now a rakudo from before labels where implemented, but I turn off optimization
20:44 jnthn FROGGS++ # investigating
20:46 FROGGS jnthn: btw, the OpaquePointer.Int stuff is now there on all backends... I add tests and bump nqp revision, and then you can apply NativeCall #44
20:46 FROGGS porting nativecast to the others will be "fun"
20:46 FROGGS :/
20:48 jnthn FROGGS: OK, just lemme know when it's ready to apply.
20:48 jnthn FROGGS: Or do you want a NativeCall commitbit?
20:48 FROGGS I take the bit *g*
20:48 vendethiel m: multi a(:$a!) { 'named' }; multi a($a) { 'positional' }; say a(a => 1); say a("a" => 1); say a((a=>1)); # insanity--
20:48 camelia rakudo-moar 7bd297: OUTPUT«named␤positional␤positional␤»
20:49 FROGGS the one with the quoted name is clearly a bug
20:49 FROGGS the others are correct
20:50 jnthn FROGGS: You got it.
20:50 FROGGS jnthn: thank you :o)
20:50 jnthn No, quoting the name means it's not a named arg any more.
20:50 jnthn Has to be a literal there
20:50 FROGGS that is surprising
20:50 lue joined #perl6
20:51 lizmat to me this feels it predates the invention of :key<value>
20:51 FROGGS but I think I understand now
20:51 lizmat I would argue that only :a(1) would be named
20:51 lizmat and all others would be positional
20:52 jnthn No.
20:54 lizmat jnthn: care to elaborate ?
20:54 TimToady foo => 42 is actually the named argument syntax from Ada
20:54 TimToady and it's what P5ers will reach for
20:55 lizmat but "foo" => 42 would not be a named argument ?
20:55 jnthn lizmat: foo => ... is a *really* common way to do that, and often reads a lot more nicely.
20:55 FROGGS they already need to let -foo => 42 go :o)
20:55 jnthn lizmat: Also: we're WAY past the point where such things are up for grabs any more.
20:55 FROGGS jnthn++
20:56 TimToady in real life people don't pass pairs to a function much unless they're gonna pass a bunch of 'em, in which case just put 'em all in one set of parens
20:57 TimToady or use the quotes
20:57 TimToady the implication that it should not think about whether the key is a valid identifier
20:57 mattp_ joined #perl6
20:57 TimToady even if it happens to be one inside the quotes
20:58 raiph joined #perl6
20:59 mattp_ joined #perl6
21:00 lizmat m: multi a(:$a!) { "named" }; multi a($a) { "positional" }; my $a = "a"; say a(a => 1); say a("a" => 1); say a(|($a=>1))
21:00 camelia rakudo-moar 7bd297: OUTPUT«(signal )named␤positional␤»
21:00 lizmat seems to segfault on the last one, but only if the positional is before it
21:00 lizmat m: multi a(:$a!) { "named" }; multi a($a) { "positional" }; my $a = "a"; say a(a => 1); say a(|($a=>1))  # doesn't segfault
21:00 camelia rakudo-moar 7bd297: OUTPUT«named␤named␤»
21:00 FROGGS eww
21:01 jnthn r: multi a(:$a!) { "named" }; multi a($a) { "positional" }; my $a = "a"; say a(a => 1); say a("a" => 1); say a(|($a=>1))
21:01 camelia rakudo-jvm 7bd297: OUTPUT«(timeout)»
21:01 camelia ..rakudo-{parrot,moar} 7bd297: OUTPUT«(signal )named␤positional␤»
21:01 lizmat even on parrot, wow
21:01 jnthn At least they're consistent :P
21:01 lizmat I guess I'll rakudobug this...
21:01 jnthn But yeah, wtf.
21:01 jnthn Plesae do.
21:01 jnthn *please
21:04 lizmat #122218
21:04 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122218
21:05 beastd joined #perl6
21:08 FROGGS jnthn: this line in the setting explodes: https://gist.github.com/FROGGS/ee29f​d604210defdb8f9#file-setting-nqp-L19
21:09 FROGGS jnthn: do you see a connection to MapIter?
21:09 guru joined #perl6
21:28 pippo joined #perl6
21:29 pippo m: %h = {};
21:29 camelia rakudo-moar 7bd297: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/MyV7QGrFjgâ�¤Variable '%h' is not declaredâ�¤at /tmp/MyV7QGrFjg:1â�¤------> [32m%h[33mâ��[31m = {};[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
21:29 pippo m: my %h = {};
21:29 camelia rakudo-moar 7bd297: ( no output )
21:33 lizmat in a few hours, that will fail with Odd Numbered ...
21:35 pippo lizmat: I am confused. {}.WHAT still says it is a hash.
21:36 pippo so why I cannot assign %h  to {} ?
21:36 lizmat because {} is itemized
21:36 FROGGS like [] is an itemized list
21:36 lizmat m: say nqp::iscont({}); say nqp::iscont(%())
21:36 FROGGS so it is one thing and will land in one slot of the array
21:36 camelia rakudo-moar 498480: OUTPUT«1␤0␤»
21:37 lizmat m: say %().WHAT
21:37 camelia rakudo-moar 498480: OUTPUT«(Hash)␤»
21:38 BenGoldberg joined #perl6
21:40 pippo Why then I can do my %h := {} ?
21:41 pippo <== scratching his head...
21:42 lizmat because binding gives you a "view" on something else
21:43 * vendethiel has heard "I actually didn't want to look at it first because of it's a 'Perl', but wow, it's amazing"
21:43 teodozjan joined #perl6
21:43 lizmat how about this as a deprecation warning:
21:43 lizmat $ 6 'my %bar = {a => 1}; say %bar.perl'
21:43 lizmat ("a" => 1).hash
21:43 lizmat Saw 1 call to deprecated code during execution.
21:43 lizmat ========================================​========================================
21:43 lizmat %bar = { ... } called at:
21:43 lizmat -e, line 1
21:43 lizmat Please use %bar = ... instead.
21:43 lizmat ----------------------------------------​----------------------------------------
21:46 dalek rakudo/nom: b8a1883 | (Elizabeth Mattijsen)++ | src/core/Hash.pm:
21:46 dalek rakudo/nom: Deprecate %h = {...} rather than make it fail
21:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b8a1883998
21:46 lizmat vendethiel++
21:47 vendethiel (so it does have that image - hey, that's what I talked about ! - but the language's so good it doesn't matter :-).)
21:47 * vendethiel has converted 4 friends from 2 yesterday o/
21:48 * vendethiel also heard "there's not much beginner material" ... and will be busy fixing that :-)
21:48 lizmat again vendethiel++  :-)
21:49 psch vendethiel++ # writing a beginner tutorial
21:50 psch FWIW, i blindly went some way from the test-failure reproduction i pasted earlier, and as it turns out the NPE happens in subcallstaticResolve_nao because Ops.getlex somehow returns null
21:51 psch which, as i understand it, means that the symbol can't be found in the current or any outer callframe
21:51 jnthn FROGGS: Well, the @values could hold a MapIter
21:51 psch which *might* mean that bytecode gen somehow messes up?
21:51 jnthn psch: Most likely, the outer chain is somehow broken.
21:52 FROGGS hmmm
21:52 jnthn FROGGS: But wasn't it just constants being passed?
21:52 jnthn Can .DUMP it I guess to find out
21:52 FROGGS what constants do you mean?
21:52 FROGGS the exploding one liner?
21:53 jnthn I mean, wasn't the failing test just [+] 1,2 or so?
21:53 jnthn In whihc case I don't see where a MapIter would be coming from
21:53 FROGGS yes, exactly that
21:55 FROGGS takes more than three minutes to get the .DUMP :(
21:56 masak 'night, #perl6
21:57 FROGGS gnight masak
21:57 ren1us joined #perl6
21:58 lizmat night masak
21:58 ren1us okay i seriously suck at this.  do you have do anything weird to define a stubbed class?
21:59 pippo lizmat: then {} is used for example for: my %h = 'a' => {'b' => 3}?
21:59 FROGGS Array<1>(
21:59 FROGGS :$!flattens(True),
21:59 FROGGS :$!items(QRPA<3>(▶2)),
21:59 FROGGS :$!nextiter(▶Mu)
21:59 FROGGS jnthn: no mapiter :/
21:59 lizmat this is only about assigning {} to a %
21:59 lizmat pippo: ^^^
22:00 FROGGS m: class Foo { ... }  # ren1us
22:00 camelia rakudo-moar 498480: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/pK_T9dqJHeâ�¤The following packages were stubbed but not defined:â�¤    Fooâ�¤at /tmp/pK_T9dqJHe:1â�¤------> [32mclass Foo { ... }  # ren1us[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        â€¦Â»
22:00 FROGGS m: class Foo { ... }; class Foo { }  # ren1us
22:00 camelia rakudo-moar 498480: ( no output )
22:00 rurban1 joined #perl6
22:01 FROGGS jnthn: @values only contain one thing, but the while loop that contains the .shift is run twice
22:01 pippo night #perl6!
22:01 jnthn OK, well, that rules it out...
22:01 pippo left #perl6
22:01 FROGGS (the inner while)
22:02 jnthn FROGGS: Did you manage to figure out the point at which it breaks (as in, what change did it)?
22:02 ren1us huh.  that's what i'm doing and it's not really working
22:02 dalek roast: da091b0 | (Elizabeth Mattijsen)++ | S02-types/ (2 files):
22:02 dalek roast: Adapt tests to %h = { ... } now being deprecated
22:02 dalek roast: review: https://github.com/perl6/roast/commit/da091b0929
22:02 FROGGS jnthn: merging the labels in
22:03 jnthn oh, wow...but wait, wasn't that before the last Rakudo release?
22:03 timotimo i was confused, too
22:03 FROGGS https://github.com/rakudo/rakudo/commit/196b4ff55e
22:03 FROGGS jnthn: yes
22:04 FROGGS jnthn: but it survived until you fixed the optimizer :o)
22:04 jnthn Oh...
22:04 jnthn So it wsa another case of "relies on block flattening"?
22:04 jnthn I'm also wonder what exactly in that block poisons the optimization...
22:04 timotimo aye, that's unfortunate :(
22:04 jnthn As in, I don't see anything that should
22:05 timotimo maybe we ought to put a "run tests unoptimized" mode in and force that to be run for the release, as well
22:05 FROGGS jnthn: I'm not sure... I build the commit before labels were introduced with optimization turned off... but it passed
22:06 FROGGS I did a moar run with the same output, and it looks like as if parrot ignores the condition of the while loop
22:07 FROGGS $i gets two on parrot, but only 1 on moar
22:08 jnthn OK. Well, I think any refusal to block-inline based on poisoning there is bogus.
22:08 jnthn So I'd like to look at that. But that still means there's an issue of some sort with the labels branch.
22:08 FROGGS basically that gives two in that bit of the setting as well:
22:08 FROGGS m: my int $i = 0; say $i while ($i = $i + 1) <= 1
22:08 camelia rakudo-moar 498480: OUTPUT«1␤»
22:08 timotimo less poisoning would be more better :)
22:09 smls joined #perl6
22:10 FROGGS should I also look at nqp's code? the code-gen of while loops?
22:11 dalek rakudo/nom: f8a9336 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
22:11 dalek rakudo/nom: Some Changelog entries
22:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f8a9336377
22:11 jnthn Could do.
22:11 ren1us FROGGS: that's pretty much how I'm doing it (although I may be missing something).  it still says it's never defined, though.
22:12 * jnthn is really tired, so will get some rest
22:12 jnthn Will look at the optimizer tomorrow
22:12 FROGGS jnthn: me too
22:12 lizmat good night, jnthn
22:12 lizmat will also do the same
22:12 timotimo all right, good night you three!
22:12 FROGGS ren1us: is the code short enough to no-paste it?
22:12 lizmat early morning again tomorrow, travel to London
22:12 psch g'night you three
22:13 ren1us FROGGS: Nope, but https://github.com/ren1us/Research​/blob/master/lib/SimNet/Frames.pm (lines 27, 79)
22:13 FROGGS ren1us: what if you remove line three?
22:14 ren1us Why did that fix it ._.
22:14 FROGGS modules act a bit weird sometimes
22:14 ren1us this is true
22:15 ren1us feature or freaky?
22:15 FROGGS not a feature I guess
22:18 pdcawley joined #perl6
22:20 pdcawley joined #perl6
22:24 zengargoyle https://github.com/zengargoyle/perl6-Text-Fortune
22:25 zengargoyle it's horribly ugly at this point, nitpicking welcome as i try to polish it up.
22:26 rurban1 joined #perl6
22:29 rurban2 joined #perl6
22:42 ren1us m: class A { method new(@list) { self.bless; }; }; class B is A { method new() { callwith(@(())); }; }; my $b = B.new;
22:42 camelia rakudo-moar b8a188: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method new at /tmp/DE9mLRpUUM:1␤  in any call_with_args at src/gen/m-Metamodel.nqp:2967␤  in block  at src/gen/m-CORE.setting:618␤  in method new at /tmp/DE9mLRpUUM:1␤  in block  …»
22:42 ren1us rakudobug or am i just failing?
22:43 psch m: @(()).WHAT.say
22:43 camelia rakudo-moar b8a188: OUTPUT«(List)␤»
22:44 psch m: my @a = a, @(()), b; @a.perl.say
22:44 camelia rakudo-moar b8a188: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7RhTbVsiU0â�¤Undeclared routines:â�¤    a used at line 1â�¤    b used at line 1â�¤â�¤Â»
22:44 psch m: my @a = 1, @(()), 2; @a.perl.say
22:44 camelia rakudo-moar b8a188: OUTPUT«Array.new(1, 2)␤»
22:45 ren1us i suspect that the problem is that behind the scenes, callwith takes in all the params as a list, and it flattens the empty list into nothing
22:45 psch m: Mu.new.^signature.params.say
22:45 ren1us m: class A { method new(@list) { self.bless; }; }; class B is A { method new() { callwith(@(()).item); }; }; my $b = B.new;
22:45 camelia rakudo-moar b8a188: OUTPUT«No such method 'signature' for invocant of type 'Perl6::Metamodel::ClassHOW'␤  in block  at /tmp/qt0gZEoHOf:1␤␤»
22:45 camelia rakudo-moar b8a188: ( no output )
22:46 psch eh, how was signature of method again... :)
22:47 timotimo m: say Str.^can('lc').perl
22:47 camelia rakudo-moar b8a188: OUTPUT«(method lc (Cool: *%_) { #`(Method|48338912) ... },)␤»
22:47 timotimo m: say Str.^can('lc')[0].signature
22:47 ren1us m: Mu.new.signature.params.say
22:47 camelia rakudo-moar b8a188: OUTPUT«:(Cool: *%_)␤»
22:47 camelia rakudo-moar b8a188: OUTPUT«No such method 'signature' for invocant of type 'Mu'␤  in block  at /tmp/QeibjVVJLs:1␤␤»
22:47 timotimo ren1us: no, that creates a new Mu object and tries to call a "signature" method on it
22:47 psch m: Mu.^can('new')[0].signature.params.say
22:47 ren1us realized that as i hit enter
22:47 camelia rakudo-moar b8a188: OUTPUT«Mu Any |␤»
22:47 timotimo :)
22:47 psch thanks timotimo++
22:47 timotimo yw
22:48 psch i don't think that helps though :D
22:48 ren1us but yeah, seems that callwith breaks for list params because it attempts to flatten them
22:48 timotimo does ... not?
22:48 ren1us works with .item tho
22:48 psch maybe i don't understand | sufficiently
22:48 psch in signature
22:50 timotimo |@ expands a listy thing into positionals, |% expands a hashy into nameds
22:51 psch and the raw | only works in protos?
22:51 timotimo oh
22:51 timotimo you mean | inside signatures %)
22:51 timotimo that gives you a snapshot of the "capture" at the point where it sits
22:52 timotimo m: sub do_it($a, |one, $b, |two) { say one.perl; say two.perl; }; do_it(1, 2);
22:52 camelia rakudo-moar b8a188: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NXdLvt6yljâ�¤Cannot put required parameter $b after variadic parametersâ�¤at /tmp/NXdLvt6ylj:1â�¤------> [32msub do_it($a, |one, $b[33mâ��[31m, |two) { say one.perl; say two.perl; };[0mâ�¤    ex…»
22:52 timotimo oh, right.
22:52 timotimo m: sub do_it($a, $b, |one) { say one.perl; }; do_it(1, 2);
22:52 camelia rakudo-moar b8a188: OUTPUT«Capture.new()␤»
22:52 jdv79 if find it odd that recursive regex by capture is not implemented - is that correct?
22:52 jdv79 something like <~~0>
22:53 timotimo m: sub do_it(|c ($a, $b)) { say one.perl; }; do_it(1, 2);
22:53 camelia rakudo-moar b8a188: OUTPUT«one()␤»
22:53 timotimo m)
22:53 timotimo m: sub do_it(|c ($a, $b)) { say c.perl; }; do_it(1, 2);
22:53 camelia rakudo-moar b8a188: OUTPUT«Capture.new(list => (1, 2,))␤»
22:53 timotimo m: sub do_it(|c, $a, $b) { say c.perl; }; do_it(1, 2);
22:53 camelia rakudo-moar b8a188: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/a5HssPJKEUâ�¤Cannot put required parameter $a after variadic parametersâ�¤at /tmp/a5HssPJKEU:1â�¤------> [32msub do_it(|c, $a[33mâ��[31m, $b) { say c.perl; }; do_it(1, 2);[0mâ�¤    expecting any…»
22:53 timotimo right.
22:55 psch not sure if that makes sense to me right now :)
22:55 cognominal I am curious to know how Perl6 internal deals with these expansions and contractions. In many places a call is an expansion that result into a contraction due to a slurpy in the called. And these sometimes happen on many levels (even if I don't have a specific example in mind).
22:56 timotimo |foo noms the capture at that point and is regarded as a variadic
22:56 psch cognominal: an example is Mu.new($, *@), fwiw
22:56 timotimo so you can't put requireds after it
22:56 timotimo but if you put a sub signature into it (what i did with |c ($a, $b) there), you can have a second match process
22:57 psch (half an example at best i reckon)
22:57 timotimo if you have a proto foobar(|), that just means anything whatsoever can be passed and if it's onlystar, it'll be passed on, too
22:57 timotimo it could as well work with callsame/nextsame without an onlystar proto, too
22:57 timotimo not sure
22:58 psch oh
22:58 psch so e.g. multi a ($a, |b) { nextwith b }; multi a(*@b) { ... }
22:59 timotimo oh
22:59 psch err, probably with a subsignature behind |b that's already a slurpy array
22:59 timotimo i think it'd be nextwith |b
22:59 cognominal psch, this one throws an error.
23:00 timotimo i'm not sure you'll ever get the second multi candidate with more than one argument in the array
23:00 timotimo oh, wait, it's "next"with, not samewith
23:00 psch cognominal: the bit i wrote? probably; i'm rather sure i don't quite understand what exactly it does, anyway :)
23:01 adu joined #perl6
23:01 cognominal psch:  https://github.com/rakudo/raku​do/blob/nom/src/core/Mu.pm#L54
23:01 psch m: multi a($a, |b) { say "1. a"; nextwith |b }; mutli a(*@b) { say "2. a"; say @b }; a(1, "a", "b", "c"); a(1, 2)
23:01 camelia rakudo-moar b8a188: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Yi89is4PRc�Unable to parse expression in argument list; couldn't find final ')' �at /tmp/Yi89is4PRc:1�------> [32m) { say "1. a"; nextwith |b }; mutli a(*[33m�[31m@b) { say "2. a"; say @b…»
23:02 timotimo i'm ... not sure why that's a problem there?
23:02 kaiserpathos joined #perl6
23:02 psch mutli... :)
23:02 timotimo ooooh
23:02 psch m: multi a($a, |b) { say "1. a"; nextwith |b }; multi a(*@b) { say "2. a"; say @b }; a(1, "a", "b", "c"); a(1, 2)
23:02 camelia rakudo-moar b8a188: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:(Any $a, Any |b)␤:(*@b)␤  in sub a at /tmp/cCx8NJ37aZ:1␤  in block  at /tmp/cCx8NJ37aZ:1␤␤»
23:02 psch m: multi a($a, |b) { say "1. a"; nextwith |b }; multi a(*@b where @b.elems > 2) { say "2. a"; say @b }; a(1, "a", "b", "c"); a(1, 2)
23:02 camelia rakudo-moar b8a188: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:(Any $a, Any |b)␤:(*@b where { ... })␤  in sub a at /tmp/UIDZmwco4k:1␤  in block  at /tmp/UIDZmwco4k:1␤␤»
23:02 ren1us such confusion.  what's this error mean?
23:02 ren1us Cannot invoke this object (REPR: Null, cs = 0) in method new at /home/Phoenix/workspace/Research​/PokeEnv/lib/SimNet/Frames.pm:32
23:02 psch m: multi a($a, |b) { say "1. a"; nextwith |b }; multi a(*@b where @b.elems < 3) { say "2. a"; say @b }; a(1, "a", "b", "c"); a(1, 2)
23:02 camelia rakudo-moar b8a188: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:(Any $a, Any |b)␤:(*@b where { ... })␤  in sub a at /tmp/fg56DB4M2v:1␤  in block  at /tmp/fg56DB4M2v:1␤␤»
23:03 psch m: multi a($a, |b) { say "1. a"; nextwith |b }; multi a(*@b where @b.elems < 3) { say "2. a"; say @b }; a(1, "a", "b", "c")
23:03 camelia rakudo-moar b8a188: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:(Any $a, Any |b)␤:(*@b where { ... })␤  in sub a at /tmp/4Bjfq2Mk4K:1␤  in block  at /tmp/4Bjfq2Mk4K:1␤␤»
23:03 ren1us (that line's just a self.bless)
23:03 psch cognominal: right, the default constructor doesn't do positional arguments
23:04 psch cognominal: i don't really know how the internals deal with though
23:05 cognominal Yes. So it is not a good example of a sequence of calls doing expansion/contraction which was the point I was curious about. But you may have wanted to carry some other point.
23:07 psch cognominal: no, sorry, i think i just spouted half-informed tidbits
23:08 cognominal psch: well, I once run on that particular error. so that was interesting to see what multi throwed it. so psch++
23:08 cognominal Can't sleep. Will go outside to enjoy the nice weather. An iPad is nice to read in the dark.
23:09 ren1us i think it just got mixed in with camelia's stuff, so i'll ask again: anyone know what this error's going on about?
23:09 ren1us Cannot invoke this object (REPR: Null, cs = 0)
23:09 timotimo m: my Mu $this := nqp::null(); $this();
23:09 camelia rakudo-moar b8a188: OUTPUT«Cannot invoke this object (REPR: Null, cs = 0)␤  in block  at /tmp/nM1BCDCrMz:1␤␤»
23:10 jnap1 joined #perl6
23:11 ren1us yeah that looks way, way more complicated than what i'm doing
23:11 timotimo somewhere internally something like that happens
23:12 ren1us what would cause that?
23:12 psch or something else doesn't happen even though it should
23:12 timotimo well, something returns a null instead of something invocable and something tries to invoke it later
23:12 timotimo can you get a better error with --ll-error?
23:12 psch --ll-exception
23:12 timotimo er, yes
23:13 timotimo i'm getting mighty tired
23:13 timotimo i'll go to bed i think
23:13 timotimo gnite and good luck!
23:13 Ben_Goldberg joined #perl6
23:13 psch g'nite timotimo
23:13 cognominal joined #perl6
23:14 ren1us 'night timotimo
23:14 ren1us and uh... it's certainly a longer error
23:14 ren1us http://pastebin.com/y4nSfk5Q
23:16 psch ren1us: can you push to your github? your local copy seems to be ahead
23:17 ren1us done.  i assume you already have a link somehow
23:17 psch ren1us: in the end, what timotimo said applies, you're doing something somewhere that should get you *something* but you get an empty Mu
23:21 ren1us i dunno, i just checked where the FrameInstance.new is called, and everything there seems to be clean.  the params i pass in are properly set, etc etc
23:22 ren1us i think what's setting it off is just the 'self' in self.bless
23:23 ren1us unless it could be getting caused by something totally unrelated
23:23 psch m: class Bar { has $.foo; method new(:$foo) { my $x = self.bless(:$foo) } }; my $b = Bar.new(:foo(1));
23:23 camelia rakudo-moar b8a188: ( no output )
23:23 psch probably golfed the cause away there... :)
23:25 ren1us that looks like exactly what i'm doing, other than having the new() params as named arguments
23:27 ren1us the very fact that self.WHICH is pitching a fit makes me think it's somewhere else entirely
23:27 ren1us Cannot invoke this object (REPR: Null, cs = 0) in method message at src/gen/m-CORE.setting:12555 in method WHICH at /home/Phoenix/workspace/Research/​PokeEnv/lib/SimNet/Frames.pm:144
23:29 psch m: class A::B {...}; class A::C is A::B { method WHICH { say "which" } }; class A::B { method inst { return A::C.new } }; my $a = A::B.inst; $a.WHICH
23:29 camelia rakudo-moar b8a188: OUTPUT«Cannot invoke this object (REPR: Null, cs = 0)␤  in method inst at /tmp/tOJLKN8zrC:1␤  in block  at /tmp/tOJLKN8zrC:1␤␤»
23:29 psch that's it
23:30 psch the WHICH is actually also not doing anything there
23:30 psch r: class A::B {...}; class A::C is A::B { }; class A::B { method inst { return A::C.new } }; my $a = A::B.inst; $a.WHICH
23:30 camelia rakudo-jvm b8a188: OUTPUT«(timeout)»
23:30 camelia ..rakudo-parrot b8a188: OUTPUT«No such method 'new' for invocant of type 'A::C'␤  in method inst at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
23:30 camelia ..rakudo-moar b8a188: OUTPUT«Cannot invoke this object (REPR: Null, cs = 0)␤  in method inst at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
23:31 BenGoldberg std: class A::B {...}; class A::C is A::B { }; class A::B { method inst { return A::C.new } }; my $a = A::B.inst; $a.WHICH
23:31 camelia std 0f2049c: OUTPUT«ok 00:01 126m␤»
23:31 BenGoldberg n: class A::B {...}; class A::C is A::B { }; class A::B { method inst { return A::C.new } }; my $a = A::B.inst; $a.WHICH
23:31 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Two definitions found for symbol ::GLOBAL::A::Bâ�¤â�¤  first at /tmp/2EXdgwIiRt line 1â�¤  second at /tmp/2EXdgwIiRt line 1 at /tmp/2EXdgwIiRt line 1:â�¤------> [32m..}; class A::C is A::B { }; class A::B [33mâ��…»
23:32 psch so what happens there? .new doesn't end up in A::B for some reason?
23:34 psch ren1us: i'm rather sure by now that it's a bug; .new from Mu should definitely end up in A::B and also in A::C, but even if you write it yourself self somehow breaks...
23:35 psch unless i'm lacking some knowledge wrt how OO works in Perl 6, which is definitely not impossible...
23:36 ren1us is it just that it's not being inherited down after a certain number of levels, or is it getting tripped by something weirder you think?
23:37 psch m: class A::B { method inst { return A::C.new } }; class A::C is A::B { }; my $a = A::B.inst;
23:37 camelia rakudo-moar f8a933: OUTPUT«Could not find symbol '&C'␤  in method <anon> at src/gen/m-CORE.setting:12879␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2604␤  in any find_method at src/gen/m-Metamodel.nqp:934␤  in method inst at /tmp/U7fAWu3RnR:1␤  in block  at /…»
23:38 psch ren1us: i'm not sure i know at all what's going on :)
23:38 ren1us well shit
23:38 psch m: class B { method inst { return C.new } }; class C is B { }; my $a = B.inst;
23:38 camelia rakudo-moar f8a933: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lnK_v0DET6â�¤Illegally post-declared type:â�¤    C used at line 1â�¤â�¤Â»
23:38 ren1us i feel like the stubbing has something to do with it
23:38 ren1us just a hunch
23:38 psch m: class C { }; class B { method inst { return C.new } }; class C is B { }; my $a = B.inst;
23:38 camelia rakudo-moar f8a933: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KCuw_5Tfexâ�¤Redeclaration of symbol Câ�¤at /tmp/KCuw_5Tfex:1â�¤------> [32md inst { return C.new } }; class C is B [33mâ��[31m{ }; my $a = B.inst;[0mâ�¤    expecting any of:â�¤        method ar…»
23:39 psch m: class C { ... }; class B { method inst { return C.new } }; class C is B { }; my $a = B.inst;
23:39 camelia rakudo-moar f8a933: ( no output )
23:39 Khisanth joined #perl6
23:39 psch ren1us: i guess you have to shuffle your code around a bit
23:39 psch apparently stubbing the class that gets instantiated works
23:39 ren1us ._.
23:40 ren1us you know what
23:40 ren1us i'm not going to question it
23:40 ren1us i'm not even going to complain about it
23:40 ren1us i'm just going to accept
23:40 psch you should
23:40 ren1us it*
23:40 psch file a rakudobug
23:40 psch it should work both ways, i'm pretty sure
23:40 psch (and if not it'll get mentioned in the ticket)
23:40 ren1us i think i'll do that
23:41 ren1us and i was going to file this one, too, but just to make sure, this looks broken to you, right?
23:42 ren1us m: class A { method new(@arr) { self.bless(); }; }; class B is A { method new() { callwith(@(())); }; }; my $b = B.new;
23:42 camelia rakudo-moar f8a933: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method new at /tmp/0y0znic1hh:1␤  in any call_with_args at src/gen/m-Metamodel.nqp:2967␤  in block  at src/gen/m-CORE.setting:618␤  in method new at /tmp/0y0znic1hh:1␤  in block  …»
23:42 psch that's just () flattening; working as i would expect it to
23:42 psch m: say 1, @(()), 2
23:42 camelia rakudo-moar f8a933: OUTPUT«12␤»
23:42 psch m: say "1 @(()) 2"
23:42 camelia rakudo-moar f8a933: OUTPUT«1 @(()) 2␤»
23:42 psch m: say "1 {@(())} 2"
23:42 camelia rakudo-moar f8a933: OUTPUT«1  2␤»
23:43 ren1us i feel like there should be an implied call to .item or something
23:43 psch the empty list in array context is nothing
23:43 psch i dimly remember something about () flattening to Nil and Nil disappearing in item context or somesuch, but that was a few months ago
23:43 ren1us it makes sense why it's doing it, i just feel like it shouldn't be flattening in the first place lol
23:44 psch i don't have an opinion about what should flatten when and how tbh, there's smarter people than me here to worry about that :)
23:45 ren1us i'm all about having opinions on things i'm not smart enough to worry about :)
23:46 psch but yeah, i think @(()) turning to nothing is what's supposed to happen
23:46 psch you can, as you said, use .item or an empty array
23:47 ren1us i usually treat it as "list with 0 elements"
23:47 ren1us which may or may not be blasphemous.  there's no way of knowing.
23:49 psch S02: '[...] () is defined and means "there are 0 arguments here if you're counting that low".'
23:49 psch about 1/8 down the site, below the header "Nil"
23:50 SevenWolf joined #perl6
23:50 psch so the behavior above is perfectly fine; you're passing 0 arguments into a method call and rakudo complains about 1 instead of 2 arguments
23:51 psch m: say @(()) ?? 1 !! 0, ' args';
23:51 camelia rakudo-moar f8a933: OUTPUT«0 args␤»
23:51 psch m: say () ?? 1 !! 0, ' args';
23:51 camelia rakudo-moar f8a933: OUTPUT«0 args␤»
23:51 psch ...but "defined" isn't neccessarily True.

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

Perl 6 | Reference Documentation | Rakudo