AlexDaniel *ables are going to be down for a bit more than a day 04:30
dalek ast: a18c569 | usev6++ | S0 (2 files):
Fudge newly added tests for JVM
05:51
[Tux] This is Rakudo version 2016.09-68-g447d592 built on MoarVM version 2016.09-1-gdebb859 07:04
csv-ip5xs 9.159
test 15.604
test-t 7.675
csv-parser 17.334
nine_ [Tux]: I don't get this. Inline::Perl5 becomes faster and faster but it doesn't show at all in your benchmarks :/ 07:11
[Tux]: csv-ip5xs used to do 700K native calls. That's now down to ~ 100K. It cannot take the same time for 1/7 of the work. 07:12
This is what I do: for i in $(seq 1 10000); do echo 'hello,","," ",world,"!"'; done > /tmp/hello.csv 07:13
time perl6 -I/home/nine/Inline-Perl5/lib csv-ip5xs.pl < /tmp/hello.csv
[Tux] I'll have a look later. must run now 07:16
nine_ ok, thanks!
psch hrm, t/04-nativecall/16-rt125408.t /o\ 07:20
nine_ Btw. compiling moar without optimization and with debug info, it takes 7.491s here while an optimized moar runs it in 4.267s 07:21
lizmat Files=1142, Tests=53134, 227 wallclock secs (12.91 usr 3.79 sys + 1393.44 cusr 131.57 csys = 1541.71 CPU) 07:28
psch okay, how does a C struct without any fields actually work? 07:36
i mean, in C
*does* it actually work or is moar cheating in some horrible way?
stackoverflow.com/questions/755305/ says empty structs aren't valid C 07:40
well, aren't valid C99 at least
buut gcc doesn't care, even with -std=c99 07:42
well, it does with -pedantic-errors at least 07:43
nine_ Is the struct actually empty there or does it contain a function pointer? Haven't dealt with structs in NativeCall at all, so I really got no idea. 07:48
psch nine_: i honestly have no idea. the test declares a class with repr('CStruct') which has a method
arnsholt Oh, in that case, I think NativeCall will allocate 1 byte
Because malloc(0) is undefined behaviour 07:49
psch arnsholt++ right, i see that in CStruct.c; "MVMint32 info_alloc = num_attrs == 0 ? 1 : num_attrs;"
thing is, i can't malloc in java 07:50
so do i just stuff a byte in just because and... what?
arnsholt Oh, not sure what you should do on NativeCall/JVM
psch hm, it at least shouldn't leak if we don't add a Perl 6 accessor i suppose
"leak" as in "get exposed to the user" 07:51
arnsholt Maybe just create an instance with a secret byte member
Or maybe no members at all. Does JNA complain if there are no data members?
psch yeah, it dies with an IllegalArgumentException in Structure.deriveLayout 07:52
arnsholt Yeah, in that case just stuff in a byte
Or maybe we actually should throw an exception on those structs too, as they don't actually make any sense in C 07:56
psch well, yeah, that's what i'm thinking 07:57
i mean, the jvm case probably shouldn't leak a JNA exception
arnsholt Yeah, definitely
psch but from what i can see C99 says empty structs aren't okay
granted, gcc only complains with -pedantic-errors, so idk how that usually looks in practice 07:58
arnsholt That RT#125408 test is super-weird too
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=125408
psch honestly, i didn't even understand the ticket
arnsholt I mean, why is there a struct class there at all
Yeah, from the commit they referenced that fixed it, it wasn't a NativeCall problem really 07:59
It just happened to show up there
psch the tickets progress just seems weird to me
i mean, it starts with a CArray
and somehow the test references a CStruct 08:00
and i don't get how it came to that
arnsholt Me neither
Do you happen to know if Jonathan Stowe is on IRC?
psch that's RabidGravy iirc?
RabidGravy it is 08:01
arnsholt Ah, excellent
Do you remember why there's a CStruct class in that test file? (t/04-nativecall/16-rt125408.t)
RabidGravy or it was the last time I checked
arnsholt Good enough for me! =D
RabidGravy let me look, I can't even remember the test 08:02
arnsholt Sure, no rush
RabidGravy right, I think it's because that was exactly the circumstance that the bug was triggered in the code I found it, I may not have checked whether it did it without 08:06
psch well, the issue is that an empty struct isn't really valid C in the first place
so, in moar we work around that by explicitly malloc-ing a 1byte struct without any fields 08:07
(which, honestly, sounds kind of terribly hacky too)
arnsholt Yeah
ISTR the patch being because otherwise it segfaults (or something similar) 08:08
But you're entirely right, it should cause an exception, no accept it
RabidGravy Oh I see 08:13
the CStruct having no members is not part of the bug 08:15
arnsholt Yeah, can't see how it participates 08:16
Just having it as a sub should work fine
RabidGravy Or just losing the 'CStruct' to be honest 08:19
the bug, if I remember correctly, that the optimiser was being over-zealous in that circumstances 08:22
psch right, the ticket looks like that 08:23
i mean, the title especially :)
one upside is we get a new test, that currently moar fails and jvm (kinda-sorta) passes :P 08:25
right, so i'll toss the "is repr" bit from rt125408.t, dieInternal on jvm when we have a size 0 struct, and add a test for that 08:35
arnsholt +1 08:40
It should be a pretty straightforward patch on Moar as well
Where we currently allocate one byte, you can MVM_exception_throw_adhoc(tc, "Zero-byte struct!") 08:41
psch well, we kind want a handler for a typed exception don't we 08:45
and i know how to do that on jvm, but really not on moar... :)
+of 08:46
RabidGravy yeah, it's almost certainly a mistake to have a CStruct with no data members 08:47
there is of course CPointer for the case of "opague pointer"
arnsholt Yup 08:48
psch: I have no idea how to do that on *either* platform =)
psch right, so i might still open a PR for moar that throws the adhoc 08:49
i'm *so* over that whole PR process though since i got my commit bit for perl6/nqp and rakudo/rakudo :P 08:50
hm, actually the Exception probably should be NativeCall specific 08:58
which makes installing a handler a bit more iffy
as in, i'm not sure how we do that only if we *might* have that specific exception...
so, yeah, adhoc on both platforms it is vOv 09:01
nine_ psch: I'm not sure that one can throw typed exceptions on moar. All I've ever seen was adhoc 09:03
psch nine_: well, MVM_exception_throwobj exists 09:06
jnthn There is a way to do it
psch nine_: that's quite a bit different from how i think we do it on jvm, though. there we invoke a rakudo-level closure that throws the exception
jnthn grep for method_not_found_error in the MoarVM source 09:07
psch: same on Moar :)
psch jnthn: oh, okay :)
jnthn 'cus the VM doesn't know about Perl 6's exception classes or how to construct them
psch right, MVM_exception_throwobj seems to be mostly involved with rethrow 09:08
jnthn Yeah, and the obj in question must be an MVMException REPR, so it's still not what you want
psch ah, okay
nine_ Ah, so it's possible but much more work than just an adhoc exception. No wonder it's used so sparingly :)
psch jnthn: so installing the handler for a NC-specific exception that should be thrown from the backend is via getcurhllsym('P6EX') in NC, right? 09:09
nine_ Ironically it seems like method_not_found_error throws an adhoc exception most of the time...
jnthn nine_: Hm, curious... 09:10
nine_ It's nqp::die("Method '$name' not found for invocant of class '$type'"); except if $name eq 'STORE'
psch (plus bindkey and the sub and all...)
jnthn psch: You also have to make a registration in BOOTSTRAP.nqp where we do the hll configure call
nine_ github.com/rakudo/rakudo/blob/nom/....nqp#L3206 09:11
psch jnthn: oh, like for lexical_handler_not_found_error? 09:12
jnthn yes 09:18
nine_: heh, wow. There's some LHF... 09:19
psch hm, do core modules install Exception into X::? 09:36
or -- in this case -- NativeCall::X::..? 09:37
nine_ jnthn: especially, since X::Method::NotFound is already set up for being generated that way :) Will try 09:39
Zoffix .tell AlexDaniel Nope. I was sleeping. RE: '<AlexDaniel> were you doing anything weird with committable/bisectable? :)' 10:01
.tell AlexDaniel Nope. I was sleeping. RE: '<AlexDaniel> were you doing anything weird with committable/bisectable? :)' 10:02
yoleaux2 Zoffix: I'll pass your message to AlexDaniel.
nine_ jnthn: I added proper typing but fail to come up with a case that actually demonstrates throwing an adhoc there 10:50
jnthn: oh boy! It's because of this piece of beauty: github.com/rakudo/rakudo/blob/nom/...on.pm#L280 10:51
First I worried that throwing a typed exception will slow things down (as this particular code seems to be hit by some .? or try prefixes for example). But if we can get rid of the regex that way, it can only become faster :) 11:01
dalek kudo/nom: 222d16b | niner++ | src/ (2 files):
Actually throw a typed "method not found" exception from the VM

