MasterDuke .tell jnthn it's not just IO or run(), even "await (for ^7 { start { my $a = rand; say $a} })" segfaults. rt.perl.org/Ticket/Display.html?id=129781 00:22
yoleaux2 MasterDuke: I'll pass your message to jnthn.
MasterDuke .tell Zoffix it seems you never submitted a PR for RT #72820, but according to irclog.perlgeek.de/perl6/2016-07-06#i_12795893 you had a fix lined up 01:04
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=72820
yoleaux2 MasterDuke: I'll pass your message to Zoffix.
gfldex m: my $c = Channel.new; $c.send((1,2,3).Slip); dd $c.list 01:46
camelia rakudo-moar 3a6cd8: OUTPUT«(timeout)»
gfldex m: my $c = Channel.new; $c.send(|(1,2,3)); dd $c.list
camelia rakudo-moar 3a6cd8: OUTPUT«Too many positionals passed; expected 2 arguments but got 4␤ in block <unit> at <tmp> line 1␤␤»
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)␤»
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 irclog.perlgeek.de/perl6/2016-07-06#i_12795893 you had a fix lined up
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=72820
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)␤»
gfldex m: my $c = Channel.new; $c.send((1,2,3)); $c.close; put (1, $c.receive, 3).perl
camelia rakudo-moar 3a6cd8: OUTPUT«(1, (1, 2, 3), 3)␤»
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"␤»
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(':');
camelia rakudo-moar 3a6cd8: OUTPUT«"1:1 2 3:3"␤»
Zoffix What does nqp::p6bindattrinvres do? 02:45
(or stand for)
r: gist.github.com/zoffixznet/685bc54...33471b5cc1 04:07
camelia rakudo-jvm 2a1605: OUTPUT«===SORRY!===␤Method 'count' not found for invocant of class 'NQPMu'␤»
..rakudo-moar 3a6cd8: OUTPUT«===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
Zoffix :S
works fine locally 04:08
Ohh... it's 'cause I'm running with optimize off 04:10
optimizer bug \o/
m: ^4 .map: {}; 04:11
camelia rakudo-moar 3a6cd8: OUTPUT«===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
Zoffix m: sub foo ($) {}; ^4 .map: &foo;
camelia rakudo-moar 3a6cd8: OUTPUT«===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
Zoffix And I bet it's inlining it 04:13
m: sub foo ($) {say "meow"}; ^4 .map: &foo;
camelia rakudo-moar 3a6cd8: OUTPUT«===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
Zoffix m: sub foo ($) {say "meow"; my $i; $i++ }; ^4 .map: &foo;
camelia rakudo-moar 3a6cd8: OUTPUT«===SORRY!===␤Cannot find method 'count' on object of type NQPMu␤»
Zoffix maybe not :}
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␤␤»
Zoffix ".git/hooks/pre-commit: 4: .git/hooks/pre-commit: etckeeper: not found" 04:51
on www.p6c.org
(when attempting to git commit /etc/ changes
)
[Tux] This is Rakudo version 2016.09-108-g3a6cd8a built on MoarVM version 2016.09-15-gc8b4228 06:18
csv-ip5xs 3.413
test 17.138
test-t 7.693
csv-parser 19.511
nine [Tux]: is this with Inline::Perl5 v0.17? 06:22
[Tux] should I add that to the output?
what was the shortest way to show the version again? 06:23
nine perl6 -e 'say $*REPO.need(CompUnit::DependencySpecification.new(:short-name<Inline::Perl5>)).version' 06:27
[Tux] just found it in the logs. ETOOHARDTOREMEMBER 06:28
v0.17
nine ok, thanks!
[Tux] gist.github.com/Tux/a165ccf7398834...4855a6ea4c 07:16
nine nice 07:25
|Tux| nine, but it doesn't work as I wanted/expected :/ 10:01
dalek p: 5769a65 | usev6++ | src/vm/jvm/QAST/Compiler.nqp:
Fix handling of QAST::Want on JVM

The fix is to look only at those alternatives that have the selector for the context we are in (I|N|S|v).
I've mainly copied the code from src/vm/moar/QAST/QASTCompilerMAST.nqp (which works just fine).
10:15
p: 5960973 | lizmat++ | src/vm/jvm/QAST/Compiler.nqp:
Merge pull request #309 from usev6/jvm_qast_want

