01:47 ilbot3 joined 03:14 skids joined 07:53 lizmat joined 08:01 RabidGravy joined
psch i don't get the p6for desugar 09:18
i mean, with a label 09:19
timotimo p6for was quite a challenge 09:20
psch m: (^3).map({ .say }).sink # this is label-less i think
camelia rakudo-moar d7698f: OUTPUT«0␤1␤2␤»
timotimo it's important that we can turn a for into a while loop, so that was a part that got into it
psch eqv to < for ^3 { .say } >
timotimo and the one-arg-rule was also a part that made for some trouble
get it? made for some trouble?
psch ...no? :/ 09:21
...yeah, alright :P
i suppose we don't have a syntax for attaching a label to a method call, do we? 09:22
i mean, in the Perl 6 HLL
timotimo yeah, i don't think we do
psch m: my \block = A: { .say; last A }; (^3).map(block).sink 09:24
camelia rakudo-moar d7698f: OUTPUT«===SORRY!=== Error while compiling /tmp/5d5SmRGyhB␤Confused␤at /tmp/5d5SmRGyhB:1␤------> my \block = A:⏏ { .say; last A }; (^3).map(block).sink␤ expecting any of:␤ colon pair␤»
psch m: my \block = A: { .say; last A }; say block #(^3).map(block).sink
camelia rakudo-moar d7698f: OUTPUT«===SORRY!=== Error while compiling /tmp/rMWCD6QrM3␤Confused␤at /tmp/rMWCD6QrM3:1␤------> my \block = A:⏏ { .say; last A }; say block #(^3).map(b␤ expecting any of:␤ colon pair␤»
psch oh hm
can't even do that apparently
m: A: my \block = { .say; last A }; say block 09:25
camelia rakudo-moar d7698f: OUTPUT«-> ;; $_? is raw { #`(Block|57422960) ... }␤»
psch m: my \block = { A: { .say; last A } }; (^3).map(block).sink # hrmm 09:27
camelia rakudo-moar d7698f: OUTPUT«0␤control exception without handler␤ in block at /tmp/PshjUs9pRJ line 1␤ in block <unit> at /tmp/PshjUs9pRJ line 1␤␤»
timotimo i must admit i'm not entirely sure how the label gets in there
psch src/Perl6/Actions.nqp:404 :P
if $label { $call.push($label) } 09:28
where $call is the QAST::Op callmethod map
timotimo ah, ok, so it takes an extra argument
psch oh duh, of course 09:29
m: A: (^3).map({ .say; last A }, :label(A)).sink 09:30
camelia rakudo-moar d7698f: OUTPUT«0␤»
psch that looks about right then i guess?
which means a nested one is...
m: A: (^3).map({ (^3).map({ .say; last A }) }, :label(A)).sink 09:31
camelia ( no output )
psch m: A: (^3).map({ (^3).map({ .say; last A }), :label(A) }, :label(A)).sink
camelia ( no output )
psch well, apparently not quite :P
...sink is important there :l 09:32
m: (^3).map({ (^3).map({ .say }).sink }).sink
camelia rakudo-moar d7698f: OUTPUT«0␤1␤2␤0␤1␤2␤0␤1␤2␤»
psch m: A: (^3).map({ (^3).map({ .say; last A }).sink, :label(A) }).sink
camelia rakudo-moar d7698f: OUTPUT«0␤control exception without handler␤ in block at /tmp/dUWVhKO0eB line 1␤ in block <unit> at /tmp/dUWVhKO0eB line 1␤␤»
psch m: A: (^3).map({ (^3).map({ .say; last A }, :label(A)).sink, :label(A) }).sink 09:33
camelia rakudo-moar d7698f: OUTPUT«0␤0␤0␤»
dalek kudo/nom: b61ca12 | lizmat++ | src/core/Str.pm:
Fix RT #128038

Clients of Rakudo::Internals.SUBSTR-SANITY were checking for definedness rather than Failureness. I wonder how many other places in the core setting we make that mistake :-(
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128038
psch well
the good thing is that works the same in r-j 09:34
the bad thing is that i had hoped it wouldn't so i get a new hint where to look
i have to say i wish i could see the desugared p6for QAST 09:35
as in, the QAST::Op that calls map and sink and so on
oh wow 09:38
the bug is even narrower than previously assumed
because: 09:39
$ ./perl6-j -e'A: for ^1 { for ^1 { .say; last A } }'
$ ./perl6-j -e'A: for 1 { for 1 { .say; last A } }'
labeled last without loop construct
m: use nqp; say nqp::iscont(^1); say nqp::iscont(1) 09:40
camelia rakudo-moar d7698f: OUTPUT«0␤0␤»
timotimo put "note(result.dump)" into the Ops.nqp ? 09:41
psch yeah, i'll try that
nine_ Maybe it's an optimizer thing?
psch nine_: no, i checked that
"5 but False" not working on r-j is an optimizer thing, though 09:42
'cause constant folding or something, i forgot
dalek kudo/nom: 1e54c52 | lizmat++ | src/core/Exception.pm:
Fix for RT #128045

Let the bikeshedding on the new message begin!
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128045
psch heh, the child nodes for the callmethod can't be stringified :/ 10:05
callmethod sink that is 10:07
lizmat m: my $a = Failure.new("foo"); (1,2,$a,3).minmax.say; say $a.handled # another questionable use of .defined 10:18
camelia rakudo-moar 1e54c5: OUTPUT«1..3␤True␤»
lizmat I would argue that this should fail ?
timotimo sounds sensible 10:19
lizmat or possibly ignore the Failure without handling it ? 10:31
m: (1,2,Str,3).minmax.say # like this? 10:32
camelia rakudo-moar 1e54c5: OUTPUT«1..3␤»
lizmat *like it does with type objects 10:33
dalek kudo/nom: fcac39b | lizmat++ | src/core/Any-iterable-methods.pm:
Nativy excludes flags

Since they're natives in Range anyway
lizmat m: 'my $a = Failure.new("foo"); (1,2,$a,3).Supply.minmax.list.say; say $a.handled # similar issue 10:50
camelia rakudo-moar 1e54c5: OUTPUT«===SORRY!=== Error while compiling /tmp/RpFlPrd9Cb␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/RpFlPrd9Cb:1␤------> st.say; say $a.handled # similar issue⏏<EOL>␤ expecting any of:␤ sing…»
lizmat m: my $a = Failure.new("foo"); (1,2,$a,3).Supply.minmax.list.say; say $a.handled # similar issue
camelia rakudo-moar 1e54c5: OUTPUT«(1..1 1..2 1..3)␤True␤»
timotimo another point where "language features meet and behave in unforeseen ways" 10:56
psch hm, anything against a dump method on NQPMu that returns "NQPMu\n"? 11:08
cause i'm running into "no such method" right now, and i remember running into it a few times before
and seeing as it can turn up in QASTs at nearly every level...
or is that mixing concerns too much..? :/ 11:09
[Tux] This is Rakudo version 2016.04-58-g1e54c52 built on MoarVM version 2016.04 11:12
test 21.937
test-t 13.408
csv-parser 23.486
timotimo psch: just put it in as a debugging aid and then rip it back out? 11:13
psch timotimo: yeah, i'm doing that anyway. just wondering if it's something that should stick around... :) 11:19
timotimo we may rely on it to stringify to "" in some places perhaps 11:20
but NQPMu tends to F you over so often
any undeclared/not-findable name evaluates to NQPMu instead of erroring
which we may want to change anyway
psch well, i'm really only concerned about a ChildNode that could be NQPMu 11:24
timotimo right 11:25
dalek rakudo/relocateable-precomp: 2330534 | niner++ | src/core/CompUnit/PrecompilationRepository.pm: 11:27
rakudo/relocateable-precomp: Avoid loading a module from source when already loaded as precompiled version
rakudo/relocateable-precomp: * We load a precompiled module A.
rakudo/relocateable-precomp: * We use lib 'foo';
rakudo/relocateable-precomp: * We try to load A again.
rakudo/relocateable-precomp: This resulted in a duplicate symbol error, since we loaded A from source again
rakudo/relocateable-precomp: (as we are no longer allowed to precompile) and the duplication checks failed.
rakudo/relocateable-precomp: Fix by explicitly check the loaded status before even asking if we may
rakudo/relocateable-precomp: precompile.
nine_ And with this I can successfully install Inline::Perl5 with panda :)
This was the last known issue with the relocateable-precomp branch :) 11:28
psch nine_++
timotimo neat!
nine_ The TODO list now constists of: * cleaning up the locking code as jnthn++ suggested and * storing updated dependency info after re-resolving, so we hopefully don't have to re-resolve the next time. 11:30
However both can be done after a merge just as well.
timotimo sounds like it, yeah
nine_ ==> Successfully installed Task::Star 11:32
timotimo very good! 11:33
sounds like it's safe to merge, then :)
nine_ Yeah. A bit of rebasing and commit cleanup and it should be good to go 11:34
dalek p: 6a6766d | niner++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java.orig:
Remove obviously accidentally committed file
kudo/nom: 4379cf0 | lizmat++ | src/core/ (2 files):
Make Failures fail in .minmax

