bartolin_ .tell viki the other day Zoffix added a bunch of (sub-)tests to S02-types/num.t which use a unicode literal for euler's number. Unfortunately those tests explode with a parsing error with rakudo-j. do you have an opinion whether those tests should be fudged (skipped) on JVM or whether we should refrain from using that unicode literal? 04:29
yoleaux2 bartolin_: I'll pass your message to viki.
19 Oct 2016 17:10Z <psch> bartolin_: p6for transform into the appropriate .map call, so this is probably a permutation of #126490
19 Oct 2016 17:11Z <psch> bartolin_: note that that ticket got accidentifixed by a refactor, but apparently there's still wonky bits in how jvm handles our iterators
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126490
dalek kudo/nom: 94d7309 | MasterDuke17++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Convert some BOOTSTRAPATTRs to Attributes

This allows more attributes to be more easily worked with at the Perl 6 level.
05:05
kudo/nom: 6319b55 | MasterDuke17++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Fix comment explaining scalar_attr, nine++
kudo/nom: ca78176 | FROGGS++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Merge pull request #906 from MasterDuke17/remove_BOOTSTRAPATTR_where_possible_2nd_attempt

c0d85ce | lizmat++ | src/core/Str.pm: Fixed missing ob -> as bikeshed
Apparently this path is not covered by spectesting :-(
lizmat Files=1150, Tests=53683, 212 wallclock secs (12.67 usr 3.95 sys + 1295.65 cusr 120.26 csys = 1432.53 CPU) 07:22
nine Sent a PR for zef to add a missing use statement. Otherwise it installs itself just fine :) 07:50
lizmat nine++ # lexical_module_load 07:51
nine Ecosystem is gonna need quite a few more use statements :/ 08:01
lizmat nine: the good thing is of course, these use statements can be added now before merging the lexical_module_load branch 08:15
nine: without breaking anything, right ?
dalek kudo/nom: 84b4c83 | lizmat++ | src/core/Str.pm:
Remove :g as :x implies :g

This will allow this to take the slight faster single adverb code path in .match
08:27
nine lizmat: right 08:59
cygx o/ 10:30
cygx lobs RT #129957 jnthn's way 10:31
rt.perl.org/Public/Bug/Display.html?id=129957
moritz cygx: what about Bar ~~ Foo (without the .new)? 10:35
cygx moritz: same
viki j: say 𝑒 10:56
yoleaux2 04:29Z <bartolin_> viki: the other day Zoffix added a bunch of (sub-)tests to S02-types/num.t which use a unicode literal for euler's number. Unfortunately those tests explode with a parsing error with rakudo-j. do you have an opinion whether those tests should be fudged (skipped) on JVM or whether we should refrain from using that unicode literal?
camelia rakudo-jvm 8d357a: OUTPUT«===SORRY!===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> say⏏ 𝑒␤Bogus postfix␤at <tmp>:1␤------> say ⏏𝑒␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ stat…» 10:57
viki j: say π
camelia rakudo-jvm 8d357a: OUTPUT«3.141592653589793␤»
viki bartolin_: why is it commented out for JVM? It seems to be just like pi and tau: github.com/rakudo/rakudo/blob/nom/...um.pm#L253 10:58
Or I guess psch would know: github.com/rakudo/rakudo/commit/db...0062d6e06d 11:01
j: say e
camelia rakudo-jvm 8d357a: OUTPUT«2.7182818284590455␤»
viki j: my constant 𝑒 := e; say 𝑒 11:02
camelia rakudo-jvm 8d357a: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Missing initializer on constant declaration␤at <tmp>:1␤------> my constant⏏ 𝑒 := e; say 𝑒␤»
viki j: my constant 𝑒 = e; say 𝑒
camelia rakudo-jvm 8d357a: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Missing initializer on constant declaration␤at <tmp>:1␤------> my constant⏏ 𝑒 = e; say 𝑒␤»
viki & bus
(as for tests, 𝑒 can be replaced with e; I'll do so in an hour) 11:04
dalek ast: bf64f3f | (Zoffix Znet)++ | S02-types/num.t:
s/𝑒/e/

𝑒 is currently not supported on JVM:
  github.com/rakudo/rakudo/commit/db...0062d6e06d
12:13
lizmat m: my Int $a = 42; $a.subst-mutate(/./,"x",:g); say $a # I wonder how much sense it makes to have a Cool.subst-mutate 12:17
camelia rakudo-moar 84b4c8: OUTPUT«Type check failed in assignment to $a; expected Int but got Str ("xx")␤ in block <unit> at <tmp> line 1␤␤»
lizmat as the result is always a string
viki m: my $a = 42; $a.subst-mutate(/./,"x",:g); say $a
camelia rakudo-moar 84b4c8: OUTPUT«xx␤»
lizmat m: my $a = 42; dd $a; $a.subst-mutate(/./,"x",:g); dd $a 12:18
camelia rakudo-moar 84b4c8: OUTPUT«Int $a = 42␤Str $a = "xx"␤»
jnthn I think we didn't have it in the past, and it was awkward in various cases. 12:19
(People tripped over it)
lizmat ok
was just wondering :-)
I so wish we had a syntax for saying "no additional named parameters" 13:04
in a signature
(not using where, fwiw :-)
viki same 13:06
dalek kudo/nom: 364e67b | lizmat++ | src/core/ (2 files):
Make simple Str.subst(-mutate) 30% faster