Fix handling of QAST::Want on JVM ab11625 | usev6++ | src/vm/jvm/QAST/Compiler.nqp: Add comment about imperfect handling of QAST::Want
compare irclog.perlgeek.de/perl6-dev/2016-...i_13327086
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. rt.perl.org/Ticket/Display.html?id=129781
jnthn But it seems to improve things, so... :-) 10:18
psch jnthn: irclog.perlgeek.de/perl6-dev/2016-...i_13325106 10:29
jnthn: basically, something else somewhere else is messed up and that's why we fall back to void context there
...i think :)
r: sub f { sub { say 1 } }()() # this one probably depends on the missing RT_OBJ check
camelia ( no output )
..rakudo-moar 3a6cd8: OUTPUT«1␤»
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
yeah, what psch said :-) 10:30
jnthn Hm, OK...probably worth hunting down what the other one is :)
bartolin maybe I should add a comment, that there's still something fishy?
psch has faith in bartolin++ :)
jnthn *nod*
lizmat also nods
jnthn That particular example psch posted is the kind of problem I'd expect to see as a result of such a bug
But if it's there even before you patch then there's likely a second similar problem elsewhere 10:31
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␤»
..rakudo-moar 3a6cd8: OUTPUT«False␤»
psch anyway, yeah, in general it seems we could've benefited from a bit more unification between the QAST to * Compilers
but that's hard because of semantic differences in the backends
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
github.com/usev6/nqp/blob/master/s...r.nqp#L648 and github.com/usev6/nqp/blob/master/s....nqp#L1522
pmurias: ^^ maybe of interest for you
jnthn If there are such commonalities across the bunch, they could be pulled out into roles 10:39
psch nqp doesn't do role stubs, does it? 10:44
as in, die-when-not-implemented-in-does'ing-class 10:45
nqp-m: role Foo { method bar { ... } }; class Baz does Foo { }
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…»
psch nqp-m: role Foo { method() bar { ... } }; class Baz does Foo { }
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-…»
psch ah, doesn't do stubs at all
jnthn psch: No
Zoffix lizmat, if there's space in the Weekly, we have a bunch of Issues tagged for Hacktoberfest github.com/issues?utf8=%E2%9C%93&a...ktoberfest 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 hacktoberfest.digitalocean.com/ 10:50
lizmat Zoffix: was planning of making Hacktoberfest the main article: thanks for the links 10:51
Zoffix \o/
jnthn A free shirt, not a free beer? Aww! :) 10:57
gfldex is there an official way to check if a program runs multithreaded? This %*ENV<RAKUDO_MAX_THREADS> hackery is a bit eyesoreing. 11:02
masak .oO( free as in shirt ) 11:04
jnthn gfldex: Not as of yet, now 11:05
*no
Ideally in the future we'll provide some way to get a list of all running threads
If you don't need something platform-agnostic, a look inside of /proc/ can probably tell you 11:06
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
But it doesn't have any impact on Thread.new or if you make your own scheduler with more threads than that
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.
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
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
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
jnthn lunch, bbiab & 11:11
gfldex with the value ending up in $*MAX-WORKER-THREADS and defaulting to %*ENV<RAKUDO_MAX_THREADS> 11:12
nine I can hardly see enough users for that kind of functionality to warrant a command line switch 11:13
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:16
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
s/Slip/Slip work/
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)␤»
gfldex that feels wrong too
m: my \l = gather for 1..10 -> $a, $b { take |($a, $b) }; dd l;
camelia rakudo-moar 3a6cd8: OUTPUT«((1, 2), (3, 4), (5, 6), (7, 8), (9, 10)).Seq␤»
psch &take implicitly returns a Scalar, via nqp::p6recont_ro 11:28
not sure that quite fits for the case where it's already ro, though 11:29
m: use nqp; say nqp::iscont(|(1, 2))
camelia rakudo-moar 3a6cd8: OUTPUT«This representation (VMArray) cannot unbox to a native int (for type BOOTArray)␤ in block <unit> at <tmp> line 1␤␤»
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. 11:46
roast seams not to test take with slip, .Slip or |(1,2,3) 12:02
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␤»
gfldex shouldn't |(1,2,3) and (1,2,3).Slip act the same? 12:04
jnthn Remember that take is a sub call 12:05
So the | there is an argument-passing flattening, not a Slip construction 12:06
gfldex that makes sense then
jnthn But still that'd mean passing three things to take
gfldex m: my $c = Channel.new; $c.send((1,2,3).Slip); $c.close; dd (1,$c.receive,2).join(':')
camelia rakudo-moar 3a6cd8: OUTPUT«"1:1:2:3:2"␤»
gfldex m: my $c = Channel.new; $c.send((1,2,3).Slip); $c.close; dd (1,$c.list,2).join(':')
camelia rakudo-moar 3a6cd8: OUTPUT«"1:1 2 3:2"␤»
gfldex i did not expect the Slip vanish in .list 12:07
so this is either rakudobug or ENODOC
lizmat Slips should almost always disappear
and it looks like they're not in this case ? 12:09
psch $c.list is a List that doesn't slip, isn't it 12:10
i mean, the .receive call slipped
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
lizmat well, .list is supposed to return something listy 12:11
(which could be an Array, fwiw)
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:12
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
jnthn Whereas if you handled it send side, then another sender could sneak values into the middle :)
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
m: dd (1,((1,2,3),),4)
camelia rakudo-moar 3a6cd8: OUTPUT«(1, ((1, 2, 3),), 4)␤»
lizmat m: dd (1,(1,2,3),4)
camelia rakudo-moar 3a6cd8: OUTPUT«(1, (1, 2, 3), 4)␤»
lizmat m: dd (1,((1,2,3),),4).join(":") 12:15
camelia rakudo-moar 3a6cd8: OUTPUT«"1:1 2 3:4"␤»
lizmat m: dd (1,(1,2,3),4).join":"
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…»
lizmat m: dd (1,(1,2,3),4).join(":")
camelia rakudo-moar 3a6cd8: OUTPUT«"1:1 2 3:4"␤»
jnthn Those look correct?
lizmat ah, maybe it's in the stringification of the List ?
jnthn Yeah, think so 12:16
lizmat m: say (1,2,3).Str
jnthn .join shouldn't flatten
camelia rakudo-moar 3a6cd8: OUTPUT«1 2 3␤»
yoleaux2 jnthn: Sorry, this command is admin-only.
lizmat m: say ((1,2,3),).Str
camelia rakudo-moar 3a6cd8: OUTPUT«1 2 3␤»
lizmat yup
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:17
that's either wrong or a ENODOC 12:18
jnthn I'd expect .send to return Nil, not the channel itself 12:19
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
Except in a handful of places where it makes sense (like .then on Promise) 12:23
(And even that isn't the good way to do things)
dalek ast: 33bc0ad | (Zoffix Znet)++ | S32-temporal/DateTime.t:
[coverage] Cover all methods and subs in DateTime
12:55
ast: 3ca7452 | (Zoffix Znet)++ | S32-temporal/DateTime.t:
Fix small error in test description
12:56
ast: 338460c | (Zoffix Znet)++ | S32-temporal/Date.t:
Comment in commented out (for some reason) test
13:01
hackedNODE m: DateTime.is-leap-year(2016).say 13:05
camelia rakudo-moar 3a6cd8: OUTPUT«True␤»
hackedNODE I really want to toss that.
It feels like a sub tacked onto an OO interface. 13:06
(and it's not in roast)
m: Date.new(:2016year).is-leap-year.say
camelia rakudo-moar 3a6cd8: OUTPUT«True␤»
hackedNODE That's a perfectly good way to test if a year is a leap year
m: Date.new(:2013year).is-leap-year(2016).say # and this is gross 13:07
camelia rakudo-moar 3a6cd8: OUTPUT«True␤»
lizmat hackedNODE: agree 13:16
I guess it's good there are no tests for it :-)
[Coke] t/04-nativecall/16-rt125408.t is failing for me on OS X at rakudo@ed0ced2 13:59
hackedNODE [Coke]: try with HEAD. I believe that issue was already fixed by c4a8855 and 46e0ede 14:13
nine join doesn't seem to be any faster than [~] (which is good I guess) 14:22
lizmat hmmm... I find that strange, unless we optimize specifically for [~] 14:27
nine lizmat: Could also just be that [~] is not slow enough to actually matter. 14:28
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
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
lizmat I mean, if we would a SHA of a count of files / filenames / last modified
wouldn't that be just as good but a *lot* faster ? 14:31
nine 2 second time stamp resolution
timotimo only sha1ing file contents doesn't catch renames 14:32
actually, what if the OS gives us the same files in a different order just because it can?
nine Good point.
lizmat nine: maybe we need to be smarter?
I mean, if the number of files is different from before, we have a fail. no? 14:33
no need to be SHAing then at all
also: I'm not sure the 2 second time stamp resolution is a big issue
I mean, one would need to be a very fast typer *and* do it inside the exact 2 second window 14:34
to not recognize a change
nine timotimo: we can always sort the dir() result
timotimo right
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:39
dalek kudo/nom: 6aab641 | (Zoffix Znet)++ | src/core/Dateish.pm:
Remove sub-like method candidates in Dateish

Remove argument-taking candidates for is-leap-year, days-in-month, and day-of-week because they muddy the OO interface, by behaving like tacked on subs, rather than methods relevant to the object. E.g.:
   Date.new(:2013year).is-leap-year(2016).say; # gives True
The functionality provided by all of these methods is still retained by the candidates that operate on the Dateish object itself, using the values of its attributes. Both 6.c-errata and current master[^1] roast stresstests pass with this change.
6c07321 | (Zoffix Znet)++ | src/core/Dateish.pm: Fix unusable Dateish.IO
Stringify Dateish before constructing IO::Path, so we don't get NoMulti throwage, and restrict the method to only :D Dateishes, so we do not attempt to stringify undefined things.
Fixes RT#129799: rt.perl.org/Ticket/Display.html?id=129799
14:40
nine I'd also be totally supportive of anyone wanting to give it a try.
hackedNODE github.com/rakudo/rakudo/commit/6a...0a989b6edd
lizmat nine: where does that code live? 14:41
nine lizmat: method id in CompUnit::Repository::FileSystem 14:42
lizmat nine: ok, will try some things :-)
nine lizmat: remember to have fun :)
lizmat hehe... now translating perl6intro to Dutch, at 96% wil look at it after I reach 100% :-) 14:43
[Coke] hackedNODE: whoops, thought I had updated before I tested; thanks, all fine. 14:47
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129799
dalek ast: a7fe6b6 | (Zoffix Znet)++ | S32-temporal/Date.t:
[coverage] Cover Dateish.IO