Instead of just ignoring them *and* marking them as handled. Also makes List.minmax about 1.5x faster.
timotimo wow, it makes it faster, too
lizmat well, basically the difference between .defined and nqp::defined() 11:59
since a Failure object is nqp::defined(), it will cause a throw when used later on 12:00
timotimo oh
lizmat without needing to check specifically for Failures
timotimo hm, what was p6definite about again?
so now we can no longer emit values out of a supply that claim they're undefined and let them be ignored by a minmax supply combinator 12:01
no clue if we want either of those two
lizmat hmm... maybe I should gave used nqp::isconcrete...
12:01 brrt joined
lizmat hmmm... 12:01
timotimo looks up p6definite
oh, p6definite is also about generating a p6bool 12:02
other than that it's just decont + isconcrete
if you're going with isconcrete, you'll probably have to decont manually, too?
not sure about that
lizmat timotimo: eh... any undefined values are still ignored in Supply.minmax ?
fwiw, there were no spectest fails with this change 12:03
$ 6 '(1,2,Str,3).Supply.minmax.list.say' 12:04
(1..1 1..2 1..3)
timotimo hm, right
if we ever had a type that pretends to be a valid defined value by overriding .defined, that'll break 12:05
and concrete values that claim to be undefinde
etc etc
but i don't have a design hat on right now
lizmat well, I guess it all boils down to whether we want Failures to be throw, ignored and/or handled or not 12:07
tadzik nine_++! \o/ 12:10
dalek kudo/nom: 6df0539 | lizmat++ | src/core/ (2 files):
Restore original .defined semantic in .minmax