We used to throw an AdHoc exception and parse the message to upgrade it to a typed exception. The need for that is not obvious and the spectest passes just fine if we throw the proper exception type in the first place.
11:18
nine_ psch: now that I've pushed, I wonder if this ^^^ has any negative side effects on JVM? 11:19
DrForr nine - opensource.com/life/16/9/perl-6-features - You'll notice I pimped Inline:: :)
(it's also the most popular on the site at the moment, I'm amazed.)
psch nine_: i'm not sure at a glance. you'd have to check in the Binder (or, well, build and run :)) 11:20
nine_: ah, actually we throw that from Ops apparently 11:21
nine_ DrForr: indeed I have noticed :) Boosts motivation :)
psch nine_: so, yeah, with the removal of the regex we're probably leaking VMException on r-j 11:22
or rather AdHoc'ing it again
DrForr Well, you *did* say you wanted more exposure :) And I want it so we can talk more about sidegrade paths :) 11:28
nine_ Is there any reason to have the method_not_found_error moar-only in BOOTSTRAP?
Looks to me like it could be used just as well for JVM 11:29
jnthn nine_: The thing to handle it just isn't implemented on JVM yet, is all 11:30
yoleaux2 25 Sep 2016 17:26Z <FROGGS> jnthn: that patch to not set ->process again looks totally valid
jnthn FROGGS++ # thanks!
bartolin psch: maybe you could take a look at RT #122732 on occasion? I tried something with regard to the error 'control operator crossed continuation barrier' on JVM 11:43
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122732
psch bartolin: did you run nqp 'make test' with your changes? 11:56
bartolin: 'cause if that also passes i'd say just PR your changes in the ticket and we'll run with it until something breaks, honestly
bartolin psch: I *think*, I've done that as well. I'll check later today and make a PR. 12:00
thanks for looking!
hackedNODE pokes dalek 13:18
thing's ded
dalek ast: 2e1428a | (Zoffix Znet)++ | S32-num/complex.t:
[coverage] Cover all nudity in Complex.pm
13:19
DrForr Patience, young padawan. 13:21
hackedNODE :D
timotimo hackedNODE: did you see my message about the timing of parse-coverage-report? 13:59
hackedNODE timotimo: yeah. Not bad. I'm also gonna try grepping annottaions before running the script and removing the check in the script entirely too 14:01
timotimo yeah, that'll be another noticable boost, i'd expect 14:05
hackedNODE
.oO( Why did LemonMan close all those PRs ... )
14:26
[ for records, if we need to dig them out: nqp/#304, and rakudo #870 #866 #865 and #864 ] 14:31
timotimo .o( to get to the other side! ) 14:47
hackedNODE m: \('a', 'Z', :ii, :global).say 14:58
camelia rakudo-moar 222d16: OUTPUT«\("a", "Z", :global, :ii)␤»
hackedNODE m: \('a', 'Z', :ii, :global).Str.say
camelia rakudo-moar 222d16: OUTPUT«a Z global True ii True␤»
hackedNODE .Str looks like crap :/
timotimo pairs put a tab between key and value, iirc 15:00
hackedNODE ahh 15:01
timotimo m: say (:foo).Str.perl
camelia rakudo-moar 222d16: OUTPUT«"foo\tTrue"␤»
hackedNODE oh boy... in my tests that Cool.subst-mutate works same as Str.subst-mutate: "Looks like you failed 31 tests of 60" 15:06
How many of them are real bugs? Taking all bets! :)
timotimo at least three
hackedNODE m: say ($ = "").subst-mutate('', '').^name.perl 15:13
camelia rakudo-moar 222d16: OUTPUT«"Match"␤»
hackedNODE m: say ($ = "").subst-mutate('', '', :g).^name.perl
camelia rakudo-moar 222d16: OUTPUT«"List"␤»
hackedNODE Well, a lot of those are simply my tripping up on that ^, I think :)
AlexDaniel: no, didn't do nothing with *ables
AlexDaniel hackedNODE: yeah, I think we figured it out 15:14
yoleaux2 10:02Z <Zoffix> AlexDaniel: Nope. I was sleeping. RE: '<AlexDaniel> were you doing anything weird with committable/bisectable? :)'
AlexDaniel hackedNODE: basically, whateverables committed mass seppuku right in front of my eyes, so I was trying to figure out what happened exactly 15:17
hackedNODE: the issue seems to be with the build script (instead of removing temp folders it decided to remove everything in the current folder, DOH) 15:18
timotimo wow, oops
hackedNODE wow
AlexDaniel I am not sure yet, but it feels like it is not my error 15:19
this script is building stuff in parallel, so I am seeing various weird errors from rakudo 15:20
it got much better since proc :out → :in issue was fixed (no segfaults anymore), but something is still wrong
what I did not expect though is that it may possibly cause THAT 15:21
but yeah, I managed to reproduce it yesterday, so we will see
[Coke] can't build r-j atm. 15:23
java.lang.RuntimeException: Missing or wrong version of dependency 'gen/jvm/stage2/QRegex.nqp'
(just did a make clean...)
me tries a git clean -xdf, it's been a while.
timotimo [Coke]: did you also re-build nqp? 15:24
perhaps running Configure.pl again is necessary, too? who knows ... :)
nine I've also found rm blib/Perl6/* helpful 15:25
[Coke] timotimo: yes, rebuilt nqp using configure.pl 15:26
timotimo oh, OK 15:27
[Coke] Note: src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java uses unchecked or unsafe operations. 15:31
hackedNODE m: /<[bb\x[308]]>/ 15:37
camelia rakudo-moar 222d16: OUTPUT«Potential difficulties:␤ Repeated character (b) unexpectedly found in character class␤ at <tmp>:1␤ ------> /<[bb\x[308⏏]]>/␤»
hackedNODE m: /<[b\x[308]ab]>/
camelia rakudo-moar 222d16: OUTPUT«Potential difficulties:␤ Repeated character (b) unexpectedly found in character class␤ at <tmp>:1␤ ------> /<[b\x[308⏏]ab]>/␤»
hackedNODE m: /<[b]+[b\x[308]]>/
camelia ( no output )
hackedNODE timotimo: you've lost the bet :) All the bugs were in my test suite 15:38
timotimo oh! snap.
well, i'm glad :)
dalek ast: 1a00e5e | (Zoffix Znet)++ | S05-substitution/subst.t:
[coverage] Cover Cool.subst-mutate
15:39
hackedNODE Aha. I forgot to cover the :x adverb and it looks like there are two bugs in it. 15:49
m: my $s = "1234567"; dd $s.subst-mutate(/\d/, '', :5x).Str; dd $s 15:50
camelia rakudo-moar 222d16: OUTPUT«"1"␤Str $s = "67"␤»
hackedNODE should be a list of 1, 2, 3, 4, 5 match objects
m: dd "1234567".subst: /\d/, '', :x{5;} 15:51
camelia rakudo-moar 222d16: OUTPUT«"1234567"␤»
hackedNODE either a doc bug (that claims :x can take a Callable like all the other :nth) or an LTA error 15:52
hackedNODE & lunch
m: dd "1234567".subst: /\d/, '', :x{say 'your mother'; 5;} 16:02
camelia rakudo-moar 222d16: OUTPUT«"1234567"␤»
hackedNODE m: dd "1234567".subst: /\d/, '', :th(1|3|4) 16:03
camelia rakudo-moar 222d16: OUTPUT«This type cannot unbox to a native integer: P6opaque, Junction␤ in block <unit> at <tmp> line 1␤␤»
[Coke] 's r-j is working, forgot how slow this is. :) 16:10
(running a stresstest) 16:11
timotimo oof, yeah 16:17
do the stresstests use the eval server?
hackedNODE m: say "foo".match: /\w/, :x{5} 16:22
camelia rakudo-moar 222d16: OUTPUT«in Str.match, got invalid value of type Block for :x, must be Int or Range␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE m: say "foo".subst: /\w/, '', :x{5}
camelia rakudo-moar 222d16: OUTPUT«foo␤»
hackedNODE I don't get it. .subst just passes the options to .match; how come no throwage happens? github.com/rakudo/rakudo/blob/222d...tr.pm#L603
Same for other args seems 16:23
m: say "foo".subst: /\w/, '', :nth(1.5)
camelia rakudo-moar 222d16: OUTPUT«foo␤»
hackedNODE m: say "foo".match: /\w/, :nth(1.5) 16:25
camelia rakudo-moar 222d16: OUTPUT«False␤»
hackedNODE well, maybe not that one, but the $x .... wtf
raiph m: gist.github.com/raiph/d2160ce895d8...192e742774 16:29
camelia rakudo-moar 222d16: OUTPUT«Numeric $var = 42 (Int)␤»
raiph m: my Numeric $var = 42; dd $var 16:30
camelia rakudo-moar 222d16: OUTPUT«Int $var = 42␤»
hackedNODE Ahhh
raiph ^^ Do #perl6-dev folk agree that the above gist version is an improvement for `dd`? 16:31
hackedNODE You get a bunch of Failures in @matches that's why
m: my Numeric @var = ^10; dd @var 16:33
camelia rakudo-moar 222d16: OUTPUT«Array[Numeric] @var = Array[Numeric].new(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)␤»
hackedNODE m: gist.github.com/zoffixznet/7ae7a25...64319078c6
m: " 16:35
SourceBaby: help
.oO( Robotocide )
16:36
m: say "test" 16:37
camelia rakudo-moar 222d16: OUTPUT«Numeric @var = Array[Numeric].new(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) (Array[Numeric])␤»
SourceBaby hackedNODE, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See modules.perl6.org/dist/CoreHackers::Sourcery
hackedNODE m: my Numeric $x = 41; my Numeric $y = 42; my Numeric $z = 43; my Numeric $w = 44; dd [ $x, $y, $z, $w ];
m: gist.github.com/zoffixznet/82e9c75...11f03590d9 16:38
m: gist.github.com/zoffixznet/7ab24d3...888f48bd5e 16:41
bah. turbulence.
OLD: Hash % = {:bar($[41, 42, 43, 44]), :foo($[41, 42, 43, 44])} 16:42
NEW: Mu % = {:bar($[41, 42, 43, 44]), :foo($[41, 42, 43, 44])} (Hash)
camelia rakudo-moar 222d16: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> "⏏<EOL>␤ expecting any of:␤ double quotes␤ term␤»
rakudo-moar 222d16: OUTPUT«test␤» 16:43
hackedNODE raiph: overall yeah. Though I find that ^ to be a de-provement 16:44
[the fact that (Hash) bit is all the way at the end, making go "wat"] 16:45
m: gist.github.com/zoffixznet/9b02fb4...c910aa7b96 16:46
camelia rakudo-moar 222d16: OUTPUT«[41, 42, 43, 44]␤» 16:47
rakudo-moar 222d16: OUTPUT«Nil[41, 42, 43, 44] (Array)␤»
rakudo-moar 222d16: OUTPUT«OLD: Hash % = {:bar($[41, 42, 43, 44]), :foo($[41, 42, 43, 44])}␤NEW: Mu % = {:bar($[41, 42, 43, 44]), :foo($[41, 42, 43, 44])} (Hash)␤»
rakudo-moar 222d16: OUTPUT«OLD: Hash[Any,Any] %hash = (my Any %{Any} = :bar($[41, 42, 43, 44]), :foo($[41, 42, 43, 44]))␤NEW: Any %hash = (my Any %{Any} = :bar($[41, 42, 43, 44]), :foo($[41, 42, 43, 44])) (Hash[Any,Any])␤» 16:52
raiph hackedNODE: Thx for look/help/guidance 17:01
hackedNODE m: sub stuff { fail }; my @matches = stuff; !@matches || (@matches == 1 && !@matches[0]) and say "well, there's your problem!" 17:04
camelia rakudo-moar 222d16: OUTPUT«well, there's your problem!␤»
hackedNODE ^ reason for .subst fail. gonna fix it tonight 17:05
m: sub wone { fail }; sub two { my $v = wone; $v }; two; say "wat" 17:13
m: sub wone { fail }; sub two { my $v = wone; return $v }; two; say "wat"
This isn't on purpose, is it? Explicit return messes up the sinking of a Failure
camelia rakudo-moar 222d16: OUTPUT«Failed␤ in sub wone at <tmp> line 1␤ in sub two at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤» 17:14
rakudo-moar 222d16: OUTPUT«wat␤»
hackedNODE RTed: rt.perl.org/Ticket/Display.html?id=129373 17:21
Though I can imagine a reason why this may be done on purpose...
psch hrm 17:26
i get the closure in P6EX at runtime, but a 'is repr' decl doesn't get :/ 17:27
uh, what's the phaser after 'use' but before the mainline? CHECK? 17:28
...why does that NPE 17:29
oooh, i'm getting the wrong hllConfig in CStruct.java 17:32
hm, that's a bit iffy, actually 17:34
[Coke] psch: running stresstest getting a ton of very slow "no subtests run" failures. 18:09
(on r-j) expected?
dalek kudo/nom: 6ef4cdf | (Zoffix Znet)++ | src/core/Str.pm:
Throw on wrong arguments to .subst/.subst-mutate