Also covers RT#129799: rt.perl.org/Ticket/Display.html?id=129799
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129799
hackedNODE Another bug discovered by coverage reports :) 14:57
timotimo++
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
nine But it seems like jvm still needs that modification, too. StackOverflow suggests that FileChannel.open will happily open() a directory, too. 15:09
lizmat afk& 15:30
travis-ci Rakudo build passed. Zoffix Znet 'Remove sub-like method candidates in Dateish 15:35
travis-ci.org/rakudo/rakudo/builds/164651146 github.com/rakudo/rakudo/compare/3...ab64103f1c
Rakudo build passed. Zoffix Znet 'Fix unusable Dateish.IO 16:16
travis-ci.org/rakudo/rakudo/builds/164655434 github.com/rakudo/rakudo/compare/6...0732146a27
dalek kudo/nom: 1e6c465 | (Zoffix Znet)++ | src/core/Exception.pm:
Awesomify X::Multi::NoMatch

It's not clear from the list of candidates when the only reason for NoMatch is lack of rw containers for given arguments.
Detect any candidates that would match the capture with all of its arguments in writable containers and list those candidates separately, indicating that writable container may be missing.
  timotimo++ for helping
18:02
timotimo yay 18:12
hackedNODE AND I spotted how to fix the bug I was complaining about a few days ago 18:16
timotimo oh? 18:17
hackedNODE m: class Z { multi method meow {} }.meow: 42, :foo(Str)
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␤␤»
hackedNODE ^ see how it claims I called it with two positionals and not pos + named
perlpilot how does one trigger the new message? 18:20
hackedNODE m: 42++
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)␤ …»
perlpilot ah
timotimo ah 18:22
hackedNODE aaahhh
:)
dalek kudo/nom: f4bda35 | (Zoffix Znet)++ | src/core/Exception.pm:
Fix X::Multi::NoMatch incorreclty showing named args as positionals