Except that a Failure will always throw. Only noise-levels slower.
bartolin has someone an idea why nqp::iterval doesn't work here with rakudo-j: gist.github.com/usev6/65701798270e...8c480a0133 12:37
lizmat bartolin: sadly, no :-( 12:39
bartolin on a related note: how can rakudo-j builds be enabled for camelia?
lizmat: thanks for looking. maybe it's down in the implementation of nqp::iterval for jvm ... 12:40
lizmat looks again
bartolin: where does $!iter come from ? 12:42
ah, MappyIterator, right ?
timotimo should be, yeah
bartolin yes. I only duplicated the code from Map.pm for debugging purposes. 12:43
timotimo i wonder what place throws the NPE; would a native java debugger be able to tell you?
lizmat bartolin: yeah, no clue :-)
bartolin timotimo: I think it's in Map.pm method 'pairs' which calls 'Pair.new(nqp::iterkey_s(tmp), nqp::iterval(tmp))' 12:44
and that nqp::iterval(tmp) is Null 12:45
timotimo huh, seems kind of strange
i'm not so sure about the code paths involved here, and i've gotta go AFK for a bit, too
bartolin here's the link: github.com/rakudo/rakudo/blob/nom/...Map.pm#L87 12:46
m: use nqp; Pair.new("foo", nqp::null) # gives a NPE on JVM 12:48
camelia ( no output )
psch eh, $*REPO and related things isn't transparent enough to me vOv 12:59
bartolin: yeah, nqp::null maps directly to NPE on nqp-j 13:00
bartolin: that's the VMNull thingy agian
curious how that doesn't happen with sinking nqp::null, actually... 13:01
bartolin psch: yes, that NPE with Pair.new is not surprising. I just wanted to point out where the NPE from 'CallFrame.new.perl' actually happens.
psch oh, i see 13:02
bartolin do you have an idea about nqp::iterval, perhaps :-) (see my gist above)
psch i don't see anything in VMIterInstance itself, no 13:09
bartolin ah, maybe it's somewhere here: github.com/perl6/nqp/blob/master/s...java#L3611 13:11
bartolin will looks some more 13:12
psch yeah, that looks about right
that should be rather easily patchable 13:15
well, if i don't misunderstand anything :)
the ContextRefInstance has at_key_native and at_key_boxed methods, so it should be possible to fetch those and bind them correctly instead of binding null 13:16
hm, although i'm not sure about binding mixed native and boxed to the same hash 13:26
bartolin well, that's probably too far above my paygrade ... 13:33
psch replacing the null in lines 3622 with something like ((ContextRefInstance)agg).at_key_boxed(tc, sci.oLexicalNames[i]) should probably work with the CallFrame example 13:35
'cause i'm pretty sure the values in a CallFrame aren't natives :)
lines 3626, 3630, 3634 would probably need appropriate boxing 13:36
that's something like box_i(((ContextRefInstance)agg).at_key_native(tc, sci.iLexicalNames[i]), tc.gc.hllConfig.intBoxType, tc) or so... :P 13:37
i still have this loop label thing to poke here... :) 13:38
bartolin psch++ thanks a lot for explaining!
psch ...not really explaining, more like exampling :D
13:51 brrt joined
psch m: constant A = Label.new(:name<A>, :1line, :prematch<foo>, :postmatch<bar>); (^5).map({ (^5).map({ .say; last A }).sink }, :label(A)).sink # i'm fairly sure *this* is pretty close to how it actually desugars 14:21
camelia rakudo-moar 6df053: OUTPUT«0␤»
psch well, except for the label creation, that probably ends up somewhere slightly different 14:22
and the QAST that i'm seeing for r-j hangs the label into the inner map
m: constant A = Label.new(:name<A>, :1line, :prematch<foo>, :postmatch<bar>); (^5).map({ (^5).map({ .say; last A }, :label(A) ).sink }).sink 14:23
camelia rakudo-moar 6df053: OUTPUT«0␤0␤0␤0␤0␤»
psch this is really confusing 14:24
i don't get it 14:39
asts between r-j and r-m are identical
so i'll just quietly blame this onto the sink difference
y'know, the one that has us do #?if jvm\n my $ = \n #?endif
bartolin: you're getting along the nqp guts? 14:40
+with 14:42
bartolin psch: changing the first null (for sci.oLexicalNames) does indeed help with the nqp::iterval/NPE 14:46
for the other three cases I get an error 'void' type not allowed here. looks like 'at_key_native' is defined as 'public void at_key_native' 14:48
psch bartolin: oh, right. you have to get the result from the tc
grep for "tc.native_i" to see how that's used 14:49
bartolin cool, will do
psch i think the various getattr ops are the cleanest example 14:53
dalek kudo/nom: 381bb2d | niner++ | src/core/CompUnit/Repository/Installation.pm:
Turn short-name lookup files into directories

