Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-06-07

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:00 labster joined #perl6
00:01 labster o/ greetings from the Large Salt Lake
00:15 timotimo o/
00:18 labster Now that I have finally escaped work, it's time to deal with the pile of pull requests I've assembled.  "unit"? Who ordered that?
00:20 telex joined #perl6
00:21 TimToady some recently deceased physicist or other
00:25 labster TimToady++ gets all of my jokes.
00:25 jack_rabbit joined #perl6
00:30 * TimToady -> Reno
00:31 tinyblak joined #perl6
00:38 colomon joined #perl6
00:46 lizmat joined #perl6
00:52 colomon joined #perl6
01:07 colomon joined #perl6
01:13 flaviusb joined #perl6
01:16 JimmyZ_ joined #perl6
01:27 rurban joined #perl6
01:42 uncleyear joined #perl6
01:45 mr-foobar joined #perl6
01:45 SevenWolf joined #perl6
01:46 ilbot3 joined #perl6
01:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:55 fhelmberger joined #perl6
01:56 amurf joined #perl6
02:04 labster joined #perl6
02:07 kaare__ joined #perl6
02:08 llfourn joined #perl6
02:10 gagalicious does anyone know how to use html::treebuilder? i'm not sure how to match this  : <div class="presentation editorHtml"> <-- only this part.
02:18 Util gagalicious: Sure, just a second
02:21 Util gagalicious: my $d_p_eH = $tree->look_down( _tag => 'div', id => 'presentation editorHtml' ) or die;
02:21 Util Change $ to @ if you might have more than one occurance; in scalar context, look_down returns first found.
02:22 Util docs: https://metacpan.org/pod/HTML::Element#look_down
02:23 Util (The main TreeBuilder doc needs a pointer to the HTML::Element docs)
02:26 gagalicious oh ok. thanks. yeah i got it
02:26 Util yw
02:27 gagalicious $the ->as_text... problem is... <a>hello</a><a>there</a>... returns as hellothere. i would like to have "hello there" with space in between. how do i get this done?
02:28 skids joined #perl6
02:30 AlexDaniel oh no, not again
02:30 AlexDaniel m: grammar MyGrammar { regex TOP { ^ [ <foo> <bar> ]+ $ } regex foo { 'ZZZ' } regex bar { .*? } } my $data = 'ZZZ 123 ZZZ 456'; say MyGrammar.parse($data);
02:30 camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NtZuB0vGny␤Strange text after block (missing semicolon or comma?)␤at /tmp/NtZuB0vGny:1␤------> 3mar { regex TOP { ^ [ <foo> <bar> ]+ $ }7⏏5 regex foo { 'ZZZ' } regex bar { .*? } }␤    expecting an…»
02:30 labster AlexDaniel: try a semicolon after each block?
02:31 AlexDaniel nhm weird
02:31 AlexDaniel but no, that's not the problem
02:31 Util Well, if there are no spaces between </a> and <a> , it probably is not *displaying* with a space, but try this:
02:31 Util my $a_texts = join ' ', map { $_->as_text } $d_p_eH->look_down( _tag => 'a' );
02:31 Util gagalicious: ^
02:31 AlexDaniel m: grammar MyGrammar { regex TOP { ^ [ <foo> <bar> ]+ $ }; regex foo { 'ZZZ' }; regex bar { .*? }; }; my $data = 'ZZZ 123 ZZZ 456'; say MyGrammar.parse($data);
02:31 camelia rakudo-moar c2a57e: OUTPUT«「ZZZ 123 ZZZ 456」␤ foo => 「ZZZ」␤ bar => 「」␤ bar => 「 」␤ bar => 「 1」␤ bar => 「 12」␤ bar => 「 123」␤ bar => 「 123 」␤ foo => 「ZZZ」␤ bar => 「」␤ bar => 「 」␤ bar => 「 4」␤ bar => 「 45」␤ …»
02:31 AlexDaniel now this is a problem
02:31 gagalicious Util : thanks
02:31 gagalicious will try now
02:33 AlexDaniel this is probably related to my previous bug report: https://rt.perl.org/Public/​Bug/Display.html?id=125285
02:34 noganex_ joined #perl6
02:34 AlexDaniel either I don't get it at all or it is just one fat bug
02:34 ugexe it looks like that bug report is just related to how you quanitfy matches with %%
02:35 rmgk_ joined #perl6
02:35 AlexDaniel ugexe: the problem is that I see backtracking
02:35 AlexDaniel ugexe: this time there is no %%
02:35 AlexDaniel but again, it adds partial matches to the match object
02:36 AlexDaniel if it does so, how can I handle that? For example, I'm using actions
02:36 AlexDaniel and every time it grabs another character my method runs
02:36 gagalicious Util : it's not working. the map part...
02:38 Util gagalicious: Can you give me the block of HTML that you are parsing?
02:38 gagalicious ok... hang on
02:38 ugexe m: grammar MyGrammar { regex TOP { ^ [ <foo> <bar>* ]+ $ }; regex foo { 'ZZZ' }; regex bar { <thing> }; token thing { \d+ }; }; my $data = 'ZZZ123ZZZ456'; say MyGrammar.parse($data);
02:38 camelia rakudo-moar c2a57e: OUTPUT«「ZZZ123ZZZ456」␤ foo => 「ZZZ」␤ bar => 「123」␤  thing => 「123」␤ foo => 「ZZZ」␤ bar => 「456」␤  thing => 「456」␤»
02:38 ugexe thats how ive danced around that problem
02:39 ugexe https://github.com/ugexe/zef/blob/master/l​ib/Zef/Net/HTTP/Grammar/RFC7231.pm6#L6-L7
02:39 ugexe its not pretty (adding another token per rule) but it works
02:40 labster yes, that seems LTA
02:40 gagalicious Util : http://pastebin.com/HjqL08mz <-- thanks in advance
02:41 AlexDaniel ugexe: so I did: regex bar { <thing> }; token thing { .*? }; and now it just hangs
02:41 ugexe make sure you arent ending up with a < some-token* >* deal
02:42 labster you can match a lot of zero length strings in a row
02:42 AlexDaniel a lot of zero length strings on the same position?
02:42 AlexDaniel ummmm
02:43 ugexe you are also using a token and expecting backtracking i think
02:43 * AlexDaniel confused
02:43 Util gagalicious: and what does "not working" look like?
02:43 gagalicious still the same output... all joined.
02:44 gagalicious hang on i test again...
02:45 ugexe you are asking for a zero-or-more width match 1 to Infinity times
02:45 ugexe i think thats what you are ending up with
02:45 labster zero width, infinity times.
02:46 AlexDaniel right
02:48 AlexDaniel ugexe: sorry but this does not help at all
02:49 AlexDaniel so basically you just added \d and it started working
02:49 AlexDaniel but that's not the case for me
02:49 AlexDaniel I want <bar> to eat every character that does not match <foo>
02:49 ugexe i didnt just add \d
02:50 gagalicious Util : http://pastebin.com/STU8sZua
02:50 gagalicious output... same
02:50 AlexDaniel ugexe: then why did you add it all...
02:50 Util gagalicious: Working on it.
02:51 ugexe m: grammar MyGrammar { regex TOP { ^ [ <foo> <bar> ]+ $ }; regex foo { 'ZZZ' }; regex bar { <thing> }; token thing { .+ }; }; my $data = 'ZZZ123ZZZ456'; say MyGrammar.parse($data);
02:51 camelia rakudo-moar c2a57e: OUTPUT«「ZZZ123ZZZ456」␤ foo => 「ZZZ」␤ bar => 「123ZZZ456」␤  thing => 「123ZZZ456」␤»
02:51 ugexe happy?
02:51 labster ugexe: nope, it ate his Z's
02:51 AlexDaniel labster: thanks
02:51 ugexe i wasnt trying to give him the answer, just point out what his problem is
02:52 ugexe as i pointed out earlier, its how you quantify your matches
02:54 AlexDaniel somehow I still don't understand
02:55 labster m: grammar MyGrammar { regex TOP { ^ [ <foo> <bar> ]+ $ }; regex foo { 'ZZZ' }; regex bar { <thing> }; token thing { <![Z]>+ }; }; my $data = 'ZZZ123ZZZ456'; say MyGrammar.parse($data);
02:56 camelia rakudo-moar c2a57e: OUTPUT«(timeout)»
02:56 labster huh, there are no * in there.
02:58 AlexDaniel okay, I think I have a solution
02:58 AlexDaniel m: grammar MyGrammar { regex TOP { ^ [ <foo> $<bar>=.*? ]+ $ }; regex foo { 'ZZZ' }; };
02:58 camelia rakudo-moar c2a57e: ( no output )
02:58 AlexDaniel m: grammar MyGrammar { regex TOP { ^ [ <foo> $<bar>=.*? ]+ $ }; regex foo { 'ZZZ' }; }; my $data = 'ZZZ 123 ZZZ 456'; say MyGrammar.parse($data);
02:58 camelia rakudo-moar c2a57e: OUTPUT«「ZZZ 123 ZZZ 456」␤ foo => 「ZZZ」␤ bar => 「 123 」␤ foo => 「ZZZ」␤ bar => 「 456」␤»
02:59 * labster claps
02:59 AlexDaniel labster: do I get it right that it is a bug?
02:59 Util gagalicious: That is bad HTML; the last LI element in each UL block has no closing /LI.
02:59 Util However, just by using the A tags, this works for me:
02:59 Util my $d_sAT = $tree->look_down( _tag => 'div', id => 'secondaryActivitiesTree' ) or die; $d_sAT->dump;
02:59 Util my @a_s = map { $_->as_text } $d_sAT->look_down( _tag => 'a' );
02:59 Util use Data::Dumper; $Data::Dumper::Useqq=1; print Dumper \@a_s;
02:59 Util does it work for you?
02:59 gagalicious Util : so how? :I
02:59 gagalicious hang on...
02:59 gagalicious let me check what i need to do...
03:00 gagalicious yes, without the closing li tag... how do i do this? do u know?
03:00 labster AlexDaniel: no idea.  Maybe we should go ahead and rakudobug it anyway, and have someone tell us that we're wrong.
03:02 AlexDaniel labster: well, there is already one that I opened some time ago -- same problem, backtracking stuff in match object
03:02 labster ugexe: ¿do you have any idea why my last camelia times out?, because I'm not seeing it.
03:02 AlexDaniel labster: and I already commented there that there is a workaround
03:02 AlexDaniel so I just applied the same workaround here and it worked
03:03 AlexDaniel somehow I feel that if that's a bug, then it has the same roots
03:03 gagalicious Util : i see what u mean... u look_down on <a... ok... i guess... that's a quick fix. thanks a lot.
03:05 AlexDaniel because, well, instead of doing this: regex TOP { ^ [ <foo> <bar> ]+ $ }; regex bar { .*? }; I just do this regex TOP { ^ [ <foo> $<bar>=.*? ]+ $ };
03:05 labster I'll add this case to RT#125285, because it seems clearer than your previous one
03:05 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125285
03:05 AlexDaniel and honestly, I can't see any reason why it should work differently
03:06 labster .oO (  m: grammar MyGrammar { regex TOP { 'ZZ' } }  )
03:07 AlexDaniel in fact, it works exactly the same way, just that the former includes this bullshit:  bar => 「 」 bar => 「 1」  bar => 「 12」  bar => 「 123」  bar => 「 123 」
03:07 AlexDaniel labster: that would be great
03:10 Util gagalicious: yw
03:10 labster I can't believe we just spent half an hour on that.
03:10 AlexDaniel labster: actually I've spent much more
03:11 AlexDaniel I was trying to figure it out before I submitted that bug report
03:11 labster I think I've seen this before.  I just assumed I was dumb at grammars and stayed away from them for a while.
03:11 AlexDaniel then I just said "okay, whatever, maybe this will get fixed one day"
03:12 AlexDaniel then after some days I came up with that workaround
03:12 AlexDaniel so I started writing more code, and then got stuck on that same problem again
03:14 labster AlexDaniel: It's certainly an unintuitive result.
03:18 Util m: my @a = 1..12; say @a.sort( { $^a %% 2 <=> $^b %% 2  or $^a %% 5 <=> $^b %% 5 } );
03:18 camelia rakudo-moar c2a57e: OUTPUT«1 3 7 9 11 5 2 4 6 8 12 10␤»
03:18 Util m: my @a = 1..12; say @a.sort( { $_ %% 2 },{ $_ %% 5 } );
03:18 camelia rakudo-moar c2a57e: OUTPUT«Too many positionals passed; expected 1 or 2 arguments but got 3␤  in block <unit> at /tmp/eFNyYPRpFc:1␤␤»
03:18 Util Is sort( multiple code blocks ) NYI?
03:19 Util Example 1 is right, and I expect example 2 to work identically.
03:21 AlexDaniel what is the third argument?
03:21 skids AlexDaniel, labster: I did notice some new, possibly related, misbehavior in % but haven't gotten to RTing it (see http://irclog.perlgeek.de/p​erl6/2015-05-25#i_10654319)
03:22 raydiak AlexDaniel: you're supposed to be able to pass multiple sorting criteria to get subsorting, subsubsorting, etc
03:22 raydiak Util: funny thing, I just tried that for the first time today and wondered the same thing :)
03:22 AlexDaniel raydiak: yea, but it says that it got 3 arguments but I can only see two
03:23 AlexDaniel ah
03:23 raydiak that's why we're wondering if it's not yet implemented or if it's a bug
03:24 * raydiak confesses he didn't check the source and just worked around it
03:28 AlexDaniel skids: yeah
03:32 AlexDaniel skids: although I'm not quite sure how to make it work in this case
03:32 skids I don't think I managed to find a non-capturing workaround.
03:34 skids Once camelia can gist again maybe we could check your case against star.
03:35 skids Oh wait you did get it golfed.
03:36 skids star: grammar MyGrammar { regex TOP { ^ [ <foo> <bar> ]+ $ }; regex foo { 'ZZZ' }; regex bar { .*? }; }; my $data = 'ZZZ 123 ZZZ 456'; say MyGrammar.parse($data);
03:36 camelia star-m 2015.03: OUTPUT«「ZZZ 123 ZZZ 456」␤ foo => 「ZZZ」␤ bar => 「」␤ bar => 「 」␤ bar => 「 1」␤ bar => 「 12」␤ bar => 「 123」␤ bar => 「 123 」␤ foo => 「ZZZ」␤ bar => 「」␤ bar => 「 」␤ bar => 「 4」␤ bar => 「 45」␤ bar …»
03:36 skids star: my $*guard = 0; grammar Foo { regex TOP { [a | [ "[" <R> b? "]" ]]+ % b { die if $*guard++ > 500 } }; regex b { b }; regex R { <TOP>+ % [ <.b>? "/" ] } }; Foo.parse("[aba]").say; Foo.parse("[abab]").say;
03:36 camelia star-m 2015.03: OUTPUT«「[aba]」␤ R => 「aba」␤  TOP => 「aba」␤「[abab]」␤ R => 「aba」␤  TOP => 「aba」␤»
03:36 skids OK, so not the same thing.  I should RT that separately.
03:55 fhelmberger joined #perl6
03:57 rurban joined #perl6
03:58 llfourn joined #perl6
04:05 tinyblak joined #perl6
04:24 sty joined #perl6
04:24 mr-foobar joined #perl6
04:26 vendethiel joined #perl6
04:42 lizmat tea, earl grey, hot
04:42 yoleaux 6 Jun 2015 18:36Z <jnthn> lizmat: No, despite the name overlap, that's something completely different
04:42 yoleaux 6 Jun 2015 20:54Z <quester> lizmat: Hi, I just did a panda install Inline::Perl5 and all of the tests failed with "Can't locate Filter/Simple.pm".  Installing the perl5 module Filter::Simple fixed the tests.  Perhaps it should be documented as a prerequisite?  -- BTW, thanks lizmat++ FROGGS++ niner++!
04:43 lizmat hmmm... that's not what I asked for ?   :-)
04:44 mr-foobar joined #perl6
04:56 BenGoldberg Filter::Simple has been part of perl5 core since 5.7.3
04:56 mr-foobar joined #perl6
04:57 * BenGoldberg wonders if quester's perl installation is really that ancient
05:03 dalek roast: 03ab40a | lizmat++ | S03-operators/arith.t:
05:03 dalek roast: Fix too specific tests
05:03 dalek roast: review: https://github.com/perl6/roast/commit/03ab40ab2f
05:04 labster joined #perl6
05:05 gagalicious joined #perl6
05:06 tinyblak joined #perl6
05:07 lizmat barring&
05:16 mr-fooba_ joined #perl6
05:19 Sqirrel joined #perl6
05:34 amurf joined #perl6
06:19 labster_ joined #perl6
06:30 araujo_ joined #perl6
06:41 dalek rakudo/nom: cafe9b9 | lizmat++ | src/vm/jvm/runtime/org/perl6/rakudo/Binder.java:
06:41 dalek rakudo/nom: Unbreak JVM build, bartolin++
06:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cafe9b931a
06:48 camelia joined #perl6
07:02 lizmat m: say @INC[0]
07:02 camelia rakudo-moar c2a57e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AajEFlpxfA␤Variable '@INC' is not declared. Did you mean '@?INC'?␤at /tmp/AajEFlpxfA:1␤------> 3say 7⏏5@INC[0]␤»
07:02 lizmat m: say @*INC[0]
07:02 camelia rakudo-moar c2a57e: OUTPUT«file#/home/camelia/.pe​rl6/2015.05-29-gc2a57ec/lib␤»
07:03 vendethiel joined #perl6
07:06 dalek rakudo/nom: 8ebddfe | lizmat++ | docs/ChangeLog:
07:06 dalek rakudo/nom: Hopefully nudge camelia into a rebuild
07:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8ebddfee04
07:06 nine I'd guess quester has some bare perl installation. ISTR some Linux distribution splitting core modules off the base package.
07:06 yoleaux 4 Jun 2015 18:54Z <japhb> nine: moritz says around http://irclog.perlgeek.de/p​erl6/2015-06-04#i_10702197 that you are the only one who can fix the DNS problems plaguing Camelia's rebuilds.  Can that power be spread around a bit more?  Or is there a blocker to that?
07:07 lizmat nine++
07:07 nine .tell japhb moritz would have had the power to fix it. I guess it was more a problem of not knowing how I intended the setup to work.
07:07 yoleaux nine: I'll pass your message to japhb.
07:07 aindilis` joined #perl6
07:14 laouji joined #perl6
07:35 tinyblak joined #perl6
07:36 llfourn joined #perl6
07:39 RabidGravy joined #perl6
07:40 espadrine_ joined #perl6
07:46 dalek roast: 29821cf | lizmat++ | S03-operators/is-divisible-by.t:
07:46 dalek roast: Fix too specific tests
07:46 dalek roast: review: https://github.com/perl6/roast/commit/29821cf61f
07:46 vendethiel joined #perl6
07:47 dalek rakudo/nom: c892940 | lizmat++ | src/core/array_slice.pm:
07:47 dalek rakudo/nom: Speed up @a[^foo] = 1..Inf assignment
07:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c89294039e
07:51 rindolf joined #perl6
07:54 AndChat|228864 joined #perl6
07:54 AndChat|228864 joined #perl6
07:55 AndChat-228864 joined #perl6
07:55 JimmyZ_ joined #perl6
07:56 gfldex joined #perl6
08:05 Ven joined #perl6
08:13 tinyblak joined #perl6
08:14 darutoko joined #perl6
08:17 Ven o/, #perl6
08:20 lizmat Ven o/
08:23 domidumont joined #perl6
08:27 tinyblak joined #perl6
08:29 uncleyear joined #perl6
08:29 domidumont joined #perl6
08:48 dalek rakudo/nom: 2fdef2e | lizmat++ | src/core/ (4 files):
08:48 dalek rakudo/nom: Add numerator info to DivideByZero exceptions
08:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2fdef2e681
08:48 araujo joined #perl6
08:48 araujo joined #perl6
08:54 dalek roast: eda5413 | lizmat++ | S03-operators/ (2 files):
08:54 dalek roast: Add numerator info to DivideByZero testing
08:54 dalek roast: review: https://github.com/perl6/roast/commit/eda5413de2
08:56 lizmat m: say @*INC[0]
08:56 camelia rakudo-moar c2a57e: OUTPUT«file#/home/camelia/.pe​rl6/2015.05-29-gc2a57ec/lib␤»
08:56 lizmat :-(
08:57 lizmat .tell nine it appears camelia building needs to be kickstarted again
08:57 yoleaux lizmat: I'll pass your message to nine.
09:00 uncleyear joined #perl6
09:01 tinyblak joined #perl6
09:01 laouji joined #perl6
09:08 tinyblak joined #perl6
09:09 lizmat .tell TimToady should Rat.new(42,0) already fail or not ?
09:09 yoleaux lizmat: I'll pass your message to TimToady.
09:12 lizmat m: say Rat.new(42,0).nude    # we already lost the "42" here
09:12 camelia rakudo-moar c2a57e: OUTPUT«1 0␤»
09:20 diana_olhovik_ joined #perl6
09:23 uncleyear joined #perl6
09:25 [Tux] Is RT#124191 spreading like oil? https://gist.github.com/Tux/57326e146cc249310195
09:25 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=124191
09:26 moritz lizmat: fwiw rakudo on camelia didn't rebuild, because
09:26 moritz Stage classfile  : OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000007de600000, 390070272, 0) failed; error='Cannot allocate memory' (errno=12)
09:26 moritz # There is insufficient memory for the Java Runtime Environment to continue.
09:26 moritz # Native memory allocation (malloc) failed to allocate 390070272 bytes for committing reserved memory.
09:26 [Tux] same for csv-ip5pp.pl
09:27 lizmat perhaps...  but I think this is something jnthn should look at  :-(
09:27 moritz p5 question: is there any way to enable or disable global destruction warnings?
09:28 [Tux] https://gist.github.com/Tux/63311ce6f17352102323 even shorter for the state machine
09:29 dalek evalbot: f1bdc43 | moritz++ | build-scripts/rebuild-rakudo.pl:
09:29 dalek evalbot: Disable r-j build for now
09:29 dalek evalbot:
09:29 dalek evalbot: we do not have enough memory for that :(
09:29 dalek evalbot: review: https://github.com/perl6/evalbot/commit/f1bdc43ca4
09:30 moritz .tell nine we don't seem to have enough RAM on the camelia server to rebuild rakudo-jvm; any chance to get a bigger slice?
09:30 yoleaux moritz: I'll pass your message to nine.
09:30 moritz r-m rebuild should start in 8 minutes
09:35 lizmat moritz++  :-)
09:36 bbkr joined #perl6
09:41 moritz m: say 'which version?'
09:41 camelia rakudo-moar 2fdef2: OUTPUT«which version?␤»
09:41 moritz wow, that was quick.
09:41 moritz less than four minutes for the rebuild
09:42 moritz it almost wants me want to split up r-m and r-j rebuilds, and do the r-m rebuilds much more often
09:45 spider-mario joined #perl6
09:45 lizmat m: say @*INC[0]
09:45 camelia rakudo-moar 2fdef2: OUTPUT«file#/home/camelia/.per​l6/2015.05-130-g2fdef2e/lib␤»
09:46 lizmat woot!
09:46 lizmat m: 42 % 0
09:46 camelia rakudo-moar 2fdef2: OUTPUT«Earlier failure:␤ Attempt to divide 42 by zero using infix:<%>␤  in block <unit> at /tmp/vuB1Ublk2P:1␤␤Final error:␤ Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:639␤ …»
09:47 lizmat moritz: SIG{__WARN__} = sub {} ?
09:47 smls joined #perl6
09:48 * lizmat gets some shuteye&
09:48 smls m: my $r = /\d+/; say "a42" ~~ /a $r/
09:48 camelia rakudo-moar 2fdef2: OUTPUT«「a42」␤»
09:48 smls ^^ is this an official feature?
09:49 smls http://design.perl6.org/S05.html#​Variable_%28non-%29interpolation doesn't seem to mention it.
09:53 uncleyear joined #perl6
09:55 larion joined #perl6
10:06 kaare__ joined #perl6
10:06 bbkr joined #perl6
10:07 bbkr__ joined #perl6
10:08 larion joined #perl6
10:12 Timbus smls:  https://github.com/perl6/roast/blob/master​/S05-interpolation/regex-in-variable.t#L36
10:14 smls ok
10:19 uncleyear joined #perl6
10:26 Ven joined #perl6
10:27 laouji joined #perl6
10:28 Ven https://www.blackhat.com/us-15/briefings.html​#the-memory-sinkhole-unleashing-an-x86-design​-flaw-allowing-universal-privilege-escalation whoops.
10:29 Ven .oO( this could never happen in perl6! therefore... )
10:34 bbkr joined #perl6
10:35 beastd joined #perl6
10:39 JimmyZ_ joined #perl6
10:45 uncleyear joined #perl6
10:46 rurban joined #perl6
10:52 uncleyear joined #perl6
11:00 rurban joined #perl6
11:05 AlexDaniel joined #perl6
11:07 uncleyear joined #perl6
11:18 cognominal https://github.com/vbarbaresi/MetroGit :)
11:20 Sqirrel joined #perl6
11:20 Ven joined #perl6
11:21 diana_olhovik_ joined #perl6
11:22 rurban joined #perl6
11:27 AndChat|228864 joined #perl6
11:31 BenGoldberg joined #perl6
11:32 RabidGravy joined #perl6
11:33 uncleyear joined #perl6
11:34 smls m: say "a" ~~ /<:Latin_1>/
11:34 camelia rakudo-moar 2fdef2: OUTPUT«Nil␤»
11:34 smls ^^ what is the correct way to say this?
11:36 Emeric joined #perl6
11:37 smls also, why is there no error or warning for specifying an unknown unicode property?
11:40 mohij joined #perl6
11:44 yqt joined #perl6
11:49 virtualsue joined #perl6
11:52 uncleyear joined #perl6
11:59 smls m: "foo/b ar!".subst(/<[\0..\xff]-[a..zA..Z0..9_.~-]>/, *.ord.fmt('%%%02X'), :g)
11:59 camelia rakudo-moar 2fdef2: ( no output )
11:59 smls m: say "foo/b ar!".subst(/<[\0..\xff]-[a..zA..Z0..9_.~-]>/, *.ord.fmt('%%%02X'), :g)
11:59 camelia rakudo-moar 2fdef2: OUTPUT«foo/b ar!␤»
11:59 smls hm
12:04 smls m: say "f:o-o/b ar!".subst(/<[\x00..\xff]-[a..zA..Z0..9_.~-]>/, *.ord.fmt("%%%02X"), :g)
12:04 camelia rakudo-moar 2fdef2: OUTPUT«f%3Ao-o%2Fb%20ar%21␤»
12:04 smls there.
12:04 smls ^^does the same as URI::Encode's uri_encode, but much faster.
12:04 dalek rakudo/nom: 55fba33 | usev6++ | src/core/Capture.pm:
12:04 dalek rakudo/nom: Avoid some NullPointerExceptions with Match objects
12:04 dalek rakudo/nom:
12:04 dalek rakudo/nom: Things like 'Match.new.perl', 'Match.new.list', 'Match.new.elems' or
12:04 dalek rakudo/nom: 'Match.new eqv 42' all gave NullPointerExceptions on JVM.
12:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/55fba33224
12:04 dalek rakudo/nom: 49d44b2 | FROGGS++ | src/core/Capture.pm:
12:04 dalek rakudo/nom: Merge pull request #436 from usev6/npe_jvm_match
12:04 dalek rakudo/nom:
12:04 dalek rakudo/nom: Avoid some NullPointerExceptions with Match objects
12:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/49d44b264e
12:05 FROGGS joined #perl6
12:08 virtualsue left #perl6
12:11 uncleyear joined #perl6
12:11 smls Btw, having the three different routines  sprintf() .sprintf .fmt  for the same functionality (just with different calling conventions) is confusing.
12:12 smls I'd vote for removing .sprintf and just keeping:
12:12 smls .fmt      -- recommended way to format strings in Perl6
12:12 smls sprintf() -- alternative to make the C/Perl nostalgia crowd happy
12:13 smls Can always go .&sprintf in the unlikely case that you actually need that calling convention
12:13 smls Opinions?
12:25 flaviusb left #perl6
12:30 telex joined #perl6
12:30 uncleyear joined #perl6
12:36 FROGGS o/
12:40 _mg_ joined #perl6
12:49 Ven joined #perl6
12:55 rindolf joined #perl6
12:56 mr-foobar joined #perl6
12:58 Ven joined #perl6
13:03 llfourn joined #perl6
13:40 timotimo o/
13:53 smls joined #perl6
13:56 Sqirrel joined #perl6
13:59 nys joined #perl6
14:03 Ven joined #perl6
14:03 smls why does HTTP::UserAgent's .get sometimes hang for many seconds at 100% CPU before finishing the request?
14:08 rjbs Last time I saw something like this, there was some kind of spinning attempting to parse something.
14:08 rjbs not in UA, but just in general in p6 somewhere
14:08 tinyblak joined #perl6
14:09 rjbs but I don't think it's a crazy guess here; something doing too much backtracking trying to decide on a response parse
14:09 laouji joined #perl6
14:10 tinyblak_ joined #perl6
14:11 Ven joined #perl6
14:12 smls it doesn't seem to happen anymore after 'rakudobrew switch moar-nom-master-master'
14:12 rjbs
14:12 smls so maybe it's related to the ongoing concurrency fixes
14:13 smls HTTP::Client, otoh, fails with  "You have confused the number c45 with the textual representation "c45";"  when calling $response.content :P
14:19 Util smls: sprintf is one of about 78 methods that are marked "is export", which makes a method also into a function.
14:19 Util Such dual existence supports Perl 5 migration, and programmers who prefer procedural-style coding to OO-style.
14:19 Util So, leaving .sprintf as-is would be more consistent with the rest of the implementation, and be less of a surprise.
14:19 Util Granted, those 77 other methods do not have a shorter-named overlapping cousin.
14:19 Util I would just add to the sprintf docs:
14:19 Util "If you are using the method form of .sprintf, note that .fmt is less to type."
14:19 Util So, -1 to removal, but still listening.
14:20 smls except if you consider  .fmt  to be the method form of  sprintf :)
14:21 smls The problem with .sprintf is that its easy to accidentally use it when .fmt was intended
14:22 smls whereas it has to be used with pinvocant and argument switched
14:27 Util Hmm, I do note that .sprintf is not present in Roast.
14:32 mohij joined #perl6
14:39 diana_olhovik_ joined #perl6
14:41 BenGoldberg joined #perl6
14:47 bjz joined #perl6
14:58 JimmyZ_ joined #perl6
14:58 zakharyas joined #perl6
15:01 smls joined #perl6
15:05 smls Util: .sprintf already *is* inconsistent vs how other  ($qualifier, @list)  signatured subs like sort/map were turned into methods
15:05 smls "Sorting is an action you can perform on an array" -- Sounds rights.
15:05 smls "Sprintf'ing is an action you can perform on a format" -- Doesn't sound right.
15:05 smls If anything, one might say "I'm sprintf'ing these values *using* a given format".
15:06 smls In other words, *@fields and not $format is the logical invocant when turning sprintf into a method.
15:06 kaare__ joined #perl6
15:06 smls Except at that point, you'll find that there are better words to name it, like "format".
15:06 smls And that's exactly what .fmt is.
15:07 smls I suppose if .sprintf were turned into an alias for .fmt, it would no longer be so confusing
15:07 smls (Sust redundant.)
15:07 smls *J
15:08 kaare__ joined #perl6
15:19 breinbaas joined #perl6
15:27 TimToady lizmat: I'd have no problem with Rat preserving the 42 numerator; after all, I'm the one who wrote the paragraph at S02:856 about lazily applying GCD to make adding long columns of fractions fast when two numbers have the same denominator, such as 100
15:27 yoleaux 09:09Z <lizmat> TimToady: should Rat.new(42,0) already fail or not ?
15:27 synbot6 Link: http://design.perl6.org/S02.html#line_856
15:27 TimToady so keeping 42/0 in that form is not a problem to me
15:28 TimToady I think the GCD invariant should be applied at a different point, not after every operation
15:29 smls timotimo: http://rosettacode.org/wiki/Rosetta_Code/Rank_​languages_by_popularity#Perl_6:_Using_the_API
15:30 dnmfarrell joined #perl6
15:31 TimToady smls++
15:31 dnmfarrell hey all, is it possible from within a Grammar token method to access the action classes that the Grammar parse() was called with?
15:31 jnthn $*ACTIONS
15:31 yoleaux 6 Jun 2015 20:40Z <quester> jnthn: Nevermind, a clean install did fix it.  (Although that was a pretty weird error message...)  Thank you very much.
15:31 yoleaux 6 Jun 2015 23:41Z <TimToady> jnthn: I'm not worried about that particular list-to-remember, because nobody will bother to remember which functions will tell me I'm an idiot right off the bat, and which will let me flail about and figure out I'm an idiot slowly.  It's really just another "this can't possible work, and we can tell so at compile time".
15:32 dnmfarrell jnthn: thank you :)
15:39 TimToady joined #perl6
15:39 lizmat looking at ~ %query.reverse.map({ "&{.key}={uri-encode .value}" }).join;, I wonder whether we should have a map(Str:D) variant
15:39 lizmat we could then write it as:
15:39 lizmat ~ %query.reverse.map("&{.key}={uri-encode .value}").join;
15:40 Emeric joined #perl6
15:40 jnthn Don't see how that could work; the closures would evaluate in the string too soon
15:42 Emeric Is HTTP::Server::Simple is included in Rakudo Star ?
15:42 Emeric How can I use it ? Thanks for your help.
15:45 jnthn Emeric: Doens't look like it; guess you'd install it with Panda (the module installer) which is included with Star ("panda install HTTP::Server::Simple" I guess)
15:45 jnthn walk &
15:50 nwc10 Perl 6 is 6th on Rosetta Code. How apt.
15:50 Ven joined #perl6
15:50 nwc10 although 7th an 5th are within striking distance.
15:50 Sqirrel joined #perl6
15:55 timotimo smls++
15:57 Emeric Is Panda included with Star ? (Sorry, I'm a beginner)
15:57 timotimo yes, it is
16:01 Util smls++ # for RC
16:02 Sqirrel joined #perl6
16:05 Emeric left #perl6
16:06 Begi joined #perl6
16:07 Begi Sorry, it's me again. I've got a problem : I can't use Panda. (I use Ubuntu on a VM).
16:07 timotimo can you give a bit more information?
16:07 ugexe it would be wise to tell us why you can't instead of simply that yuo cant
16:08 Begi I try "panda" in the Ubuntu shell, but it doesn't found the command
16:09 ugexe is the appropriate directory in your $PATH
16:10 Begi I asked myself the question
16:10 raydiak does "perl6" work?
16:10 ugexe locate bin/panda, then echo $PATH and see if you see it
16:10 Begi Yes, "perl6" works.
16:12 Begi Panda isn't in my PATH
16:13 lizmat m: say (3.5/0).perl   # just testing
16:13 camelia rakudo-moar 49d44b: OUTPUT«<1/0>␤»
16:13 raydiak Begi: did you find where it is, though?
16:14 ugexe after you run panda's bootstrap.pl it shoudl tell you the location to add to PATH
16:14 Begi Yes, -> home/panda/bin/panda
16:14 aristotle joined #perl6
16:15 aristotle <someone> aristotle: given this Python program
16:15 aristotle <someone> import os; sorted(os.listdir('.'), key=lambda f: os.stat(f).st_mtime)
16:15 aristotle <someone> is there a reasonable way to write that in Perl6?
16:15 raydiak I didn't think that was where the star install puts it...
16:15 aristotle someone give me an answer for this person? :)
16:16 ugexe is your user 'panda'? seems like there might be permissions related problems
16:16 lizmat aristotle: if I read it correctly, it is sorting by modification time?
16:16 Begi -> home/user/panda/bin/panda...
16:17 aristotle lizmat: correctly indeed
16:17 Begi I've tried to install only Panda, but it didn't works
16:17 lizmat m: say ".".dir.sort(*.modified)
16:17 camelia rakudo-moar 49d44b: OUTPUT«Method 'dir' not found for invocant of class 'Str'␤  in block <unit> at /tmp/rneZ8xgwic:1␤␤»
16:17 lizmat m: say ".".IO.dir.sort(*.modified)
16:17 camelia rakudo-moar 49d44b: OUTPUT«"/home/camelia/p1".IO "/home/camelia/p2".IO "/home/camelia/.bashrc".IO "/home/camelia/.perlbrew".IO "/home/camelia/perl5".IO "/home/camelia/.rcc".IO "/home/camelia/niecza".IO "/home/camelia/.local".IO "/home/camelia/star-2014.09".IO "/home/camelia/bin".IO …»
16:17 lizmat m: say ".".IO.dir.sort(*.modified)>>.modified
16:17 camelia rakudo-moar 49d44b: OUTPUT«Instant:1414005049 Instant:1414005049 Instant:1414007181 Instant:1414008168 Instant:1414008248 Instant:1414008410 Instant:1414008485 Instant:1414008526 Instant:1414011737 Instant:1414054040 Instant:1415465338 Instant:1415466301 Instant:1417651855 Instant:1…»
16:18 ugexe PATH=~/panda/bin:$PATH ?
16:18 flussence m: say dir('.').sort(*.modified)
16:18 camelia rakudo-moar 49d44b: OUTPUT«"/home/camelia/p1".IO "/home/camelia/p2".IO "/home/camelia/.bashrc".IO "/home/camelia/.perlbrew".IO "/home/camelia/perl5".IO "/home/camelia/.rcc".IO "/home/camelia/niecza".IO "/home/camelia/.local".IO "/home/camelia/star-2014.09".IO "/home/camelia/bin".IO …»
16:18 aristotle flussence: nice
16:18 lizmat aristotle: does that answer the question?
16:18 aristotle I think so :)
16:19 flussence (I tried that line in the REPL and got a segfault... worked fine with -e though :/)
16:19 * raydiak was trying the same thing when he got an error from trying to stat a broken symlink
16:20 skids joined #perl6
16:21 Begi ugexe : it doesn't work...
16:21 smls_ joined #perl6
16:21 smls_ Did something change in that area?
16:21 flussence > dir('.').sort␤Cannot call infix:<cmp>(Mu, Mu); none of these signatures match:␤[...]␤> dir('.').sort␤Segmentation fault␤
16:21 dalek rakudo/nom: 442a567 | lizmat++ | src/core/Rat (2 files):
16:21 dalek rakudo/nom: Preserve numerator if denominator is 0
16:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/442a5679cc
16:22 * lizmat breaks a symlink and tries to reproduce
16:22 smls_ sorry, IRC ate some of my messages. again:
16:22 smls_ http://rosettacode.org/wiki/C​onstrained_genericity#Perl_6  fails with  "Method 'perl' not found for invocant of class 'T'"
16:22 smls_ It says "Works with: Rakudo version 2010.09.17"
16:22 smls_ Did something change in that area?
16:22 ugexe Begi: if you add the correct path to PATH it will work
16:23 ugexe alternatively you can just run the /full/file/path/panda if you dont wish to figure out the problem with your systems PATH
16:23 raydiak lizmat: I think it's doing what's expected, just the error is a bit surprising "failed to find file" then you ls and the file it names is right there :)  lucky I had ls colors on, the red is what tipped me off
16:24 dalek roast: 5486205 | lizmat++ | S03-operators/arith.t:
16:24 dalek roast: Adapt tests to numerator preservation if / 0
16:24 dalek roast: review: https://github.com/perl6/roast/commit/5486205216
16:24 lizmat raydiak: on what OS are you?
16:25 ugexe Begi: also you can install perl6 using 'rakudobrew' which will also install panda for you in another step. it adds the appropriate PATH entries for you
16:25 flussence «perl6 -e 'say dir(q{.}).sort xx 2'» reliably segfaults on my 32-bit laptop, everything else I have is 64-bit and runs fine. I'll install gdb but... it'll take a while to do that.
16:26 lizmat brrt++  # http://brrt-to-the-future.blog​spot.com/2015/06/studying.html
16:26 raydiak lizmat: 64-bit linux
16:27 amurf joined #perl6
16:27 raydiak lizmat: and rakudo from Wednesday
16:28 dnmfarrell I've found some weird behavior with panda If I do "panda install Pod::Perl5" everything works. But if I clone the Pod::Perl5 repo, and do "panda install ./". the install appears to work, but Pod::Perl5 cannot see Pod::Perl5::Grammar anymore and doesn't work. Can anyone replicate? https://github.com/dnmfarrell/Pod-Perl5 I'm using Rakudobrew
16:31 Begi ugexe : I'm installing rakudobrew. Thanks for the nice idea. I hope it will work.
16:33 Peter_R joined #perl6
16:35 lizmat m: say 42/0
16:35 camelia rakudo-moar 49d44b: OUTPUT«Attempt to divide 1 by zero using div␤  in block <unit> at /tmp/PrAztACfni:1␤␤»
16:35 lizmat hmmm... camelia stuck again?
16:36 ugexe Begi: if you pastebin the output of 'echo $PATH' and 'locate bin/panda'  i might be able to figure out the problem
16:37 ab5tract moritz: I submitted a PR for a bug I ran into with p6doc-index
16:38 ab5tract though the circumstances are strange... I don't know how nonexistent directories showed up in @*INC
16:39 labster joined #perl6
16:39 ab5tract it could be that such a thing should be checked and dealt with on a lower level
16:40 lizmat ab5tract: originally, non-existing dirs did not make it to @*INC
16:40 lizmat but that created issues with installing on a new installation
16:40 ab5tract I see $home ~ ".perl6/2015.03-369-ga94d687" directories in @*INC
16:41 lizmat so FROGGS made them appear again
16:41 lizmat is that the version of rakudo you're working with?
16:41 ab5tract I don't think so
16:41 ab5tract let me rebuild again
16:41 lizmat hmmm...
16:42 ab5tract I am doing standard rakudobrew at the moment
16:42 ab5tract the only thing strange about my setup is that I run fish shell
16:42 lizmat m: say 42/0
16:42 camelia rakudo-moar 442a56: OUTPUT«Attempt to divide 42 by zero using div␤  in block <unit> at /tmp/Xp2moHFq16:1␤␤»
16:42 lizmat woot
16:42 BenGoldberg m: say <42/0>
16:42 camelia rakudo-moar 442a56: OUTPUT«Attempt to divide 42 by zero using div␤  in block <unit> at /tmp/7CWibzdKWC:1␤␤»
16:43 ab5tract m: say Rat.new(42,0)
16:43 camelia rakudo-moar 442a56: OUTPUT«Attempt to divide 42 by zero using div␤  in block <unit> at /tmp/qPYEK4fpi6:1␤␤»
16:43 lizmat m: 3.5/0  # sigh, confusing, but not sure what to do about it
16:43 camelia rakudo-moar 442a56: ( no output )
16:43 lizmat m: say 3.5/0  # sigh, confusing, but not sure what to do about it
16:43 camelia rakudo-moar 442a56: OUTPUT«Attempt to divide 7 by zero using div␤  in block <unit> at /tmp/kOpRpzVCDW:1␤␤»
16:43 BenGoldberg m: 3.5e0 / 0e0
16:43 camelia rakudo-moar 442a56: OUTPUT«Unhandled exception: Attempt to divide 3.5 by zero using /␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/share/perl6/run​time/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:16783  (/home/camelia/rakudo-inst-​1/share/perl6/runtime/CO…»
16:43 Util m: .say for dir(".").sort(- *.modified)>>.Str
16:43 camelia rakudo-moar 442a56: OUTPUT«evalbot.log␤rakudo1␤rakudo-inst-1␤rakud​o-inst␤std␤rakudo2␤rakudo-inst-2␤evalbot␤Perli​to␤.bash_history␤tail␤.perl6␤foobar␤star␤rakud​o-star-2015.03␤.lesshst␤.cpanm␤rakudo-star-201​5.03.tar.gz␤.viminfo␤rakudo-star-2015.02…»
16:44 lizmat Util: why not .Str.say for ...
16:44 lizmat and lose the >>.Str at the end?
16:44 lizmat also, the >>.Str may lose the order ?
16:44 Util lizmat: playing around. Also reversed the sort, which was not requested.
16:45 lizmat m: say (^10)>>.Str
16:45 camelia rakudo-moar 442a56: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
16:45 lizmat m: say (^10).list>>.Str
16:45 camelia rakudo-moar 442a56: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
16:45 raydiak lizmat: I thought » would process in any order but preserve the order of the resulting list
16:45 Util lizmat: the >>. will not lose the order. It might executed the .Str method out-of-order, but the list will be restored to original order before being passed to for().
16:45 lizmat yeah, you're right
16:46 lizmat m: (^10).list>>.say
16:46 camelia rakudo-moar 442a56: OUTPUT«9␤7␤5␤3␤1␤8␤6␤4␤2␤0␤»
16:46 raydiak yeah that's the one I had to stop writing :)
16:46 ab5tract lizmat: upgrading version changes the directories
16:47 jack_rabbit joined #perl6
16:47 lizmat yeah, I'm not sure what the idea is about that just yet  :-)
16:47 Util lizmat: also, I have    ».method    in my fingers from my current writing. Knee-jerk coding; non-optimal.
16:47 lizmat I'm all for having a version named dir with precomps in an installation dir
16:48 lizmat but having a version named installation dir, I'm not too sure about
16:48 ab5tract it would be shame to end up with a perma-pattern of: for @*INC -> $inc { next unless $inc.e; ... }
16:49 BenGoldberg m: "japh".comb>>.print;
16:49 camelia rakudo-moar 442a56: OUTPUT«hapj»
16:49 lizmat ab5tract: it's all a bit in flux still atm
16:49 BenGoldberg m: "japh".comb>>{ .print };
16:49 camelia rakudo-moar 442a56: OUTPUT«Use of uninitialized value <element> of type Any in string context  in block <unit> at /tmp/OHcZ3_6PvB:1␤»
16:49 lizmat it'll get fixed before Christmas
16:49 ab5tract yup, I get that
16:50 ab5tract Util: thanks for confirming that about >>. In reading about hyper-operators, much is made about the out-of-order-ness.
16:50 ab5tract Enough that I have to remind myself that the returned order of the operation will remain the same.
16:51 Util If we could introspect a method for side-effects, then we could warn on >>.say
16:53 hoelzro o/ #perl6
16:53 raydiak and we wouldn't need to write things by hand like "is pure" :)
16:53 raydiak \o hoelzro
16:57 * BenGoldberg . o O (Monads)
16:59 lizmat sightseeing&
17:01 ab5tract o/ hoelzro
17:02 domidumont joined #perl6
17:09 BenGoldberg m: my @x = comb 'Just Another Perl/Bidi Hacker,'; print(chr(8237) ~ @x.shift ~ chr(8238) ~ @x.pop) while @x; # /me ponders writing this using the >> operator
17:09 camelia rakudo-moar 442a56: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KzoHUhivC9␤Calling comb(str) will never work with proto signature (Any, Any, Any $?)␤at /tmp/KzoHUhivC9:1␤------> 3my @x = 7⏏5comb 'Just Another Perl/Bidi Hacker,'; p␤»
17:09 BenGoldberg m: my @x = 'Just Another Perl/Bidi Hacker,'.comb; print(chr(8237) ~ @x.shift ~ chr(8238) ~ @x.pop) while @x; # /me ponders writing this using the >> operator
17:09 camelia rakudo-moar 442a56: OUTPUT«‭J‮,‭u‮r‭s‮e‭t‮k‭ ‮c‭A‮a‭n‮H‭o‮ ‭t‮i‭h‮d‭e‮i‭r‮B‭ ‮/‭P‮l‭e‮r»
17:14 skids Hrm.  RT failed to log a ticket from me.  In case anyone can/wants to diagnose, SMTP id 20150607040056.GB23056@abrij.org.  Maybe it was angry that it had 「」 characters in it or something.
17:17 aristotle left #perl6
17:18 skids Oh it's an SMTP delivery problem NM.
17:22 jack_rabbit joined #perl6
17:28 Ven joined #perl6
17:29 FROGGS joined #perl6
17:39 Ven joined #perl6
17:41 coffee` joined #perl6
17:42 ugexe m: sub bar is rw { Proxy.new: FETCH => { state $fetch++; }, STORE => method ($a) { state $store++; }; }; say bar
17:42 camelia rakudo-moar 442a56: OUTPUT«9␤»
17:43 ugexe what am i overlooking... i thought that would be 1, but FETCH is getting called 9 times
17:45 raydiak probably from getting shuffled around in the rakudo internals
17:47 ugexe ah ok
17:52 labster joined #perl6
17:53 [Tux] joined #perl6
17:55 gfldex joined #perl6
18:04 gagalicious joined #perl6
18:06 dalek nqp/openpipe3: 59b2b38 | FROGGS++ | / (2 files):
18:06 dalek nqp/openpipe3: map op syncpipe and adjusts tests for latest openpipe
18:06 dalek nqp/openpipe3: review: https://github.com/perl6/nqp/commit/59b2b3820c
18:06 dalek nqp/openpipe3: 03f9a2c | FROGGS++ | t/nqp/ (2 files):
18:06 dalek nqp/openpipe3: update tests for nqp::spawn and nqp::shell
18:06 dalek nqp/openpipe3: review: https://github.com/perl6/nqp/commit/03f9a2c20b
18:07 dalek rakudo/openpipe3: 8866154 | FROGGS++ | src/core/ (2 files):
18:07 dalek rakudo/openpipe3: follow recent nqp::openpipe changes
18:07 dalek rakudo/openpipe3: review: https://github.com/rakudo/rakudo/commit/886615443d
18:07 dalek rakudo/openpipe3: 2161b14 | FROGGS++ | src/core/control.pm:
18:07 dalek rakudo/openpipe3: adjust use of  nqp::spawn and nqp::shell ops
18:07 dalek rakudo/openpipe3: review: https://github.com/rakudo/rakudo/commit/2161b14edb
18:07 FROGGS hoelzro: now shell and spawn can work like openpipe
18:08 FROGGS hoelzro: did you manage to create a deadlock?
18:16 virtualsue joined #perl6
18:17 amurf joined #perl6
18:17 tinyblak joined #perl6
18:31 llfourn joined #perl6
18:37 colomon joined #perl6
18:40 colomon joined #perl6
18:42 mohij joined #perl6
18:44 * FROGGS starts to bisect RT #125345, which is reproducable in nqp too
18:46 coffee` joined #perl6
18:48 colomon joined #perl6
18:56 yqt joined #perl6
18:57 spider-mario joined #perl6
19:01 FROGGS TimToady: https://github.com/perl6/nqp/commit/ab80bb3 introduced RT #125345
19:01 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125345
19:07 yqt joined #perl6
19:13 hoelzro FROGGS: I did not; I forgot that writing on MoarVM uses libuv, so it's really scheduling a write to happen rather than blocking on a pipe write
19:14 FROGGS ahh
19:14 hoelzro so that's good =)
19:14 FROGGS I hope so :o)
19:15 tinyblak joined #perl6
19:16 uncleyear joined #perl6
19:20 hoelzro I'm looking through old branches of mine, and I'm looking at one where !!! and co. throw an X::StubCode instead of an X::Adhoc exception.  I'm trying to build a QAST to perform the throw, but the compiler can't find X::StubCode.  Is there something extra I need to do for my new exception type to be visible to World.nqp?
19:22 FROGGS can you point to the code?
19:23 jnthn hoelzro: When does it fail to find it?
19:23 hoelzro jnthn: when compiling src/gen/m-CORE.setting
19:23 jnthn hoelzro: Ah, and the setting stubs stuff...
19:24 jnthn and uh...you...I guess need to stub the type but...hmm :)
19:24 hoelzro oh, is that why?
19:24 hoelzro I didn't realize the setting stubbed things
19:24 jnthn Plenty.
19:24 dalek rakudo/stub-exception: 7cdad9d | hoelzro++ | src/ (2 files):
19:24 dalek rakudo/stub-exception: StubCode work in progress
19:24 dalek rakudo/stub-exception: review: https://github.com/rakudo/rakudo/commit/7cdad9d170
19:25 hoelzro FROGGS: if you're curious, I just pushed my little bit of work into that branch
19:25 hoelzro jnthn: =(
19:25 jnthn The usual solution to these issues is to stub the type in question early enough but, uh... :)
19:25 hoelzro I guess I could have my impl look up X::StubCode when the stub is actually run, but I don't know how I'd go about doing that
19:26 jnthn You could also do it in a try, and if you fail just fall back to what it's doing now
19:26 jnthn (And leave a comment saying why you've gotta do that)
19:27 flussence m: try { my $x = 0; for ^5000 { [+] (1 X+< 10); $x++ }; CATCH { say $x } }
19:27 camelia rakudo-moar 442a56: ( no output )
19:27 flussence that line... dies at $x=133 here
19:28 jnthn flussence: That's RT'd already; planning to look into it tomorrow
19:28 hoelzro hmm...I can give it a...
19:28 flussence oh, okay
19:28 hoelzro <sunglasses>try</sunglasses>
19:28 jnthn :D
19:29 jnthn flussence: Well, provided it's the bug I think it is, anyways
19:29 flussence it ends up erroring with a "Cannot call infix:<+>(Mu); none of these signatures match:"
19:29 masak hoelzro: (•_•) / ( •_•)>⌐■-■ / (⌐■_■)
19:30 hoelzro =)
19:33 flussence there's definitely something wonky on 32-bit, I've been getting all kinds of bizarre bugs on it
19:33 rindolf joined #perl6
19:34 hoelzro jnthn++ # ideas
19:39 raydiak m: say (:a<1>:b<2>).hash
19:39 camelia rakudo-moar 442a56: OUTPUT«a => 1, b => 2␤»
19:39 raydiak m: say %(:a<1>:b<2>)
19:39 camelia rakudo-moar 442a56: OUTPUT«a => 1␤»
19:40 masak why are there double parens in `((@x,@y))` in S09:414 ?
19:40 synbot6 Link: http://design.perl6.org/S09.html#line_414
19:40 jnthn Beats me
19:41 jnthn Those two are wrong in using method rather than subcall form also
19:41 masak oh, right
19:42 jnthn Though that's just bitrot
19:42 jnthn I found various oddities while taking a glance over S09 recently :)
19:42 * jnthn is starting to ponder how various bits of it will be implemented
19:42 jnthn And which bits we'll push off to post-6.0
19:42 masak \o/
19:42 masak m: say "finally".uc, "!"
19:42 camelia rakudo-moar 442a56: OUTPUT«FINALLY!␤»
19:43 vendethiel YAPC::NA added the youtube streaming thingies
19:43 raydiak m: say (my %h).list.perl
19:43 camelia rakudo-moar 442a56: OUTPUT«()␤»
19:43 bin_005 joined #perl6
19:43 raydiak m: say (my %h{Any}).list.perl
19:43 camelia rakudo-moar 442a56: OUTPUT«Nil␤»
19:44 masak raydiak: I don't see why that latter one should be Nil when the former isn't.
19:44 jnthn Me either
19:44 raydiak nor me
19:44 masak even moreso since ISTR Nil was decoupled from meaning "undefined empty list" recently.
19:45 masak raydiak: please rakudobug-submit, kthx.
19:45 masak 'night, #perl6
19:45 raydiak good night masak
19:45 itz joined #perl6
19:52 raydiak m: say (:a(1):b(2)).hash; say %(:a(1):b(2)); say %(:a(1),:b(2)) # this was the more surprising one to me
19:52 camelia rakudo-moar 442a56: OUTPUT«a => 1, b => 2␤a => 1␤a => 1, b => 2␤»
19:53 FROGGS jnthn: if you spot stuff in roast that might be post-6.0, you can mark it as '#?v6+ skip ...'
19:53 jnthn FROGGS: oooh, good to know :)
19:58 ab5tract I've been digging into Whatever a bit, hoping to write something that demystifies it a bit
19:58 ab5tract I'm curious as to what it's potential uses are when assigned to a scalar
19:59 ab5tract m: my $f = $e ~~ *; $f(*).say
19:59 camelia rakudo-moar 442a56: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NJzZqUdBaJ␤Variable '$e' is not declared␤at /tmp/NJzZqUdBaJ:1␤------> 3my $f = 7⏏5$e ~~ *; $f(*).say␤»
20:00 ab5tract m: my $e = *; my $f = $e ~~ *; $f(*).say
20:00 camelia rakudo-moar 442a56: OUTPUT«True␤»
20:00 ab5tract other than that I haven't found much to do with it :)
20:01 jnthn my $limit = get-limit() // *; return 1..$limit; # when you want to talk about it just as a normal value
20:01 jnthn Uh, that badly explains it
20:02 ab5tract jnthn: well, it does shed some light: it comes in handy precisely in the exception cases where Whatever does not curry to WhateverCode
20:02 jnthn I meant more like, sometimes you may want to use some defined value or just say "whatever", and * being a normal value you can put in a variable lets that happen.
20:02 ab5tract (or that was my instant-takeaway from what you said)
20:02 jnthn yeah, the code example was fine, I mis-explained it though :)
20:03 ab5tract ah, yeah your comment was a bit confusing :)
20:04 ab5tract the current doc.git explanation explains it just as "The currying is purely semantic".
20:05 ab5tract I take this to mean something like: "meaning you will get no runtime currying of stored C<Whatever>-stars into C<WhateverCode>"
20:06 ab5tract GAR. Above I meant: "The currying is purely _syntactic"
20:06 jnthn I was gonna say, syntactic would be clearer :)
20:06 jnthn But yes, it's a compiler transform.
20:07 jnthn I think way, way back in Perl 6 history we may have tried it as a runtime one.
20:07 jnthn I don't think it ended too well for various reasons...
20:07 jnthn :)
20:10 nine Good evening #perl6
20:10 yoleaux 08:57Z <lizmat> nine: it appears camelia building needs to be kickstarted again
20:10 yoleaux 09:30Z <moritz> nine: we don't seem to have enough RAM on the camelia server to rebuild rakudo-jvm; any chance to get a bigger slice?
20:11 nine .tell moritz Odd. I thought I'd given camelia 4 GiB, but it saw only about 1 GiB. I explicitely virsh setmem 4G'd it now and free -m shows the memory
20:11 yoleaux nine: I'll pass your message to moritz.
20:12 ab5tract jnthn: the fact that it is compiler-level inspires confidence.
20:13 ab5tract It feels very magical when reading it in examples, but everyone (or so) can understand a compiler transform
20:20 jnthn ab5tract: Yes, I think the reasons it became one were language design sanity as well as implementation sanity :)
20:25 japhb jnthn: re: Evject, as far as I can tell you didn't code anything for actually doing a query (all the code and the slides discuss the command processing side).  There are a lot of places to put in a way to run queries against current object state, but where is conventional (assuming you're just doing event-sourced CQS, and not full CQRS with a reporting-optimized DB)
20:25 yoleaux 07:07Z <nine> japhb: moritz would have had the power to fix it. I guess it was more a problem of not knowing how I intended the setup to work.
20:26 japhb nine: Ah, but all fixed now, excellent.
20:26 japhb nine: Is that knowledge now distributed?
20:27 japhb jnthn: I meant, where is the conventional place to tap in and run queries against the current object state?  Do you return the object from Domain.process?  Do you add a method to Domain to fetch the current version of a particular Aggregate?
20:30 dalek doc: 1a04ad2 | paultcochrane++ | / (2 files):
20:30 dalek doc: Document Str.substr-eq()
20:30 dalek doc: review: https://github.com/perl6/doc/commit/1a04ad2c90
20:31 jnthn japhb: These days I tend to take a hybrid CQS/CQRS approach: for queries that only involve the state of one aggregate, I add something to the dispatcher (Domain in our case) where I give the aggregate ID and a lambda; it then loads the current version of the aggregate and invokes the lambda with it.
20:31 [Sno] joined #perl6
20:32 jnthn japhb: For many-aggregate queries (or other cases where it makes sense) I subscribe to the events and build read models
20:32 japhb jnthn: Oh, that's a nice approach ... it mirrors the way process works
20:32 jnthn japhb: One thing I've noticed is that when you really nail your aggregate boundaries, they tend to map to the places you need immediate consistency.
20:33 japhb Where do tap the event stream?  Is this something you already prepared for in Evject, or is this where you would set up a Supply feeding Domain.process, and tappable elsewhere?
20:33 jnthn japhb: Which makes applying a more eventual approach to the read models less scary. :)
20:33 japhb jnthn: Yeah, the immediate consistency v. aggregate boundaries comment definitely makes sense
20:34 jnthn japhb: I didn't set it up in Evject, but I've generally gone with a supply per event type.
20:34 jnthn Then you can write corellations of certain kinds of event
20:35 japhb That all makes me wonder, how do you treat several events as a transaction in this pattern?  Meaning, let's say one command resulted in attempting several events, but they all have to verify or the whole thing should roll back and throw.  How do you manage that?
20:35 japhb jnthn: A supply *per event type*?  Wow, that could result in a lot of supplies for complex business rules/aggregates.
20:36 labster joined #perl6
20:36 jnthn The "all or nothing" is something punted to the event store
20:37 japhb (My transaction question is more general than I phrased it ... I was wondering about changes to multiple aggregates, that may need to command each other based on events ....)
20:37 bin_005 joined #perl6
20:37 jnthn I'm not sure if Evject was too simplistic to do this, but I typically set it up so a given command can lead to multiple events
20:38 japhb Hmmmm.  So you basically mark the event stream in the event store as being at the end of a transaction, and you never re-run the events if you have a partial stream?
20:38 jnthn And you and that batch of events for all-or-nothing persistence to the event store.
20:38 jnthn Well, you send your "how many events did we load" count along too
20:38 japhb OK, gotcha.
20:39 jnthn And then deciding whether to persist the new ones or report a concurrency conflict is just "is the current count events in the aggregates stream equal to the number we loaded"
20:39 jnthn That's the optimistic concurrency aspect of it.
20:39 japhb nodnod, that much I could see.  :-)
20:39 jnthn Of course, since all is pure, you're free to automatically retry. :)
20:40 jnthn In which case you'll either be successful or get a domain exception 'cus the state changed and the command really is not allowed any more
20:40 japhb The annoying thing about this is that a lot of the online references I found for CQS, CQRS, event sourcing, etc. happily described all the easy cases, and glossed over the stuff you need to do something non-trivial.
20:40 nine .tell moritz Btw. I added the VM's network (192.168.0.0/16) to bind's allowed networks in /etc/named.conf
20:40 yoleaux nine: I'll pass your message to moritz.
20:40 japhb I found myself wanting you to continue that objects intersect concurrency talk for another section or two.  :-)
20:40 nine japhb: it is now ^^^
20:40 japhb nine: :-)
20:41 jnthn Well, another thing they often don't point out is that find aggregate boundaries is really tricky.
20:41 jnthn *finding
20:41 japhb Yeah, I could see that too, even with the toy I was building.
20:41 jnthn otoh, so is finding (good) object boundaries
20:43 jnthn The general answer for "I want a multi-aggregate thing" is some kind of process manager, though
20:43 jnthn (A state machine that reacts to events and perhaps issues commands)
20:43 brrt joined #perl6
20:43 japhb Yeah, that's exactly the kind of thing I'm going to need, I think
20:44 japhb The other thing I'm finding is that this pattern feels rather boilerplatey.  (Although OMG is the Perl 6 variant cleaner than C# and Java!)
20:45 japhb I guess it's another application of the complexity waterbed
20:45 jnthn Yeah, there's a bit of wiring to don in the C# version
20:45 labster_ joined #perl6
20:46 jnthn Though tbh if I wasn't trying to make the thing look comfortable for 99% of C# developers, I'd use "dynamic", do a little meta-programming, and be gone with it. :)
20:46 japhb jnthn: PLEASE DO THAT.
20:46 japhb :-)
20:46 jnthn But .net folks are often so damn addicted to their refactoring tools that can't see through dynamic... :S
20:46 japhb That sounds like a GREAT talk
20:47 RabidGravy what does "Cannot invoke this object (REPR: Null, cs = 0)" in the context of compiling a module mean?
20:47 japhb Sadly, I know the type.  There's a number of effort-saving things we're not allowed to use at $dayjob because the massive refactoring systems would get dispepsia
20:48 * brrt never ever uses refactoring tools
20:48 jnthn RabidGravy: "Us compiler writers screwed up"
20:48 RabidGravy :)
20:48 jnthn RabidGravy: If you have a succinct example, please file it
20:48 skids m: my @b; @b.defined.say;
20:48 camelia rakudo-moar 442a56: OUTPUT«True␤»
20:49 RabidGravy It's the Template6 module the modules list
20:49 hoelzro how does one pass named parameters to methods invoked via :op('callmethod')?
20:49 RabidGravy seems to have been doing it since 2015.03
20:50 jnthn hoelzro: :named('foo')
20:50 RabidGravy e,g http://testers.perl6.org/reports/49542.html
20:50 hoelzro jnthn: ah, thanks
20:50 jnthn hoelzro: On the QAST node corresponding ot the arg
20:50 jnthn *to the
20:51 moritz .
20:51 yoleaux 20:11Z <nine> moritz: Odd. I thought I'd given camelia 4 GiB, but it saw only about 1 GiB. I explicitely virsh setmem 4G'd it now and free -m shows the memory
20:51 yoleaux 20:40Z <nine> moritz: Btw. I added the VM's network (192.168.0.0/16) to bind's allowed networks in /etc/named.conf
20:52 dalek evalbot: 2267d41 | moritz++ | build-scripts/rebuild-rakudo.pl:
20:52 dalek evalbot: Revert "Disable r-j build for now"
20:52 dalek evalbot:
20:52 dalek evalbot: This reverts commit f1bdc43ca435c05271a1dc30a1e3e95d0fcdf119.
20:52 dalek evalbot:
20:52 dalek evalbot: nine++ bumped the memory for the VM.
20:52 dalek evalbot: review: https://github.com/perl6/evalbot/commit/2267d41b46
20:53 brrt any reasons why S32-num/rat.rakudo.moar would be failing
20:54 simon joined #perl6
20:56 moritz brrt: iirc lizmat++ changed somethiing in the way division by zero is handled
20:56 moritz and so likely touched some Rat code
20:56 brrt oh, ok, never mind then :-) just never seen it complain before
20:57 brrt re: the CQRS discussion just now
20:57 brrt would vector clocks fit in?
20:57 moritz there was a CQRS discussion?
20:57 moritz I should backlog :-)
20:59 japhb moritz: From about 35 minutes ago.
21:01 moritz japhb: yes, found it. Pretty dense stuff :-)
21:02 japhb moritz: Here I thought I was asking newbie questions ... that makes me feel a little better.  :-)
21:03 moritz japhb: oh, I'm a total CQRS newb; I've heard about it, and pondered it a bit, but never actually tried to implement it
21:04 moritz the whole topic fascinates me
21:05 japhb I had thought about it in the past, but never had a problem that looked like it would be a good fit and was proving difficult to manage using my existing toolbox.  So I figured, no time like the present to give it a try.  And then I found implementation details online to be ... lacking.
21:05 japhb And very C#/Java specific.
21:05 moritz but it also kinda scares me, because "your data should be in an RDBMS and easily queryable" still feels like a pretty strong axiom to me
21:06 moritz mostly because at $dayjob, I regularly get the task to create some new reports (sometimes one-off, sometimes regular) that nobody though of before, and I'm very happy to be able to join 5+ tables in SQL and get both decent performance and the data I want
21:06 japhb Well, a modern RDBMS uses an update journal and then separate read-optimized tables.  This just exposes that to a higher level in the app stack.
21:06 moritz and ACID
21:07 moritz japhb: I know; and I'm not too keen on that shift, because the RDBMS folks already solved that problem for me
21:07 moritz and took care of concurrency and transactional question that I don't have to ponder now, thanks to them :-)
21:07 japhb The stuff I found online has a domain model that is driven by the persisted event journal, and the events also published to (often denormalized) relational tables for fast queries.
21:08 brrt moritz: but at the cost of a lot of flexibility
21:08 japhb True, but sometimes re-examining abstractions "given what we know now" can be a win.
21:08 brrt and the reinvention of the same thing at level higher in the stack
21:08 japhb Still, I don't have a working system yet; I'll have to see how this works out when I push at it a bit more.
21:09 jnthn "don't have to care about the transactional question" is a little over-simplistic too, 'cus the defualt isolation level means your ACID is kinda AC-Iish-D :)
21:10 jnthn (Depending on database server configuration, of course.)
21:10 moritz well, as a scientist, event souring makes lots of sense; it's the "record what you measured" principle taken to the software world
21:10 japhb moritz: nice way to put it.  :-)
21:10 bin_005_z joined #perl6
21:10 moritz storing only derivative data is a deadly sin in science
21:11 jnthn In some problem domains, you legally need the audit trail also.
21:11 moritz aye; and event souring means elevating the audit trail to be your primary data source
21:11 brrt i think the whole cqrs name is a 'memeifcation' reaction
21:11 brrt the notion that an idea only spreads if you can put it on a sticker
21:11 jnthn Well, and when you unpack it there's actually several ideas.
21:12 brrt yes, certainly
21:12 Doink joined #perl6
21:12 brrt but my point is; in many cases we can think of, these principles are obvious
21:12 moritz right; I'm not sure I've bought all of these ideas; maybe I should start with a few of them :-)
21:12 brrt however, we *have* to name then, put a label on them, give conferences on them
21:12 jnthn "Which entity object does this query that involves both entities go on?" "Why put it on either, just shove it on some separate query class." "Ohhhh, that's simpler!"
21:13 brrt because otherwise a great sea of CRUD washes them out
21:13 jnthn CQRS has been taken to mean a load of things, but at the end of the day it's just about splitting up the code paths involved in reads and writes.
21:13 jnthn You can then optionally push that all the way down to persistence, and doing so enables you to more easily event source.
21:13 dalek rakudo/stub-exception: 89b9b2a | hoelzro++ | stub-exception-type.t:
21:13 dalek rakudo/stub-exception: Add a test for stub exception types
21:13 dalek rakudo/stub-exception:
21:13 dalek rakudo/stub-exception: This will be moved into roast if this branch is merged; it's
21:13 dalek rakudo/stub-exception: simply included in Rakudo for ease of review purposes
21:13 dalek rakudo/stub-exception: review: https://github.com/rakudo/rakudo/commit/89b9b2a932
21:13 dalek rakudo/stub-exception: d4bcac0 | hoelzro++ | src/core/Exception.pm:
21:13 dalek rakudo/stub-exception: Add new X::StubCode exception type
21:13 dalek rakudo/stub-exception:
21:14 dalek rakudo/stub-exception: Exceptions of this type are used when stubbed-out code (eg. .../???/!!!)
21:14 dalek rakudo/stub-exception: are called
21:14 dalek rakudo/stub-exception: review: https://github.com/rakudo/rakudo/commit/d4bcac0a0e
21:14 dalek rakudo/stub-exception: 732e95d | hoelzro++ | src/Perl6/Actions.nqp:
21:14 dalek rakudo/stub-exception: Create X::StubCode exceptions when possible for ... and friends
21:14 dalek rakudo/stub-exception: review: https://github.com/rakudo/rakudo/commit/732e95d5c8
21:14 dalek rakudo/stub-exception: 733bbbc | hoelzro++ | src/core/Exception.pm:
21:14 dalek rakudo/stub-exception: Allow overriding of X::StubCode.message
21:14 dalek rakudo/stub-exception: review: https://github.com/rakudo/rakudo/commit/733bbbc2c7
21:14 dalek rakudo/stub-exception: d8887f1 | hoelzro++ | src/Perl6/Actions.nqp:
21:14 dalek rakudo/stub-exception: Make sure args to !!! use X::StubCode as well
21:14 dalek rakudo/stub-exception: review: https://github.com/rakudo/rakudo/commit/d8887f13fe
21:14 hoelzro if anyone's curious, I created a branch (stub-exception) that implements !!!/???/... as X::StubCode instead of as X::AdHoc
21:14 hoelzro if people (esp. TimToady) think this is a good idea, I can merge it into the nom branch and amend roast/specs
21:17 moritz hoelzro: not heaving read the branch, just your short summary, i'm pretty sure it's a good idea
21:18 moritz and now, sleep &
21:19 hoelzro night moritz
21:25 japhb hoelzro: I agree with you and moritz, that seems like a good idea.  Feels like a forgiveness >> permission thing, actually.
21:25 brrt yep, seems sane to me
21:26 brrt imho X::AdHoc should not be overused
21:26 brrt it doesn't provide a lot of information
21:26 japhb I agree.
21:31 hoelzro sure, I just didn't want to abuse my commit bit to force a spec change!
21:33 flussence hoelzro: the good news is core hardly uses AdHoc at all, there's only a dozen or so mentions of it at all there and most of them are for implementing it, so you needn't worry
21:34 pmichaud good afternoon, #perl6
21:34 jnthn hoelzro: I and others have introduced typed exceptions for many things without any pushback, so I think this is fine.
21:34 hoelzro ok, I'll merge it then!
21:34 jnthn o/ pmichaud
21:34 pmichaud o/ jnthn
21:35 japhb o/ pmichaud
21:35 dalek rakudo/nom: 043d436 | hoelzro++ | src/core/Exception.pm:
21:35 dalek rakudo/nom: Add new X::StubCode exception type
21:35 dalek rakudo/nom:
21:35 dalek rakudo/nom: Exceptions of this type are used when stubbed-out code (eg. .../???/!!!)
21:35 dalek rakudo/nom: are called
21:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/043d436af8
21:35 dalek rakudo/nom: 634145a | hoelzro++ | src/Perl6/Actions.nqp:
21:36 dalek rakudo/nom: Create X::StubCode exceptions when possible for ... and friends
21:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/634145ae35
21:36 dalek rakudo/nom: c4f62a1 | hoelzro++ | src/core/Exception.pm:
21:36 dalek rakudo/nom: Allow overriding of X::StubCode.message
21:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c4f62a1fc1
21:36 dalek rakudo/nom: 6429464 | hoelzro++ | src/Perl6/Actions.nqp:
21:36 dalek rakudo/nom: Make sure args to !!! use X::StubCode as well
21:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6429464cde
21:36 pmichaud o/ japhb
21:36 telex joined #perl6
21:36 japhb How goes it?  Are you at YAPC?  Or back home?
21:36 hoelzro o/ pmichaud
21:36 pmichaud I'm at YAPC
21:36 pmichaud just arrived about 30 mins ago
21:36 labster good afternoon from YAPC::NA from me too
21:37 brrt night &
21:37 jnthn pmichaud: I'm guessing it's hot? :)
21:37 * japhb waves in the general direction of YAPC
21:37 pmichaud actually, it's quite nice here
21:38 jnthn Yeah, but my definition of "quite nice" is like 15..25 :)
21:38 jnthn In C, not F... :)
21:38 pmichaud about 28C here
21:38 jnthn Tolerable. :)
21:38 japhb jnthn: Here in San Jose it's 90+ F, may break 100 tomorrow in the next couple days.
21:39 pmichaud yes, in Plano (where I live) it's currently 33c
21:39 labster pmichaud: you missed the thunderstorm here yesterday
21:39 pmichaud labster:  I most likely drove through it :)
21:40 labster not as impressive as orlando T-storms, though.  Windows don't seem to leak in this year's hotel.
21:40 pmichaud there were plenty of storms where I was yesterday :)
21:41 dalek roast: 845ed56 | hoelzro++ | S32-exceptions/misc.t:
21:41 dalek roast: Update !!!/... exception check to use X::StubCode attrs
21:41 dalek roast: review: https://github.com/perl6/roast/commit/845ed56464
21:41 dalek roast: 32b2880 | hoelzro++ | S32-exceptions/misc.t:
21:41 dalek roast: Check for X::StubCode in !!! check
21:41 dalek roast: review: https://github.com/perl6/roast/commit/32b288009f
21:41 pmichaud and given that May was the rainiest ever recorded in Texas....  I've seen my share of rain for the year.  But I'd of course be happy to see even more :)
21:42 RabidGravy for reference there are 104 places in src/core where a bare "die Str" is used.
21:42 jnthn The forecast had been promising me a thunderstorm here, but seems I won't be getting it. :(
21:42 labster .u thunder
21:42 yoleaux U+2608 THUNDERSTORM [So] (☈)
21:42 yoleaux U+2633 TRIGRAM FOR THUNDER [So] (☳)
21:42 yoleaux U+26C8 THUNDER CLOUD AND RAIN [So] (⛈)
21:42 cognominal what is the way to display syntax highlighted Perl 6 in a html page?
21:44 jnthn cognominal: I think doc.perl6.org is using Pygments
21:45 hoelzro is it typical to add new exception types to the specs? if so, where would be best?
21:45 cognominal jnthn++, indeed ... http://pygments.org/ says "and it highlights even Perl 6"!
21:45 jnthn hah
21:46 labster hoelzro: S32::Exception
21:46 jnthn hoelzro: Adding them to doc would be more useful, if you're going to add them anywhere ;)
21:46 hoelzro why not both? ;)
21:47 pmichaud s/specs/design documents/   # :)
21:48 jnthn hoelzro: Both is fine if you have time ;)
21:48 dalek specs: 0da73b8 | hoelzro++ | S32-setting-library/Exception.pod:
21:48 dalek specs: Add StubCode to exceptions
21:48 dalek specs: review: https://github.com/perl6/specs/commit/0da73b885f
21:49 labster and the tests too, they're the new specs, right?
21:49 pmichaud I think I'm very likely to rename the specs repo this week :)
21:49 jnthn I thought there already was a roast patch...but yes :)
21:51 labster just do it pmichaud.  During a talk, if possible.
21:51 dalek doc: 4024901 | hoelzro++ | lib/Type/X/StubCode.pod:
21:51 dalek doc: Document X::StubCode
21:51 dalek doc: review: https://github.com/perl6/doc/commit/40249017c9
21:54 amurf joined #perl6
21:55 pmichaud I'm heading out to get some supplies... bbiaw
21:58 timotimo oh, yapc::na is right now?
21:58 timotimo or: very close to now
22:01 jnthn Starting very soon, I guess :)
22:01 jnthn sleep &
22:03 timotimo gnite jnthn
22:16 ab5tract m: my $g = * ~~ *; $g(Int,4);
22:16 camelia rakudo-moar 642946: OUTPUT«Invocant requires a 'Int' instance, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/o_bNNTWbfE:1␤␤»
22:19 geekosaur that looks backwards?
22:19 ab5tract m: my $g = * ~~ *; $g(Int,4); $g(Int,4.WHAT).say;
22:19 camelia rakudo-moar 642946: OUTPUT«Invocant requires a 'Int' instance, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/4JShCLhHf6:1␤␤»
22:19 ab5tract m: my $g = * ~~ *; $g(Int,4.WHAT).say;
22:19 camelia rakudo-moar 642946: OUTPUT«True␤»
22:20 ab5tract geekosaur: how do you mean?
22:20 geekosaur m: say Int ~~ 4;
22:20 camelia rakudo-moar 642946: OUTPUT«Invocant requires a 'Int' instance, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/b_RAtOkrls:1␤␤»
22:20 geekosaur m: say 4 ~~ Int;
22:21 camelia rakudo-moar 642946: OUTPUT«True␤»
22:21 ab5tract geekosaur: wow! I did not realize that smart-matching worked that way
22:21 geekosaur RHS is the invocant (ACCEPTS methood, IIRC)
22:21 ab5tract if course, it makes sense
22:37 labster joined #perl6
22:44 pmichaud back
22:55 japhb pmichaud: Is there a place (or a branch) to follow GLR internals progress?
23:06 pmichaud japhb: it's all on paper and in my head at the moment.
23:06 pmichaud I'll be transferring it to bits while here at yapc
23:09 timotimo we have spec tests that want rats over 0 to always become 1 over 0
23:23 flussence m: my Int(Str) @a = < 1 3 6 10 >
23:23 camelia rakudo-moar 642946: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8_Ewpk71p2␤Coercion Int(Str) is insufficiently type-like to qualify a variable␤at /tmp/8_Ewpk71p2:1␤------> 3my Int(Str) @a7⏏5 = < 1 3 6 10 >␤    expecting any of:␤        constraint␤»
23:23 flussence that's a confusingly helpful error message
23:24 flussence it seems to know exactly what I'm asking for, then says I'm doing it wrong.
23:24 dayangkun joined #perl6
23:26 grondilu m: my Int[Str] @a = < 1 3 6 10 >
23:26 camelia rakudo-moar 642946: OUTPUT«===SORRY!===␤Cannot find method 'parameterize'␤»
23:26 * grondilu is not sure this is supposed to work
23:27 grondilu oh no of course not. silly me.
23:28 flussence m: my @a of Int(Str) = < 1 3 6 10 >
23:28 camelia rakudo-moar 642946: OUTPUT«Unhandled exception: Type check failed in assignment to '@a'; expected 'Int(Str)' but got 'Str'␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/share/perl6/run​time/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:16647  (/home/camelia…»
23:30 grondilu m: my Int(Str) $ = 2
23:30 camelia rakudo-moar 642946: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nKPrfjz7Lo␤Coercion Int(Str) is insufficiently type-like to qualify a variable␤at /tmp/nKPrfjz7Lo:1␤------> 3my Int(Str) $7⏏5 = 2␤    expecting any of:␤        constraint␤»
23:31 grondilu m: my Int(Str) $
23:31 camelia rakudo-moar 642946: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dWFbwyD8rX␤Coercion Int(Str) is insufficiently type-like to qualify a variable␤at /tmp/dWFbwyD8rX:1␤------> 3my Int(Str) $7⏏5<EOL>␤    expecting any of:␤        constraint␤»
23:41 * raydiak guesses it's trying to say "we intentionally don't allow that"
23:41 gagalicious anyone from US? i'm trying to do a regex matching... but i dunno what it means... 2700 E Pridemore Dr 72744,  Lincoln,  United States. I know US is the "country". Arkansas is the state, "Benton County" is the county, what is lincoln?
23:41 gagalicious can anyone tell me?
23:44 timotimo do you also know that "arkansas" is actually pronounced "arkansaw"?
23:44 ugexe its a city, and the state is missing (which is Arkansas)
23:44 ugexe i.e. it should say Lincoln, Arkansas
23:45 flussence .oO( could also be a 4-dimensional address, with a 4 year granularity )
23:46 ugexe i dont think zip code 72744 includes any other dimensions
23:46 gagalicious timotimo : americans like to confuse people. i did realise that when i tried to pronounce it as arkansauce... so what if i pronounce it as arkansauce. it's the problem of the spelling :D
23:47 gagalicious So... Arkansas (state), Lincoln (city), Benton County (county)... is that correct?
23:47 gagalicious state city county
23:48 ugexe we dont use county. county exists, but if this is a mailing address its not used
23:50 ugexe generally you can populate state and city based on zipcode
23:51 timotimo i used to pronounce "arkansas" like "kansas" with an "ar" in front
23:51 raydiak usually /^<city>, <state>  zipcode$/ often with the two spaces between state and zip code, and state is often a 2-letter abbreviation
23:52 raydiak but mainly you don't pretty much ever put the state before the city
23:52 ugexe then there is washington dc
23:53 * raydiak never addressed a letter there...
23:53 raydiak ...maybe I should :)
23:53 ugexe address parsing is a torture i wouldnt wish upon anyone
23:54 aborazmeh joined #perl6
23:54 aborazmeh joined #perl6
23:55 timotimo http://t.h8.lv/string_to_int.svg
23:56 timotimo check out what happens to the second argument there
23:56 timotimo it's getting the integer argument, boxes it into an Int object, does "a general numification" on it, which creates a num from it, then it coerces the num to an int
23:57 timotimo makes me want to cry
23:58 llfourn joined #perl6
23:59 flussence yow

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

Perl 6 | Reference Documentation | Rakudo