The interpolation error in the string does not show up due to the `try` before it and the fallback is missing the `:` as well.
Fixes RT#129800: rt.perl.org/Ticket/Display.html?id=129800
18:40
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129800
ast: 000b930 | (Zoffix Znet)++ | integration/error-reporting.t:
X::Multi::NoMatch correctly shows named arguments

RT#129800: rt.perl.org/Ticket/Display.html?id=129800
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129800
[Coke] t/spec/S32-temporal/Date.t is dying for me. 18:44
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
[Coke] That was step 2, aye. 18:46
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:48
s/dying/failing/; 18:50
dalek rakudo/nom: 01321ca | (Zoffix Znet)++ | src/core/Exception.pm: 19:04
rakudo/nom: Amend text of X::Multi::NoMatch
rakudo/nom:
rakudo/nom: Per TimToady++'s comments [^1], the text now reads:
rakudo/nom:
rakudo/nom: Cannot resolve caller foo(Int, :y(Int)); the following candidates
rakudo/nom: match the type but require mutable arguments:
rakudo/nom: ($x is rw, Int :$y! is rw)
rakudo/nom:
rakudo/nom: The following do not match for other reasons:
rakudo/nom: ($x is rw, Str :$y! is rw)
rakudo/nom: in block <unit> at -e line 1
rakudo/nom:
rakudo/nom: [1] irclog.perlgeek.de/perl6/2016-10-03#i_13329939
geekosaur barely manages to not respond to the latest ticket with "My brain hurts" >.> 19:23
hackedNODE The LEAVE ENTER one? :) 19:24
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'␤»
hackedNODE hehe :)
m: sub a { LEAVE say now - INIT now; sleep 1 }; a
camelia rakudo-moar 01321c: OUTPUT«1.00182038␤»
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'␤»
psch that's a QAST problem then it seems 19:29
m: { LEAVE { ENTER now; &?BLOCK.phasers('ENTER').say } } 19:37
camelia rakudo-moar 01321c: OUTPUT«({ ... })␤»
psch m: { LEAVE &?BLOCK.phasers('ENTER').say }
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␤␤»
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:38
m: { say ENTER now - ENTER now } 19:43
camelia rakudo-moar 01321c: OUTPUT«===SORRY!===␤Cannot reference undeclared local 'enter_result__1'␤»
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
is how I parse that
(likewise the LEAVE ... ENTER) 19:47
psch geekosaur: but phasers only belong to Blocks, not statements
geekosaur: i mean, yeah, you're interpretation is congruent with mine and the data
it seems semantically wrong though
geekosaur right, it is syntactically a statement but *semantically* a block
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)
geekosaur so the parser is building a Block out of the statement, then tries to look up something in the Block it is building
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')() } }
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␤␤»
psch hm, &?BLOCK probably isn't reachable like that is it
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')() } }
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…»
geekosaur so a search for phasers includes it and then fails because it's a synthetic/"fake" Block
psch well, a statement level phaser never *gets* a Block, it's only Code 19:51
m: { ENTER &?BLOCK.WHAT.say }
camelia rakudo-moar 01321c: OUTPUT«(Code)␤»
psch m: { ENTER { &?BLOCK.WHAT.say } }
camelia rakudo-moar 01321c: OUTPUT«(Block)␤»
geekosaur thoretically at least. the implementation sure acts like it's being a BLOCK 19:52
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
(maybe consistency between the stmt and block forms)
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)␤»
psch there is no Block for statement level phasers
geekosaur m: ENTER say &?BLOCK.^name
camelia rakudo-moar 01321c: OUTPUT«Code␤»
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
-s
anyway, yeah, the question is whether statement level phasers should pretend to be actual statements or not 19:59
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
but it's a weird inconsistency between statement level phasers and Block phasers
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:02
psch right, yeah, that plays in there too 20:03
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␤␤»
nine Is it me or is something b0rked there?
dalek ast: 0da0b99 | (Zoffix Znet)++ | S32-temporal/DateTime-Instant-Duration.t:
Remove trailing whitespace
21:24
ast: 85e3c0f | (Zoffix Znet)++ | S32-temporal/DateTime-Instant-Duration.t:
[coverage] Cover all subs and methods in Duration.pm
21:25
ast: 5aa5497 | (Zoffix Znet)++ | S32-temporal/DateTime-Instant-Duration.t:
Fix too broad test

It is only for infix:<->, but the code also uses infix:<+>
21:30
Zoffix How to lead in number of commits made: make lots of mistakes; then fix them. 21:31
/o\
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.
Zoffix: been there, done that :) 21:32
Zoffix: next level: need to fix the fixes
Zoffix :)
lizmat Zoffix: I've also been there :-) 21:36
Zoffix :D 21:37
dalek ast: feb0661 | (Zoffix Znet)++ | S12-enums/basic.t:
[coverage] Cover all routines in Enumeration.pm
21:40
Zoffix Wonder what .Numeric on eval exception is for github.com/rakudo/rakudo/blob/nom/...on.pm#L111 21:46
m: ‘EVAL "{}"’.EVAL; CATCH { default { .Numeric.say } }
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 ⏏)␤»
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: github.com/rakudo/rakudo/blob/0132...on.pm#L111 21:51
yoleaux2 Zoffix: I'll pass your message to TimToady.
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2016/10/03/...toberfest/ 21:53
good night, #perl6-dev! 21:57
Zoffix lizmat++ good weekly (and good night) 21:59
psch++ fixing JVM to pass tests so we could unfudge travis on it \o. 22:00