By using a |%options when calling Str.match, we're basically forcing the MMD to find the appropriate candidate *every time*. If the hash is empty, we don't need to flatten it. And we don't need to pass it. Win both ways.
13:07
lizmat Oops, that also included a change in Cool, reducing unpacking/packing done 13:09
nine lizmat: I got large speedups in Inline::Perl5 with optimizations just like that ^^ 13:16
lizmat yup :-)
anyways, I'm now starting on refactoring Str.subst properly 13:17
this was just an easy win
viki contemplates writing a backend in Rust :) 13:28
As a learning exercise...
call it RoarVM :P 13:32
lizmat :-) 13:35
MasterDuke_ jnthn: you may have noticed i submitted a new PR (which FROGGS++ merged) for the BOOTSTRAPATTR stuff. i just started to look at the attributes that didn't work by just switching to Attribute or using scalar_attr() 13:46
as an example, Parameter.$!named_names, github.com/rakudo/rakudo/blob/nom/....nqp#L1464
i tried the naive approach of creating a list_attr() by just s/Scalar/List/, but got some error (i forget the text) that pointed to github.com/rakudo/rakudo/blob/nom/....nqp#L1875 13:47
i'll keep poking around, but wanted to check if you (or anyone else!) has a suggestion 13:49
jnthn Well, the key thing will be not setting up any auto-viv at all 13:52
MasterDuke_ yeah, i was calling my list_attr() with auto_viv disabled 13:58
jnthn Hm...curious that wasn't enough 13:59
gfldex lizmat: the needle moved by 4% thanks to your match work :) 14:02
lizmat every little bit helps :-) 14:03
[Coke] lizmat++ 14:12
lizmat m: sub a(str $a) { say $a }; a Str # shouldn't this be a candidate not found error ? 14:16
camelia rakudo-moar 364e67: OUTPUT«Cannot unbox a type object (Str) to a str.␤ in sub a at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
viki It is 14:18
m: multi a(str $a) { say $a }; a Str
camelia rakudo-moar 364e67: OUTPUT«Cannot resolve caller a(Str); none of these signatures match:␤ (str $a)␤ in block <unit> at <tmp> line 1␤␤»
lizmat hmmm.... 14:19
viki lizmat: this is a list of rules I wrote out of how I think it should be working: gist.github.com/zoffixznet/726f02a...c1b7918935 14:20
I think most of that matches our current reality.
And I think those rules don't go deep enough vis-a-vis having multi-vs-only subs
lizmat thanks viki :-) 14:21
viki Yeah, all of that stuff is just for multi resolution. Hm. I guess it makes sense to coerce when we're dealing only with only 14:23
m: sub (int8 $x) {}(443434343434343434343)
camelia rakudo-moar 364e67: OUTPUT«Cannot unbox 69 bit wide bigint into native integer␤ in sub at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
jnthn An only that wants an int will happily unbox an Int 14:27
The multi-dispatcher is strictr 14:28
*stricter
jnthn saw an RT that seemed to be a result of being confused about that
Though didn't look at it closely enough
viki jnthn: was it this one by any chance? rt.perl.org/Ticket/Display.html?id...et-history 14:31
dalek p: a0acddb | (Pawel Murias)++ | src/vm/js/Operations.nqp:
[js] Decont $sub when doing $sub().
14:32
p: e86c064 | (Pawel Murias)++ | t/nqp/067-container.t:
Test that the callee is deconted when doing a sub call.
kudo/js: 9eeaa6f | (Pawel Murias)++ | src/vm/js/ (2 files):
[js] Implement nqp::p6store.
14:34
kudo/js: ee76716 | (Pawel Murias)++ | src/vm/js/ (2 files):
[js] Implement nqp::p6argvmarray.
kudo/js: 4a86510 | (Pawel Murias)++ | src/vm/js/perl6-runtime/runtime.js:
[js] Remove debugging leftover.
kudo/js: fa77d97 | (Pawel Murias)++ | src/Perl6/Actions.nqp:
[js] Tweak workaround to prevent if from breaking stuff.
lizmat viki: re b667c927 in roast, those test flap for me every now and then, I think because or randomness in hash order? 14:38
afk& 14:40
viki I think the set()s are there to bypass that issue..
m: class Foo {}; say set(42 => "a",72 => "b",(Foo.new) => Foo) eqv set(42 => "a",(Foo.new) => Foo,72 => "b") 14:43
camelia rakudo-moar 364e67: OUTPUT«True␤»
viki m: class Foo {}; say set(42 => "a",72 => "b",(Foo.new) => Foo) eqv set(42 => "a",(Foo.new) => Foo,72 => "b")
camelia rakudo-moar 364e67: OUTPUT«False␤»
viki :/
.tell lizmat since the sets are unordered, the above two sets should eqv True all the time. Do we need a .sort over here? github.com/rakudo/rakudo/blob/364e...tty.pm#L63 14:46
yoleaux2 viki: I'll pass your message to lizmat.
viki Then the test flappiness would go away
We do sort on hashes: github.com/rakudo/rakudo/blob/364e...Map.pm#L51
I'll fix it. 14:47
... or maybe sourcable is giving me bogus info 14:55
s: &infix:<cmp>, \(set(42 => [1]), set(42 => (1))) 14:56
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/364e...rder.pm#L9
viki s: (set(42 => [1]), 'Stringy', \() 14:57
SourceBaby viki, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Unable to parse expression in argument list; couldn't find final ')' ␤at -e:7␤------> <BOL>⏏<EOL>␤ expecting any of:␤ argument list␤
viki s: set(42 => [1]), 'Stringy', \()
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/364e...Mu.pm#L455
viki s: set(42 => [1]), 'Str', \()
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/364e...tty.pm#L63
viki So eqv ends up calling Stringy, ends up calling Str, and I added dd [ %!elems ]; into it and it's not printing anything 14:58
jnthn viki: Yes...that wasn't actually a bug, but a deliberate choice :) 15:09
viki: We can't loosen it up because otherwise we'll have the native candidates - which are tighter than the non-native ones - matching always 15:10
$big-int + $big-int would match the native ones
And then we'd be in bother 15:11
viki jnthn: and there's no way to match that only if there are no Int candidates? 15:12
jnthn I wouldn't say "no way", but that feels magical and like it's going to cause worse surprises. 15:13
MasterDuke_ jnthn: yeah, i was kind of hoping list_attr() would just work. btw, i think the error was actually at github.com/rakudo/rakudo/blob/nom/...nqp#L1877, i tried say()ing $par_type and it was blank, but haven't had time to do any more testing 15:17
viki jnthn: OK. I created that ticket while debuggin RT#128655 because find_best_dispatchee finds Int candidate first. I'll review the issue and close the other ticket then 15:18
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128655
viki or something... been a couple of weeks since that bug. I need to review my notes at home 15:19
tbrowder ref RT #127305, i don't know how easy it is, but if rakudo can automatically add the module object name as an export tag, then it looks like we have a giant step toward import selection by object name: "use Foo :bar;" see my last two doc/doc/Language/modules.pod6 commits 15:32
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127305
viki Well, I'm stumped. set().Stringy prints output with my dd() in Setty.Str, but set() eqv set() does not, even though from what I can see that's supposed to call .Stringy :/ gist.github.com/zoffixznet/1227d80...0889460962 15:37
Oh... I'm using eqv, but looking up source of cmp :P 15:48
MasterDuke_ viki: github.com/rakudo/rakudo/blob/nom/...rs.pm#L147 seems relevant (to the overall problem of set() eqv set())
viki Yeah, thanks. I was looking up source of the wrong operator :( 15:51
Rust repo has a neat bot that assigns a person to review a PR: github.com/rust-lang/rust/pull/37398 16:10
And can take all sorts of commands for merging them buildbot.rust-lang.org/homu/
And lets you view the queue: buildbot.rust-lang.org/homu/queue/all 16:12
ZOFVM: Files=1198, Tests=130079, 135 wallclock secs (21.11 usr 3.19 sys + 2311.98 cusr 216.89 csys = 2553.17 CPU) 16:16
dalek kudo/nom: d92e1ad | (Zoffix Znet)++ | src/core/set_operators.pm:
Implement Setty:D eqv Setty:D

Also fixes floppiness of github.com/perl6/roast/commit/b667c9275b
  MasterDuke++ lizmat++
viki .tell lizmat never mind my last tell; I was looking at the wrong thing. Fix pushed. Test should stop flapping 16:17
yoleaux2 viki: I'll pass your message to lizmat.
viki m: dd [ bag(1, 2, ["a"]), Bag.new(1, 2, ["a"]) ] 16:35
camelia rakudo-moar d92e1a: OUTPUT«[("a"=>1,1=>1,2=>1).Bag, (1=>1,["a"]=>1,2=>1).Bag]␤»
viki just burnt self on that one :( 16:36
dalek ast: a6f89b6 | (Zoffix Znet)++ | S03-operators/eqv.t:
Test Setty eqv Setty
viki m: my $x = '42'; val $x, :val-or-fail 17:17
camelia ( no output )
viki m: my $x; val $x, :val-or-fail
camelia rakudo-moar d92e1a: OUTPUT«Unexpected named argument 'val-or-fail' passed␤ in block <unit> at <tmp> line 1␤␤»
bartolin_ viki: thanks for fixing the those tests earlier today 18:00
btw back from 2015-11-29: psch> and i suspect the misparse for 𝑒 is something about uniprop..? 18:01
irclog.perlgeek.de/perl6/2015-11-29#i_11621487
viki m: '𝑒τπ'.comb».uniprop.say 18:09
camelia rakudo-moar d92e1a: OUTPUT«(Ll Ll Ll)␤»
viki j: '𝑒τπ'.comb».uniprop.say
camelia rakudo-jvm 8d357a: OUTPUT«uniprop NYI on jvm backend␤ in block <unit> at <tmp> line 1␤␤»
nine Wow, seems like lexical_module_loading actually fixes a bug in nom: use A::B; my class A { method foo(A::B $b) { } } # throws because it doesn't know A::B 18:29
dalek ast: 8d39a9b | usev6++ | S (7 files):
Unfudge a lot of tests for rakudo-j

All those tests are passing now after lizmat's++ recent work on subst, match et al. (Probably a side effect, but very nice, nevertheless.)
18:31
bartolin_ or is it spelled lizmat++'s ? 18:32
nine bartolin_: I'd say lizmat++'s 18:35
viki
.oO( lizmat++'s++ )
lizmat bartolin_: please note that these tests now pass because they no longer use gather/take internally 18:37
yoleaux2 14:46Z <viki> lizmat: since the sets are unordered, the above two sets should eqv True all the time. Do we need a .sort over here? github.com/rakudo/rakudo/blob/364e...tty.pm#L63
16:17Z <viki> lizmat: never mind my last tell; I was looking at the wrong thing. Fix pushed. Test should stop flapping
lizmat bartolin_: so the underlying issue is still there, I think, we just work around it now 18:38
viki: thanks!
bartolin_ lizmat: yeah, I'm aware of that 18:40
lizmat ok :-) 18:41
bartolin_ (and I'm still trying to grok the problem with gather/take). however I'm happy to unfudge tests for once :-) 18:43
dalek ast: 4d6276c | niner++ | / (5 files):
More tests for nested packages

Test more situations where merging globals could fail or lose symbols.
18:47
ast: 2d1d1d5 | niner++ | / (2 files):
Test loading a module with runtime generated globals.

Could fail if those globals were not properly added to a SC.
ast/lexical_module_load: d76b755 | niner++ | / (4 files):
Fixup tests for lexical module loading

We now need to explicitly use modules if we want to use their symbols and can no longer rely on them being loaded by one of our dependencies.
18:50
ast/lexical_module_load: 5129a8d | niner++ | / (2 files):
Test that globals of loaded modules are imported lexically
ast: 8406c6e | usev6++ | S32-str/comb.t:
Some more passing tests on JVM
18:55
psch bartolin++ 18:59
re the discussion on #128320 about VMNull, i did try bringing that to nqp-j once 19:01
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128320
psch it did completely break the nqp-j build, although i think it might have been a bootstrap issue 19:02
bartolin_ did you see my latest try to fix this? github.com/perl6/nqp/pull/314
(nothing about VMNull, though :-) 19:03
psch i saw the PR in my mail, but i don't think a rakudo level solution is the rightest thing there
it probably works well enough -- i only skimmed the actual patch -- and i'm not sure we really *need* VMNull
dalek kudo/lexical_module_load: 92b5057 | niner++ | / (5 files):
Make importing globals from loaded modules lexical

Right now if A depends on C:auth<foo> and B depends on C:auth<bar> you cannot use A and B in the same program. Fix this by having not only exported symbols be lexical but also the globals contained in a module.
So only A will even have a C that's bound to C:auth<foo>. This means that you have to "use" modules in every scope that accesses those names, which is a good thing to do anyway.
Definitely 6.d material though as it will break existing code.
A lexically imported package stub was replaced instead of upgraded when a class of the same name was declared.
19:04
psch but i tend to assume that all those smart people working on rakudo/nqp have some reason for introducing something, and i also think #?if $backend is a crutch :)
kudo/lexical_module_load: 3e9323f | niner++ | src/Perl6/ModuleLoader.nqp:
Fix: class Foo { use Foo::Bar; my Foo $foo; } not finding Foo

The lexically imported "Foo" package stub containing "Bar" shadowed the
  "Foo" class we're currently declaring. Fix by considering all scopes
when looking for existing symbols, not just the one we're importing into.
psch so we probably at least eventually want VMNull on nqp-j -- or enough guards everywhere that we can make do with the jvm null
it might well be that we're far enough along the latter path that continuing there is easier by now though 19:05
bartolin_ doesn't feel smart enough to contribute to this (kind of strategical) discussion 19:07
psch yeah, me neither, i'm just observing :)
we do seem to run low on actual NPEs recently
bartolin_ *g*
psch probably should triage which of those are Perl 6 and which are Java code
bartolin_ psch: one question: why do you consider my latest PR a 'rakudo level solution'? 19:08
psch oh, right
it isn't, i misread
i thought multicache was in rakudo/src/vm
bartolin_ ah, ok, was confused
psch that also somewhat changes the applicability of my argument, i think 19:09
lizmat m: "1234".subst(/./,"x",:g); say $/ # I wonder how much would break if $/ would *not* contain the last match in this case 19:10
camelia rakudo-moar d92e1a: OUTPUT«「4」␤»
lizmat aka, should subst set $/ "on the outside" or not? 19:11
psch don't we do that for closures as substituting argument? 19:12
viki m: "1234".subst(/./, { $/.is-prime },:g); 19:15
camelia rakudo-moar d92e1a: OUTPUT«No such method 'is-prime' for invocant of type 'Match'␤ in block <unit> at <tmp> line 1␤␤»
viki m: "1234".subst(/./, { $/.Int.is-prime },:g);
camelia ( no output )
viki m: say "1234".subst(/./, { $/.Int.is-prime },:g);
camelia rakudo-moar d92e1a: OUTPUT«FalseTrueTrueFalse␤»
lizmat viki: I'm not saying anything about $/ during the substitution 19:17
I'm talking about the setting of the outer $/ *after* the .subst is done
and also inside if the replacement is a Str, when there is no $/ needed there 19:18
viki I wouldn't expect .subst to set outside $/. 19:19
I'm giving it a matcher and stuff to match and I don't care how it does it, so I think it's reasonable to expect it to not affect stuff outside of it. 19:20
lizmat which is my thought also 19:21
lemme see how much will break if it doesn't get set outside :-) 19:22
jnthn Probably plenty, since $/ is resolved lexically
m: say 'ab'.subst(/a(.)/, { "b$0" }) 19:23
camelia rakudo-moar d92e1a: OUTPUT«bb␤»
jnthn And that relies on it
dalek kudo/nom: e168ff6 | lizmat++ | src/core/Rakudo/Internals.pm:
Add R:I:TRANSPOSE-ONE

Transpose a substring in a string to another string. Basically the simple s/foo/bar/, but then without regexes.
19:44
kudo/nom: 4829f1c | lizmat++ | src/core/ (2 files):
Rename FROMLEN/FROMTO

It appears that FROMTO is more useful than FROMLEN in .subst
[Tux] On request: 20:07
This is Rakudo version 2016.10-57-g4829f1c built on MoarVM version 2016.10-15-g715e39a
csv-ip5xs 3.364
test 14.679
test-t 6.845
csv-parser 16.839
lizmat that looks like it's leaning to lower again :-) 20:08
lizmat takes an early night 20:43
nine Good night lizmat! 20:44
DrForr Nini. 20:48
masak ahojty noity 20:50
masak .oO( dream of »ö« ) 20:51
[Coke] leka nosht! 20:53
masak [Coke], I didn't know you Bulgarian'd 20:54
[Coke] Worked with an "offshore" team in Sofia ages ago. Learned about five words, because they all spoke flawless english. 20:56
(though that is how I found out about diado koleda) 20:57