Fixes RT#129374: rt.perl.org/Ticket/Display.html?id=129374
18:41
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129374
bartolin [Coke]: during my daily spectest runs I didn't see such failures lately (github.com/usev6/perl6-roast-data)
[Coke]: tests are run with 'perl t/spec/test_summary rakudo.jvm' -- but that includes stress tests
psch [Coke]: i have no idea about stresstest, actually
dalek ast: 925cf4b | (Zoffix Znet)++ | S05-substitution/subst.t:
Wrong args to .subst/.subst-mutate throw

RT#129374: rt.perl.org/Ticket/Display.html?id=129374
18:42
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129374
psch [Coke]: i assume stresstest as such doesn't lend itself to --verbose or something?
[Coke]: in any case, notice of the affected files might be useful
[Coke]: but we mostly are just lacking quite a few features on r-j in the first place, and maybe stresstest isn't fudged sufficiently (which it might not even want to be) 18:43
nine Why is nativecast not a multi? Its body is: if $target-type ~~ Signature { ... } else { ... } 18:44
psch well, it is over 1.5 years old... 18:46
dogbert17 m: say '.seen hackedNODE'
camelia rakudo-moar 222d16: OUTPUT«.seen hackedNODE␤»
dogbert17 hackedNODE: you around?
psch oh, wait, the body is only half a year old
anyway, yeah, it might as well be a multi, nine++
hackedNODE .seen hackedNODE
dogbert17 :-) where in roast should I put the duckmaptest? 18:47
it's not entirely obvious for a noob like me 18:49
hackedNODE Well, it appears neither duckmap nor deepmap are tested at all 18:50
There's a couple of tests in hyper.t that just test they're nodal
dogbert17 should I put it there?
hackedNODE naah 18:51
dogbert17: create a file S32-list/duckmap.t
And put them in there
dogbert17: and when you're done and it's merged. Submit a PR to Rakudo to list that file here: github.com/rakudo/rakudo/blob/nom/....data#L974 18:52
dogbert17 ok, will do
hackedNODE opens github.com/perl6/roast/issues/161 18:54
I guess that can be tagged with Hacktoberfest if I add explanations for how to do stuff 18:55
dalek kudo/nom: faaa516 | niner++ | lib/NativeCall.pm6:
Turn nativecast into a multi