This may become part of CompUnit::Repository::Installation format v1. Having to change any already existing files on installation of a module makes f5f80d7 | peschwa++ | src/core/Exception.pm: Correctly identify labeled next/last/redo Exception.
This only applies when they don't get handled and complain.
14:55 dalek joined
timotimo yay! the branch has landed! 14:55
15:03 skids joined
psch #127949 is interesting too, i don't really know how to start looking into the hint caching there though 15:05
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127949
psch (refering to my own recent comment :P )
m: class A { has $.foo }; class B { has $.bar }; class C is A is B { }; C.new(:1foo, :2bar).bar.say # curious that it works outside the setting, too.. 15:06
camelia rakudo-moar 6df053: OUTPUT«2␤»
bartolin hmm, have to leave now. I had no success so far with tc.native_i -- will look at it later :-) 15:08
psch m: use nqp; class A { has int $.foo }; class B { has str $.bar }; class C is A is B { method new(Int $a, Str $b) { my \SELF = nqp::create(self); nqp::bindattr_i(SELF, A, '$!foo', nqp::unbox_s($a)); nqp::bindattr_i(SELF, B, '$!bar', nqp::unbox_i($b)); SELF } }; C.new(5, "5").bar.say 15:09
camelia rakudo-moar 6df053: OUTPUT«This type cannot unbox to a native string␤ in method new at /tmp/S91XUXvhca line 1␤ in block <unit> at /tmp/S91XUXvhca line 1␤␤»
psch ...that should probably go into a gist :) 15:10
m: gist.github.com/peschwa/c2f5a405f1...8b187672cf 15:11
camelia rakudo-moar 6df053: OUTPUT«This type cannot unbox to a native integer␤ in method new at /tmp/N8EyQqjAS3 line 8␤ in block <unit> at /tmp/N8EyQqjAS3 line 12␤␤»
psch m: gist.github.com/peschwa/c2f5a405f1...8b187672cf
camelia rakudo-moar e8fd55: OUTPUT«5␤»
psch hm, yeah, there's more involved it seems
that also works on r-j
15:23 RabidGravy joined
psch m: gist.github.com/peschwa/1656b1fee6...53f1507e38 15:32
camelia rakudo-moar e8fd55: OUTPUT«(Num)␤»
psch that breaks on r-j \o/
psch adds that to the ticket
bartolin psch: I'm just spectesting this change: gist.github.com/usev6/65701798270e...nt-1766175 18:03
was that what you meant (using tc.native_i, etc.)?
psch bartolin: yeah, mostly. i'd add a check for tc.native_type == ThreadContext.NATIVE_{I,N,S} to be safe though 18:04
aside from that it looks good 18:05
ah, but the check might not even be necessary, 'cause the names are already type-dependant
bartolin psch: as I understand it, ThreadContext.NATIVE_{I,N,S} are set along with tc.native_{i,n,s} in at_key_native 18:07
psch bartolin: not quite, tc.native_type contains the corresponding constant to signify which type the latest atpos_*_native result has 18:08
hm, or maybe i'm confusing that with getattr 18:09
bartolin is looking at src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/ContextRefInstance.java
psch yeah, me too 18:10
bartolin: that's the thing. normally you'd check tc.native_type to verify that you get the type you expect 18:12
bartolin: but since you're already checking via {i,n,s}LexicalNames you don't need to do that, cause that's what'd set tc.native_type in the first place
bartolin okay, sounds plausible :-) (I'm afraid I don't fully understand the code -- but I've learned quite a bit today) 18:13
I'll let my spectest run and will open a pull request, eventually 18:15
psch yeah, i'll look out for that :) bartolin++ 18:17
18:31 dalek joined
kudo/nom: dec807e | lizmat++ | src/core/Any-iterable-methods.pm:
Make List.minmax about 15% faster

By introducing an int flag that indicates that a valid defined value has been seen, rather than checking for .defined of the current min/max value all the time. Also, if a value is more than max, it cannot be less then min, so don't bother to check twice.
19:34 travis-ci joined
travis-ci Rakudo build failed. Pepe Schwarz 'Correctly identify labeled next/last/redo Exception. 19:34
travis-ci.org/rakudo/rakudo/builds/127068794 github.com/rakudo/rakudo/compare/e...f80d7698bc
19:34 travis-ci left
psch oh damn 19:35
RabidGravy boom 19:36
psch :P
dalek kudo/nom: 3c5f7bc | peschwa++ | src/core/Exception.pm:
Refer to the actually existing variable.
19:57 travis-ci joined
travis-ci Rakudo build failed. Elizabeth Mattijsen 'Make List.minmax about 15% faster 19:57
travis-ci.org/rakudo/rakudo/builds/127071594 github.com/rakudo/rakudo/compare/f...c807e1f3f0
19:57 travis-ci left
psch waits for the next time travis comes 19:58
timotimo and puts coal under the tree? :)
psch why would i put coal under the tree? 19:59
dalek kudo/nom: e2fcdf2 | lizmat++ | src/core/Any-iterable-methods.pm:
Streamline List.min/max

