»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
retupmoca based on all my other playing, I suspect rakudo is doing something wrong there 00:01
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«===SORRY!=== Error while compiling /tmp/t3XHi5PEwC␤Confused␤at /tmp/t3XHi5PEwC:1␤------> say "first"; `(&t1,&t1)`; say "second"; ⏏`(&t1,&t1)`;␤ expecting any of:␤ postfix␤ statement end␤…»
ren1us i... really don't know what happened there
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␤»
ren1us and that just makes it weirder
apparently two say statements and a second call to the circumfix operator confuses moar ._. 00:04
00:06 spider-mario left 00:07 hummeleB1 left 00:09 atroxaper joined
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␤»
retupmoca ok, it looks like the normal pattern used in core/SupplyOperations.pm does not play well with multiple taps 00:11
00:14 atroxaper left 00:19 hoverboard joined 00:23 ivanshma` left, _slade left 00:25 ivanshma` joined 00:33 donghongbo joined
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␤»
psch retupmoca: i have a hunch that there's a bit that makes sense there, but i don't see it
actually, never mind the "i don't see it"; tapping $m taps $s as well apparently 00:39
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
camelia rakudo-moar 4cad54: OUTPUT«3␤2␤»
psch which in turn means the first "a\nb" is from $s, the second from $m
or "b\nc", as it were 00:40
00:42 hoverboard left, raiph joined 00:48 dayangkun joined, molaf joined
ren1us before i go and waste half an hour writing a base conversion module, does such a thing already exist in the core? 00:57
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?
psch .oO(probably not...) 00:59
ren1us uh, maybe
avuserow m: say :36("abcdef") # like so? converts from base 36 01:00
camelia rakudo-moar 4cad54: OUTPUT«623714775␤»
psch avuserow++
japhb I was about to point out the same.
ren1us m: say :2("8"); 01:01
psch i just found it in the spec
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…»
avuserow goes by the term "radix" in the spec
ren1us woops
m: say :2("101")
camelia rakudo-moar 4cad54: OUTPUT«5␤»
ren1us oh yeah that's exactly what i wanted
avuserow not sure how to format something in a particular base though
ren1us avuserow++
psch m: :2<101>.base(5).say 01:02
camelia rakudo-moar 4cad54: OUTPUT«10␤»
japhb Exactly
avuserow psch++
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␤␤»
avuserow m: :2<10101010>.base(36).say
camelia rakudo-moar 4cad54: OUTPUT«4Q␤»
01:03 donghongbo left
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
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␤␤»
Mouq Waaa
BenGoldberg Also, maybe special-case base 64 to work, even though it's outside 2..36?
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␤␤»
BenGoldberg m: say unbase( 4, 5 )
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␤␤»
Mouq m: unbase(2, "10101010").say
camelia rakudo-moar 4cad54: OUTPUT«170␤»
psch m: Int.can('base')[0].signature.params[2].say
camelia rakudo-moar 4cad54: OUTPUT«*%_␤»
Mouq That needs to be Cool-ized
BenGoldberg m: Int.can('base')[0].signature.params.say
camelia rakudo-moar 4cad54: OUTPUT«Int:D Cool $base *%_␤»
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
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:08
the spec says something about :2(0101) being wrong for "confusing a number with its textual representation" 01:09
(the actual example is :8(777) )
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"))␤»
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
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"))␤»
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␤␤»
japhb m: ':16«f.8*:4[2]**:2[1,0,0]»/-:60[1,0]'.Numeric.perl.say
camelia rakudo-moar 4cad54: OUTPUT«<-62/15>␤»
BenGoldberg m: (:8(777)).base(2).say
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␤␤»
japhb THERE WE GO! Damn unicode paste error
Str.Numeric FTW 01:16
BenGoldberg m: (:8<777>).base(2).say
camelia rakudo-moar 4cad54: OUTPUT«111111111␤»
01:16 _slade joined
japhb Not that I'm biased or anything. ;-) 01:16
01:21 psch left 01:22 psch joined
psch yay host machine automatically updated while i was running spectests on the guest vm 01:22
of course it also had to reboot :( 01:23
01:23 R0b0t1 left 01:25 jnap left 01:27 thou joined 01:32 thou left 01:33 diakopte1 joined, diakopte1 is now known as diakopter 01:40 FROGGS_ joined 01:43 FROGGS left
colomon_ gist.github.com/colomon/ba1259a1e21b66e2322b # quick practical p6 program for $work 01:45
01:45 klapperl_ joined
rjbs [particle]: Ransom Old Tom: ordered 01:48
01:50 araujo left, araujo joined, _slade left 01:57 hoverboard joined 02:03 chenryn joined, rindolf left 02:15 jercos left, jercos joined, noganex joined, kshannon left 02:16 awwaiid joined, raiph left 02:17 kshannon joined 02:21 rurban1 left 02:23 dayto joined 02:24 ren1us left 02:25 dayto left 02:31 chenryn left 02:33 chenryn joined 02:34 ren1us joined 02:36 zengargo1le joined 02:37 donghongbo joined, cognominal left 02:41 zengargoyle joined 02:43 zengargo1le left 02:44 klapperl_ left, klapperl joined
retupmoca .tell jnthn I think I found a supply bug. Does github.com/rakudo/rakudo/pull/286 make sense? 02:46
yoleaux retupmoca: I'll pass your message to jnthn.
02:48 noganex left 03:07 pdcawley left 03:10 pdcawley joined
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 03:15 molaf left 03:16 thou joined 03:20 thou left 03:22 SamuraiJack_ joined 03:23 _slade joined
atroxaper Hello, #perl6 ! 03:23
.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:26 dalek left 03:28 dalek joined, ChanServ sets mode: +v dalek 03:32 BenGoldberg left 03:35 dalek left 03:36 dalek joined, ChanServ sets mode: +v dalek 03:41 donghongbo left 03:43 SamuraiJack_ left, SamuraiJack_ joined 03:44 isBEKaml joined, noganex joined 03:54 gfldex joined 03:59 [Sno]_ joined, [Sno] left, [Sno]_ is now known as [Sno], jack_rabbit joined 04:01 kaare_ joined 04:07 PerlJam joined 04:08 donghongbo joined 04:09 lelf` joined 04:13 lelf left 04:16 masak left, masak joined, masak is now known as Guest79466 04:18 anaeem1 joined 04:20 PerlJam left 04:21 SamuraiJack_ left, PerlJam joined 04:30 isBEKaml left 04:49 terrencehan joined 04:57 kaare_ left 05:03 thou joined 05:04 atroxaper left 05:05 atroxaper joined 05:11 dayangkun_ joined 05:12 dayangkun left 05:13 terrencehan left 05:19 ivanshma` is now known as ivanshmakov, ivanshmakov left, ivanshmakov joined 05:22 firnsy_ is now known as firnsy 05:23 kaare_ joined 05:30 virtualsue joined 05:32 donghongbo left 05:44 FROGGS_ left 05:49 donghongbo joined 05:51 virtualsue left 05:52 Guest79466 is now known as masak
masak morning, #perl6 05:52
05:52 masak is now known as Guest40047 05:53 Guest40047 is now known as masak_grr 05:57 terrencehan joined 05:58 hoverboard is now known as moistcherry
atroxaper masak_grr: morning! 05:59
06:03 itz_ joined 06:07 terrencehan left 06:11 [Sno] left 06:16 thou left 06:18 Gothmog_ left, Gothmog_ joined 06:19 brrt joined 06:22 terrencehan joined 06:23 chenryn left 06:24 SamuraiJack_ joined 06:26 terrencehan left 06:29 brrt left 06:37 sivoais left, Alula_ joined, sivoais joined 06:51 itz_ left 06:54 chenryn joined 06:58 ponbiki left 06:59 brrt joined, chenryn left 07:00 ponbiki joined, ponbiki is now known as Guest96686 07:06 rindolf joined 07:07 dmol joined, moistcherry is now known as hoverboard 07:10 masak_grr is now known as masak 07:12 teodozjan joined
brrt how does one get command line args in p6 (like @ARGV) 07:13
07:13 dayangkun_ left
moritz @*ARGS 07:13
brrt ah, i see
atroxaper @*ARGS 07:14
brrt i suppose that also works with %*ENV ?
nope.. not env
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 hoverboard left
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:16 teodozjan left
moritz nwc10: possibly :-) 07:17
nwc10 but how many bugs will we find in the process, and need to fix?
moritz nwc10: there are many-ish ways to escape the camelia jail
07:17 hoverboard joined
moritz the restrictions are mostly there to prevent accidental harm; they can't hold back a determined attacker 07:17
07:20 Ven joined
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
brrt capturing groups in regexes? 07:24
moritz brrt: () 07:25
brrt i thought so
07:26 mathw joined
brrt m: $f = "foo bar"; say $f ~~ m/'foo '(\s+)/; 07:26
camelia rakudo-moar 4cad54: OUTPUT«===SORRY!=== Error while compiling /tmp/bEzcpju7Ld␤Variable '$f' is not declared␤at /tmp/bEzcpju7Ld:1␤------> $f⏏ = "foo bar"; say $f ~~ m/'foo '(\s+)/;␤ expecting any of:␤ postfix␤»
brrt m: my $f = "foo bar"; say $f ~~ m/'foo '(\s+)/; 07:27
camelia rakudo-moar 4cad54: OUTPUT«False␤»
brrt oh
non-space
07:30 dayangkun_ joined
brrt and .. how to get the capturing group? 07:32
captured group
ooh perl6 documentation has much improved in these years 07:33
07:34 darutoko joined
Timbus gist.github.com/TiMBuS/415d0d358e676afae647 so, whats up with this 07:35
07:35 mathw left 07:36 mathw joined
ren1us brrt: assuming you mean what I think I mean by "get the captured group" 07:38
brrt probably
ren1us m: if "I went to Istanbul" ~~ rx/'to '('Istanbul'|'Paris'|'Tokyo')/ { say $0; };
camelia rakudo-moar 4cad54: OUTPUT«「Istanbul」␤␤»
brrt ahaaah ok
ren1us $0 matches the first capture, $1 matches the second, etc etc 07:39
07:39 _slade left
brrt thanks :-) 07:40
07:46 woosley left
Timbus r: my ($a,$b) = 'a,b,c--1,2,3'.split('--')>>.split(',').lol; say $a.perl, ' and ', $b.perl; 07:47
camelia rakudo-moar 4cad54: OUTPUT«().list.item and ().list.item␤» 07:48
..rakudo-{parrot,jvm} 4cad54: OUTPUT«("a", "b", "c").list.item and ("1", "2", "3").list.item␤»
Ven ;o) 07:49
07:50 wtw joined 07:52 thou joined
moritz r: my ($a,$b) = 'a,b,c--1,2,3'.split('--')>>.split(',').lol; say $a.tree.perl; say $b.tree.perl 07:52
07:52 donghongbo left
camelia rakudo-moar 4cad54: OUTPUT«().list␤().list␤» 07:52
..rakudo-{parrot,jvm} 4cad54: OUTPUT«("a", "b", "c").list␤("1", "2", "3").list␤»
moritz looks like a r-m bug to me 07:53
07:55 chenryn joined
Timbus also using $map .= split("\n") in sink context (i think thats what we call void now?), makes $map = () for some reason.. 07:55
sergot o/ 07:57
07:57 thou left
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␤»
Timbus r: my ($a,$b) = 'a,b,c--1,2,3'.split('--'); say $a .= split(","); say $a.perl
camelia rakudo-{parrot,jvm,moar} 4cad54: OUTPUT«a b c␤("a", "b", "c").list.item␤»
Timbus yeah
07:59 chenryn left
brrt m: my %h = 'foo" => 1, "bar" = 3, "baz" = 4; my @a = %h.kv; say @a; 08:00
camelia rakudo-moar 4cad54: OUTPUT«===SORRY!=== Error while compiling /tmp/WquU2HbXwH␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/WquU2HbXwH:1␤------> " = 3, "baz" = 4; my @a = %h.kv; say @a;⏏<EOL>␤ expectin…»
08:00 donghongbo joined
brrt m: my %h = 'foo" => 1, "bar" => 3, "baz" => 4; my @a = %h.kv; say @a; 08:01
camelia rakudo-moar 4cad54: OUTPUT«===SORRY!=== Error while compiling /tmp/MvMulBE0Ub␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/MvMulBE0Ub:1␤------> => 3, "baz" => 4; my @a = %h.kv; say @a;⏏<EOL>␤ expectin…»
brrt m: my %h = "foo" => 1, "bar" => 3, "baz" => 4; my @a = %h.kv; say @a;
camelia rakudo-moar 4cad54: OUTPUT«foo 1 bar 3 baz 4␤»
brrt m: my %h = 'foo" => 1, "bar" = 3, "baz" = 4; my @a = %h.kv; say @a.join(', '); 08:02
camelia rakudo-moar 4cad54: OUTPUT«===SORRY!=== Error while compiling /tmp/qapT4Sf5wq␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/qapT4Sf5wq:1␤------> " = 4; my @a = %h.kv; say @a.join(', ');⏏<EOL>␤ expectin…»
brrt : m: my %h = "foo" => 1, "bar" => 3, "baz" => 4; my @a = %h.kv; say @a.join(",");
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␤»
brrt m: my %h = "foo" => 1, "bar" => 3, "baz" => 4; my @a = %h.kv; say @a.join(',');
camelia rakudo-moar 4cad54: OUTPUT«foo,1,bar,3,baz,4␤»
brrt hmm, that doesn't help
08:03 hoverboard left 08:08 lelf` left
brrt i want to sort a hash by its values, how to? 08:10
masak %hash.sort(*.value)
brrt oh.
wow
brrt forgets whatevercode 08:11
masak but the result will be a list of pairs, mind.
brrt that's ok :-)
and reversing?
masak %hash.sort(*.value).reverse
brrt much wow
(i'd guess the reverse method, and sure enough, it was there. i'm impressed) 08:12
ok, i'm off for now, see you in a bit
08:13 brrt left 08:14 cooper_ left, [particle] left
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 Grrrr left
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
08:15 Grrrr joined, [particle] joined
lizmat retupmoca: looking at the Supply.grep/map issue 08:15
08:19 denis_boyun joined, Ven left
sergot hi lizmat o/ 08:20
08:21 [Sno] joined 08:23 dakkar joined 08:28 chenryn joined 08:29 noganex left, noganex joined 08:30 noganex left, noganex joined
lizmat fitness, back in ~ 2 hours 08:35
08:36 teodozjan joined 08:37 donghongbo left, denis_boyun left 08:46 SevenWolf left 08:47 SamuraiJack_ left 08:58 fhelmberger joined
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 clkao_ is now known as clkao
masak brrt: that works, too. 09:04
brrt: but the '-' will vary depending on the type of value.
09:05 pecastro joined
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 09:12 rurban joined
sergot I need someone who has write access to HTTP::Status :) 09:18
09:21 denis_boyun_ joined
moritz sergot: fork it :-) 09:22
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 ;-)
timotimo atroxaper: oops, should i leave it in because it's funny or change it?
atroxaper timotimo: just leave :) 09:25
timotimo ok i'll go :( 09:27
09:33 Ven joined
sergot moritz: I did so, but I dont want to change this module in the ecosystem :) 09:33
I mean, in ecosystem list
Ven wow, facebook wants to add gradual typing to PHP. great.
What a totally novel idea !
moritz sergot: now it would be handy to install and use modules by authority 09:34
Ven (well, facebook have their php called "hack". Guess it's pretty easy with enough $) 09:35
09:35 Guest96686 is now known as ponbiki 09:39 kaleem joined
masak Ven: it's the same dynamic as with JavaScript, really. 09:40
Ven Ooh, it's actually checked at runtime. hahahahahha
masak oh, that's a bit sad :/
Ven PHP is a joke. They've had type annotations (outside of hack's) and they've always been runtime.
09:41 thou joined
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? :/
Ven because We Ought To Do Better (TM)
Ven gets depressed by Go, but is quite used to php by now ... 09:42
I guess intellij will still be better at telling you if you failed your typing than hack is, lol. 09:43
nwc10 is curious how hippyvm.com/ will pan out 09:44
also, does HHVM use reference counting? 09:45
Ven yeah. has to.
09:45 thou left
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
Ven (it's a major slowdown. 30% of the bytecode emitted by HHVM is ARC) 09:46
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.
Ven xfix: I didn't said it didn't use gc ... it just has to use ARC :-)
xfix Just like official PHP.
Ven xfix: "official" PHP got GC 3 or 4 years ago, soo 09:48
nwc10: if they only have GC, then yeah. "Though not by a long shot"
xfix Reference counting is pretty much obligatory, because PHP supports RAII.
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
means that if you only have a GC and some RAII, you don't know when stuff's gonna get freed
xfix GC in PHP has a specific purpose of dealing with cyclic references. It's just in case it's needed. 09:50
timotimo like in python, eh? 09:51
xfix You mean CPython. 09:52
But yes.
timotimo er, yes
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.
It's also in CPython, of course.
Ven (using a keyword to do it kinda makes it explicit) 09:54
xfix Sorry, I meant explicit.
I don't think.
10:00 mr-foobar left 10:01 mr-foobar joined 10:05 ggoebel111118 joined, [particle] left, [particle] joined, ggoebel111117 left 10:07 simcop2387 left 10:08 simcop2387 joined, mhasch left, mhasch joined 10:09 xinming_ joined 10:10 thilp left, nebuchadnezzar left 10:11 Alula_ left, nebuchadnezzar joined
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 atroxaper.github.io/Pod-SAX/ 10:11
10:11 chenryn left 10:12 xinming left 10:13 SamuraiJack_ joined, BooK joined 10:15 Alula_ joined, jack_rabbit left, thilp joined, SamuraiJack joined 10:16 BooK_ joined 10:19 BooK left, chenryn joined 10:21 BooK_ left, BooK joined 10:35 chenryn left
psch greetings #perl6 o/ 10:38
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:39
(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/
psch hey atroxaper :) 10:41
atroxaper: looks html-y :)
atroxaper psch: one moment. I'm updating html
psch: done. Ctrl+R please :) 10:42
10:45 cognominal joined 10:46 dayangkun_ left 10:47 chenryn joined 10:48 Alina-malina left
atroxaper going to home and playing in Carcassonne with friends and pizza. Have a nice day! 10:48
psch have fun 10:49
10:49 Alina-malina joined
psch fwiw, S17-supply/start.t always fails during spectest for me on jvm and moar, but works fine if run standalone... 10:49
cognominal playing Carcassone in Carcassone? 10:50
atroxaper cognominal: :) no. Just playing Carcassone and learn English 10:51
10:52 atroxaper left 10:53 atroxaper joined
cognominal En anglais, on se décarcasse comme on peut. :) 10:53
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…»
..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…»
..rakudo-moar 4cad54: OUTPUT«(signal )»
10:57 atroxaper left
cognominal r: class A {} but 1 10:58
camelia ( no output )
11:00 SamuraiJack left
cognominal r : class A { has $a }; say (A.new) but 1 11:00
r: class A { has $a }; say (A.new) but 1 11:01
camelia rakudo-{parrot,jvm,moar} 4cad54: OUTPUT«A+{<anon>}.new()␤»
cognominal the A but 1 was meaningless but a good way to crash moar. 11:02
11:05 dayangkun_ joined 11:10 sftp joined
timotimo time for a train! 11:12
11:12 salv0 joined
jnthn Is it a cool ICE train? :) 11:14
yoleaux 02:46Z <retupmoca> jnthn: I think I found a supply bug. Does github.com/rakudo/rakudo/pull/286 make sense?
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
lizmat jnthn: I'm looking at that already 11:16
but I first need to run some errands and have lunch with a friend&
jnthn Yeah, the patch looks a bit off...
11:29 thou joined 11:32 mr-foobar left, rindolf left 11:33 jnap joined, thou left
Ven timotimo: can we do `use ADT "foo bar"` now ? 11:39
the readme says no, the tests say yes :) 11:40
11:40 sftp_ joined
Ven OH: we should have ^% and %^ instead of (nothing) and %% :P 11:40
11:41 sftp left, sftp_ is now known as sftp, chenryn left
Ven (or maybe ^%% and %%^, with ^%%^ being %. Though ^%%^ looks cool D:) 11:44
11:51 atroxaper joined 11:52 anaeem1 left 11:56 atroxaper left, Akagi201 joined 11:58 Kreiger joined 12:00 Kreiger left 12:02 atroxaper joined 12:10 chenryn joined 12:19 chenryn left 12:22 treehug88 joined 12:32 atroxaper left 12:40 teodozjan left
sergot Is there any way to install a module with panda, which uses .c libs attached to this module? 12:45
actually, the .c file should be compiled first. 12:46
12:52 spider-mario joined, mr-foobar joined
[Coke] yawns. 12:57
mr-foobar hey guys, any updates on rakudo star jvm ? 12:58
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
from ... april I think it was
it builds perl6-j . I was able to do "use java::lang::String:from<java>", but I don't know how to instantiate things :)
(could be that isn't a feature of said release) 13:00
mr-foobar awwaiid: i asked last week, jvm backend had some issues :/
[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:01
13:05 anaeem1_ joined
awwaiid ahh 13:06
well it worked for a demo I gave recently, but I didn't do anything java interop related
jnthn awwaiid: .new method calls are mapped to Java constructors, iirc 13:07
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
awwaiid r: use java::lang::String:from<java> ; my $x = String.new
camelia rakudo-jvm 4cad54: OUTPUT«No such method 'new' for invocant of type 'java.lang.String'␤ in block at /tmp/tmpfile:1␤␤»
..rakudo-{parrot,moar} 4cad54: OUTPUT«===SORRY!===␤Do not know how to load code from java␤»
awwaiid oh it collapses output when they are they same? you people are so fancy! 13:11
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
I was just trying to pick something simple :)
jnthn I'll bet new has quite a few constructor overloads..
psch awwaiid: java.lang.String has over a dozend constructors
jnthn For string.
awwaiid ah
13:14 teodozjan joined
awwaiid note: this is not something I actually care about at the moment, was just conversing w/ mr-foobar :) 13:14
as in -- cool! I'll come back when I try this again :)
13:14 pdcawley left, pdcawley joined 13:15 molaf joined
awwaiid but while I have the floor -- my talk on Rakudo went great! 13:16
13:17 thou joined
[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
[Coke] (/me just does it manually before invoking configure, close enough) 13:20
13:22 thou left
dalek p: 29b78d1 | (Will Coleda)++ | README.pod:
Note MoarVM in the last section also.
13:25
13:25 teodozjan left 13:27 zakharyas joined 13:29 kaare_ left
awwaiid www.slideshare.net/awwaiid/rakudo 13:32
jnthn On 16, you can just say thing() to call it, fwiw 13:34
13:34 JimmyZ joined
awwaiid good to know 13:35
and prettier
I clearly just picked some things to demo. So many things! 13:36
Between many (most) slides, I showed live examples in the REPL
jnthn nice :)
awwaiid worked really well. The main thing I want in the REPL is tab completion :) 13:39
I've been using ruby's pry a lot lately, so am in the habit of doing "thing.<tab>" 13:40
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:41
i.e. i didn't get callbacks working for rl_bind_key to get e.g. tab completion o 13:42
-o
also it's obviously very unfinished :)
i don't know if the readline that's in core can do tab completion
or "could do tab completion" rather 13:44
ah no, it wasn't callbacks, it was variables 13:45
as in, gnu-readline exports a char* rl_line_buffer, and NativeCall doesn't do that yet 13:46
or didn't, i might have missed something 13:47
mr-foobar if i am not mistaken, nqp supports moarvm, jvm, parrot right ? 13:50
JimmyZ yeah
13:50 guru joined, btyler joined, guru is now known as Guest51621 13:51 Guest51621 is now known as ajr_, thou joined
dalek ast/S26-WHY: 1328fe9 | (Rob Hoelz)++ | S26-TODO:
Make sure to test simultaneous declarations
13:51
13:56 dmol1 joined
mr-foobar JimmyZ: any issues with nqp->jvm ? I assume i need to compile from source. 13:56
13:56 thou left 13:57 dmol left
JimmyZ just try it 13:58
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:04
14:06 spider-mario left 14:08 thou joined, spider-mario joined 14:09 spider-mario left 14:10 bluescreen10 joined, carlin joined 14:11 treehug88 left, ajr_ left, spider-mario joined
carlin sergot: were asking if it's possible to ship C with a module and have panda compile it when installing? 14:13
sergot: if so, using a Build.pm file. The LibraryMake module makes this easier too
14:14 ajr joined, ajr is now known as Guest12049, Guest12049 is now known as ajr_
mr-foobar compiling 14:16
masak .oO( xkcd.com/303/ ) 14:17
14:17 JimmyZ left
sergot carlin: yes, and later use it with NativeCall 14:17
14:18 zakharyas left 14:21 anaeem1_ left 14:22 lelf joined 14:23 SamuraiJack joined, salv0 left 14:24 salv0 joined
carlin sergot: take a look at LibraryMake - github.com/retupmoca/P6-LibraryMake/ 14:24
sergot: or take a look at Crypt::Bcrypt for an example; github.com/carbin/p6-Crypt-Bcrypt/ (*shameless plug*) 14:25
although the hack to make dynamic paths work with NativeCall doesn't work on the JVM 14:26
14:26 salv0 left, salv0 joined 14:27 telex left 14:28 telex joined
sergot carlin++: thanks! :) 14:30
14:32 kaleem left 14:35 ajr_ left 14:36 anaeem1 joined 14:37 kivutar joined 14:40 anaeem1 left, guru joined, kaare_ joined, guru is now known as ajr_
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␤»
lizmat m: my %h; my $s = %h = 1,2; say $s; say %h # fails without parens
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␤␤»
lizmat m: my %h; my $s = %h = (1,2); say $s; say %h # need parens to work
camelia rakudo-moar 4cad54: OUTPUT«{"1" => 2}␤("1" => 2).hash␤»
lizmat the above seems inconsistent to me: should there be a difference between 'my %h' and just '%h' ? 14:50
jnthn Quite possibly
= does not have a single precedence
It either has item or list assignment
14:51 SamuraiJack_ left
jnthn There's a contextual that controls it. 14:51
14:51 SamuraiJack left
lizmat so it is correct that we need the parens in the case if just %h ? 14:51
jnthn $*LEFTSIGIL
Well, we may want to see that we're agreeing with STD 14:52
lizmat std: my %h; my $s = %h = (1,2);
camelia std 0f2049c: OUTPUT«ok 00:01 128m␤»
lizmat std: my $s = my %h = (1,2);
camelia std 0f2049c: OUTPUT«ok 00:01 128m␤»
lizmat std: my $s = my %h = 1,2;
camelia std 0f2049c: OUTPUT«ok 00:01 125m␤»
lizmat std: my %h; my $s = %h = 1,2;
jnthn Yeah, question is though...
camelia std 0f2049c: OUTPUT«ok 00:01 125m␤»
jnthn std: my $s = my $s2 = 1, 2;
camelia std 0f2049c: OUTPUT«ok 00:01 125m␤»
jnthn It doesn't warm on that 14:53
m: my $s = my $s2 = 1, 2;
14:53 ajr_ left
camelia ( no output ) 14:53
jnthn Hm, nor does Rakudo :)
Anyway, hard to be conclusive without digging deeper I guess.
14:54 guru joined, guru is now known as Guest71809 14:55 Guest71809 is now known as ajr_
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
m: my $s = my $s2 = 1, 2; 1 # it does warn if the warning doesn't get eaten
camelia rakudo-moar 4cad54: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $s = my $s2 = 1, 2" in sink context (line 1)␤»
jnthn oh, neat ;)
*:)
lizmat [Coke]: I'm not going to touch this right now, perhaps we should rakudobug it ? 14:56
14:56 spider-mario left
jnthn I'd rather we didn't create rakudobugs that haven't got an expected behavior... 14:58
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... 14:59
lelf Is \w defined as <alnum> on purpose? 15:00
moritz yes
lelf It is not in perl5
moritz no? 15:01
lelf With the very good reason that it matches combining chars for example
m: say 'xyz̧p' ~~ /(\w)+/
camelia rakudo-moar 4cad54: OUTPUT«「xyz」␤ 0 => 「x」␤ 0 => 「y」␤ 0 => 「z」␤␤»
moritz those are meant to be deal with at grapheme level in p6 15:02
jnthn Right; that's a lack of NFG...
lelf moritz: how?
masak oh, so the above's a bug?
lelf m: say 'xyz̧p' ~~ /\w+/ 15:03
camelia rakudo-moar 4cad54: OUTPUT«「xyz」␤␤»
jnthn masak: Well, it's an "NFG is NYI"...
masak jnthn: so... no need to submit separately?
or, I should ask, do we have "NFG is NYI" in RT?
moritz lelf: by putting a codepoint + combining characters into a single logical character
masak: we have
jnthn If not, we should have one, but I suspect we do...
masak moritz: thank you.
jnthn And I'd include this as an example in it.
masak gets on it 15:04
jnthn So we have that ticket a source to mine for test cases :)
lelf moritz: look at the example, this is not what you'd expect
moritz lelf: and I'm not saying that it is
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.
Ven I'm sure you can find plenty of test cases for nfg haha
lelf if \w = <alnum>, then \w is pointless 15:05
masak moritz: I only found this -- rt.perl.org/Ticket/Display.html?id=65170 -- is that the one you mean?
moritz: oh, and rt.perl.org/Ticket/Display.html?id=65172
moritz masak: yes, those two
masak should I merge them? 15:06
(and rename them to "NFG is NYI"?)
15:06 denis_boyun_ left
masak r: say "( ͡° ͜ʖ ͡°)".chars 15:07
camelia rakudo-{parrot,jvm,moar} 4cad54: OUTPUT«11␤»
masak r: say "( ͡° ͜ʖ ͡°)".comb>>.ord.perl
camelia rakudo-{parrot,jvm,moar} 4cad54: OUTPUT«(40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41)␤»
15:08 kaleem joined
masak lelf: why? 15:09
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
masak it is.
15:12 spider-mario joined
lelf I just assumed regex will contunue to match on codepoints 15:12
15:13 spider-mario left
moritz masak: +1 to merge + rename 15:13
masak lelf: no, it's considered a NYI that they do.
moritz NYI = not yet implemented 15:14
jnthn bbiab
Ven (that's probably gonna stay NYI for a while, though) 15:15
15:15 spider-mario joined
masak moritz: merged, renamed: rt.perl.org/Ticket/Display.html?id=65170 15:16
15:16 dayangkun_ left 15:17 FROGGS joined, SamuraiJack_ joined
Ven .u LATIN CAPITAL LETTER A WITH DOT ABOVE, COMBINING DOT BELOW 15:18
yoleaux U+0020 SPACE [Zs] ( )
U+002C COMMA [Po] (,)
U+0041 LATIN CAPITAL LETTER A [Lu] (A)
Ven wat
psch m: say "\c[LATIN CAPITAL LETTER A WITH DOT ABOVE, COMBINING DOT BELOW]" 15:19
camelia rakudo-moar 4cad54: OUTPUT«===SORRY!=== Error while compiling /tmp/XmoXnedVaJ␤Unrecognized character name COMBINING DOT BELOW␤at /tmp/XmoXnedVaJ:1␤------> R A WITH DOT ABOVE, COMBINING DOT BELOW⏏]"␤»
FROGGS m: say "\c[LATIN CAPITAL LETTER A WITH DOT ABOVE]"
camelia rakudo-moar 4cad54: OUTPUT«Ȧ␤»
Ven :o)
hoelzro morning #perl6
FROGGS .u Ȧ
yoleaux U+0226 LATIN CAPITAL LETTER A WITH DOT ABOVE [Lu] (Ȧ)
lelf .u 􏿽xC8􏿽xA6􏿽xCC􏿽xA3 15:20
yoleaux U+0226 LATIN CAPITAL LETTER A WITH DOT ABOVE [Lu] (Ȧ)
U+0323 COMBINING DOT BELOW [Mn] (◌̣)
FROGGS m: say "\c[LATIN CAPITAL LETTER A WITH DOT ABOVE,COMBINING DOT BELOW]"
camelia rakudo-moar 4cad54: OUTPUT«===SORRY!=== Error while compiling /tmp/lAMs0_xmhR␤Unrecognized character name COMBINING DOT BELOW␤at /tmp/lAMs0_xmhR:1␤------> ER A WITH DOT ABOVE,COMBINING DOT BELOW⏏]"␤»
Ven is NFG actually "planned for 6.1"? or something 15:21
FROGGS Ven: I'm not sure
lelf m: say "\c[LATIN CAPITAL LETTER A WITH DOT ABOVE,COMBINING DOT BELOW]"
camelia rakudo-moar 4cad54: OUTPUT«􏿽xC8􏿽xA6􏿽xCC􏿽xA3􏿽xE2􏿽x90􏿽xA4»
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
ahh! 15:22
Ven FROGGS: is there enough specced to implement it ?
FROGGS Ven: I think so, yes
Ven and .. Can it be implemented in the current backends without a huge drop in performance ?
15:22 ajr_ left
FROGGS Ven: a yes for MoarVM, and a I have no clue for the others 15:23
Ven thanks :)
15:23 ajr joined
FROGGS I mean, it means that we get away from StringBuilders and do it in Java directly 15:23
15:24 ajr is now known as Guest37704
FROGGS this would be kinda slow then perhaps 15:24
15:24 Guest37704 is now known as ajr_
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:24
because parrot uses libicu, and that would be kinda weird to keep it that way 15:25
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
either that or the string handling gets a rewrite first, including the needed abstractions 15:27
15:31 Akagi201 left, Akagi201 joined
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:32
15:34 FROGGS left
[Coke] is unable to build nqp-jvm on his mac laptop due to memory issues. :( 15:35
15:35 Ven left
[Coke] (if we are concerned about the spec, add "unspecced?" to the skip comment. 15:36
(RT) yes, if it's a spec question, open a spec ticket, not an RT. 15:38
(or just annoy TimToady until it's spec'd)
^^ (don't actually do that)(
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:39
or confirm that I don't make sense :) 15:40
15:47 atroxaper joined 15:49 [Sno] left 15:50 [Sno] joined, [Sno] left
dalek kudo/nom: 9a1c529 | (Elizabeth Mattijsen)++ | src/core/SupplyOperations.pm:
Fix problem with multiple .tap on SupplyOperations

Spotted and suggested by retupmoca++ . Basically, a new internal tap was being created for each tap on the outside: now only the first outside tap creates an internal tap.
15:57
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 15:59
retupmoca lizmat++ 16:00
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) ?
jnthn lizmat: Um...I'm a tiny bit concerned that is oging to over-share.
As in, more than a tiny bit.
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␤»
jnthn Should be two of each.
16:03 Akagi201_ joined
jnthn 4 is certainly wrong. 1 would be wrong too and I worry the patch does that...or am I wrong? 16:03
retupmoca patch will do 2, if it takes the same approach mine did (which I think it does) 16:04
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:06
16:07 btyler_ joined, Akagi201 left
lizmat ah, we need to keep count as well... 16:07
ok, working on that as well
jnthn Well, it's not about counts 16:08
It's about subscriber lists, no?
lizmat as soon as the last tap closes, *then* we need to close the internal tap
is what I'm saying
16:09 btyler left, atroxaper left
lizmat everytime we get a new tap, we increment a counter 16:10
16:10 atroxaper joined
lizmat everytime we get a close, we decrement a counter: close the internal tap when we reach 0 16:10
jnthn: does that make sense?
jnthn My gut feeling tells me that a solution involving a counter is broken and wrong. 16:11
When we $s.tap there, it's meant to tap the map, which in turn taps an interval 16:12
When we $s.tap again, then it again taps the map, which taps a fresh interval
Otherwise you only get one timer.
That's why it was using a lexical for the source tap and closing over it 16:13
For some reason it was also making two entries in @!tappers, or whatever it's called these days, at a guess.
That's the issue that wants fixing, so far as I can see.
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:14
16:14 atroxaper left
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:16 spider-mario left
jnthn Counter-based approaches will probably basically work out for a live supply, but will behave wrongly for an on-demand one. 16:18
16:19 Rotwang joined 16:20 treehug88 joined
lizmat so you're saying we should take a different approach depending on whether the original supply is live or not ? 16:20
16:20 hoverboard joined
jnthn Not at all 16:21
We should have one approach that works for both.
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:22
lizmat the logical bug is that the internal tap is just a lexical in a method 16:23
so every call to the tap method gets a new one
jnthn But that's right, no? It should be tapping the source once each time? 16:24
It's that somehow it ends up putting two entries into an @!tappers somewhere. 16:26
lizmat ok, let me check that
jnthn k
(sorry, my attention is split between this and a $dayjob task too...)
retupmoca there's only one entry in @!tappers 16:27
but each source tap calls more on all the tappers
16:27 _slade joined 16:29 spider-mario joined 16:35 anaeem1_ joined
lizmat mind hurts 16:50
16:52 fabio__ joined 16:54 anaeem1_ left 16:55 anaeem1 joined 16:58 dakkar left 16:59 itz_ joined 17:01 lelf` joined, lelf left
dalek kudo-star-daily: 0070da7 | coke++ | log/ (14 files):
today (automated commit)
17:01
rl6-roast-data: f2aae43 | coke++ | / (6 files):
today (automated commit)
17:03 anaeem1 left 17:05 pdcawley left 17:07 [Sno] joined
mr-foobar sweet, have a perl-j repl on my comp. any tutorial for calling java stuff ? 17:14
psch mr-foobar: perl6advent.wordpress.com/2013/12/0...n-the-jvm/ 17:16
it has a bit in there 17:17
YMMV though, the example as-is didn't work for me recently; the method descriptor wasn't found or something
mr-foobar psch: let me check. 17:18
17:19 Akagi201_ left
mr-foobar psch: is there a test directory for perl6-j ? 17:19
lizmat this may also be of interest? blog.timbunce.org/2010/07/16/java2p...d-whereto/ 17:20
17:20 broquaint left
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:20
17:21 ajr_ left 17:25 anaeem1 joined 17:31 zakharyas joined
psch lizmat: that's for recreating a java api in perl6 though, isn't it? 17:38
maybe it's useful as a getting-started for improving codegen for jvminterop, i.e. getting overloaded methods properly into perl6-space
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:42
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:43
jnthn lizmat: That does sound rather weird. I should take a look at that. 17:45
Something's rotten....
As retupmoca also described 17:46
lizmat psch: yes, something that would be worthwhile, no?
but jnthn: that's how I read the code before my change
jnthn lizmat: oh wait I misread
Grr
So each time you tap something you're building up a chain.
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*...
Just that the chains are getting tangled. 17:48
Probably because "does Supply" is providing a little too much...
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
lizmat BTW, I guess I should take out the "paused" stuff now 17:50
jnthn lizmat: Yes, I think so
lizmat ok, will do that
17:51 atroxaper joined 17:54 Akagi201 left 17:56 cooper_ joined, darutoko left, anaeem1 left 17:57 atroxaper left 17:59 FROGGS[mobile] joined
lizmat jnthn: just verified that the paused stuff was not the reason 18:00
FROGGS[mobile] o/
lizmat FROGGS[mobile] o/
FROGGS[mobile] my third fork has been checked out \o/ 18:01
psch FROGGS[mobile] \o 18:02
FROGGS[mobile] hi psch
lizmat FROGGS+++ 18:03
:-)
and not to forget the mother!
FROGGS[mobile] :o)
lizmat mother+++
18:03 itz_ left
FROGGS[mobile] sqirrel++ 18:03
aye
lizmat sqirrel+++
lizmat does not wonder why she's not online 18:04
psch ...oh
18:04 zakharyas left
psch congratulations, if i don't misunderstand everything :) 18:04
18:05 ingy left, ingy joined
psch (maybe even if i do, can't hurt right?) 18:05
lizmat psch: you're reading it right :-)
FROGGS[mobile]: read hair again ?
*red
FROGGS[mobile] lizmat: she just has no irc client on her mobile
jnthn congrats, FROGGS++ and family :)
FROGGS[mobile] lizmat: looks like 18:06
thanks :o)
lizmat
.oO( the power of the red is string in the FROGGS )
*strong
*sigh*
FROGGS[mobile] yeah
well, number two is blond
dalek kudo/nom: ef8137f | (Elizabeth Mattijsen)++ | src/core/SupplyOperations.pm:
Let's try to do this another way

