Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-10-03

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

All times shown according to UTC.

Time Nick Message
00:22 MasterDuke .tell jnthn it's not just IO or run(), even "await (for ^7 { start { my $a = rand; say $a} })" segfaults. https://rt.perl.org/Ticket/Display.html?id=129781
00:22 yoleaux2 MasterDuke: I'll pass your message to jnthn.
01:04 MasterDuke .tell Zoffix it seems you never submitted a PR for RT #72820, but according to http://irclog.perlgeek.de/perl6/2016-07-06#i_12795893 you had a fix lined up
01:04 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=72820
01:04 yoleaux2 MasterDuke: I'll pass your message to Zoffix.
01:46 gfldex m: my $c = Channel.new; $c.send((1,2,3).Slip); dd $c.list
01:46 camelia rakudo-moar 3a6cd8: OUTPUT«(timeout)»
01:46 gfldex m: my $c = Channel.new; $c.send(|(1,2,3)); dd $c.list
01:46 camelia rakudo-moar 3a6cd8: OUTPUT«Too many positionals passed; expected 2 arguments but got 4␤  in block <unit> at <tmp> line 1␤␤»
01:48 ilbot3 joined #perl6-dev
01:48 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
01:53 gfldex m: my $c = Channel.new; $c.send((1,2,3).Slip); $c.close; say (1, $c.list, 3)
01:53 camelia rakudo-moar 3a6cd8: OUTPUT«(1 ((1 2 3)) 3)␤»
01:54 Zoffix MasterDuke, 'cause it's hard. IIRC, the easy fix interferes with subroutine interpolation in strings.
01:54 yoleaux2 01:04Z <MasterDuke> Zoffix: it seems you never submitted a PR for RT #72820, but according to http://irclog.perlgeek.de/perl6/2016-07-06#i_12795893 you had a fix lined up
01:54 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=72820
01:57 gfldex m: my $c = Channel.new; $c.send((1,2,3).Slip); $c.close; put (1, $c.receive, 3).perl
01:57 camelia rakudo-moar 3a6cd8: OUTPUT«(1, 1, 2, 3, 3)␤»
01:57 gfldex m: my $c = Channel.new; $c.send((1,2,3)); $c.close; put (1, $c.receive, 3).perl
01:57 camelia rakudo-moar 3a6cd8: OUTPUT«(1, (1, 2, 3), 3)␤»
02:20 gfldex m: use MONKEY-TYPING; augment class Channel { method send-capture(Channel:D: |c) { use nqp; nqp::push($!queue, nqp::decont(c)); $!async-notify.emit(True); Nil }; method receive-capture { return |self!receive(1) } }; my $c = Channel.new; $c.send-capture((1,2,3).Slip); $c.close; dd (1, $c.receive-capture, 3).join(':');
02:20 camelia rakudo-moar 3a6cd8: OUTPUT«"1:1:2:3:3"␤»
02:20 gfldex m: use MONKEY-TYPING; augment class Channel { method send-capture(Channel:D: |c) { use nqp; nqp::push($!queue, nqp::decont(c)); $!async-notify.emit(True); Nil }; method receive-capture { return |self!receive(1) } }; my $c = Channel.new; $c.send-capture((1,2,3)); $c.close; dd (1, $c.receive-capture, 3).join(':');
02:20 camelia rakudo-moar 3a6cd8: OUTPUT«"1:1 2 3:3"␤»
02:45 Zoffix What does nqp::p6bindattrinvres do?
02:45 Zoffix (or stand for)
03:14 stmuk joined #perl6-dev
04:07 Zoffix r: https://gist.github.com/zoffixznet/685bc5495852383b6f039333471b5cc1
04:07 camelia rakudo-jvm 2a1605: OUTPUT«===SORRY!===␤Method 'count' not found for invocant of class 'NQPMu'␤»
04:07 camelia ..rakudo-moar 3a6cd8: OUTPUT«===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
04:07 Zoffix :S
04:08 Zoffix works fine locally
04:10 Zoffix Ohh... it's 'cause I'm running with optimize off
04:10 Zoffix optimizer bug \o/
04:11 Zoffix m: ^4 .map: {};
04:11 camelia rakudo-moar 3a6cd8: OUTPUT«===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
04:11 Zoffix m: sub foo ($) {}; ^4 .map: &foo;
04:11 camelia rakudo-moar 3a6cd8: OUTPUT«===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
04:13 Zoffix And I bet it's inlining it
04:13 Zoffix m: sub foo ($) {say "meow"}; ^4 .map: &foo;
04:13 camelia rakudo-moar 3a6cd8: OUTPUT«===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
04:13 Zoffix m: sub foo ($) {say "meow"; my $i; $i++ }; ^4 .map: &foo;
04:13 camelia rakudo-moar 3a6cd8: OUTPUT«===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
04:13 Zoffix maybe not :}
04:23 Zoffix m: (^4).map: {};
04:23 camelia rakudo-moar 3a6cd8: OUTPUT«Cannot map a Range to a Hash.␤Did you mean to add a stub ({...}) or did you mean to .classify?␤  in block <unit> at <tmp> line 1␤␤»
04:40 stmuk_ joined #perl6-dev
04:51 Zoffix ".git/hooks/pre-commit: 4: .git/hooks/pre-commit: etckeeper: not found"
04:51 Zoffix on www.p6c.org
04:51 Zoffix (when attempting to git commit /etc/ changes
04:51 Zoffix )
06:18 [Tux] This is Rakudo version 2016.09-108-g3a6cd8a built on MoarVM version 2016.09-15-gc8b4228
06:18 [Tux] csv-ip5xs        3.413
06:18 [Tux] test            17.138
06:18 [Tux] test-t           7.693
06:18 [Tux] csv-parser      19.511
06:22 nine [Tux]: is this with Inline::Perl5 v0.17?
06:22 [Tux] should I add that to the output?
06:23 [Tux] what was the shortest way to show the version again?
06:27 nine perl6 -e 'say $*REPO.need(CompUnit::DependencySpecification.new(:short-name<Inline::Perl5>)).version'
06:28 [Tux] just found it in the logs. ETOOHARDTOREMEMBER
06:28 [Tux] v0.17
06:28 nine ok, thanks!
06:32 ShimmerFairy joined #perl6-dev
07:16 [Tux] https://gist.github.com/Tux/a165ccf7398834654b213b4855a6ea4c
07:25 nine nice
10:01 |Tux| nine, but it doesn't work as I wanted/expected :/
10:03 FROGGS joined #perl6-dev
10:15 dalek nqp: 5769a65 | usev6++ | src/vm/jvm/QAST/Compiler.nqp:
10:15 dalek nqp: Fix handling of QAST::Want on JVM
10:15 dalek nqp:
10:15 dalek nqp: The fix is to look only at those alternatives that have
10:15 dalek nqp: the selector for the context we are in (I|N|S|v).
10:15 dalek nqp:
10:15 dalek nqp: I've mainly copied the code from
10:15 dalek nqp: src/vm/moar/QAST/QASTCompilerMAST.nqp (which works
10:15 dalek nqp: just fine).
10:15 dalek nqp: review: https://github.com/perl6/nqp/commit/5769a65fbc
10:15 dalek nqp: 5960973 | lizmat++ | src/vm/jvm/QAST/Compiler.nqp:
10:15 dalek nqp: Merge pull request #309 from usev6/jvm_qast_want
10:15 dalek nqp:
10:15 dalek nqp: Fix handling of QAST::Want on JVM
10:16 jnthn I reviewed that, fwiw, and was a tad curious that it assuemd void context if we didn't want a native type...
10:16 yoleaux2 00:22Z <MasterDuke> jnthn: it's not just IO or run(), even "await (for ^7 { start { my $a = rand; say $a} })" segfaults. https://rt.perl.org/Ticket/Display.html?id=129781
10:18 jnthn But it seems to improve things, so... :-)
10:29 psch jnthn: https://irclog.perlgeek.de/perl6-dev/2016-10-02#i_13325106
10:29 psch jnthn: basically, something else somewhere else is messed up and that's why we fall back to void context there
10:29 psch ...i think :)
10:29 psch r: sub f { sub { say 1 } }()() # this one probably depends on the missing RT_OBJ check
10:29 camelia rakudo-jvm 2a1605: ( no output )
10:29 camelia ..rakudo-moar 3a6cd8: OUTPUT«1␤»
10:29 bartolin jnthn, lizmat: thanks for looking! I tried to restrict the use of 'v' to void context (with an additional check like $type == $RT_VOID ?? 'v' !! 'X' as we do it for Moar) but then other things started to fail
10:30 bartolin yeah, what psch said :-)
10:30 jnthn Hm, OK...probably worth hunting down what the other one is :)
10:30 bartolin maybe I should add a comment, that there's still something fishy?
10:30 * psch has faith in bartolin++ :)
10:30 jnthn *nod*
10:30 * lizmat also nods
10:30 jnthn That particular example psch posted is the kind of problem I'd expect to see as a result of such a bug
10:31 jnthn But if it's there even before you patch then there's likely a second similar problem elsewhere
10:33 psch r: my $x = 1 but False; say so $x # this got fixed with the PR i think
10:33 camelia rakudo-jvm 2a1605: OUTPUT«True␤»
10:33 camelia ..rakudo-moar 3a6cd8: OUTPUT«False␤»
10:33 psch anyway, yeah, in general it seems we could've benefited from a bit more unification between the QAST to * Compilers
10:33 psch but that's hard because of semantic differences in the backends
10:38 bartolin I noticed that the code for the js backend looks the same like the old code for the jvm. probably it would work better if it uses the approach taken for moar
10:38 bartolin https://github.com/usev6/nqp/blob/master/src/vm/js/Compiler.nqp#L648 and https://github.com/usev6/nqp/blob/master/src/vm/js/Operations.nqp#L1522
10:38 bartolin pmurias: ^^ maybe of interest for you
10:39 jnthn If there are such commonalities across the bunch, they could be pulled out into roles
10:44 psch nqp doesn't do role stubs, does it?
10:45 psch as in, die-when-not-implemented-in-does'ing-class
10:45 psch nqp-m: role Foo { method bar { ... } }; class Baz does Foo { }
10:45 camelia nqp-moarvm: OUTPUT«Routine declaration requires a signature at line 2, near "{ ... } };"␤   at gen/moar/stage2/NQPHLL.nqp:621  (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic)␤ from gen/moar/stage2/NQP.nqp:1288  (/home/camelia/rakudo-m-inst-2/share/nqp/lib/nqp.m…»
10:45 psch nqp-m: role Foo { method() bar { ... } }; class Baz does Foo { }
10:45 camelia nqp-moarvm: OUTPUT«Unable to parse expression in blockoid; couldn't find final '}'  at line 2, near "method() b"␤   at gen/moar/stage2/NQPHLL.nqp:621  (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic)␤ from gen/moar/stage2/NQPHLL.nqp:628  (/home/camelia/rakudo-m-…»
10:45 psch ah, doesn't do stubs at all
10:45 jnthn psch: No
10:50 Zoffix lizmat, if there's space in the Weekly, we have a bunch of Issues tagged for Hacktoberfest https://github.com/issues?utf8=%E2%9C%93&amp;q=is%3Aopen+is%3Aissue+user%3Aperl6+label%3AHacktoberfest  which is a promotional event by DigitalOcean where you submit any 4 PRs to any repo on GitHub during october and receive a free shirt https://hacktoberfest.digitalocean.com/
10:51 lizmat Zoffix: was planning of making Hacktoberfest the main article: thanks for the links
10:51 Zoffix \o/
10:57 jnthn A free shirt, not a free beer? Aww! :)
11:02 gfldex is there an official way to check if a program runs multithreaded? This %*ENV<RAKUDO_MAX_THREADS> hackery is a bit eyesoreing.
11:04 * masak .oO( free as in shirt )
11:05 jnthn gfldex: Not as of yet, now
11:05 jnthn *no
11:05 jnthn Ideally in the future we'll provide some way to get a list of all running threads
11:06 jnthn If you don't need something platform-agnostic, a look inside of /proc/ can probably tell you
11:07 jnthn Note that RAKUDO_MAX_THREADS is also a little bit of a lie, since it is really the default maximum thread pool size for the default thread pool scheduler
11:07 jnthn But it doesn't have any impact on Thread.new or if you make your own scheduler with more threads than that
11:07 gfldex i was thinking to turn channelify() into a module but without an agreed upon way to tell perl6 to run with threads or without, I would just create debt.
11:08 jnthn That seems like an odd thing to do though
11:08 gfldex i would need the result of perl6 --no-thread -e 'your-code-here()' or perl6 --max-threads
11:09 jnthn I don't imagine us implementing a --no-threads
11:09 gfldex it would be a lie anyway because of libuv, as i understand it
11:10 jnthn Yup, and we'll move some of GC off to a background thread too, and spesh...
11:10 gfldex so it would be more like --max-worker-threads
11:11 jnthn lunch, bbiab &
11:12 gfldex with the value ending up in $*MAX-WORKER-THREADS and defaulting to %*ENV<RAKUDO_MAX_THREADS>
11:13 nine I can hardly see enough users for that kind of functionality to warrant a command line switch
11:16 gfldex the overhead for channelify if quite hefty. It wraps a for loop, adds the channel.send/.receive stuff and an iterator on the Seq to any lazy list.
11:20 gfldex jnthn: also, being able to return more then one value and make Slip with in .send would be nice. Right now a Slip doesn't slip in .receive and .list on a Channel.
11:20 gfldex s/Slip/Slip work/
11:23 gfldex m: my \l = gather for 1..10 -> $a, $b { take |($a, $b) }; .perl.say for l;
11:23 camelia rakudo-moar 3a6cd8: OUTPUT«(1, 2)␤(3, 4)␤(5, 6)␤(7, 8)␤(9, 10)␤»
11:23 gfldex that feels wrong too
11:23 gfldex m: my \l = gather for 1..10 -> $a, $b { take |($a, $b) }; dd l;
11:23 camelia rakudo-moar 3a6cd8: OUTPUT«((1, 2), (3, 4), (5, 6), (7, 8), (9, 10)).Seq␤»
11:28 pmurias joined #perl6-dev
11:28 psch &take implicitly returns a Scalar, via nqp::p6recont_ro
11:29 psch not sure that quite fits for the case where it's already ro, though
11:29 psch m: use nqp; say nqp::iscont(|(1, 2))
11:29 camelia rakudo-moar 3a6cd8: OUTPUT«This representation (VMArray) cannot unbox to a native int (for type BOOTArray)␤  in block <unit> at <tmp> line 1␤␤»
11:46 gfldex in the case of take, one can just have 2 takes in a row but for .send that doesn't make sense because returning more then 1 value is meant to reduce the overhead of .send, not to add another one.
12:02 gfldex roast seams not to test take with slip, .Slip or |(1,2,3)
12:03 gfldex m: my \l = gather for 1..10 -> $a, $b { take ($a, $b).Slip }; dd l;
12:03 camelia rakudo-moar 3a6cd8: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).Seq␤»
12:04 gfldex shouldn't |(1,2,3) and (1,2,3).Slip act the same?
12:05 jnthn Remember that take is a sub call
12:06 jnthn So the | there is an argument-passing flattening, not a Slip construction
12:06 gfldex that makes sense then
12:06 jnthn But still that'd mean passing three things to take
12:06 gfldex m: my $c = Channel.new; $c.send((1,2,3).Slip); $c.close; dd (1,$c.receive,2).join(':')
12:06 camelia rakudo-moar 3a6cd8: OUTPUT«"1:1:2:3:2"␤»
12:06 gfldex m: my $c = Channel.new; $c.send((1,2,3).Slip); $c.close; dd (1,$c.list,2).join(':')
12:06 camelia rakudo-moar 3a6cd8: OUTPUT«"1:1 2 3:2"␤»
12:07 gfldex i did not expect the Slip vanish in .list
12:07 gfldex so this is either rakudobug or ENODOC
12:07 lizmat Slips should almost always disappear
12:09 lizmat and it looks like they're not in this case ?
12:09 dalek nqp: ab11625 | usev6++ | src/vm/jvm/QAST/Compiler.nqp:
12:09 dalek nqp: Add comment about imperfect handling of QAST::Want
12:09 dalek nqp:
12:09 dalek nqp: compare https://irclog.perlgeek.de/perl6-dev/2016-10-03#i_13327086
12:09 dalek nqp: review: https://github.com/perl6/nqp/commit/ab11625aad
12:10 psch $c.list is a List that doesn't slip, isn't it
12:10 psch i mean, the .receive call slipped
12:10 gfldex i am a bit confused what should slip where, bit .list should behave the same way then a gather/take to make it easy to turn a lazy list into a lazy cuncurrent list
12:11 lizmat well, .list is supposed to return something listy
12:11 lizmat (which could be an Array, fwiw)
12:12 jnthn I think channels should probably just convey things as they are send, but the thing $channel.list returns coping with slips (e.g. flattening them into the target list) seems reasonable
12:13 jnthn Curiously, doing it that way also means you know the values will show up together in the thing you get from .list
12:13 gfldex i shell rakudobug so it doesn't slip though
12:13 jnthn Whereas if you handled it send side, then another sender could sneak values into the middle :)
12:14 gfldex you can send a Capture if you really want stuff to stay the way they are
12:14 lizmat fwiw, I think you found a bug in List.join
12:14 lizmat m: dd (1,((1,2,3),),4)
12:14 camelia rakudo-moar 3a6cd8: OUTPUT«(1, ((1, 2, 3),), 4)␤»
12:14 lizmat m: dd (1,(1,2,3),4)
12:14 camelia rakudo-moar 3a6cd8: OUTPUT«(1, (1, 2, 3), 4)␤»
12:15 lizmat m: dd (1,((1,2,3),),4).join(":")
12:15 camelia rakudo-moar 3a6cd8: OUTPUT«"1:1 2 3:4"␤»
12:15 lizmat m: dd (1,(1,2,3),4).join":"
12:15 camelia rakudo-moar 3a6cd8: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> dd (1,(1,2,3),4).join⏏":"␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modi…»
12:15 lizmat m: dd (1,(1,2,3),4).join(":")
12:15 camelia rakudo-moar 3a6cd8: OUTPUT«"1:1 2 3:4"␤»
12:15 jnthn Those look correct?
12:15 lizmat ah, maybe it's in the stringification of the List ?
12:16 jnthn Yeah, think so
12:16 lizmat m: say (1,2,3).Str
12:16 jnthn .join shouldn't flatten
12:16 camelia rakudo-moar 3a6cd8: OUTPUT«1 2 3␤»
12:16 yoleaux2 jnthn: Sorry, this command is admin-only.
12:16 lizmat m: say ((1,2,3),).Str
12:16 camelia rakudo-moar 3a6cd8: OUTPUT«1 2 3␤»
12:16 lizmat yup
12:17 gfldex also, Channel.new.send(1).close looks correct to me but doesn't work becaue .send returns Nil (and there are a few other methods in Channel that do the same)
12:18 gfldex that's either wrong or a ENODOC
12:19 jnthn I'd expect .send to return Nil, not the channel itself
12:22 gfldex chaining methods on a channel feels wrong to me too, because things might happen to the channel inbetween those two calls
12:22 jnthn Also we just don't generally do chaining in Perl 6 like that
12:23 jnthn Except in a handful of places where it makes sense (like .then on Promise)
12:23 jnthn (And even that isn't the good way to do things)
12:55 dalek roast: 33bc0ad | (Zoffix Znet)++ | S32-temporal/DateTime.t:
12:55 dalek roast: [coverage] Cover all methods and subs in DateTime
12:55 dalek roast: review: https://github.com/perl6/roast/commit/33bc0adffc
12:56 dalek roast: 3ca7452 | (Zoffix Znet)++ | S32-temporal/DateTime.t:
12:56 dalek roast: Fix small error in test description
12:56 dalek roast: review: https://github.com/perl6/roast/commit/3ca7452444
13:01 dalek roast: 338460c | (Zoffix Znet)++ | S32-temporal/Date.t:
13:01 dalek roast: Comment in commented out (for some reason) test
13:01 dalek roast: review: https://github.com/perl6/roast/commit/338460c598
13:05 hackedNODE m: DateTime.is-leap-year(2016).say
13:05 camelia rakudo-moar 3a6cd8: OUTPUT«True␤»
13:05 hackedNODE I really want to toss that.
13:06 hackedNODE It feels like a sub tacked onto an OO interface.
13:06 hackedNODE (and it's not in roast)
13:06 hackedNODE m: Date.new(:2016year).is-leap-year.say
13:06 camelia rakudo-moar 3a6cd8: OUTPUT«True␤»
13:06 hackedNODE That's a perfectly good way to test if a year is a leap year
13:07 hackedNODE m: Date.new(:2013year).is-leap-year(2016).say # and this is gross
13:07 camelia rakudo-moar 3a6cd8: OUTPUT«True␤»
13:16 lizmat hackedNODE: agree
13:16 lizmat I guess it's good there are no tests for it  :-)
13:59 [Coke] t/04-nativecall/16-rt125408.t is failing for me on OS X at rakudo@ed0ced2
14:13 hackedNODE [Coke]: try with HEAD. I believe that issue was already fixed by c4a8855 and 46e0ede
14:22 nine join doesn't seem to be any faster than [~] (which is good I guess)
14:27 lizmat hmmm... I find that strange, unless we optimize specifically for [~]
14:28 nine lizmat: Could also just be that [~] is not slow enough to actually matter.
14:29 nine Reading 987 source files with 113MB combined and SHA1ing them might just take a minute...
14:29 timotimo right, the ropes implementation ought to make repeatedly concating reasonably cheap
14:30 lizmat nine: still not sure whether we really need to SHAing the contents
14:30 nine Though of course (find . -name "*.pm" | xargs cat | time sha1sum) runs in just about ~ 70 milliseconds
14:30 lizmat I mean, if we would a SHA of a count of files /  filenames / last modified
14:31 lizmat wouldn't that be just as good but a *lot* faster ?
14:31 nine 2 second time stamp resolution
14:32 timotimo only sha1ing file contents doesn't catch renames
14:32 timotimo actually, what if the OS gives us the same files in a different order just because it can?
14:32 nine Good point.
14:32 lizmat nine: maybe we need to be smarter?
14:33 lizmat I mean, if the number of files is different from before, we have a fail. no?
14:33 lizmat no need to be SHAing then at all
14:33 lizmat also: I'm not sure the 2 second time stamp resolution is a big issue
14:34 lizmat I mean, one would need to be a very fast typer *and* do it inside the exact 2 second window
14:34 lizmat to not recognize a change
14:34 nine timotimo: we can always sort the dir() result
14:34 timotimo right
14:39 nine Frankly, the solution we have now is certainly the safest. I'm not sure I fancy bringing back hard to debug precomp issues just for fixing an edge case that doesn't make all that much sense in practice.
14:40 dalek rakudo/nom: 6aab641 | (Zoffix Znet)++ | src/core/Dateish.pm:
14:40 dalek rakudo/nom: Remove sub-like method candidates in Dateish
14:40 dalek rakudo/nom:
14:40 dalek rakudo/nom: Remove argument-taking candidates for is-leap-year, days-in-month,
14:40 dalek rakudo/nom: and day-of-week because they muddy the OO interface, by behaving like
14:40 dalek rakudo/nom: tacked on subs, rather than methods relevant to the object. E.g.:
14:40 dalek rakudo/nom:
14:40 dalek rakudo/nom:     Date.new(:2013year).is-leap-year(2016).say; # gives True
14:40 dalek rakudo/nom:
14:40 dalek rakudo/nom: The functionality provided by all of these methods is still retained by the
14:40 dalek rakudo/nom: candidates that operate on the Dateish object itself, using the values of
14:40 dalek rakudo/nom: its attributes. Both 6.c-errata and current master[^1] roast stresstests
14:40 dalek rakudo/nom: pass with this change.
14:40 dalek rakudo/nom:
14:40 nine I'd also be totally supportive of anyone wanting to give it a try.
14:40 hackedNODE https://github.com/rakudo/rakudo/commit/6aab64103f1c6ce509be79783d2fd10a989b6edd
14:41 lizmat nine: where does that code live?
14:42 nine lizmat: method id in CompUnit::Repository::FileSystem
14:42 lizmat nine: ok, will try some things  :-)
14:42 nine lizmat: remember to have fun :)
14:43 lizmat hehe... now translating perl6intro to Dutch, at 96%   wil look at it after I reach 100%  :-)
14:47 [Coke] hackedNODE: whoops, thought I had updated before I tested; thanks, all fine.
14:47 AlexDaniel joined #perl6-dev
14:55 dalek rakudo/nom: 6c07321 | (Zoffix Znet)++ | src/core/Dateish.pm:
14:55 dalek rakudo/nom: Fix unusable Dateish.IO
14:55 dalek rakudo/nom:
14:55 dalek rakudo/nom: Stringify Dateish before constructing IO::Path, so we don't get NoMulti
14:55 dalek rakudo/nom: throwage, and restrict the method to only :D Dateishes, so we do not
14:55 dalek rakudo/nom: attempt to stringify undefined things.
14:55 dalek rakudo/nom:
14:55 dalek rakudo/nom: Fixes RT#129799: https://rt.perl.org/Ticket/Display.html?id=129799
14:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6c0732146a
14:55 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129799
14:55 dalek roast: a7fe6b6 | (Zoffix Znet)++ | S32-temporal/Date.t:
14:55 dalek roast: [coverage] Cover Dateish.IO
14:55 dalek roast:
14:55 dalek roast: Also covers RT#129799: https://rt.perl.org/Ticket/Display.html?id=129799
14:55 dalek roast: review: https://github.com/perl6/roast/commit/a7fe6b6f67
14:55 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129799
14:57 hackedNODE Another bug discovered by coverage reports :)
14:57 hackedNODE timotimo++
14:58 nine Btw we can now speed up IO::Handle::open a bit by moving the is-directory check into the CATCH block. cygx++ has fixed MoarVM to throw an exception when trying to open() a directory :)
14:58 timotimo yays
15:09 nine But it seems like jvm still needs that modification, too. StackOverflow suggests that FileChannel.open will happily open() a directory, too.
15:30 lizmat afk&
15:35 travis-ci joined #perl6-dev
15:35 travis-ci Rakudo build passed. Zoffix Znet 'Remove sub-like method candidates in Dateish
15:35 travis-ci https://travis-ci.org/rakudo/rakudo/builds/164651146 https://github.com/rakudo/rakudo/compare/3a6cd8a73070...6aab64103f1c
15:35 travis-ci left #perl6-dev
16:16 travis-ci joined #perl6-dev
16:16 travis-ci Rakudo build passed. Zoffix Znet 'Fix unusable Dateish.IO
16:16 travis-ci https://travis-ci.org/rakudo/rakudo/builds/164655434 https://github.com/rakudo/rakudo/compare/6aab64103f1c...6c0732146a27
16:16 travis-ci left #perl6-dev
18:02 dalek rakudo/nom: 1e6c465 | (Zoffix Znet)++ | src/core/Exception.pm:
18:02 dalek rakudo/nom: Awesomify X::Multi::NoMatch
18:02 dalek rakudo/nom:
18:02 dalek rakudo/nom: It's not clear from the list of candidates when the only reason
18:02 dalek rakudo/nom: for NoMatch is lack of rw containers for given arguments.
18:02 dalek rakudo/nom:
18:02 dalek rakudo/nom: Detect any candidates that would match the capture with all of its
18:02 dalek rakudo/nom: arguments in writable containers and list those candidates separately,
18:02 dalek rakudo/nom: indicating that writable container may be missing.
18:02 dalek rakudo/nom:
18:02 dalek rakudo/nom: timotimo++ for helping
18:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1e6c465ce2
18:12 timotimo yay
18:16 hackedNODE AND I spotted how to fix the bug I was complaining about a few days ago
18:17 timotimo oh?
18:17 hackedNODE m: class Z { multi method meow {} }.meow: 42, :foo(Str)
18:17 camelia rakudo-moar 1e6c46: OUTPUT«Cannot resolve caller meow(Z: Int, Str); none of these signatures match:␤    (Z $: *%_)␤  in block <unit> at <tmp> line 1␤␤»
18:17 hackedNODE ^ see how it claims I called it with two positionals and not pos + named
18:20 perlpilot how does one trigger the new message?
18:20 hackedNODE m: 42++
18:20 camelia rakudo-moar 1e6c46: OUTPUT«Cannot resolve caller postfix:<++>(Int); arguments that are expected to be␤in writable containers do not have them, for these candidates:␤    (Mu:D $a is rw)␤    (Int:D $a is rw)␤␤These candidates are also available:␤    (Bool:D $a is rw)␤   …»
18:20 perlpilot ah
18:22 timotimo ah
18:22 hackedNODE aaahhh
18:22 hackedNODE :)
18:34 RabidGravy joined #perl6-dev
18:40 dalek rakudo/nom: f4bda35 | (Zoffix Znet)++ | src/core/Exception.pm:
18:40 dalek rakudo/nom: Fix X::Multi::NoMatch incorreclty showing named args as positionals
18:40 dalek rakudo/nom:
18:40 dalek rakudo/nom: The interpolation error in the string does not show up due to
18:40 dalek rakudo/nom: the `try` before it and the fallback is missing the `:` as well.
18:40 dalek rakudo/nom:
18:40 dalek rakudo/nom: Fixes RT#129800: https://rt.perl.org/Ticket/Display.html?id=129800
18:40 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129800
18:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f4bda356fc
18:40 dalek roast: 000b930 | (Zoffix Znet)++ | integration/error-reporting.t:
18:40 dalek roast: X::Multi::NoMatch correctly shows named arguments
18:40 dalek roast:
18:40 dalek roast: RT#129800: https://rt.perl.org/Ticket/Display.html?id=129800
18:40 dalek roast: review: https://github.com/perl6/roast/commit/000b930c61
18:40 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129800
18:44 [Coke] t/spec/S32-temporal/Date.t is dying for me.
18:45 [Coke] t/spec/S17-supply/interval.t t/spec/S19-command-line/repl.t both failed under high load.
18:45 hackedNODE 99% t/spec/S32-temporal/Date.t is dying 'cause your Rakudo is not new enough
18:46 [Coke] That was step 2, aye.
18:48 hackedNODE And the other two are dying due to too small a timeout for doesn't-hang() test. It takes too long for the test to run due to high load, so it thinks the thing hung. You can try to set ROAST_TIMING_SCALE=3 or higher.
18:50 hackedNODE s/dying/failing/;
19:04 dalek rakudo/nom: 01321ca | (Zoffix Znet)++ | src/core/Exception.pm:
19:04 dalek rakudo/nom: Amend text of X::Multi::NoMatch
19:04 dalek rakudo/nom:
19:04 dalek rakudo/nom: Per TimToady++'s comments [^1], the text now reads:
19:04 dalek rakudo/nom:
19:04 dalek rakudo/nom:     Cannot resolve caller foo(Int, :y(Int)); the following candidates
19:04 dalek rakudo/nom:     match the type but require mutable arguments:
19:04 dalek rakudo/nom:         ($x is rw, Int :$y! is rw)
19:04 dalek rakudo/nom:
19:04 dalek rakudo/nom:     The following do not match for other reasons:
19:04 dalek rakudo/nom:         ($x is rw, Str :$y! is rw)
19:04 dalek rakudo/nom:     in block <unit> at -e line 1
19:04 dalek rakudo/nom:
19:04 dalek rakudo/nom: [1] https://irclog.perlgeek.de/perl6/2016-10-03#i_13329939
19:23 * geekosaur barely manages to not respond to the latest ticket with "My brain hurts" >.>
19:24 hackedNODE The LEAVE ENTER one? :)
19:25 hackedNODE m: sub a { LEAVE say now - ENTER now; sleep 1 }; a
19:25 camelia rakudo-moar 01321c: OUTPUT«===SORRY!===␤Cannot reference undeclared local 'enter_result__1'␤»
19:25 hackedNODE hehe :)
19:25 hackedNODE m: sub a { LEAVE say now - INIT now; sleep 1 }; a
19:25 camelia rakudo-moar 01321c: OUTPUT«1.00182038␤»
19:28 psch j: sub a { LEAVE say now - ENTER now; sleep 1 }; a
19:28 camelia rakudo-jvm 2a1605: OUTPUT«===SORRY!===␤Cannot reference undeclared local 'enter_result__1'␤»
19:29 psch that's a QAST problem then it seems
19:37 psch m: { LEAVE { ENTER now; &?BLOCK.phasers('ENTER').say } }
19:37 camelia rakudo-moar 01321c: OUTPUT«({ ... })␤»
19:37 psch m: { LEAVE &?BLOCK.phasers('ENTER').say }
19:37 camelia rakudo-moar 01321c: OUTPUT«No such method 'phasers' for invocant of type 'Code'␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
19:38 psch so the statement form of LEAVE isn't a Block, but it's not looking for the ENTER phaser in the surrounding Block
19:43 psch m: { say ENTER now - ENTER now }
19:43 camelia rakudo-moar 01321c: OUTPUT«===SORRY!===␤Cannot reference undeclared local 'enter_result__1'␤»
19:46 geekosaur phasers like that eat the rest of the expression, so the seocnd ENTER is looking for the phasers belonging to the first ENTER
19:46 geekosaur is how I parse that
19:47 geekosaur (likewise the LEAVE ... ENTER)
19:47 psch geekosaur: but phasers only belong to Blocks, not statements
19:47 psch geekosaur: i mean, yeah, you're interpretation is congruent with mine and the data
19:47 psch it seems semantically wrong though
19:47 geekosaur right, it is syntactically a statement but *semantically* a block
19:48 geekosaur this is a convenience hack in the parser, more or less
19:48 psch hmm, so an awesome error message might be "phaser staments cannot have phasers" (with better phrasing, probably)
19:48 geekosaur so the parser is building a Block out of the statement, then tries to look up something in the Block it is building
19:49 geekosaur arguably it has put that incomplete Block somewhere it shouldn't have yet, and should start the search in the next outermost Block
19:49 psch m: { ENTER { now }; LEAVE { now - OUTER::<&?BLOCK>.phasers('ENTER')() } }
19:49 camelia rakudo-moar 01321c: OUTPUT«WARNINGS for <tmp>:␤Useless use of "-" in expression "now - OUTER::<&?BLOCK>.phasers('ENTER')()" in sink context (line 1)␤Cannot find method 'Nil' on object of type List␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
19:49 psch hm, &?BLOCK probably isn't reachable like that is it
19:50 geekosaur that is, it pushed the synthetic Block onto the stack of open Blocks, but it shouldn't actually be there yet
19:50 psch m: { my $a := &?BLOCK; ENTER { now }; LEAVE { now - OUTER::<$a>.phasers('ENTER')() } }
19:50 camelia rakudo-moar 01321c: OUTPUT«WARNINGS for <tmp>:␤Useless use of "-" in expression "now - OUTER::<$a>.phasers('ENTER')()" in sink context (line 1)␤Invocant requires a type object of type List, but an object instance was passed.  Did you forget a 'multi'?␤  in block  at <tmp> line…»
19:50 geekosaur so a search for phasers includes it and then fails because it's a synthetic/"fake" Block
19:51 psch well, a statement level phaser never *gets* a Block, it's only Code
19:51 psch m: { ENTER &?BLOCK.WHAT.say }
19:51 camelia rakudo-moar 01321c: OUTPUT«(Code)␤»
19:51 psch m: { ENTER { &?BLOCK.WHAT.say } }
19:51 camelia rakudo-moar 01321c: OUTPUT«(Block)␤»
19:52 geekosaur thoretically at least. the implementation sure acts like it's being a BLOCK
19:53 geekosaur I suspect it is synthesizing a Block and then merging it with the existing phasers, because something else becomes more convenient that way
19:53 geekosaur (maybe consistency between the stmt and block forms)
19:54 psch m: { ENTER { 1 }; LEAVE 1; say &?BLOCK.phasers('ENTER')[0].WHAT; &?BLOCK.phasers('LEAVE')[0].WHAT.say }
19:54 camelia rakudo-moar 01321c: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 1 in sink context (line 1)␤(Block)␤(Code)␤»
19:54 psch there is no Block for statement level phasers
19:54 geekosaur m: ENTER say &?BLOCK.^name
19:54 camelia rakudo-moar 01321c: OUTPUT«Code␤»
19:55 psch mind, if there was it still wouldn't help the bug, because we would look inside the statement level phaser for the ENTER phasers
19:55 psch -s
19:59 psch anyway, yeah, the question is whether statement level phasers should pretend to be actual statements or not
20:00 psch if they should we could have 'LEAVE now - ENTER now;' and have it return the amount of time inside the Block the statement sits in
20:00 psch but it's a weird inconsistency between statement level phasers and Block phasers
20:02 geekosaur there's also how you deal with the ambiguity of LEAVE x - y --- that is, is the scope of a stmt phaser as long as possible (actual stmt) or is it as short as possible (actually, an expr with some specific precedence)
20:03 psch right, yeah, that plays in there too
21:05 nine m: use NativeCall; class Args is repr("CUnion") { has Pointer $.arg; has CArray[Pointer] $.args; }; my Pointer $obj .= new; Args.new(:arg($obj));
21:05 camelia rakudo-moar 01321c: OUTPUT«Cannot modify an immutable NativeCall::Types::Pointer␤  in block <unit> at <tmp> line 1␤␤»
21:05 nine Is it me or is something b0rked there?
21:24 dalek roast: 0da0b99 | (Zoffix Znet)++ | S32-temporal/DateTime-Instant-Duration.t:
21:24 dalek roast: Remove trailing whitespace
21:24 dalek roast: review: https://github.com/perl6/roast/commit/0da0b99eb9
21:25 dalek roast: 85e3c0f | (Zoffix Znet)++ | S32-temporal/DateTime-Instant-Duration.t:
21:25 dalek roast: [coverage] Cover all subs and methods in Duration.pm
21:25 dalek roast: review: https://github.com/perl6/roast/commit/85e3c0f3fd
21:30 dalek roast: 5aa5497 | (Zoffix Znet)++ | S32-temporal/DateTime-Instant-Duration.t:
21:30 dalek roast: Fix too broad test
21:30 dalek roast:
21:30 dalek roast: It is only for infix:<->, but the code also uses infix:<+>
21:30 dalek roast: review: https://github.com/perl6/roast/commit/5aa549712c
21:31 Zoffix How to lead in number of commits made: make lots of mistakes; then fix them.
21:31 Zoffix /o\
21:31 nine Ok, I can get around that by adding setter methods that bind instead of assign. But even then I get strange breakage, possibly GC related.
21:32 nine Zoffix: been there, done that :)
21:32 nine Zoffix: next level: need to fix the fixes
21:32 Zoffix :)
21:36 lizmat Zoffix: I've also been there  :-)
21:37 Zoffix :D
21:40 dalek roast: feb0661 | (Zoffix Znet)++ | S12-enums/basic.t:
21:40 dalek roast: [coverage] Cover all routines in Enumeration.pm
21:40 dalek roast: review: https://github.com/perl6/roast/commit/feb0661ae8
21:46 Zoffix Wonder what .Numeric on eval exception is for https://github.com/rakudo/rakudo/blob/nom/src/core/Exception.pm#L111
21:46 Zoffix m:  ‘EVAL "{}"’.EVAL; CATCH { default { .Numeric.say } }
21:46 camelia rakudo-moar 01321c: OUTPUT«===SORRY!===␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏EVAL is a very dangerous function!!!' (indicated by ⏏)␤»
21:51 Zoffix .ask TimToady do you recall why you added a .Numeric to eval exception? In its default incantation it seems uncallable due to the payload being a string: https://github.com/rakudo/rakudo/blob/01321ca310e9b72b7ee3321dc0fc1c49910e15a2/src/core/Exception.pm#L111
21:51 yoleaux2 Zoffix: I'll pass your message to TimToady.
21:53 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2016/10/03/2016-40-pull-up-to-the-hacktoberfest/
21:57 lizmat good night, #perl6-dev!
21:59 Zoffix lizmat++ good weekly (and good night)
22:00 Zoffix psch++ fixing JVM to pass tests so we could unfudge travis on it \o.

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