Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-07-10

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:01 retupmoca based on all my other playing, I suspect rakudo is doing something wrong there
00:02 ren1us m: sub circumfix:<` `> (@in, *@params) { &@in[(^@in.elems).roll](@params); say "here"; }; sub t1($param) { say "t1"; }; sub t2($param) { say "t2"; }; say "first"; `(&t1,&t1)`; say "second"; `(&t1,&t1)`;
00:02 camelia rakudo-moar e9fad6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/t3XHi5PEwCâ�¤Confusedâ�¤at /tmp/t3XHi5PEwC:1â�¤------> [32msay "first"; `(&t1,&t1)`; say "second"; [33mâ��[31m`(&t1,&t1)`;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        statement endâ�¤â€¦Â»
00:02 ren1us i... really don't know what happened there
00:03 ren1us m: sub circumfix:<` `> (@in, *@params) { &@in[(^@in.elems).roll](@params); say "here"; }; sub t1($param) { say "t1"; }; sub t2($param) { say "t2"; }; `(&t1,&t1)`;
00:03 camelia rakudo-moar e9fad6: OUTPUT«t1␤here␤»
00:03 ren1us and that just makes it weirder
00:04 ren1us apparently two say statements and a second call to the circumfix operator confuses moar ._.
00:09 atroxaper joined #perl6
00:10 retupmoca m: my $s = Supply.new; my $m = $s.grep({ $_ == 1}); $m.tap({say 'a'}); $m.tap({say 'b'}); $s.more(1)
00:10 camelia rakudo-moar e9fad6: OUTPUT«a␤b␤a␤b␤»
00:11 retupmoca ok, it looks like the normal pattern used in core/SupplyOperations.pm does not play well with multiple taps
00:19 hoverboard joined #perl6
00:25 ivanshma` joined #perl6
00:33 donghongbo joined #perl6
00:36 psch m: my $s = Supply.new; my $m = $s.grep(* == 1); $s.tap({say 'a'}); $m.tap({say 'b'}); $m.tap({say 'c'}); $s.more: 1 # tapping a narrowed Supply does seem wonky, yes
00:36 camelia rakudo-moar 4cad54: OUTPUT«a␤b␤c␤b␤c␤»
00:36 psch retupmoca: i have a hunch that there's a bit that makes sense there, but i don't see it
00:39 psch actually, never mind the "i don't see it"; tapping $m taps $s as well apparently
00:39 psch m: my $s = Supply.new; my $m = $s.grep(* == 1); $s.tap({say 'a'}); $m.tap({say 'b'}); $m.tap({say 'c'}); $s.tappers.elems.say; $m.tappers.elems.say; # as seen here
00:39 camelia rakudo-moar 4cad54: OUTPUT«3␤2␤»
00:39 psch which in turn means the first "a\nb" is from $s, the second from $m
00:40 psch or "b\nc", as it were
00:42 raiph joined #perl6
00:48 dayangkun joined #perl6
00:48 molaf joined #perl6
00:57 ren1us before i go and waste half an hour writing a base conversion module, does such a thing already exist in the core?
00:58 ren1us because i haven't yet found it (granted i'm pretty sure there's a huge repository of information i have yet to find) but it feels like the sort of thing that's lurking in an existing routine call
00:58 psch sprintf?
00:59 * psch .oO(probably not...)
00:59 ren1us uh, maybe
01:00 avuserow m: say :36("abcdef") # like so? converts from base 36
01:00 camelia rakudo-moar 4cad54: OUTPUT«623714775␤»
01:00 psch avuserow++
01:00 japhb I was about to point out the same.
01:01 ren1us m: say :2("8");
01:01 psch i just found it in the spec
01:01 camelia rakudo-moar 4cad54: OUTPUT«Cannot convert string to number: base-2 number must begin with valid digits or '.' in ':2<⏏8>' (indicated by ⏏)␤  in method BUILDALL at src/gen/m-CORE.setting:907␤  in method bless at src/gen/m-CORE.setting:826␤  in method new at src/gen/m-CORE.s…»
01:01 avuserow goes by the term "radix" in the spec
01:01 ren1us woops
01:01 ren1us m: say :2("101")
01:01 camelia rakudo-moar 4cad54: OUTPUT«5␤»
01:01 ren1us oh yeah that's exactly what i wanted
01:01 avuserow not sure how to format something in a particular base though
01:01 ren1us avuserow++
01:02 psch m: :2<101>.base(5).say
01:02 camelia rakudo-moar 4cad54: OUTPUT«10␤»
01:02 japhb Exactly
01:02 avuserow psch++
01:03 avuserow m: :2<10101010>.base(64).say
01:03 camelia rakudo-moar 4cad54: OUTPUT«base must be between 2 and 36, got 64␤  in method gist at src/gen/m-CORE.setting:12858␤  in sub say at src/gen/m-CORE.setting:13784␤  in method say at src/gen/m-CORE.setting:1019␤  in block  at /tmp/jmGlbteW0J:1␤␤»
01:03 avuserow m: :2<10101010>.base(36).say
01:03 camelia rakudo-moar 4cad54: OUTPUT«4Q␤»
01:04 ren1us i kinda feel like there should be one unified routine for both to and from arbitrary bases, rather than one... thing to go from base n to base 10, then a method to go from base 10 to base m
01:04 Mouq also .unbase
01:05 Mouq m: "10101010".unbase(2).say
01:05 camelia rakudo-moar 4cad54: OUTPUT«No such method 'unbase' for invocant of type 'Str'␤  in block  at /tmp/G7EKsMHheW:1␤␤»
01:05 Mouq Waaa
01:05 BenGoldberg Also, maybe special-case base 64 to work, even though it's outside 2..36?
01:06 Mouq m: "10101010".&unbase(2).say
01:06 camelia rakudo-moar 4cad54: OUTPUT«Type check failed in binding $base; expected 'Int' but got 'Str'␤  in sub unbase at src/gen/m-CORE.setting:6862␤  in block  at /tmp/bF0Ov2mqUX:1␤␤»
01:06 BenGoldberg m: say unbase( 4, 5 )
01:06 camelia rakudo-moar 4cad54: OUTPUT«Type check failed in binding $str; expected 'Str' but got 'Int'␤  in sub unbase at src/gen/m-CORE.setting:6862␤  in block  at /tmp/BznEek0wcf:1␤␤»
01:06 Mouq m: unbase(2, "10101010").say
01:06 camelia rakudo-moar 4cad54: OUTPUT«170␤»
01:06 psch m: Int.can('base')[0].signature.params[2].say
01:06 camelia rakudo-moar 4cad54: OUTPUT«*%_␤»
01:06 Mouq That needs to be Cool-ized
01:06 BenGoldberg m: Int.can('base')[0].signature.params.say
01:06 camelia rakudo-moar 4cad54: OUTPUT«Int:D Cool $base *%_␤»
01:07 psch not sure what i was looking for :)
01:07 avuserow base64 typically has padding so it's a bit more special. Plus we already have MIME::Base64 in the ecosystem
01:08 psch ren1us: i don't think the adverb conversion gets you base10, it gets you a number which gets represented in base10 by convention. similarly, .base returns something Stringy i assume
01:09 psch the spec says something about :2(0101) being wrong for "confusing a number with its textual representation"
01:09 psch (the actual example is :8(777) )
01:10 japhb m: ':16«f.8*:4[2]**:2<1*2**2>»​/-:60[1,0]'.Numeric.perl.say
01:10 camelia rakudo-moar 4cad54: OUTPUT«Failure.new(exception => X::Str::Numeric.new(source => ":16«f.8*:4[2]**:2<1*2**2>»​/-:60[1,0]", pos => 26, reason => "trailing characters after number"))␤»
01:11 ren1us this strikes me as incredibly unintuitive.  give me a few hours.
01:11 japhb m: ':16«f.8*:4[2]**:2<1*2**2>»​'.Numeric.perl.say
01:11 camelia rakudo-moar 4cad54: OUTPUT«Failure.new(exception => X::Str::Numeric.new(source => ":16«f.8*:4[2]**:2<1*2**2>»​", pos => 26, reason => "trailing characters after number"))␤»
01:15 BenGoldberg m: :8(777).base(2).say
01:15 camelia rakudo-moar 4cad54: OUTPUT«Type check failed in binding $str; expected 'Str' but got 'Int'␤  in sub unbase at src/gen/m-CORE.setting:6862␤  in block  at /tmp/0TJ4h0KZzY:1␤␤»
01:15 japhb m: ':16«f.8*:4[2]**:2[1,0,0]»/-:60[1,0]'.Numeric.perl.say
01:15 camelia rakudo-moar 4cad54: OUTPUT«<-62/15>␤»
01:15 BenGoldberg m: (:8(777)).base(2).say
01:15 camelia rakudo-moar 4cad54: OUTPUT«Type check failed in binding $str; expected 'Str' but got 'Int'␤  in sub unbase at src/gen/m-CORE.setting:6862␤  in block  at /tmp/jMLzmuL_DB:1␤␤»
01:15 japhb THERE WE GO!  Damn unicode paste error
01:16 japhb Str.Numeric FTW
01:16 BenGoldberg m: (:8<777>).base(2).say
01:16 camelia rakudo-moar 4cad54: OUTPUT«111111111␤»
01:16 _slade joined #perl6
01:16 japhb Not that I'm biased or anything.  ;-)
01:22 psch joined #perl6
01:22 psch yay host machine automatically updated while i was running spectests on the guest vm
01:23 psch of course it also had to reboot :(
01:27 thou joined #perl6
01:33 diakopte1 joined #perl6
01:40 FROGGS_ joined #perl6
01:45 colomon_ https://gist.github.com/colomon/ba1259a1e21b66e2322b # quick practical p6 program for $work
01:45 klapperl_ joined #perl6
01:48 rjbs [particle]: Ransom Old Tom: ordered
01:50 araujo joined #perl6
01:57 hoverboard joined #perl6
02:03 chenryn joined #perl6
02:15 jercos joined #perl6
02:15 noganex joined #perl6
02:16 awwaiid joined #perl6
02:17 kshannon joined #perl6
02:23 dayto joined #perl6
02:33 chenryn joined #perl6
02:34 ren1us joined #perl6
02:36 zengargo1le joined #perl6
02:37 donghongbo joined #perl6
02:41 zengargoyle joined #perl6
02:44 klapperl joined #perl6
02:46 retupmoca .tell jnthn I think I found a supply bug. Does https://github.com/rakudo/rakudo/pull/286 make sense?
02:46 yoleaux retupmoca: I'll pass your message to jnthn.
03:10 pdcawley joined #perl6
03:11 retupmoca .tell jnthn that patch results in an issue where calling .close on one tap closes the source_tap for all taps; I'm not sure the best way to solve this
03:11 yoleaux retupmoca: I'll pass your message to jnthn.
03:14 atroxaper joined #perl6
03:16 thou joined #perl6
03:22 SamuraiJack_ joined #perl6
03:23 _slade joined #perl6
03:23 atroxaper Hello, #perl6 !
03:26 atroxaper .tell timotimo just read yesterday's post. You made my day! atroxB<p>aper ;-)
03:26 yoleaux atroxaper: I'll pass your message to timotimo.
03:28 dalek joined #perl6
03:36 dalek joined #perl6
03:43 SamuraiJack_ joined #perl6
03:43 isBEKaml joined #perl6
03:44 noganex joined #perl6
03:54 gfldex joined #perl6
03:58 [Sno]_ joined #perl6
03:59 jack_rabbit joined #perl6
04:01 kaare_ joined #perl6
04:07 PerlJam joined #perl6
04:08 donghongbo joined #perl6
04:09 lelf` joined #perl6
04:16 masak joined #perl6
04:18 anaeem1 joined #perl6
04:21 PerlJam joined #perl6
04:49 terrencehan joined #perl6
05:03 thou joined #perl6
05:05 atroxaper joined #perl6
05:11 dayangkun_ joined #perl6
05:19 ivanshmakov joined #perl6
05:23 kaare_ joined #perl6
05:30 virtualsue joined #perl6
05:49 donghongbo joined #perl6
05:52 masak morning, #perl6
05:57 terrencehan joined #perl6
05:59 atroxaper masak_grr: morning!
06:03 itz_ joined #perl6
06:18 Gothmog_ joined #perl6
06:19 brrt joined #perl6
06:22 terrencehan joined #perl6
06:24 SamuraiJack_ joined #perl6
06:26 terrencehan left #perl6
06:37 Alula_ joined #perl6
06:37 sivoais joined #perl6
06:54 chenryn joined #perl6
06:59 brrt joined #perl6
07:00 ponbiki joined #perl6
07:06 rindolf joined #perl6
07:07 dmol joined #perl6
07:12 teodozjan joined #perl6
07:13 brrt how does one get command line args in p6 (like @ARGV)
07:13 moritz @*ARGS
07:13 brrt ah, i see
07:14 atroxaper @*ARGS
07:14 brrt i suppose that also works with %*ENV ?
07:14 brrt nope.. not env
07:15 moritz m: say %*ENV.perl
07:15 camelia rakudo-moar 4cad54: OUTPUT«("LANGUAGE" => "en_US:en", "TMUX" => "/tmp/tmux-1005/default,26465,1", "LS_COLORS" => "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.…»
07:16 brrt oh, i must've done something wrong then
07:16 nwc10 oooh, can we use the TMUX socket to escape the restricted shell?
07:17 moritz nwc10: possibly :-)
07:17 nwc10 but how many bugs will we find in the process, and need to fix?
07:17 moritz nwc10: there are many-ish ways to escape the camelia jail
07:17 hoverboard joined #perl6
07:17 moritz the restrictions are mostly there to prevent accidental harm; they can't hold back a determined attacker
07:20 Ven joined #perl6
07:21 ren1us One would hope that there would be someone in here to intervene in that case, anyway
07:21 moritz ren1us: not so easy, since you can also /msg camelia
07:24 brrt capturing groups in regexes?
07:25 moritz brrt: ()
07:25 brrt i thought so
07:26 mathw joined #perl6
07:26 brrt m: $f = "foo bar"; say $f ~~ m/'foo '(\s+)/;
07:26 camelia rakudo-moar 4cad54: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/bEzcpju7Ldâ�¤Variable '$f' is not declaredâ�¤at /tmp/bEzcpju7Ld:1â�¤------> [32m$f[33mâ��[31m = "foo bar"; say $f ~~ m/'foo '(\s+)/;[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
07:27 brrt m: my $f = "foo bar"; say $f ~~ m/'foo '(\s+)/;
07:27 camelia rakudo-moar 4cad54: OUTPUT«False␤»
07:27 brrt oh
07:27 brrt non-space
07:30 dayangkun_ joined #perl6
07:32 brrt and .. how to get the capturing group?
07:32 brrt captured group
07:33 brrt ooh perl6 documentation has much improved in these years
07:34 darutoko joined #perl6
07:35 Timbus https://gist.github.com/TiMBuS/415d0d358e676afae647 so, whats up with this
07:36 mathw joined #perl6
07:38 ren1us brrt: assuming you mean what I think I mean by "get the captured group"
07:38 brrt probably
07:38 ren1us m: if "I went to Istanbul" ~~ rx/'to '('Istanbul'|'Paris'|'Tokyo')/ { say $0; };
07:38 camelia rakudo-moar 4cad54: OUTPUT«「Istanbul」␤␤»
07:38 brrt ahaaah ok
07:39 ren1us $0 matches the first capture, $1 matches the second, etc etc
07:40 brrt thanks :-)
07:46 woosley left #perl6
07:47 Timbus r: my ($a,$b) = 'a,b,c--1,2,3'.split('--')>>.split(',').lol; say $a.perl, ' and ', $b.perl;
07:48 camelia rakudo-moar 4cad54: OUTPUT«().list.item and ().list.item␤»
07:48 camelia ..rakudo-{parrot,jvm} 4cad54: OUTPUT«("a", "b", "c").list.item and ("1", "2", "3").list.item␤»
07:49 Ven ;o)
07:50 wtw joined #perl6
07:52 thou joined #perl6
07:52 moritz r: my ($a,$b) = 'a,b,c--1,2,3'.split('--')>>.split(',').lol; say $a.tree.perl; say $b.tree.perl
07:52 camelia rakudo-moar 4cad54: OUTPUT«().list␤().list␤»
07:52 camelia ..rakudo-{parrot,jvm} 4cad54: OUTPUT«("a", "b", "c").list␤("1", "2", "3").list␤»
07:53 moritz looks like a r-m bug to me
07:55 chenryn joined #perl6
07:55 Timbus also using $map .= split("\n") in sink context (i think thats what we call void now?), makes $map = () for some reason..
07:57 sergot o/
07:57 Timbus r: my ($a,$b) = 'a,b,c--1,2,3'.split('--'); $a .= split(","); say $a.perl
07:57 camelia rakudo-{parrot,jvm,moar} 4cad54: OUTPUT«().list.item␤»
07:57 Timbus r: my ($a,$b) = 'a,b,c--1,2,3'.split('--'); say $a .= split(","); say $a.perl
07:57 camelia rakudo-{parrot,jvm,moar} 4cad54: OUTPUT«a b c␤("a", "b", "c").list.item␤»
07:57 Timbus yeah
08:00 brrt m: my %h = 'foo" => 1, "bar" = 3, "baz" = 4; my @a = %h.kv; say @a;
08:00 camelia rakudo-moar 4cad54: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/WquU2HbXwHâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/WquU2HbXwH:1â�¤------> [32m" = 3, "baz" = 4; my @a = %h.kv; say @a;[33mâ��[31m<EOL>[0mâ�¤    expectin…»
08:00 donghongbo joined #perl6
08:01 brrt m: my %h = 'foo" => 1, "bar" => 3, "baz" => 4; my @a = %h.kv; say @a;
08:01 camelia rakudo-moar 4cad54: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/MvMulBE0Ubâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/MvMulBE0Ub:1â�¤------> [32m=> 3, "baz" => 4; my @a = %h.kv; say @a;[33mâ��[31m<EOL>[0mâ�¤    expectin…»
08:01 brrt m: my %h = "foo" => 1, "bar" => 3, "baz" => 4; my @a = %h.kv; say @a;
08:01 camelia rakudo-moar 4cad54: OUTPUT«foo 1 bar 3 baz 4␤»
08:02 brrt m: my %h = 'foo" => 1, "bar" = 3, "baz" = 4; my @a = %h.kv; say @a.join(', ');
08:02 camelia rakudo-moar 4cad54: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/qapT4Sf5wqâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/qapT4Sf5wq:1â�¤------> [32m" = 4; my @a = %h.kv; say @a.join(', ');[33mâ��[31m<EOL>[0mâ�¤    expectin…»
08:02 brrt :    m: my %h = "foo" => 1, "bar" => 3, "baz" => 4; my @a = %h.kv; say @a.join(",");
08:03 brrt m: my %h = "foo" => 1, "bar" => 3, "baz" => 4; my @a = %h.kv; say @a;
08:03 camelia rakudo-moar 4cad54: OUTPUT«foo 1 bar 3 baz 4␤»
08:03 brrt m: my %h = "foo" => 1, "bar" => 3, "baz" => 4; my @a = %h.kv; say @a.join(',');
08:03 camelia rakudo-moar 4cad54: OUTPUT«foo,1,bar,3,baz,4␤»
08:03 brrt hmm, that doesn't help
08:10 brrt i want to sort a hash by its values, how to?
08:10 masak %hash.sort(*.value)
08:10 brrt oh.
08:10 brrt wow
08:10 * brrt forgets whatevercode
08:11 masak but the result will be a list of pairs, mind.
08:11 brrt that's ok :-)
08:11 brrt and reversing?
08:11 masak %hash.sort(*.value).reverse
08:11 brrt much wow
08:11 brrt (i'd guess the reverse method, and sure enough, it was there. i'm impressed)
08:12 brrt ok, i'm off for now, see you in a bit
08:12 brrt left #perl6
08:14 lizmat good *, #perl6!
08:14 yoleaux 9 Jul 2014 23:53Z <[Coke]> lizmat: is S03-metaops/hyper.t:659:#?rakudo skip 'EVAL(Buf)' easily fixable? (I tried unskipping it, no love)
08:15 lizmat [Coke]: tried that yesterday, to no avail: Buf.Str is an error, and Buf.Stringy returns self, so it gets into a loop with the naive solution
08:15 Grrrr joined #perl6
08:15 [particle] joined #perl6
08:15 lizmat retupmoca: looking at the Supply.grep/map issue
08:19 denis_boyun joined #perl6
08:20 sergot hi lizmat o/
08:21 [Sno] joined #perl6
08:23 dakkar joined #perl6
08:28 chenryn joined #perl6
08:29 noganex joined #perl6
08:30 noganex joined #perl6
08:35 lizmat fitness, back in ~ 2 hours
08:36 teodozjan joined #perl6
08:58 fhelmberger joined #perl6
09:04 masak m: my %h = foo => 2, bar => 3, mardi_graz => 1; say %h.sort(-*.value).perl
09:04 camelia rakudo-moar 4cad54: OUTPUT«("bar" => 3, "foo" => 2, "mardi_graz" => 1)␤»
09:04 masak brrt: that works, too.
09:04 masak brrt: but the '-' will vary depending on the type of value.
09:05 pecastro joined #perl6
09:10 sergot .seen supernovus
09:10 yoleaux I saw supernovus 19 Feb 2014 00:12Z in #perl6: <supernovus> Well, I'll test some more of my libraries out on the various backends another day. Have a good * #perl6 :-)
09:11 mikegrb joined #perl6
09:12 rurban joined #perl6
09:18 sergot I need someone who has write access to HTTP::Status :)
09:21 denis_boyun_ joined #perl6
09:22 moritz sergot: fork it :-)
09:24 timotimo .o( copy on write semantics yay )
09:24 yoleaux 03:26Z <atroxaper> timotimo: just read yesterday's post. You made my day! atroxB<p>aper ;-)
09:24 timotimo atroxaper: oops, should i leave it in because it's funny or change it?
09:25 atroxaper timotimo: just leave :)
09:27 timotimo ok i'll go :(
09:33 Ven joined #perl6
09:33 sergot moritz: I did so, but I dont want to change this module in the ecosystem :)
09:33 sergot I mean, in ecosystem list
09:33 Ven wow, facebook wants to add gradual typing to PHP. great.
09:33 Ven What a totally novel idea !
09:34 moritz sergot: now it would be handy to install and use modules by authority
09:35 Ven (well, facebook have their php called "hack". Guess it's pretty easy with enough $)
09:39 kaleem joined #perl6
09:40 masak Ven: it's the same dynamic as with JavaScript, really.
09:40 Ven Ooh, it's actually checked at runtime. hahahahahha
09:40 masak oh, that's a bit sad :/
09:40 Ven PHP is a joke. They've had type annotations (outside of hack's) and they've always been runtime.
09:41 thou joined #perl6
09:41 Ven (I think they've had "class annotations" (+ array and closure, but not int and stuff, because.) since php 5 or 5.1 ...)
09:41 masak why do innocent discussions about PHP always end up making me depressed, even though I basically expect it by now? :/
09:41 Ven because We Ought To Do Better (TM)
09:42 * Ven gets depressed by Go, but is quite used to php by now ...
09:43 Ven I guess intellij will still be better at telling you if you failed your typing than hack is, lol.
09:44 * nwc10 is curious how http://hippyvm.com/ will pan out
09:44 nwc10 also, does HHVM use reference counting?
09:45 Ven yeah. has to.
09:45 Ven PHP exposes it through some functions, sooo :-)
09:45 nwc10 oh right. I also thought that it was implicit, because some stuff relies on it for timely destruction
09:46 Ven (it's a major slowdown. 30% of the bytecode emitted by HHVM is ARC)
09:47 nwc10 OK, fun, so HippyVM is going to be "fast but wrong" if it assumes that it can use a GC?
09:47 xfix HHVM uses both reference counting and garbage collection if I remember correctly.
09:47 Ven xfix: I didn't said it didn't use gc ... it just has to use ARC :-)
09:47 xfix Just like official PHP.
09:48 Ven xfix: "official" PHP got GC 3 or 4 years ago, soo
09:48 Ven nwc10: if they only have GC, then yeah. "Though not by a long shot"
09:48 xfix Reference counting is pretty much obligatory, because PHP supports RAII.
09:49 Ven You don't "support RAII". people just use what's available. But yeah, the fact that it (RAII) has become somewhat "mainstream"
09:49 Ven means that if you only have a GC and some RAII, you don't know when stuff's gonna get freed
09:50 xfix GC in PHP has a specific purpose of dealing with cyclic references. It's just in case it's needed.
09:51 timotimo like in python, eh?
09:52 xfix You mean CPython.
09:52 xfix But yes.
09:52 timotimo er, yes
09:53 timotimo as a former pypy contributor (barely), i really should know
09:53 xfix There is RAII of sorts in other Python implementations, but it's implicit RAII using `with` keyword.
09:53 xfix It's also in CPython, of course.
09:54 Ven (using a keyword to do it kinda makes it explicit)
09:54 xfix Sorry, I meant explicit.
09:54 xfix I don't think.
10:01 mr-foobar joined #perl6
10:04 ggoebel111118 joined #perl6
10:05 [particle] joined #perl6
10:08 simcop2387 joined #perl6
10:08 mhasch joined #perl6
10:09 xinming_ joined #perl6
10:11 nebuchadnezzar joined #perl6
10:11 atroxaper I'm still working on my Pod::SAX and Pod::SAX::Goes::HTML. You can see my progress in transformation of S26 to HTML by the link http://atroxaper.github.io/Pod-SAX/
10:13 SamuraiJack_ joined #perl6
10:13 BooK joined #perl6
10:14 Alula_ joined #perl6
10:15 thilp joined #perl6
10:15 SamuraiJack joined #perl6
10:16 BooK_ joined #perl6
10:19 chenryn joined #perl6
10:21 BooK joined #perl6
10:38 psch greetings #perl6 o/
10:39 psch i now have a patch that unbreaks the "OUTER gets lost" case, but i think i'm solving it at the wrong level of abstraction
10:40 psch (i.e. i'm doing what i did manually in the debugger in the spot where it would break, in subcallstaticResolve_noa, which doesn't *really* seem sane...)
10:40 atroxaper psch: hello o/
10:41 psch hey atroxaper :)
10:41 psch atroxaper: looks html-y :)
10:41 atroxaper psch: one moment. I'm updating html
10:42 atroxaper psch: done. Ctrl+R please :)
10:45 cognominal joined #perl6
10:47 chenryn joined #perl6
10:48 * atroxaper going to home and playing in Carcassonne with friends and pizza. Have a nice day!
10:49 psch have fun
10:49 Alina-malina joined #perl6
10:49 psch fwiw, S17-supply/start.t always fails during spectest for me on jvm and moar, but works fine if run standalone...
10:50 cognominal playing Carcassone in Carcassone?
10:51 atroxaper cognominal: :) no. Just playing Carcassone and learn English
10:53 atroxaper joined #perl6
10:53 cognominal En anglais, on se décarcasse comme on peut.  :)
10:56 cognominal r: class A { has  $a }; A but 1
10:56 camelia rakudo-parrot 4cad54: OUTPUT«Cannot look up attributes in a type object␤  in block  at gen/parrot/CORE.setting:1131␤  in method reify at gen/parrot/CORE.setting:7661␤  in method reify at gen/parrot/CORE.setting:7523␤  in method gimme at gen/parrot/CORE.setting:8015␤  in me…»
10:56 camelia ..rakudo-jvm 4cad54: OUTPUT«Cannot look up attributes in a type object␤  in block  at gen/jvm/CORE.setting:1128␤  in method reify at gen/jvm/CORE.setting:7677␤  in method reify at gen/jvm/CORE.setting:7513␤  in method gimme at gen/jvm/CORE.setting:8025␤  in method sink at ge…»
10:56 camelia ..rakudo-moar 4cad54: OUTPUT«(signal )»
10:58 cognominal r: class A {} but 1
10:58 camelia rakudo-{parrot,jvm,moar} 4cad54: ( no output )
11:00 cognominal r :  class A { has $a }; say (A.new) but 1
11:01 cognominal r:  class A { has $a }; say (A.new) but 1
11:01 camelia rakudo-{parrot,jvm,moar} 4cad54: OUTPUT«A+{<anon>}.new()␤»
11:02 cognominal the A but 1 was meaningless but a good way to crash moar.
11:05 dayangkun_ joined #perl6
11:10 sftp joined #perl6
11:12 timotimo time for a train!
11:12 salv0 joined #perl6
11:14 jnthn Is it a cool ICE train? :)
11:14 yoleaux 02:46Z <retupmoca> jnthn: I think I found a supply bug. Does https://github.com/rakudo/rakudo/pull/286 make sense?
11:14 yoleaux 03:11Z <retupmoca> jnthn: that patch results in an issue where calling .close on one tap closes the source_tap for all taps; I'm not sure the best way to solve this
11:16 lizmat jnthn: I'm looking at that already
11:16 lizmat but I first need to run some errands and have lunch with a friend&
11:16 jnthn Yeah, the patch looks a bit off...
11:29 thou joined #perl6
11:33 jnap joined #perl6
11:39 Ven timotimo: can we do `use ADT "foo bar"` now ?
11:40 Ven the readme says no, the tests say yes :)
11:40 sftp_ joined #perl6
11:40 Ven OH: we should have ^% and %^ instead of (nothing) and %% :P
11:44 Ven (or maybe ^%% and %%^, with ^%%^ being %. Though ^%%^ looks cool D:)
11:51 atroxaper joined #perl6
11:56 Akagi201 joined #perl6
11:58 Kreiger joined #perl6
12:02 atroxaper joined #perl6
12:10 chenryn joined #perl6
12:22 treehug88 joined #perl6
12:45 sergot Is there any way to install a module with panda, which uses .c libs attached to this module?
12:45 sergot actually, the .c file should be compiled first.
12:52 spider-mario joined #perl6
12:52 mr-foobar joined #perl6
12:57 * [Coke] yawns.
12:58 mr-foobar hey guys, any updates on rakudo star jvm ?
12:59 mr-foobar have an idea, really want to use perl6 with java-bridge
12:59 awwaiid mr-foobar: the most recent rakudo star includes the jvm backend
12:59 awwaiid from ... april I think it was
12:59 awwaiid it builds perl6-j . I was able to do "use java::lang::String:from<java>", but I don't know how to instantiate things :)
13:00 awwaiid (could be that isn't a feature of said release)
13:00 mr-foobar awwaiid: i asked last week, jvm backend had some issues :/
13:01 [Coke] lizmat: S03-operators/assign.t:209:#?rakudo skip 'Odd number of elements found where hash expected' might be germane to your recent work.
13:04 anaeem1_ joined #perl6
13:06 awwaiid ahh
13:06 awwaiid well it worked for a demo I gave recently, but I didn't do anything java interop related
13:07 jnthn awwaiid: .new method calls are mapped to Java constructors, iirc
13:10 awwaiid tried that, get: Method 'new' not found for invocant of class 'java.lang.String'
13:10 psch overloaded constructors probably need the same explicit call as any other overloaded method
13:10 awwaiid r: use java::lang::String:from<java> ; my $x = String.new
13:10 camelia rakudo-jvm 4cad54: OUTPUT«No such method 'new' for invocant of type 'java.lang.String'␤  in block  at /tmp/tmpfile:1␤␤»
13:10 camelia ..rakudo-{parrot,moar} 4cad54: OUTPUT«===SORRY!===␤Do not know how to load code from java␤»
13:11 awwaiid oh it collapses output when they are they same? you people are so fancy!
13:12 jnthn Yeah, if there are overloads that differ by type then you have to specify the overload long name...
13:12 awwaiid oh, so the thing I picked already has a name and that messes with stuff?
13:13 awwaiid I was just trying to pick something simple :)
13:13 jnthn I'll bet new has quite a few constructor overloads..
13:13 psch awwaiid: java.lang.String has over a dozend constructors
13:13 jnthn For string.
13:13 awwaiid ah
13:14 teodozjan joined #perl6
13:14 awwaiid note: this is not something I actually care about at the moment, was just conversing w/ mr-foobar :)
13:14 awwaiid as in -- cool! I'll come back when I try this again :)
13:14 pdcawley joined #perl6
13:15 molaf joined #perl6
13:16 awwaiid but while I have the floor -- my talk on Rakudo went great!
13:17 thou joined #perl6
13:17 [Coke] do we have a way to tell rakudo's Configure to prefer ssh urls over http urls?
13:17 awwaiid I think p6 advocacy has a (not perl5-legacy-related) struggle -- making it clear that most day to day code would be clear and straightforward, and that while you CAN do insane things, it doesn't mean you must
13:20 [Coke] (/me just does it manually before invoking configure, close enough)
13:25 dalek nqp: 29b78d1 | (Will Coleda)++ | README.pod:
13:25 dalek nqp: Note MoarVM in the last section also.
13:25 dalek nqp: review: https://github.com/perl6/nqp/commit/29b78d1c2d
13:27 zakharyas joined #perl6
13:32 awwaiid http://www.slideshare.net/awwaiid/rakudo
13:34 jnthn On 16, you can just say thing() to call it, fwiw
13:34 JimmyZ joined #perl6
13:35 awwaiid good to know
13:35 awwaiid and prettier
13:36 awwaiid I clearly just picked some things to demo. So many things!
13:36 awwaiid Between many (most) slides, I showed live examples in the REPL
13:36 jnthn nice :)
13:39 awwaiid worked really well. The main thing I want in the REPL is tab completion :)
13:40 awwaiid I've been using ruby's pry a lot lately, so am in the habit of doing "thing.<tab>"
13:41 psch i've been trying myself a bit on gnu-readline bindings a few weeks back, but from what i remember NativeCall stopped me
13:42 psch i.e. i didn't get callbacks working for rl_bind_key to get e.g. tab completion o
13:42 psch -o
13:42 psch also it's obviously very unfinished :)
13:42 psch i don't know if the readline that's in core can do tab completion
13:44 psch or "could do tab completion" rather
13:45 psch ah no, it wasn't callbacks, it was variables
13:46 psch as in, gnu-readline exports a char* rl_line_buffer, and NativeCall doesn't do that yet
13:47 psch or didn't, i might have missed something
13:50 mr-foobar if i am not mistaken, nqp supports moarvm, jvm, parrot right ?
13:50 JimmyZ yeah
13:50 guru joined #perl6
13:50 btyler joined #perl6
13:51 thou joined #perl6
13:51 dalek roast/S26-WHY: 1328fe9 | (Rob Hoelz)++ | S26-TODO:
13:51 dalek roast/S26-WHY: Make sure to test simultaneous declarations
13:51 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/1328fe94f0
13:56 dmol1 joined #perl6
13:56 mr-foobar JimmyZ: any issues with nqp->jvm ? I assume i need to compile from source.
13:58 JimmyZ just try it
14:04 Ven perl6-j works pretty good. Well, it's ugly to use, but a guy I just introduced to perl 6 just went ahead and played with buffers and other stuff, thanks to jnthn++'s slides
14:08 thou joined #perl6
14:08 spider-mario joined #perl6
14:10 bluescreen10 joined #perl6
14:10 carlin joined #perl6
14:11 spider-mario joined #perl6
14:13 carlin sergot: were asking if it's possible to ship C with a module and have panda compile it when installing?
14:13 carlin sergot: if so, using a Build.pm file. The LibraryMake module makes this easier too
14:14 ajr joined #perl6
14:16 * mr-foobar compiling
14:17 * masak .oO( https://xkcd.com/303/ )
14:17 sergot carlin: yes, and later use it with NativeCall
14:22 lelf joined #perl6
14:23 SamuraiJack joined #perl6
14:24 salv0 joined #perl6
14:24 carlin sergot: take a look at LibraryMake - https://github.com/retupmoca/P6-LibraryMake/
14:25 carlin sergot: or take a look at Crypt::Bcrypt for an example; https://github.com/carbin/p6-Crypt-Bcrypt/ (*shameless plug*)
14:26 carlin although the hack to make dynamic paths work with NativeCall doesn't work on the JVM
14:26 salv0 joined #perl6
14:28 telex joined #perl6
14:30 sergot carlin++: thanks! :)
14:36 anaeem1 joined #perl6
14:37 kivutar joined #perl6
14:40 guru joined #perl6
14:40 kaare_ joined #perl6
14:49 lizmat m: my $s = my %h = 1,2; say $s; say %h # don't need parens around 1,2
14:49 camelia rakudo-moar 4cad54: OUTPUT«{"1" => 2}␤("1" => 2).hash␤»
14:49 lizmat m: my %h; my $s = %h = 1,2; say $s; say %h # fails without parens
14:49 camelia rakudo-moar 4cad54: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $s = %h = 1,2" in sink context (line 1)␤Odd number of elements found where hash initializer expected␤  in method STORE at src/gen/m-CORE.setting:9417␤  in block  at /tmp/9dkf8BiJIx:1␤␤»
14:49 lizmat m: my %h; my $s = %h = (1,2); say $s; say %h # need parens to work
14:49 camelia rakudo-moar 4cad54: OUTPUT«{"1" => 2}␤("1" => 2).hash␤»
14:50 lizmat the above seems inconsistent to me: should there be a difference between 'my %h' and just '%h' ?
14:50 jnthn Quite possibly
14:50 jnthn = does not have a single precedence
14:50 jnthn It either has item or list assignment
14:51 jnthn There's a contextual that controls it.
14:51 lizmat so it is correct that we need the parens in the case if just %h ?
14:51 jnthn $*LEFTSIGIL
14:51 jnthn Well, we may want to see that we're agreeing with STD
14:52 lizmat std: my %h; my $s = %h = (1,2);
14:52 camelia std 0f2049c: OUTPUT«ok 00:01 128m␤»
14:52 lizmat std: my $s = my %h = (1,2);
14:52 camelia std 0f2049c: OUTPUT«ok 00:01 128m␤»
14:52 lizmat std: my $s = my %h = 1,2;
14:52 camelia std 0f2049c: OUTPUT«ok 00:01 125m␤»
14:52 lizmat std: my %h; my $s = %h = 1,2;
14:52 jnthn Yeah, question is though...
14:52 camelia std 0f2049c: OUTPUT«ok 00:01 125m␤»
14:52 jnthn std: my $s = my $s2 = 1, 2;
14:52 camelia std 0f2049c: OUTPUT«ok 00:01 125m␤»
14:53 jnthn It doesn't warm on that
14:53 jnthn m: my $s = my $s2 = 1, 2;
14:53 camelia rakudo-moar 4cad54: ( no output )
14:53 jnthn Hm, nor does Rakudo :)
14:53 jnthn Anyway, hard to be conclusive without digging deeper I guess.
14:54 guru joined #perl6
14:55 jnthn It's for sure that my [var] = [initializer] is parsed differently from [var] = [value] though.
14:55 lizmat m# my $s = my $s2 = 1, 2; 1  # it does warn if the warning doesn't get eaten
14:55 lizmat m: my $s = my $s2 = 1, 2; 1  # it does warn if the warning doesn't get eaten
14:55 camelia rakudo-moar 4cad54: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $s = my $s2 = 1, 2" in sink context (line 1)␤»
14:55 jnthn oh, neat ;)
14:55 jnthn *:)
14:56 lizmat [Coke]: I'm not going to touch this right now, perhaps we should rakudobug it ?
14:58 jnthn I'd rather we didn't create rakudobugs that haven't got an expected behavior...
14:59 jnthn Better is to see if the spec actually says what should happen here. If it does, then we can file rakudobug if we're out of line with it. Ohterwise should file a spec ticket to get it resolved there...
15:00 lelf Is \w defined as <alnum> on purpose?
15:00 moritz yes
15:00 lelf It is not in perl5
15:01 moritz no?
15:01 lelf With the very good reason that it matches combining chars for example
15:01 lelf m: say 'xyz̧p' ~~ /(\w)+/
15:01 camelia rakudo-moar 4cad54: OUTPUT«「xyz」␤ 0 => 「x」␤ 0 => 「y」␤ 0 => 「z」␤␤»
15:02 moritz those are meant to be deal with at grapheme level in p6
15:02 jnthn Right; that's a lack of NFG...
15:02 lelf moritz: how?
15:02 masak oh, so the above's a bug?
15:03 lelf m: say 'xyz̧p' ~~ /\w+/
15:03 camelia rakudo-moar 4cad54: OUTPUT«「xyz」␤␤»
15:03 jnthn masak: Well, it's an "NFG is NYI"...
15:03 masak jnthn: so... no need to submit separately?
15:03 masak or, I should ask, do we have "NFG is NYI" in RT?
15:03 moritz lelf: by putting a codepoint + combining characters into a single logical character
15:03 moritz masak: we have
15:03 jnthn If not, we should have one, but I suspect we do...
15:03 masak moritz: thank you.
15:03 jnthn And I'd include this as an example in it.
15:04 * masak gets on it
15:04 jnthn So we have that ticket a source to mine for test cases :)
15:04 lelf moritz: look at the example, this is not what you'd expect
15:04 moritz lelf: and I'm not saying that it is
15:04 jnthn lelf: moritz isn't telling you Rakudo is getting the right answer, he's telling you that the problem isn't how \w is defined; it's that the definition (correctly) assumes grapheme level strings, which we don't have yet.
15:04 Ven I'm sure you can find plenty of test cases for nfg haha
15:05 lelf if \w = <alnum>, then \w is pointless
15:05 masak moritz: I only found this -- https://rt.perl.org/Ticket/Display.html?id=65170 -- is that the one you mean?
15:05 masak moritz: oh, and https://rt.perl.org/Ticket/Display.html?id=65172
15:05 moritz masak: yes, those two
15:06 masak should I merge them?
15:06 masak (and rename them to "NFG is NYI"?)
15:06 masak r: say "( ͡° ͜ʖ ͡°)".chars
15:07 camelia rakudo-{parrot,jvm,moar} 4cad54: OUTPUT«11␤»
15:07 masak r: say "( ͡° ͜ʖ ͡°)".comb>>.ord.perl
15:07 camelia rakudo-{parrot,jvm,moar} 4cad54: OUTPUT«(40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41)␤»
15:08 kaleem joined #perl6
15:09 masak lelf: why?
15:11 * masak has the sense that lelf keeps reasoning under the influence of some assumption
15:11 lelf masak: well, if it's meant to match on graphemes, than it's ok
15:11 masak it is.
15:12 spider-mario joined #perl6
15:12 lelf I just assumed regex will contunue to match on codepoints
15:13 moritz masak: +1 to merge + rename
15:13 masak lelf: no, it's considered a NYI that they do.
15:14 moritz NYI = not yet implemented
15:14 * jnthn bbiab
15:15 Ven (that's probably gonna stay NYI for a while, though)
15:15 spider-mario joined #perl6
15:16 masak moritz: merged, renamed: https://rt.perl.org/Ticket/Display.html?id=65170
15:17 FROGGS joined #perl6
15:17 SamuraiJack_ joined #perl6
15:18 Ven .u LATIN CAPITAL LETTER A WITH DOT ABOVE, COMBINING  DOT BELOW
15:18 yoleaux U+0020 SPACE [Zs] ( )
15:18 yoleaux U+002C COMMA [Po] (,)
15:18 yoleaux U+0041 LATIN CAPITAL LETTER A [Lu] (A)
15:18 Ven wat
15:19 psch m: say "\c[LATIN CAPITAL LETTER A WITH DOT ABOVE, COMBINING  DOT BELOW]"
15:19 camelia rakudo-moar 4cad54: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/XmoXnedVaJâ�¤Unrecognized character name COMBINING  DOT BELOWâ�¤at /tmp/XmoXnedVaJ:1â�¤------> [32mR A WITH DOT ABOVE, COMBINING  DOT BELOW[33mâ��[31m]"[0mâ�¤Â»
15:19 FROGGS m: say "\c[LATIN CAPITAL LETTER A WITH DOT ABOVE]"
15:19 camelia rakudo-moar 4cad54: OUTPUT«Ȧ␤»
15:19 Ven :o)
15:19 hoelzro morning #perl6
15:19 FROGGS .u Ȧ
15:19 yoleaux U+0226 LATIN CAPITAL LETTER A WITH DOT ABOVE [Lu] (Ȧ)
15:20 lelf .u Ạ̇
15:20 yoleaux U+0226 LATIN CAPITAL LETTER A WITH DOT ABOVE [Lu] (Ȧ)
15:20 yoleaux U+0323 COMBINING DOT BELOW [Mn] (◌̣)
15:20 FROGGS m: say "\c[LATIN CAPITAL LETTER A WITH DOT ABOVE,COMBINING  DOT BELOW]"
15:20 camelia rakudo-moar 4cad54: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lAMs0_xmhRâ�¤Unrecognized character name COMBINING  DOT BELOWâ�¤at /tmp/lAMs0_xmhR:1â�¤------> [32mER A WITH DOT ABOVE,COMBINING  DOT BELOW[33mâ��[31m]"[0mâ�¤Â»
15:20 Ven is NFG actually "planned for 6.1"? or something
15:21 FROGGS Ven: I'm not sure
15:21 lelf m: say "\c[LATIN CAPITAL LETTER A WITH DOT ABOVE,COMBINING DOT BELOW]"
15:21 camelia rakudo-moar 4cad54: OUTPUT«Ạ̇␤»
15:21 FROGGS Ven: I guess it will be in 6.0 if someones tackles it, and 6.1 when nobody does it in a reasonable timeframe
15:22 FROGGS ahh!
15:22 Ven FROGGS: is there enough specced to implement it ?
15:22 FROGGS Ven: I think so, yes
15:22 Ven and .. Can it be implemented in the current backends without a huge drop in performance ?
15:23 FROGGS Ven: a yes for MoarVM, and a I have no clue for the others
15:23 Ven thanks :)
15:23 ajr joined #perl6
15:23 FROGGS I mean, it means that we get away from StringBuilders and do it in Java directly
15:24 FROGGS this would be kinda slow then perhaps
15:24 FROGGS and for parrot it would also mean that we port the unicode database from MoarVM to parrot, but perhaps have some indirection for string handling itself
15:25 FROGGS because parrot uses libicu, and that would be kinda weird to keep it that way
15:26 FROGGS at the end the MoarVM string handling is a weak spot atm, so it is possible (maybe even likely) to improve in speed when NFG gets implemented
15:26 FROGGS either that or the string handling gets a rewrite first, including the needed abstractions
15:31 Akagi201 joined #perl6
15:32 FROGGS btw, a branch in moarvm is a nice thing to play with... so if you would like to try the idea of implementing NFG...
15:35 * [Coke] is unable to build nqp-jvm on his mac laptop due to memory issues. :(
15:36 [Coke] (if we are concerned about the spec, add "unspecced?" to the skip comment.
15:38 [Coke] (RT) yes, if it's a spec question, open a spec ticket, not an RT.
15:38 [Coke] (or just annoy TimToady until it's spec'd)
15:38 [Coke] ^^ (don't actually do that)(
15:39 carlin can someone with a better understanding of time travel take a look at the tests in the bottom half of S32-temporal/local.t and confirm that they don't make sense
15:40 carlin or confirm that I don't make sense :)
15:47 atroxaper joined #perl6
15:50 [Sno] joined #perl6
15:57 dalek rakudo/nom: 9a1c529 | (Elizabeth Mattijsen)++ | src/core/SupplyOperations.pm:
15:57 dalek rakudo/nom: Fix problem with multiple .tap on SupplyOperations
15:57 dalek rakudo/nom:
15:57 dalek rakudo/nom: Spotted and suggested by retupmoca++ .  Basically, a new internal tap was
15:57 dalek rakudo/nom: being created for each tap on the outside: now only the first outside tap
15:57 dalek rakudo/nom: creates an internal tap.
15:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9a1c529013
15:59 * sjn just ran "make test" in rakudo, and is pleased to see that with moar the test suite is running more than twice as fast than with parrot
16:00 retupmoca lizmat++
16:01 lizmat now on to write tests  :-)
16:01 retupmoca lizmat: does that handle the $tap.close issue as well? (my PR had an issue where calling .close on a tap would close the source tap for all taps) ?
16:01 jnthn lizmat: Um...I'm a tiny bit concerned that is oging to over-share.
16:01 jnthn As in, more than a tiny bit.
16:03 jnthn m: my $s = Supply.interval(0.25).map({ 'x' x $_ }); $s.tap(&say); $s.tap(&say); sleep 2;
16:03 camelia rakudo-moar 4cad54: OUTPUT«␤␤␤␤x␤x␤x␤x␤xx␤xx␤xx␤xx␤xxx␤xxx␤xxx␤xxx␤xxxx␤xxxx␤xxxx␤xxxx␤xxxxx␤xxxxx␤xxxxx␤xxxxx␤xxxxxx␤xxxxxx␤xxxxxx␤xxxxxx␤xxxxxxx␤xxxxxxx␤xxxxxxx␤xxxxxxx␤xxxxxxxx␤xxxxxxxx␤xxxxxxxx␤xxxxxxxx␤»
16:03 jnthn Should be two of each.
16:03 Akagi201_ joined #perl6
16:03 jnthn 4 is certainly wrong. 1 would be wrong too and I worry the patch does that...or am I wrong?
16:04 retupmoca patch will do 2, if it takes the same approach mine did (which I think it does)
16:06 retupmoca I *think* that patch has the same issue mine did with .close though - it closes the source tap the first time a tap is closed, not after all taps on it are closed
16:07 btyler_ joined #perl6
16:07 lizmat ah, we need to keep count as well...
16:07 lizmat ok, working on that as well
16:08 jnthn Well, it's not about counts
16:08 jnthn It's about subscriber lists, no?
16:08 lizmat as soon as the last tap closes, *then* we need to close the internal tap
16:08 lizmat is what I'm saying
16:10 lizmat everytime we get a new tap, we increment a counter
16:10 atroxaper joined #perl6
16:10 lizmat everytime we get a close, we decrement a counter: close the internal tap when we reach 0
16:10 lizmat jnthn: does that make sense?
16:11 jnthn My gut feeling tells me that a solution involving a counter is broken and wrong.
16:12 jnthn When we $s.tap there, it's meant to tap the map, which in turn taps an interval
16:12 jnthn When we $s.tap again, then it again taps the map, which taps a fresh interval
16:12 jnthn Otherwise you only get one timer.
16:13 jnthn That's why it was using a lexical for the source tap and closing over it
16:13 jnthn For some reason it was also making two entries in @!tappers, or whatever it's called these days, at a guess.
16:13 jnthn That's the issue that wants fixing, so far as I can see.
16:14 jnthn And a counter-based fixes sharing a single source tap sounds like it's going to end up with only one timer at the top of the chain.
16:16 lizmat jnthn: this is actually *not* about .interval
16:16 jnthn lizmat: Yes, but I can most clearly illustrate the problem with the patch using interval.
16:18 jnthn Counter-based approaches will probably basically work out for a live supply, but will behave wrongly for an on-demand one.
16:19 Rotwang joined #perl6
16:20 treehug88 joined #perl6
16:20 lizmat so you're saying we should take a different approach depending on whether the original supply is live or not ?
16:20 hoverboard joined #perl6
16:21 jnthn Not at all
16:21 jnthn We should have one approach that works for both.
16:22 jnthn I feel like the patch throws the baby out with the bathwater; instead of hutning a logical bug somewhere that is causing two entries to be made in a place needing one, it instead changes the scopes and lifetimes of things.
16:23 lizmat the logical bug is that the internal tap is just a lexical in a method
16:23 lizmat so every call to the tap method gets a new one
16:24 jnthn But that's right, no? It should be tapping the source once each time?
16:26 jnthn It's that somehow it ends up putting two entries into an @!tappers somewhere.
16:26 lizmat ok, let me check that
16:26 jnthn k
16:26 jnthn (sorry, my attention is split between this and a $dayjob task too...)
16:26 retupmoca there's only one entry in @!tappers
16:27 retupmoca but each source tap calls more on all the tappers
16:27 _slade joined #perl6
16:29 spider-mario joined #perl6
16:35 anaeem1_ joined #perl6
16:50 * lizmat mind hurts
16:52 fabio__ joined #perl6
16:55 anaeem1 joined #perl6
16:58 itz_ joined #perl6
17:01 lelf` joined #perl6
17:01 dalek rakudo-star-daily: 0070da7 | coke++ | log/ (14 files):
17:01 dalek rakudo-star-daily: today (automated commit)
17:01 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/0070da7ad6
17:01 dalek perl6-roast-data: f2aae43 | coke++ | / (6 files):
17:01 dalek perl6-roast-data: today (automated commit)
17:01 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/f2aae43b9b
17:07 [Sno] joined #perl6
17:14 mr-foobar sweet, have a perl-j repl on my comp. any tutorial for calling java stuff ?
17:16 psch mr-foobar: http://perl6advent.wordpress.com/2013/12/03/day-03-rakudo-perl-6-on-the-jvm/
17:17 psch it has a bit in there
17:17 psch YMMV though, the example as-is didn't work for me recently; the method descriptor wasn't found or something
17:18 mr-foobar psch: let me check.
17:19 mr-foobar psch: is there a test directory for perl6-j ?
17:20 lizmat this may also be of interest? http://blog.timbunce.org/2010/07/16/java2perl6api-java-to-perl-6-api-tranalation-what-why-and-whereto/
17:20 psch there's roast; i don't know if there's specific tests for the jvminterop, i'd assume those are handled by the NQP tests
17:25 anaeem1 joined #perl6
17:31 zakharyas joined #perl6
17:38 psch lizmat: that's for recreating a java api in perl6 though, isn't it?
17:38 psch maybe it's useful as a getting-started for improving codegen for jvminterop, i.e. getting overloaded methods properly into perl6-space
17:42 lizmat jnthn: I've now verified that with the original code, the second tap on e.g. .flat opens a second tap on the original Supply
17:43 lizmat that seems counter intuitive: I mean, if we create a Supply2 from another Supply1, then the number of taps on Supply1 should be independent of the number of taps on Supply2, no?
17:45 jnthn lizmat: That does sound rather weird. I should take a look at that.
17:45 jnthn Something's rotten....
17:46 jnthn As retupmoca also described
17:46 lizmat psch: yes, something that would be worthwhile, no?
17:46 lizmat but jnthn: that's how I read the code before my change
17:46 jnthn lizmat: oh wait I misread
17:46 jnthn Grr
17:46 jnthn So each time you tap something you're building up a chain.
17:47 lizmat yes, and that's what our patch prevents: so it only does it once
17:47 jnthn Yes but *it should build up a chain*...
17:48 jnthn Just that the chains are getting tangled.
17:48 jnthn Probably because "does Supply" is providing a little too much...
17:49 * jnthn suspects there's a unification or something too far somewhere in all this
17:49 mr-foobar alright. it seems java.lang.String is loaded, but I can't call new (method) or valueOf(static method)
17:49 Akagi201 joined #perl6
17:50 lizmat BTW, I guess I should take out the "paused" stuff now
17:50 jnthn lizmat: Yes, I think so
17:50 lizmat ok, will do that
17:51 atroxaper joined #perl6
17:56 cooper_ joined #perl6
17:59 FROGGS[mobile] joined #perl6
18:00 lizmat jnthn: just verified that the paused stuff was not the reason
18:00 FROGGS[mobile] o/
18:00 lizmat FROGGS[mobile] o/
18:01 FROGGS[mobile] my third fork has been checked out \o/
18:02 psch FROGGS[mobile] \o
18:02 FROGGS[mobile] hi psch
18:03 lizmat FROGGS+++
18:03 lizmat :-)
18:03 lizmat and not to forget the mother!
18:03 FROGGS[mobile] :o)
18:03 lizmat mother+++
18:03 FROGGS[mobile] sqirrel++
18:03 FROGGS[mobile] aye
18:03 lizmat sqirrel+++
18:04 * lizmat does not wonder why she's not online
18:04 psch ...oh
18:04 psch congratulations, if i don't misunderstand everything :)
18:05 ingy joined #perl6
18:05 psch (maybe even if i do, can't hurt right?)
18:05 lizmat psch: you're reading it right  :-)
18:05 lizmat FROGGS[mobile]: read hair again ?
18:05 lizmat *red
18:05 FROGGS[mobile] lizmat: she just has no irc client on her mobile
18:05 jnthn congrats, FROGGS++ and family :)
18:05 FROGGS[mobile] lizmat: looks like
18:06 FROGGS[mobile] thanks :o)
18:06 lizmat .oO( the power of the red is string in the FROGGS )
18:06 lizmat *strong
18:06 lizmat *sigh*
18:06 FROGGS[mobile] yeah
18:06 FROGGS[mobile] well, number two is blond
18:07 dalek rakudo/nom: ef8137f | (Elizabeth Mattijsen)++ | src/core/SupplyOperations.pm:
18:07 dalek rakudo/nom: Let's try to do this another way
18:07 dalek rakudo/nom:
18:07 dalek rakudo/nom: This reverts commit 9a1c529013bf580d5c27579559dc9ebe7d71e725.
18:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ef8137f772
18:07 dalek rakudo/nom: 592a2ed | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
18:07 dalek rakudo/nom: Remove the experimental "paused" functionality
18:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/592a2edf4c
18:07 dalek rakudo/nom: 2c957ff | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
18:07 dalek rakudo/nom: Add helper method Supply.taps for debugging
18:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2c957ff991
18:08 FROGGS[mobile] now I'm in a train from hospital to a friend's house, to fetch the boys
18:08 anaeem1 joined #perl6
18:08 mr-foobar jnthn: i just compiled rakudo from source. looking into perl6-j interop.
18:08 FROGGS[mobile] then I get some rest and can read backlog
18:09 mr-foobar as far as I can say calling conventions and marshalling of perl6<->jvm needs to be done.
18:09 mr-foobar i think i can contribute a test or two, any pointers :)
18:10 FROGGS[mobile] mr-foobar++
18:10 mr-foobar say System.currentTimeMillis(); works ! so i think the hard parts are done.
18:12 mr-foobar i used clojurescript. they used a very dumb clj->js and js->clj for data marshalling.
18:13 mr-foobar although I don't know how much special syntax can be given for FFI's
18:21 jnthn Yes, it's just that in the case of ambiguous overloads things need qualifying
18:21 jnthn For example, things like $crc.'method/update/(B)V'($_);
18:22 jnthn (takes a Bool, returns Void, in this case)
18:22 mr-foobar jnthn: is that name mangling from java's side ?
18:23 psch http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.3.2
18:23 psch (B is Byte, Z is Bool)
18:24 psch jnthn's point obviously still stands, the descriptors needs to get corresponding Signatures in perl6-space
18:25 mr-foobar how to convert [1,2,3] <-> java ?
18:27 jnthn psch: oh, you're right
18:27 jnthn mr-foobar: At the moment, manually... In the future we could provide various useful converters
18:28 jnthn Anyway, the syntax for JVM's static overloads isn't something that we made up on our side; it's the JVM's own sig syntax. Thus it's documented elsewhere...
18:29 jnthn dinner; bbl
18:29 mr-foobar jnthn: have lots of desert :)
18:30 * mr-foobar wonders if the "." operator can be overloaded
18:33 araujo joined #perl6
18:35 FROGGS[mobile] you can implement a method postcircumfix:<( )> in your class
18:37 [particle] joined #perl6
18:50 Akagi201 joined #perl6
18:56 teodozjan joined #perl6
19:05 zakharyas joined #perl6
19:07 psch i'm revisiting tr///, and i wonder how i can comfortably convert the .distance method i implemented for it to something that happens completely in Actions...
19:07 psch writing the whole algorithm as QAST Nodes seems a bit much to me
19:08 raiph joined #perl6
19:08 psch for reference, a --traget=ast compile of that method (converted to a sub) is about 400 lines of output
19:08 itz_ joined #perl6
19:09 psch that's probably misleading though... i'll just give it a shot to write it as QAST and see where that takes me...
19:10 lelf joined #perl6
19:13 sftp joined #perl6
19:15 jnthn psch: Writing it in QAST is surely the wrong way...
19:15 jnthn psch: What does the distance method do? What's its input/output?
19:17 jnthn But whatever the case, almost every situation where we'd end up with a huge QAST tree, we put a sub in the setting and call it (QX is one example)
19:18 mr-foobar jnthn: I am thinking of adding test cases into a new rakudo/t/03-javainterop/ folder
19:18 psch jnthn: right, the huge QAST tree is another deterrent
19:18 jnthn psch: Yes, it just bulks up Actions.nqp
19:19 jnthn And would make each tr/// generate huge code too
19:19 psch jnthn: the method calculates the levenshtein distance between tr/// input (i.e. $_ or the ~~ $lhs) and it's output, which is my understanding is equal to the amount of replaced characters
19:20 jnthn What does tr/// evaluate to?
19:20 psch output is a Bool with mixed in .Int and .Numeric
19:20 psch so, to clarify
19:20 psch it actually returns a Bool which calculates the distance when evaluated as Numeric
19:20 psch the Bool is $lhs ne $lhs.trans(...)
19:21 psch where ... is the arguments to tr/// as Pair
19:21 jnthn If we can think of a name for it, I'd just create an object that is constructed with $lhs and $lhs.trans(...)
19:21 psch ...more or less, i'm explaining badly
19:21 jnthn And it implemnts Bool, Numeric, Int...
19:21 psch https://github.com/rakudo/rakudo/pull/284/files#diff-4ce1542a6f014c9a003fe452abe8cac3R935 ... :)
19:21 jnthn And then just have QAST that constructs that object.
19:22 psch right, timotimo said something similar; i wasn't aware that he meant to add a class to the SETTING
19:22 jnthn Yeah, I'd do that
19:22 psch or maybe he didn't, in any case i didn't see that option
19:22 jnthn StrDistance or something...
19:22 jnthn It will be cheaper and neater than mixing into a Bool...
19:23 psch the semantics of StrDistance.Bool seem a bit muddy to me on that layer though
19:23 moistcherry joined #perl6
19:24 psch but in any case, .Bool would only be used as an optimization i guess
19:24 psch i.e. if $str ~~ tr/a/b/ { #`[[ we changed stuff ]] } else { #`[[ we didn't ]] }
19:24 psch and inside the if anyone would probably rather use it Numeric anyway
19:25 psch right, i'll do it like that, thanks :)
19:29 timotimo push (my %), %otherhash<hey blah hi boo foo bar baz>:p ← create a new hash from a subset of key/values from another hash
19:29 guru joined #perl6
19:33 jnthn psch: Yeah, it's such a common case that it's worth the opt, I think.
19:34 denis_boyun_ joined #perl6
19:51 Akagi201 joined #perl6
19:57 zakharyas joined #perl6
20:13 treehug88 joined #perl6
20:16 lelf joined #perl6
20:33 geekosaur joined #perl6
20:52 Akagi201 joined #perl6
20:55 atroxaper joined #perl6
21:02 SevenWolf joined #perl6
21:03 rindolf joined #perl6
21:04 rindolf Hi all
21:04 sjn joined #perl6
21:06 psch hrm, i'm stuck at the .new call in Actions
21:06 psch simply passing QAST::Vars cleary doesn't work because they're not named
21:07 psch putting .named onto the Vars.new() gives complaints about "unknown type BOOTstr"
21:07 psch i also tried decont and manually constructing the Want/WVal stuff that --target=ast dumps when it gets a "$type.new(...)"
21:07 psch and those both don't work either :/
21:08 psch time for jnthn++'s nqp slides!
21:09 Mouq .ask atroxaper Do you expect Pod::SAX to supercede the current Pod::To::HTML? I ask simply because I don't want to be doing work on something else when someone is working on a better solution. Right now my focus with Pod::To::HTML is readibility and encapsulation/thread safety. We should co-ordinate efforts :)
21:09 yoleaux Mouq: I'll pass your message to atroxaper.
21:10 Mouq psch: What are you trying to do?
21:11 psch Mouq: i'm trying to instantiate an object inside perl6's Actions
21:12 virtualsue joined #perl6
21:13 Mouq The only case I can find of that is at L4302 & L4392 if you need a reference
21:14 Mouq But I'm not sure if that's what you want.
21:15 psch Mouq: i've seen the similar spots in Actions; the problem i'm having is that the QASTs i build for my arguments seem to be missing something
21:15 psch https://github.com/peschwa/rakudo/blob/implement_tr/src/Perl6/Actions.nqp#L5891 # for reference, this is where i'm stuck... :)
21:15 psch the scope the .new call should end up in has the vars, but just QAST::Var doesn't seem to be enough
21:16 psch maybe i did something else wrong though, i'm not sure
21:17 psch it might also be that the class i'm trying to instantiate isn't known yet; i've added it to the Makefile and can instantiate it from the REPL though
21:19 Mouq psch: Would it be easier to just call a sub that creates the StrDistance object?
21:19 bluescreen100 joined #perl6
21:20 timotimo if it says "unknown type bootstr", you may need to box_s($the_text, $*W.find_symbol('Str')) or something like that?
21:20 psch ugh, right, boxing
21:21 psch i can at least try it, thanks timotimo++ (and Mouq++ too)
21:21 psch hold on
21:21 psch i have $_ and my $orig_lhs
21:22 psch i don't think boxing helps here
21:23 timotimo regretfully, i couldn't backlog at all today, so i'll probably have oodles of text to work through tomorrow :S
21:23 psch http://paste.debian.net/hidden/81d365dc/ this is what i get dumped when i put QAST::Var.new(... for $_).named('before')
21:24 psch where "... for $_" is ":name('$_'), :scope('lexical')"
21:24 psch similarly for $orig_lhs
21:25 psch Mouq: if i was to call a sub i'd have to have that sub declared in perl6-space already, no?
21:26 timotimo psch: a workaround would be to just build a constructor that takes positionals rather than nameds and see if that gets you further
21:26 * timotimo goes to bed
21:26 psch timotimo: thanks and g'night
21:33 sjn joined #perl6
21:34 FROGGS joined #perl6
21:48 * jnthn back
21:49 * jnthn wonders if psch is still about/having "fun" :)
21:50 psch i probably got a bit impatient there, yeah
21:51 psch i guess that's a good indicator to stop working on this for now...
21:52 jnthn OK; I know QAST pretty well so feel free to run a diff by me at some point.
21:52 jnthn But basically, any node can become a named parameter by putting .named(...) on it
21:52 jnthn And if you can't mutate it, you can wrap it in a QAST::Stmts that is .named
21:52 psch right, that's what i tried; but all i got back was the content of that .named
21:53 psch (in my defence, it's horribly hot here and we discovered mold on two walls today)
21:53 psch sorry for letting that spill
21:54 * masak hugs psch
21:54 jnthn Yeah, it's hot here too... :/
21:54 jnthn My next place will have aircon or be in the darn arctic :P
21:55 jnthn Anyway, I'd need a diff to help much more, I think.
22:02 psch jnthn: https://github.com/rakudo/rakudo/pull/284/files#diff-deae5f68054ef8116f04d6cb78bc4395R5877 # this is what felt obvious to me
22:03 psch but that gives me "unknown QAST type BOOTStr" and the ast dump only contains 'before' and 'after' as strings below the :op<callmethod>
22:05 jnthn QAST::Var.new( :name($orig_lhs), :scope<lexical> ).named('before')
22:05 jnthn Should be
22:05 jnthn QAST::Var.new( :name($orig_lhs), :scope<lexical>, :named('before') )
22:05 psch that was anticlimatic :)
22:06 psch in any case, thanks.  proves my point of having worked on this enough for now
22:06 jnthn :)
22:06 jnthn Look forward to the patch, when you get energy/patience to work on it again :)
22:07 psch one thing i'm not sure about is if i have to pay attention to where i add StrDistance.pm in the Makefile, except for "somewhere near the end"
22:08 psch aside from that it probably should maybe already work :)
22:08 jnthn Shouldn't matter much in this case.
22:08 jnthn Though yeah, later is usually easier :)
22:09 psch there's another thing i'd like to run by you; mainly to confirm that it's a horrible solution
22:11 jnthn ok... :)
22:11 dmol joined #perl6
22:11 psch http://paste.debian.net/hidden/3169c211/ # this solves the NPE here https://gist.github.com/peschwa/e5aee72dcce9d4b60ec1
22:11 psch but i'm pretty sure that patching OUTER like that is definitely not right; i'm thinking it should be in the right place from deserialization, but...
22:12 psch also, it might just happen that it doesn't even find the right outer...
22:13 psch basically, there i'm relying on "it's always the SETTING that's missing", afaiu
22:15 psch oh, and thanks for the hug masak++ :)
22:17 jnthn psch: Yes, that identifies the problem clearly, but doesn't quite explain why it's happening. I agree the outer should be being set up properly.
22:19 * masak .oO( will always have been being set up properly )
22:21 sftp_ joined #perl6
22:22 psch alright, thanks
22:22 psch that's something for next week or so though :)
22:31 guru joined #perl6
22:33 arnsholt joined #perl6
22:33 mst joined #perl6
22:33 masak joined #perl6
22:33 PerlJam joined #perl6
22:33 Ulti joined #perl6
22:33 moritz joined #perl6
22:33 anocelot joined #perl6
22:33 daxim joined #perl6
22:33 charsbar_______2 joined #perl6
22:33 mls joined #perl6
22:33 mls joined #perl6
22:33 SHODAN joined #perl6
22:33 go|dfish joined #perl6
22:34 DarthGandalf joined #perl6
22:34 jnap joined #perl6
22:36 Celelibi joined #perl6
22:36 Grimnir_ joined #perl6
22:36 jlaire joined #perl6
22:36 jdv79 joined #perl6
22:36 yoleaux joined #perl6
22:36 PZt joined #perl6
22:36 silug joined #perl6
22:36 obra_ joined #perl6
22:36 clkao joined #perl6
22:36 flussence joined #perl6
22:36 japhb joined #perl6
22:36 ribasushi joined #perl6
22:36 xfix joined #perl6
22:36 camelia joined #perl6
22:36 cxreg joined #perl6
22:36 ivan`` joined #perl6
22:36 atrodo joined #perl6
22:36 sorear joined #perl6
22:36 tokuhirom joined #perl6
22:36 timotimo joined #perl6
22:36 ashleydev joined #perl6
22:36 pnu joined #perl6
22:37 ivan`` joined #perl6
22:38 sjn joined #perl6
22:38 BinGOs joined #perl6
22:39 c1sung joined #perl6
22:40 thilp joined #perl6
22:41 Rix joined #perl6
22:42 masak_grr 'night, #perl6
22:53 eternaleye joined #perl6
22:57 atroxaper joined #perl6
22:57 felipe joined #perl6
23:20 eternaleye joined #perl6
23:31 FOAD joined #perl6
23:36 retupmoca jnthn, lizmat: Does this patch for the SupplyOperation bug look saner? https://github.com/rakudo/rakudo/pull/287
23:38 retupmoca .tell jnthn I tried to kill the SupplyOperation bug again: https://github.com/rakudo/rakudo/pull/287
23:38 yoleaux retupmoca: I'll pass your message to jnthn.
23:48 xragnar_ joined #perl6
23:50 eternaleye joined #perl6
23:57 atroxaper joined #perl6

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

Perl 6 | Reference Documentation | Rakudo