This reverts commit 9a1c529013bf580d5c27579559dc9ebe7d71e725.
18:07
kudo/nom: 592a2ed | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Remove the experimental "paused" functionality
kudo/nom: 2c957ff | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Add helper method Supply.taps for debugging
FROGGS[mobile] now I'm in a train from hospital to a friend's house, to fetch the boys 18:08
18:08 anaeem1 joined
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
mr-foobar as far as I can say calling conventions and marshalling of perl6<->jvm needs to be done. 18:09
i think i can contribute a test or two, any pointers :)
FROGGS[mobile] mr-foobar++ 18:10
mr-foobar say System.currentTimeMillis(); works ! so i think the hard parts are done.
i used clojurescript. they used a very dumb clj->js and js->clj for data marshalling. 18:12
although I don't know how much special syntax can be given for FFI's 18:13
jnthn Yes, it's just that in the case of ambiguous overloads things need qualifying 18:21
For example, things like $crc.'method/update/(B)V'($_);
(takes a Bool, returns Void, in this case) 18:22
mr-foobar jnthn: is that name mangling from java's side ?
psch docs.oracle.com/javase/specs/jvms/s...jvms-4.3.2 18:23
(B is Byte, Z is Bool)
jnthn's point obviously still stands, the descriptors needs to get corresponding Signatures in perl6-space 18:24
mr-foobar how to convert [1,2,3] <-> java ? 18:25
jnthn psch: oh, you're right 18:27
mr-foobar: At the moment, manually... In the future we could provide various useful converters
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:28
dinner; bbl 18:29
mr-foobar jnthn: have lots of desert :)
mr-foobar wonders if the "." operator can be overloaded 18:30
18:32 kaleem left 18:33 araujo left, araujo joined
FROGGS[mobile] you can implement a method postcircumfix:<( )> in your class 18:35
18:36 [particle] left 18:37 [particle] joined 18:45 hoverboard is now known as moistcherry 18:50 Akagi201 joined 18:55 Akagi201 left 18:56 teodozjan joined 18:58 SamuraiJack_ left 19:01 carlin left 19:05 zakharyas joined
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
writing the whole algorithm as QAST Nodes seems a bit much to me
19:08 raiph joined
psch for reference, a --traget=ast compile of that method (converted to a sub) is about 400 lines of output 19:08
19:09 itz_ joined, moistcherry left
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:09
19:10 lelf joined 19:12 sftp left 19:13 sftp joined
jnthn psch: Writing it in QAST is surely the wrong way... 19:15
psch: What does the distance method do? What's its input/output?
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:17
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
jnthn psch: Yes, it just bulks up Actions.nqp
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
jnthn What does tr/// evaluate to? 19:20
psch output is a Bool with mixed in .Int and .Numeric
so, to clarify
it actually returns a Bool which calculates the distance when evaluated as Numeric
the Bool is $lhs ne $lhs.trans(...) 19:21
where ... is the arguments to tr/// as Pair
jnthn If we can think of a name for it, I'd just create an object that is constructed with $lhs and $lhs.trans(...)
psch ...more or less, i'm explaining badly
jnthn And it implemnts Bool, Numeric, Int...
psch github.com/rakudo/rakudo/pull/284/...e8cac3R935 ... :)
jnthn And then just have QAST that constructs that object.
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
psch or maybe he didn't, in any case i didn't see that option
jnthn StrDistance or something...
It will be cheaper and neater than mixing into a Bool...
psch the semantics of StrDistance.Bool seem a bit muddy to me on that layer though 19:23
19:23 moistcherry joined
psch but in any case, .Bool would only be used as an optimization i guess 19:24
i.e. if $str ~~ tr/a/b/ { #`[[ we changed stuff ]] } else { #`[[ we didn't ]] }
and inside the if anyone would probably rather use it Numeric anyway
right, i'll do it like that, thanks :) 19:25
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
19:29 guru joined 19:30 guru is now known as Guest70251, Guest70251 is now known as ajr_
jnthn psch: Yeah, it's such a common case that it's worth the opt, I think. 19:33
19:34 denis_boyun_ joined 19:37 treehug88 left 19:49 zakharyas left 19:51 Akagi201 joined 19:53 lelf left 19:54 lelf` left 19:55 Akagi201 left 19:57 zakharyas joined 20:05 moistcherry is now known as hoverboard 20:13 treehug88 joined 20:16 lelf joined 20:33 geekosaur joined 20:34 Rotwang left 20:38 molaf left 20:39 gfldex left 20:52 Akagi201 joined 20:55 atroxaper joined 20:56 Akagi201 left 20:59 atroxaper left 21:02 SevenWolf joined, kaare_ left 21:03 rindolf joined
rindolf Hi all 21:04
21:04 sjn joined 21:05 zakharyas left
psch hrm, i'm stuck at the .new call in Actions 21:06
simply passing QAST::Vars cleary doesn't work because they're not named
putting .named onto the Vars.new() gives complaints about "unknown type BOOTstr" 21:07
i also tried decont and manually constructing the Want/WVal stuff that --target=ast dumps when it gets a "$type.new(...)"
and those both don't work either :/
time for jnthn++'s nqp slides! 21:08
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.
Mouq psch: What are you trying to do? 21:10
psch Mouq: i'm trying to instantiate an object inside perl6's Actions 21:11
21:11 sjn left 21:12 virtualsue joined
Mouq The only case I can find of that is at L4302 & L4392 if you need a reference 21:13
But I'm not sure if that's what you want. 21:14
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
github.com/peschwa/rakudo/blob/imp....nqp#L5891 # for reference, this is where i'm stuck... :)
the scope the .new call should end up in has the vars, but just QAST::Var doesn't seem to be enough 21:16
maybe i did something else wrong though, i'm not sure
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:17
21:19 spider-mario left
Mouq psch: Would it be easier to just call a sub that creates the StrDistance object? 21:19
21:19 bluescreen100 joined
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
i can at least try it, thanks timotimo++ (and Mouq++ too) 21:21
21:21 teodozjan left
psch hold on 21:21
i have $_ and my $orig_lhs
i don't think boxing helps here 21:22
21:22 bluescreen10 left
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 paste.debian.net/hidden/81d365dc/ this is what i get dumped when i put QAST::Var.new(... for $_).named('before')
where "... for $_" is ":name('$_'), :scope('lexical')" 21:24
similarly for $orig_lhs
Mouq: if i was to call a sub i'd have to have that sub declared in perl6-space already, no? 21:25
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
psch timotimo: thanks and g'night
21:33 sjn joined 21:34 FROGGS joined 21:35 FROGGS[mobile] left 21:38 anaeem1 left
jnthn back 21:49
jnthn wonders if psch is still about/having "fun" :)
psch i probably got a bit impatient there, yeah 21:50
i guess that's a good indicator to stop working on this for now... 21:51
jnthn OK; I know QAST pretty well so feel free to run a diff by me at some point. 21:52
But basically, any node can become a named parameter by putting .named(...) on it
And if you can't mutate it, you can wrap it in a QAST::Stmts that is .named
psch right, that's what i tried; but all i got back was the content of that .named
(in my defence, it's horribly hot here and we discovered mold on two walls today) 21:53
sorry for letting that spill
masak hugs psch 21:54
jnthn Yeah, it's hot here too... :/
My next place will have aircon or be in the darn arctic :P
Anyway, I'd need a diff to help much more, I think. 21:55
21:58 denis_boyun_ left 21:59 raiph left
psch jnthn: github.com/rakudo/rakudo/pull/284/...c4395R5877 # this is what felt obvious to me 22:02
but that gives me "unknown QAST type BOOTStr" and the ast dump only contains 'before' and 'after' as strings below the :op<callmethod> 22:03
jnthn QAST::Var.new( :name($orig_lhs), :scope<lexical> ).named('before') 22:05
Should be
QAST::Var.new( :name($orig_lhs), :scope<lexical>, :named('before') )
psch that was anticlimatic :)
in any case, thanks. proves my point of having worked on this enough for now 22:06
jnthn :)
Look forward to the patch, when you get energy/patience to work on it again :)
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:07
22:08 treehug88 left
psch aside from that it probably should maybe already work :) 22:08
jnthn Shouldn't matter much in this case.
Though yeah, later is usually easier :) 22:09
22:09 dmol1 left
psch there's another thing i'd like to run by you; mainly to confirm that it's a horrible solution 22:09
22:10 itz_ left
jnthn ok... :) 22:11
22:11 dmol joined
psch paste.debian.net/hidden/3169c211/ # this solves the NPE here gist.github.com/peschwa/e5aee72dcce9d4b60ec1 22:11
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...
also, it might just happen that it doesn't even find the right outer... 22:12
basically, there i'm relying on "it's always the SETTING that's missing", afaiu 22:13
oh, and thanks for the hug masak++ :) 22:15
22:16 bluescreen100 left
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:17
masak .oO( will always have been being set up properly ) 22:19
22:21 sftp_ joined
psch alright, thanks 22:22
that's something for next week or so though :)
22:23 sftp left, sftp_ is now known as sftp 22:30 ajr_ left 22:31 guru joined, jnap left 22:32 guru is now known as Guest65171, sjn left, wtw left, PerlJam left, masak left, DarthGandalf left, PZt left, silug left, obra_ left, clkao left 22:33 camelia left, arnsholt joined, mst joined, masak joined, PerlJam joined, Ulti joined, moritz joined, anocelot joined, daxim joined, charsbar_______2 joined, mls joined, mls left, mls joined, masak is now known as Guest30913, SHODAN joined, go|dfish joined 22:34 DarthGandalf joined, jnap joined 22:36 virtualsue left, Celelibi joined, Grimnir_ joined, jlaire joined, jdv79 joined, yoleaux joined, morgan.freenode.net sets mode: +v yoleaux, PZt joined, silug joined, obra_ joined, clkao joined, flussence joined, japhb joined, ribasushi joined, xfix joined, camelia joined, cxreg joined, ivan`` joined, atrodo joined, sorear joined, tokuhirom joined, timotimo joined, ashleydev joined, pnu joined, morgan.freenode.net sets mode: +v camelia, Guest30913 is now known as masak_grr, ivan`` left 22:37 ivan`` joined 22:38 sjn joined, BinGOs joined, nebuchadnezzar left 22:39 c1sung joined 22:40 thilp left, thilp joined 22:41 Rix joined 22:42 btyler_ left
masak_grr 'night, #perl6 22:42
22:43 lelf left 22:49 eternaleye left 22:53 eternaleye joined 22:57 atroxaper joined, felipe joined 23:01 atroxaper left 23:15 eternaleye left 23:18 dmol left 23:20 eternaleye joined 23:29 rindolf left 23:31 FOAD joined
retupmoca jnthn, lizmat: Does this patch for the SupplyOperation bug look saner? github.com/rakudo/rakudo/pull/287 23:36
.tell jnthn I tried to kill the SupplyOperation bug again: github.com/rakudo/rakudo/pull/287 23:38
yoleaux retupmoca: I'll pass your message to jnthn.
23:41 eternaleye left 23:45 hoverboard left 23:48 xragnar_ joined, xragnar left, xragnar_ is now known as xragnar 23:50 eternaleye joined 23:54 Guest65171 left 23:57 atroxaper joined