No noticeable performance difference, but much DRYer
psch ooh. travis does that. right
i hope not :S
lizmat hmmm... strange that build failing: I've just done a failure free spectest
psch lizmat: my commit before was that 20:00
lizmat ah, ok
20:16 skids joined
dalek kudo/nom: a16f0a4 | lizmat++ | src/core/Any-iterable-methods.pm:
Made !first-concrete loop tighter

Makes the case of "my @a; @a[1000] = 42; @a.minmax" 10% faster
timotimo neat 20:25
lizmat hmmm... seems that minmax has quite different semantic than min or max 20:30
m: my @a = -1..5, ^20; dd @a; say @a.minmax
camelia rakudo-moar e2fcdf: OUTPUT«Array @a = [-1..5, ^20]␤-1..^20␤»
lizmat m: my @a = -1..5, ^20; dd @a; say @a.min
camelia rakudo-moar e2fcdf: OUTPUT«Array @a = [-1..5, ^20]␤-1..5␤»
lizmat shouldn't they work the same ?? 20:31
S32/Containers:552 indicates that only Range should be special handled 20:33
synopsebot6 Link: design.perl6.org/S32/Containers.htm...al_handled
lizmat design.perl6.org/S32/Containers.html#minmax # works better
20:41 sortiz joined 20:57 travis-ci joined
travis-ci Rakudo build passed. Pepe Schwarz 'Refer to the actually existing variable.' 20:57
travis-ci.org/rakudo/rakudo/builds/127075618 github.com/rakudo/rakudo/compare/d...5f7bcbf63b
20:57 travis-ci left
lizmat good night, #perl6! 21:16
timotimo gnite lizmat! 21:22
21:24 stmuk joined 22:49 travis-ci joined
travis-ci Rakudo build passed. Elizabeth Mattijsen 'Streamline List.min/max 22:49
travis-ci.org/rakudo/rakudo/builds/127078885 github.com/rakudo/rakudo/compare/3...fcdf2702a5
22:49 travis-ci left 23:09 travis-ci joined
travis-ci Rakudo build passed. Elizabeth Mattijsen 'Made !first-concrete loop tighter 23:09
travis-ci.org/rakudo/rakudo/builds/127082212 github.com/rakudo/rakudo/compare/e...6f0a46daf8
23:09 travis-ci left