Just cashing in on the advantages of multies.
18:57
nine Unfortunately I cannot say if it's actually fast as a multi. May be but may just be noise. 18:58
Btw. is there a way to cast a CArray[Pointer] to just Pointer without nativecast? 18:59
psch wouldn't know 19:08
i'm out for today too o/
dogbert17 if I want to run a single .t file, is it ok to run it as ./perl6 testfile.t ? 19:42
timotimo sometimes needs to -Ilib
in rakudo you can "make t/spec/S42-foo/blah.t 19:43
" and it'll run the harness for you
hackedNODE has 6p aliased to prove -e './perl6' -vlr
dogbert17 will it pick up stuff like #?rakudo todo "RT #129363 duckmap doesn't preserve structure types" 19:44
hackedNODE dogbert17: `make` will, but not perl6 or prove alone
dogbert17 ok, lemme try
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129363
[Coke] (rakudo) also: prove -v -e t/fudgeandrun s42-foo/blah.t (or t/spec/s42-foo/blah.t) 19:45
that fudges, and lets you run multiple files in the same harness.
dogbert17 I tried make ../roast/S32-list/duckmap.t 19:46
and got make: Nothing to be done for `../roast/S32-list/duckmap.t'.
got it working 19:51
nine csv-ip5xs is now down to ~ 4.098s here and does 8 native calls per iteration (which does 3 method calls). 19:52
Startup overhead is now > 20 % of the runtime.
dogbert17 hackedNODE: does this look ok or is it bollocks? gist.github.com/dogbert17/4aeeed6a...a25a16f32b
lizmat nine: can confirm it's faster on my machine as well: down to 4.2s down from 5.2s 19:53
nine \o/
lizmat I guess [TuxCM] didn't get the latest Inline::Perl5 automatically ? 19:54
nine lizmat: that's the only explanation I can come up with. I looked through the IRC log and his numbers stayed within the margin of error despite all my optimisations. 19:55
[TuxCM] $ panda update
[Coke] nine++
lizmat [TuxCM]: that just updates its internal tables, that doesn't get the latest version (I don't think)
nine what lizmat said
lizmat fwiw, I just run "panda install Inline::Perl5" again 19:56
[TuxCM] so, what command *should* I issue instead?
nine again what lizmat said :)
You can check easily with: perl6 -e 'say $*REPO.need(CompUnit::DependencySpecification.new(:short-name<Inline::Perl5>)).version'
[TuxCM] running
[TuxCM] laughs at *easily*
perl -MV=Inline::Perl5
is what I use in perl5. Now *that* is easy 19:57
nine Can't locate V.pm in @INC?
lizmat nine: it's not core, lives on CPAN
[TuxCM] $ cpan V
<hint>note the easy absence of the keyword "install" :)</hint> 19:58
nine I don't see why it'd be impossible to push the above line into a Perl 6 module, too. That would be a fair comparison. Otherwise it's perl -E 'say $Inline::Perl5::VERSION'
Don't get me started on that :) I've trained my fingers for cpan module, then broke them for cpanp install module then broke them again for cpan module 19:59
[TuxCM] so, nine, what timing do you *expect*? :) 20:00
nine Well between 4 and 5s would be reasonable
[TuxCM] This is Rakudo version 2016.09-68-g447d592 built on MoarVM version 2016.09-1-gdebb859
csv-ip5xs 4.513
test 16.076
test-t 6.991
csv-parser 17.441
nine Yeah! 20:01
.oO(YOU HAVE TAKEN THE LEAD!)
[TuxCM] hopes lizmat accepts the challenge/temptation :] 20:02
I added the install command to the alias
timotimo oh wow
[TuxCM] as a side-note: I *did* expect panda update to do this for me! 20:03
nine [TuxCM]: I wonder why, though. panda --help ought to be quite clear: update Updates the local copy of the module database.
[TuxCM] then add $ panda upgrade, like yum 20:04
and ipkg and opkg and dpkg
[Coke] crap. so many failures on r-j stresstest that my iterm buffer ran out. 20:27
gist.github.com/coke/26178a2effc78...9c98195219 20:28
ISTR someone has been keeping the fudging up to date here, wondering if any of these are OS X specific.
wonder how long prove -v -e t/fudgeandrun has been broken. 20:29
ZoffixMobile dogbert17, I responded in #perl6 (by mostake) :) 20:31
dogbert17 ZoffixMobile: thx, will check 20:32
nine And down to 3.873s :) 20:35
lizmat should I reinstall Inline::Perl5 now ?
ah, I guess...
nine I upped the version to 0.15 so a plain install should do 20:36
[Coke] is there a known issue trying to todo subtests where only one subtest fails?
ZoffixMobile [Coke] no, unless you are talking about the fudger that doesn't fudge subtests 20:38
lizmat nine: only seeing an improvement within noise values :-(
[Coke] ... yes, trying to fudge-todo a subtest block. 20:39
nine We now do 1/10 of the native calls (7 instead of 70) in csv-ip5xs. This benchmark has been a gold mine
lizmat and it *is* v0.15
nine lizmat: it's only a ~ 5 % improvement. That's hard to measure. I usually do lots of runs and take the lowest value. 20:40
dogbert17 ZoffixMobile: I have changed to is-deply for both tests, gist updated
*is-deeply
nine Why are native subs set up on first use and not when the native trait is applied? 20:47
jnthn Because you can't persist the resolved C function pointer, perhaps? 20:48
[Coke] Might make sense if it's expensive.
ZoffixMobile [Coke] won'rlt work. wrap it in curlies, put #?DOES 1 before it and the fudge above it
[Coke] 128579 was rejected... but it has tests in roast. 20:49
S12-introspection/meta-class.t 20:50
zoffix, the RT has your name on it. (RT #128579)
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128579
[Coke] tests intentionally kept, yes? 20:51
bartolin [Coke]: are you going to fudge the failing tests you've seen with your stresstest run on rakudo-j? 20:54
Zoffix___ On the ticket I see "Tests to check .ver and .auth are NOT present on packages: github.com/perl6/roast/commit/06b2...610cc09f8"
nine jnthn: well your self from 2011 only left us this: "Add first cut of version 2 of Zavolaj. Doesn't do any pointer/array stuff just yet; that's coming soon."
And wow am I glad, that we don't have PIR anymore 20:55
jnthn Yes, I think version 2 made it portable to other backends.
Or that was a goal at least
Though I might not have been talking about that yet ;) 20:56
I suspect some setup work can be done at compile time
But the resolution of the C symbol still needs to happen at runtime
nine I guess the self!setup unless $!setup; is not that expensive anyway 20:57
jnthn Turning the signature into the descriptor surely can happen though
Well yeah, was gonna say...how costly is it :)
bartolin [Coke]: fwiw S12-introspection/meta-class.t passed this morning on r-j (447d592693) 20:58
jnthn afk for now; will be back tomorrow with tuits
nine $r.signature.arity could be cached in a property
jnthn With look I'll get us closer to having Unicode 9 :)
bartolin [Coke]: didn't look closer but I suspect 222d16b0b9 made that test fail on JVM 20:59
[Coke]: also, I remember I had to use a higher Xmx for perl6-eval-server. before I set -Xmx4000m I had similiar problems like your gist showed, occasionally (after a while all the remaining test files failed) 21:04
arnsholt nine: Short answer on why natives are set up on first use is "because that's how jnthn++ implemented it" =) 21:05
But what jnthn said is basically it. Addresses to functions aren't stable, so can't rely on compile-time and run-time having the same addresses
[Coke] bartolin++ - I figured tha tmight fall out of more testing. 21:14
bartolin: I'm running on 222d16b, yes.
bartolin there was a short discussion of that commit between nine++ and psch++ earlier today 21:15
Zoffix m: is-deeply duckmap(-> Int $x { $x ~~ Int ?? $x !! Any }, [1, [2,3], 4]), [1, [2,3], 4]
camelia rakudo-moar faaa51: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared routine:␤ is-deeply used at line 1␤␤»
Zoffix m: use Test; is-deeply duckmap(-> Int $x { $x ~~ Int ?? $x !! Any }, [1, [2,3], 4]), [1, [2,3], 4]
camelia rakudo-moar faaa51: OUTPUT«not ok 1 - ␤␤# Failed test at <tmp> line 1␤# expected: $[1, [2, 3], 4]␤# got: $(1, (2, 3), 4)␤»
[Coke] Zoffix: yes, I see that as well, but couldn't read intent - I'll assume the tests are intentional and fudge them for the JVM
Zoffix dogbert17, ^ I think it's best to write the second test as above ^ as it shows what the difference is exactly 21:16
[Coke] I will reopen the RT and mark it JVM only.
dogbert17 Zoffix: will fix
Zoffix ¯\_(ツ)_/¯ I figured the test description was good: github.com/perl6/roast/blob/master...lass.t#L48 21:17
Maybe it should be rewritten to go first (on all subtests)
dalek ast: 0ddea52 | coke++ | S12-introspection/meta-class.t:
fudge RT #128579 for the JVM
21:18
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128579
bartolin [Coke]: but as I said before, those tests only started to fail today. wouldn't it be better to fix the breakage (maybe 222d16b0b9 can be made 'moar only')
oops, too late :-)
Zoffix bartolin, 222d16b0b9 on which repo? 21:19
bartolin rakudo
Zoffix oh, sorry. Used wrong URL the first time :)
[Coke] bartolin: if I could fix the breakage, sure.
bartolin irclog.perlgeek.de/perl6-dev/2016-0...i_13289748 21:20
Zoffix j: my package P:ver<1.2.3>:auth<me> {}; P.^ver; CATCH { default { .^name.say } }
camelia rakudo-jvm cd19db: OUTPUT«X::Method::NotFound␤»
Zoffix j: my package P:ver<1.2.3>:auth<me> {}; P.^auth; CATCH { default { .^name.say } }
camelia rakudo-jvm cd19db: OUTPUT«X::Method::NotFound␤»
[Coke] Zoffix: that's from Sat Jul 16 05:15:27 2016
Zoffix ah 21:21
bartolin one part of commit 222d16b0b9 changed code that was within a '#?if moar' block -- but the other part affected JVM as well
dogbert17 Zoffix: I have updated the PR 21:22
dalek ast: ce3050e | dogbert17++ | S32-list/duckmap.t:
Tests added for duckmap (#162)

  * Tests added for duckmap
  * Changed second test to the better. Zoffix++
ast: 5dfd859 | (Zoffix Znet)++ | S32-list/duckmap.t:
Add test description
21:23
bartolin so, maybe the removed elsif block should be reintroduced within '#?if !moar' markers?
Zoffix dogbert17, to clarify, I meant the second test to test the structure and not just a .WHAT. It's fine to use variables in tests :) 21:24
dalek ast: 7e25c94 | coke++ | S14-roles/composition.t:
fudge RT #64766 for rakudo.jvm
21:25
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=64766
dogbert17 Zoffix: ok :-) 21:26
Zoffix dogbert17, don't forget to now add that file in Rakudo's test list
dogbert17 on it
dalek ast: 7a20048 | coke++ | S14-traits/routines.t:
Fudge RT #129375 for rakudo.jvm
21:31
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129375
bartolin gist.github.com/usev6/8d8f77399587...5134ac479f 21:35
^^ S14-traits/routines.t S12-introspection/meta-class.t and S14-roles/composition.t are passing (again) with that 'half-revert' of 222d16b0 21:36
[Coke] bartolin++! 21:37
dogbert17 Zoffix: earlier you mentioned github.com/rakudo/rakud​o/blob/nom/t, do you mean the file t/spectest.data in the rakudo repo? 21:38
[Coke] yes, new test files go there.
(in the list) 21:39
dogbert17 ok, thx [Coke]
Zoffix dogbert17, [14:52:38] <hackedNODE> dogbert17: and when you're done and it's merged. Submit a PR to Rakudo to list that file here: github.com/rakudo/rakudo/blob/nom/....data#L974
Maybe there's IRC client issues, but the URL I see has spectest.data#L974 at end of it
bartolin it's already too late for me ... g'night
Zoffix night 21:40
lizmat also calls it a day 21:41
dogbert17 it did, it was this 'blob/nom' part which was confusing, it doesn't exist in my cloned repo is all
geekosaur blob is a github-ism
dogbert17 aha 21:42
geekosaur the git path starts at nom
dogbert17 geekosaur++
geekosaur well. <owner>/<repo>/blob/<branch>/... 21:43
Zoffix for files; for dirs it's /tree/ IIRC 21:45
arnsholt Yeah, I think it's tree for directories. And IIRC blob and tree are used when discussing git's internals as well 21:46
A file is simply a blob of bytes, and a directory is a tree of stuff, either blobs or other trees
geekosaur ...but the main reason it needs to do that is to leave namespace for things like the permissions page 21:47
arnsholt True dat
dalek kudo/nom: a341416 | (Jan-Olof Hendig)++ | t/spectest.data:
Add S32-list/duckmap.t test file
21:49
kudo/nom: fc3160c | (Zoffix Znet)++ | t/spectest.data:
Merge pull request #887 from dogbert17/nom

Add S32-list/duckmap.t test file
Zoffix dogbert17++ adding tests 21:50
dogbert17 :-) 21:52
MasterDuke how do i use the --git-depth=<n> option of rakudo's Configure.pl? 22:23
i thought it would just do a shallow clone of nqp (and moarvm?), assuming i also have --gen-moar 22:24
gfldex m: sub f( |c where { c.defined } ) {}; f 42 22:42
camelia rakudo-moar fc3160: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Variable '&c' is not declared␤at <tmp>:1␤------> sub f( |c where { ⏏c.defined } ) {}; f 42␤»
gfldex is this a bug?
geekosaur I think it's reasonable that c is not yet defined at that point. it is passed to the block as a parameter at runtime, though 22:47
gfldex m: sub f( |c where { c } ) {}; f 42 23:01
camelia rakudo-moar fc3160: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Variable '&c' is not declared␤at <tmp>:1␤------> sub f( |c where { ⏏c } ) {}; f 42␤»
gfldex the definedness is not the problem
m: sub f( *@a where { @a } ) {}; f 42
camelia ( no output )
geekosaur sorry, I do not mean .defined defined, I mean exists in symbol table defined 23:05
you're still constructing the variable at the time the where clause is parsed
gfldex why does the @a example work then?
geekosaur hm. I'd argue it shouldn't. but it looks like normal sigils are put into the symbol table early, but | sigil is handled specially and not put there until later 23:07
(which is why it's looking for &c)