japhb viki: IMO, Str.Numeric should handle literally any number format or characters that are valid any other way that Perl 6 parses source. 01:31
viki: Unfortunately, I wrote it long before TimToady expanded the characters that could be used to write numbers. 01:32
viki: Which is to say, Str.Numeric is due for some fixes.
psch r: class A { has int $!x }; use nqp; say nqp::iscont(nqp::getattr(A.new, A, '$!x')) 06:38
camelia rakudo-moar 53d7b7, rakudo-jvm 76b061: OUTPUT«0␤»
psch that's kind of the trouble i have with the attributive store bug on jvm 06:40
clearly a native Attribute itself doesn't have a container
so we might need a ContainerSpec for Attributes..? 06:41
actually, the Binder knows it's native and could probably just do the right coerce_* and bindattr_* call..? 06:45
unless there's something special we might have to call STORE for, but that should only happen for typeds or Proxy, right?
oh geez, actually that's kinda tough there 06:48
m: class A { has int $!x; method foo($!x) { } }; A.new.foo(2) 06:49
camelia ( no output )
psch .foo doesn't have a native constraint
m: class A { has int $!x; method foo($!x) { } }; A.new.foo(2e0) 06:56
camelia rakudo-moar 53d7b7: OUTPUT«This type cannot unbox to a native integer: P6opaque, Num␤ in method foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch aha
not sure if that's LTA, honestly, but it alleviates one concern with the patch idea i'm having right now :) 06:57
uhh 07:34
am i wrong in thinking that having a STable with .REPRData.flattenedSTables == null is kinda weird and shouldn't really happen..?
anyway 08:04
$ ./perl6-j -e'class A { has int $!foo; method bar($!foo) { $!foo } }; say A.new.bar(2)'
2
'make test' passes, too, spectest probably still is way to noisy to say what's going on though... :/ 08:05
dalek kudo/nom: 88152b1 | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/Binder.java:
Implement attributive parameter binding on the JVM.

As noted in the patch itself, there seem to be cases where we lose the flattened STables in the REPRData for a given STable. As of now this patch just ignores that and tries to DTRT regardless, which means falling back to the previous behavior of simply assuming a boxed Attribute.
08:08
psch r: say $*PERL.compiler # hrm :/ 08:12
camelia rakudo-jvm 76b061: OUTPUT«rakudo (2016.10.266.g.76.b.0618)␤»
..rakudo-moar 88152b: OUTPUT«rakudo (2016.10.302.g.88152.b.1)␤»
psch r: class A { has int $.x is rw; method x($.x) { $.x } }; A.new.x(10) 08:28
camelia rakudo-jvm 76b061: OUTPUT«java.lang.RuntimeException: $.x parameters NYI␤ in method x at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
..rakudo-moar 88152b: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in method x at <tmp> line 1␤ in method x at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch oh, moar complains because .x isn't the accessor... 08:29
r: class A { has int $.x is rw; method foo($.x) { $.x } }; A.new.foo(10)
camelia rakudo-jvm 76b061: OUTPUT«java.lang.RuntimeException: $.x parameters NYI␤ in method foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
( no output )
psch r: class A { has int $.x is rw; method foo($.x) { $.x } }; A.new.foo(10).say
camelia rakudo-jvm 76b061: OUTPUT«java.lang.RuntimeException: $.x parameters NYI␤ in method foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
..rakudo-moar 88152b: OUTPUT«10␤»
psch r: class A { has int $.x; method foo($.x) { $.x } }; A.new.foo(10).say 08:30
camelia rakudo-jvm 76b061: OUTPUT«java.lang.RuntimeException: $.x parameters NYI␤ in method foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
..rakudo-moar 88152b: OUTPUT«Cannot find method 'STORE': no method cache and no .^find_method␤ in method foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch actually, i think i'll leave that alone for now :S
dalek p: e1e73a2 | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
[js] Make nqp::decode changed the VMArray instead of returning a hacked NQPArray.
09:49
p: 4693bb8 | (Pawel Murias)++ | t/nqp/082-decode.t:
Test that nqp::decode modifies the passed buffer instead of returning a fresh one.
p: 3f0dece | (Pawel Murias)++ | src/vm/js/ (2 files):
[js] Make nqp::can and nqp::findmethod make use of HOW.find_method.
10:33
p: c57e973 | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (3 files):
[js] Serialize/deserialize the method cache authenticity.

Set it in places where we are constructing method caches manually.
11:19
kudo/nom: b4592c0 | (Zoffix Znet)++ | src/core/Rational.pm:
Improve readability of Rational.Str code

  - Avoid single-letter variables
  - Do not reuse the same variable for different purposes
Part of bug hunt for 0.9999999999999999999999.Str => "0.10"
13:43
DrForr "It's a bug hunt, man!" 13:44
lizmat viki++
m: say <a b b c c c d d d d>.pick(*-4) # I sorta expected that to work, am I wrong ? 14:00
camelia rakudo-moar b4592c: OUTPUT«Cannot resolve caller Numeric(WhateverCode: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at <tmp> line 1␤␤»
timotimo that'd make sense
lizmat m: say <a b b c c c d d d d>.Bag.pick(*-4) # same issue
camelia rakudo-moar b4592c: OUTPUT«Cannot resolve caller Numeric(WhateverCode: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at <tmp> line 1␤␤»
[Coke] lizmat: what would you expect it to be: pick all but 4? 14:07
lizmat yes
[Coke] ok, what about .pick(**4) ? 14:08
er, .pick(* * 4)
lizmat well, for .pick that wouldn't make sense
for roll it would: generate 4x the values in List in random order
viki Would you say this should print True? say $_ === .perl.EVAL given 0.9999999999999999999999 14:13
The equality gets lots in the floating point noise here: github.com/rakudo/rakudo/blob/nom/...pm#L12-L16 14:14
So I'm wondering why it does it at all and not just output the <$!numerator/$!denominator> thing all the time
lizmat well, since .perl is supposed to roundtrip, seems to me that should be True 14:26
viki Alright. 14:28
lizmat m: say "0.9999999999999999999999".perl 14:30
camelia rakudo-moar b4592c: OUTPUT«"0.9999999999999999999999"␤»
lizmat m: say "0.9999999999999999999999" eq "0.9999999999999999999999".perl
camelia rakudo-moar b4592c: OUTPUT«False␤»
arnsholt Are we sure this isn't one of those unavoidable problems with floating point?
IIRC stringification of floats is actually extremely hard to get right
lizmat arnsholt: but these are supposed to be Rats, no ? 14:31
arnsholt Oh, that's true I guess
In that case, never mind me 14:32
lizmat m: say (0.9999999999999999999999).WHAT
camelia rakudo-moar b4592c: OUTPUT«(Rat)␤»
arnsholt My brain still parses decimal notation as float >.<
dalek p: 6de4df5 | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
[js] Fix style issues found by make js-lint.
14:34
viki m: say 0.9999999999999999999999.perl 14:37
camelia rakudo-moar b4592c: OUTPUT«0.A␤»
psch ...what
viki Well, I fixed that, but now got a screenful of spectest failures :(
m: say (42/10).base: 10, * 14:38
camelia rakudo-moar b4592c: OUTPUT«4.2␤»
lizmat :-(
viki With that fix that now gives 4.20000000000000017763568394002504646778106689453125 :)
lizmat that *may* be more precise, but not expected :-)
arnsholt Yeah, that's floats rearing their ugly heads it looks like 14:45
m: say (0.9999999999999999999999).abs.WHAT 14:47
camelia rakudo-moar b4592c: OUTPUT«(Rat)␤»
viki m: 'say [/] ($_ - .floor).nude given (0.9999999999999999999999).abs 14:48
camelia rakudo-moar b4592c: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Unable to parse expression in single quotes; couldn't find final "'" ␤at <tmp>:1␤------> ude given (0.9999999999999999999999).abs⏏<EOL>␤ expecting any of:␤ single quotes␤ …»
viki m: say [/] ($_ - .floor).nude given (0.9999999999999999999999).abs
camelia rakudo-moar b4592c: OUTPUT«1␤»
viki :)
viki spectest Fix #2 14:49
arnsholt Definitely looks like you're getting Nums in there somewhere 14:51
viki arnsholt: yeah, the first attempt was using .Num 14:52
.oO( well, *there's* yo problem :)) )
timotimo there it is, you're problem! 14:53
viki \o/ only half a screen of spectest failures this time :) 14:54
lizmat hopes the screen is not a 27" 5K monitor 14:55
viki Well, I have something a bit yuky, bit it fixes the bug, makes Rat.perl roundtrip, and passes all the spectests 15:23
lizmat and it still performs :-) 15:24
lizmat hides
viki doesn't :( 15:27
m: say 2.5836995/1.6390246
camelia rakudo-moar b4592c: OUTPUT«1.576364077␤»
viki 0.5.perl becomes 1.5x slower 15:28
Beucase the yuky bit is comparing whether the converted value still == the original before giving the decimal-point format 15:29
and if we always give the <nu/de> format, the spectests break, because they expectfor 0.5.perl to give 0.5, not <1/2>
lizmat if it's only .perl becoming slower, then that's ok if it's now correct 15:31
at least to me
viki unfortunately, it isn't 15:32
viki tests slow down for the other two areas
m: say "0.5.base\(10,*) is {2.1249518 / 1.51316579}x slower"
camelia rakudo-moar b4592c: OUTPUT«0.5.base(10,*) is 1.40430864x slower␤»
viki yikes
and worst of all: 15:34
m: say "0.5.Str is {1.1812173/0.63130963}x slower"
camelia rakudo-moar b4592c: OUTPUT«0.5.Str is 1.871058580x slower␤»
viki yikes
That's comparing it with 2016.08.1-56-gdc7f279 15:35
viki will knead this a bit more 15:38
lizmat viki: these slowdowns feel like quite unavoidable to me, looking at what you're trying to fix 15:39
dalek p: c38b28e | jnthn++ | tools/build/MOAR_REVISION:
Bump to 2016.11 MoarVM release.
16:05
viki :o
jnthn viki: 2016.11 MoarVM release done well in time this month :)
viki sweet. jnthn++ 16:06
|Tux| realizes he missed out on timings today. <blush> 16:08
This is Rakudo version 2016.10-303-gb4592c0 built on MoarVM version 2016.10-172-g1ba1dd2 16:19
csv-ip5xs 3.071
test 13.852
test-t 6.238
csv-parser 13.996
new low :)
timotimo wow, was ip5xs always this fast? 16:23
yes, yes it was.
(well, ever since nine got to improving it)
viki lizmat: actually, I think I may end up making the whole thing faster than the old way :) 16:24
lizmat viki++ :-)
viki At least after my first optimization 0.5.Str runs in 95% of the old time :) 16:25
lizmat cool!
|Tux| timotimo, gist.github.com/Tux/4aa22a4090bd05...35fa010cc1 16:29
timotimo man, that initial 18-to-10 second drop
looks so good :D
lizmat and then from 9.1 to 4.5 16:30
that was a sad day
timotimo sad?
lizmat it make ip5xs faster than test-t again :-)
timotimo oh, hehe
psch jnthn: ooc, do you have any idea why we might sometimes be missing flattenedSTables on r-j? 16:36
jnthn: Set was one such type i noticed it with, during {install,upgrade}-core-dist.pl
jnthn psch: Hmm, I thought we only had them for types that had native (or otherwise flattened-in) attributes... 16:53
(Which I don't think Set does)
psch jnthn: ah, that would probably explain it already, yes :)
i came across it during 88152b18 16:54
which fixes attributive binding of natives on r-j
it's a bit hacky because the signature doesn't necessarily demand a native type...
still, thanks for the info jnthn++ 16:55
jnthn Thanks for working on r-j :) 16:56
dinner & 16:58
lizmat so, is there a way to check if a Str exists as a Type (with that name) without actually creating it ? 16:59
m: say ::("foo")
camelia rakudo-moar b4592c: OUTPUT«No such symbol 'foo'␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
lizmat aahhh
:-)
I was trying "X" and that exists, duh!
psch the 'sub MAIN(Enum $foo)' ticket seems to me like another notch on the "maybe we have to rethink coercion"... belt? 17:03
although nothing but "more syntax" comes to mind, honestly 17:04
m: enum Foo <A B C>; say Foo('A').WHAT 17:05
camelia rakudo-moar b4592c: OUTPUT«(Foo)␤»
psch m: enum Foo <A B C>; sub f(Foo(Str) $) { }; f 'A' # nope :/
camelia rakudo-moar b4592c: OUTPUT«No such method 'Foo' for invocant of type 'Str'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch hm, maybe "trying from both sides" in that case is already enough, actually..?
i.e. 'if we don't have $coercee."$coercer"($arg), try $coercer.($arg) and hope it matches the type"... probably not 17:06
m: enum Foo <A B C>; say A ~~ Cool 17:07
camelia rakudo-moar b4592c: OUTPUT«True␤»
psch err, that probably should have been '$coercer.coercee($arg)', but yeah, that just makes it worse 17:09
viki So Foo(Bar) would accept both Bars that it would convert to Foos as well as Foos that it would convert to Bars?
psch otoh, maybe enums just are that special because we have Foo('A') in the first place..?
viki: no, it would first try to turn Bar into a Foo, and then ask Foo if it can make sense of a Bar
viki: but i think that's probably bogus, and the enum is a special case here 17:10
viki So $argf.Foo or Foo.Bar($arg)
psch viki: right, but that's bogus because Foo.Bar is the coercer already 17:11
so, yes, if it was implemented as i wrote your interpretation would be the result, and that's not really TRT
hence 'maybe enum is special', and instead of adding a method name after the methodop, the methodop would have to leave
mind, i'm not sure *that* is a good idea either
m: enum Foo <1+0i 0+1i>; say 1+0i 17:12
camelia rakudo-moar b4592c: OUTPUT«1+0i␤»
psch m: enum Foo <1+0i 0+1i>; say 1+0i.WHAT
camelia rakudo-moar b4592c: OUTPUT«Use of uninitialized value of type Complex in numeric context␤ in block <unit> at <tmp> line 1␤1␤»
psch m: enum Foo <1+0i 0+1i>; say (1+0i).WHAT
camelia rakudo-moar b4592c: OUTPUT«(Complex)␤»
psch anyway, i think an enum type constraint as a Str subtype that tries the enum-coercion might work out there 17:13
viki I think harmil also ran into this type of thing and the general issue is our coercers expect the given thing to know how to coerce to wanted thing, rather than reverse. And this basically limits any coercions with custom user types. I can't write sub foo(UserName(Str)) {} for example and let UserName class be automatically instantiated from the given Str 17:14
psch i.e. 'sub MAIN(Foo $) { }' is kinda like 'Str $ where Foo(*).defined'
where Foo is an enum
viki: right, that's the redo-from-the-top approach :) 17:15
viki yup
psch generally probably the better idea, but i haven't encountered much movement in that area
there was a gist a few months or a year or so back i think..?
FROGGS o/ 17:16
viki \o\ 17:17
lizmat FROGGS \o
psch viki looking at handling Enums sensibly in src/core/Main.pm 17:18
shouldn't be too much problem, I think
but post release for sure :-)
psch lizmat: right, i think that probably works for now 17:19
lizmat: though the coercion stuff in general might want to have a different behind-the-scenes 17:20
the issue of not being able to reasonably define coercion to user types is a real one
lizmat true; especially testing of something is an Enum is problematic
Metamodel::EnumHOW.ACCEPTS($foo)
psch m: enum Foo <A B>; say A.HOW.^name
camelia rakudo-moar b4592c: OUTPUT«Perl6::Metamodel::EnumHOW␤»
lizmat is the only way I've found so far
psch m: enum Foo ('A' => 0.2, 'B', 'C'); say +A 17:22
camelia rakudo-moar b4592c: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared name:␤ A used at line 1␤␤»
psch m: enum Foo ('A' => 0.2, 'B', 'C'); say +B
camelia rakudo-moar b4592c: OUTPUT«1␤»
psch m: enum Foo ('A' => 2, 'B', 'C'); say +A
camelia rakudo-moar b4592c: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared name:␤ A used at line 1␤␤»
psch yeaah, apparently i just forgot how to do that :S
oh, wait, autoquoting 17:23
m: enum Foo (A => .2, B, C); say +A
camelia rakudo-moar b4592c: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared names:␤ B used at line 1␤ C used at line 1␤␤»
psch m: enum Foo (A => .2, 'B', 'C'); say +A 17:24
camelia rakudo-moar b4592c: OUTPUT«0.2␤»
psch right, so enum values don't have to be Int, that's what i wanted to find out... :)
m: enum Foo (A => 1+2i, B, C); say +A
camelia rakudo-moar b4592c: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared names:␤ B used at line 1␤ C used at line 1␤␤»
psch m: enum Foo (A => 1+2i, 'B', 'C'); say +B
camelia rakudo-moar b4592c: OUTPUT«2+2i␤»
viki m: enum Foo ('A' => 2, 'B', 'C'); say A
camelia rakudo-moar b4592c: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared name:␤ A used at line 1␤␤»
psch m: enum Foo (A => 1+2i, 'B', 'C'); say Foo(3+2i)
camelia rakudo-moar b4592c: OUTPUT«C␤»
psch okay so 17:25
viki m: enum Foo ('A' => 2, 'B', 'C'); say Pair.new: 'A', 2;
camelia rakudo-moar b4592c: OUTPUT«A => 2␤»
viki oh, I think there's a ticket for this case
psch 'sub MAIN(Foo $)' with Foo as an enum could mean 'sub MAIN(Str $ where * ~~ Str|Int and Foo(*).defined)'
err
s/Int/Numeric/ # geez
not sure that's a great way to implement it, but it probably would work out for this case 17:26
viki But it always be a Str
lizmat sub MAIN(:$country! where (Country.enums{$_}:exists)) { # my solution
viki well, always ~~ Str
psch viki: oh, right, allomorphs
m: enum Foo <A B>; Foo.enums{1}:exists.say
camelia rakudo-moar b4592c: OUTPUT«False␤»
psch m: enum Foo <A B>; Foo.enums{<1>}:exists.say
camelia rakudo-moar b4592c: OUTPUT«False␤»
psch dunno, in my head the coercer takes either key or value 17:27
might be a bad idea though :)
anyway, yeah. that's my enum coercer musings 17:28
lizmat m: enum Foo <A B>; Foo.enums{B}:exists.say
camelia rakudo-moar b4592c: OUTPUT«True␤»
lizmat but yeah 17:29
m: enum Foo <A B>; Foo.enums<B>:exists.say
camelia rakudo-moar b4592c: OUTPUT«True␤»
lizmat m: enum E <A B C>; say val(A) # sorta expected that to say IntStr.new(0,"A") 17:38
camelia rakudo-moar b4592c: OUTPUT«Value of type E uselessly passed to val()␤ in block <unit> at <tmp> line 1␤A␤»
viki ZOFVM: Files=1203, Tests=130170, 154 wallclock secs (20.77 usr 3.53 sys + 2713.73 cusr 247.93 csys = 2985.96 CPU) 18:02
dalek rakudo/nom: b5aa3c5 | (Zoffix Znet)++ | src/core/Rat (2 files):
rakudo/nom: Fix incorrect results in string-returning methods of Rationals
rakudo/nom:
rakudo/nom: Fixes RT#126016: rt.perl.org/Ticket/Display.html?id=126016
rakudo/nom: The issues observed in the ticket result from floating point math noise when
rakudo/nom: handling the fractional part after splitting the Rational into whole part and
rakudo/nom: fractional parts. That fractional part remains a Rat, and when further
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126016
dalek rakudo/nom: operations on it coerce it into a Num, the f.p. math noise results in it being
rakudo/nom: a whole number, but still treated under the assumption of being less than 1.
rakudo/nom:
rakudo/nom: Fix by checking for that case and adjusting fractional/whole parts accordingly.
rakudo/nom: Also, fix Rat.perl.EVAL roundtrip for Rats that end up not being equal to the
viki ...original Rat due to f.p. math noise by outputting those in <nu/de> notation.
Performance impact of this commit: Rational.Str about 40% faster,
Rational.base about 30% faster, Rat.perl 5% slower 18:03
github.com/rakudo/rakudo/commit/b5...a15618151d
Lazy robot!
dalek ast: b1a305a | (Zoffix Znet)++ | S32-num/rat.t:
Test stringification of Rats with floating point math noise issues

RT#126016: rt.perl.org/Ticket/Display.html?id=126016
18:04
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126016
lizmat viki++ 18:05
viki r: say 10 ** 10 ** 10 18:17
camelia rakudo-jvm 76b061: OUTPUT«Inf␤»
..rakudo-moar b5aa3c: OUTPUT«Numeric overflow␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
viki m: say 1e200 * 10e200 18:22
camelia rakudo-moar b5aa3c: OUTPUT«Inf␤»
viki Seems like it'd make sense to return Inf instead of throwing for ** too? 18:23
And that would align the results between JVM and MoarVM too
m: say 10e0 ** 10000000000e0 18:25
camelia rakudo-moar b5aa3c: OUTPUT«Inf␤»
viki :)
m: say <10/1> ** <10000000000/1> 18:26
camelia rakudo-moar b5aa3c: OUTPUT«Inf␤»
viki oh heh and in the Num case we throw for Underflow instead 18:28
m: say 10e0 ** -10000000000e0
camelia rakudo-moar b5aa3c: OUTPUT«Numeric underflow␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
viki m: say 10 ** -10000000000
camelia rakudo-moar b5aa3c: OUTPUT«Attempt to divide 1 by zero using div␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
viki .tell Zoffix check rt.perl.org/rt3//Public/Bug/Displa...?id=126992 18:32
yoleaux2 viki: I'll pass your message to Zoffix.
[Coke] viki, thanks. 18:35
viki Will be only in about 20 hours tho :) 18:36
[Coke] no rush whatsoever 18:39
just seemed like a likely closable ticket.
timotimo [Coke]: *carefully prods about angular 2 profiler ui*
[Coke] gingerly sets down the thoughts about Str on the JVM, and reconsiders his life choices. 18:40
viki .tell Zoffix and write a test for this one, while you're at it: rt.perl.org/Ticket/Display.html?id...et-history 18:44
yoleaux2 viki: I'll pass your message to Zoffix.
[Coke] timotimo: so, my stumbling block at this point is that angular2 seems designed to be run as an app, not inside a standalone html file. 18:46
timotimo huh, really?
i thought the point was to have it for single-page-application
[Coke] I am sure this is fixable without changing things on the nqp side, but I need to do more research/playing around.
timotimo OK 18:47
someone suggested we put the profiler data into sqlite instead of a json blob
[Coke] the docs seem geared towards people writing full on applications, not standalone pages.
timotimo we don't have convenient NativeCall at the nqp level, though
[Coke] timotimo: it is quite possible I'm just super confused. :) 18:51
timotimo i haven't looked into angular 2 yet, so ... who knows!
[Coke] timotimo: so, following the initial example, you have a about a dozen files on disk, then run "npm start", which launches the html page, which loads a dozen+ files remotely, including files compiled from your component's .ts source. 19:15
timotimo ugh 19:27
what fun
[Coke] I found an active (non-irc) chat channel for angular, hopefully this will help. :) 19:33
dalek kudo/nom: 546dbd9 | lizmat++ | src/core/Main.pm:
Fix for RT #130131

Basically, extend the functionality of val() to include looking up whether the string is an Enum. Possibly, this should be expanded to all uses of val(), but that might be v6.d worthy.
19:52
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130131
lizmat afk& 19:54
[Coke] timotimo: best comment so far: Why are you even using angular? 19:57
second best: why not leave it in angular1?
viki heh
psch [Coke]: is that a "general help" kinda channel..?
[Coke] psch: gitter.im/angular/angular
psch i mean, the questions sound kinda "what are you even doing here"-ish? 19:58
maybe i'm just spoiled by #perl6 being kind and such :S 19:59
[Coke] to be fair, I'm doing something weird.
psch i suppose that makes the replies a bit more fair 20:03
[Coke] timotimo: so, the real goal was "make it usable with large amounts of data", right? 20:05
at this point, probably easier for me to optimize JS than it is to get a2 to work. :)
mst [Coke]: the last JS experiment I did (which was react + mobx) used webpack, so I got an HTML file and an index.js
dalek ast/usev6-patch-1: a151379 | bartolin++ | integration/error-reporting.t:
Make test for output of backtrace less specific

After the recent changes to backtrace handling this test started to fail on rakudo-j. There are references to lines in gen/jvm/CORE.setting which are causing the test to fail
  because of the 's' in 'setting'.
Allowing additional lines in the backtrace still fits the test description 'Thrown Failure outputs dual backtraces'.
20:35
bartolin oops, didn't expect dalek to report this here ... 20:38
viki How come JVM still references setting? 20:42
bartolin doesn't know (yet) 20:43
jnthn Prolly 'cus the code-gen would need updating
viki m: BEGIN @*ARGS = <--country=America>; enum Country<China America Brazil>; sub MAIN(Country :$country!) { say $country; } 20:44
camelia rakudo-moar 546dbd: OUTPUT«America␤»
dalek ast: a27c062 | usev6++ | S32-basics/warn.t:
Fudge failing test for JVM
viki m: BEGIN @*ARGS = <--country=Brazil>; enum Country<China America Brazil>; sub MAIN(Country :$country!) { say $country; }
camelia rakudo-moar 546dbd: OUTPUT«Brazil␤»
viki m: BEGIN @*ARGS = <--country=China>; enum Country<China America Brazil>; sub MAIN(Country :$country!) { say $country; } 20:45
camelia rakudo-moar 546dbd: OUTPUT«Usage:␤ <tmp> --country=<Country> ␤»
viki m: BEGIN @*ARGS = <--country=China>; enum Country<Blah China America Brazil>; sub MAIN(Country :$country!) { say $country; }
camelia rakudo-moar 546dbd: OUTPUT«China␤»
viki .tell lizmat seems MAIN doesn't like the very first enum for some reason: irclog.perlgeek.de/perl6-dev/2016-...i_13592785
yoleaux2 viki: I'll pass your message to lizmat.
viki When "China" is the first element of the enum, it doesn't accept it as a proper value 20:46
jnthn m: BEGIN @*ARGS = <--country=China>; enum Country (:China(1), :America); sub MAIN(Country :$country!) { say $country; }
camelia rakudo-moar 546dbd: OUTPUT«===SORRY!===␤Incompatible MROs in P6opaque rebless for types Bool and Country␤»
jnthn m: BEGIN @*ARGS = <--country=China>; enum Country (:China(1), :America(2)); sub MAIN(Country :$country!) { say $country; } 20:47
camelia rakudo-moar 546dbd: OUTPUT«China␤»
jnthn m: BEGIN @*ARGS = <--country=America>; enum Country (:China(1), :America(0)); sub MAIN(Country :$country!) { say $country; }
camelia rakudo-moar 546dbd: OUTPUT«Usage:␤ <tmp> --country=<Country> ␤»
jnthn Looks like whichever one has a value of 0
jnthn suspects an `if` used where a `with` was meant, or some such
FROGGS m: BEGIN @*ARGS = <--country=China>; enum Country (China => 42, 'America' => 0, 'Brazil'); sub MAIN(Country :$country!) { say $country; }
camelia rakudo-moar 546dbd: OUTPUT«China␤»
FROGGS m: BEGIN @*ARGS = <--country=America>; enum Country (China => 42, 'America' => 0, 'Brazil'); sub MAIN(Country :$country!) { say $country; }
camelia rakudo-moar 546dbd: OUTPUT«Usage:␤ <tmp> --country=<Country> ␤»
FROGGS ahh, already shown 20:48
viki That's what I thought too but I don't see any obvious spot: github.com/rakudo/rakudo/commit/546dbd99b1
dalek kudo/nom: 4f581ab | (Zoffix Znet)++ | docs/ChangeLog:
Log all changes to date

Documents commits: 29db214 2d56751 395f369 4ccb2f3 53d7b72 546dbd9 58a4826 7f32243 b068e3a b5aa3c5 c1d2599 cd765e6 ee8ae92
20:53
viki don't got a computer at hand to try it out, but reading the code it seems like all args are checked for whether they're any enums? 21:31
Would that interfere with, say, attempting to pass string 'False' just as a string?
say, to Str $whatever 21:32
FROGGS m: BEGIN @*ARGS = <--country=False>; sub MAIN(Str :$country!) { say $country; } 21:34
camelia rakudo-moar 4f581a: OUTPUT«False␤»
FROGGS m: BEGIN @*ARGS = <--country=False>; sub MAIN(Bool :$country!) { say $country; }
camelia rakudo-moar 4f581a: OUTPUT«Usage:␤ <tmp> --country ␤»
viki m: BEGIN @*ARGS = <--country=False>; sub MAIN (Str :$country) { say "$country $country.^name()" } 21:35
camelia rakudo-moar 4f581a: OUTPUT«False Str␤»
viki ok. nevermind :)
m: BEGIN @*ARGS = <--country=False>; sub MAIN (:$country) { say "$country $country.^name()" }
camelia rakudo-moar 4f581a: OUTPUT«False Str␤»
MasterDuke bartolin, jnthn: i'm working on the backtraces on JVM now, but i'm finding it less straightforward than the moar stuff 22:02
jnthn Welcome to JVM ;) 22:04
bartolin MasterDuke++
MasterDuke right now it seems to be getting the line numbers from the directives, but not the filename, haven't figured out why/how yet 22:08
Zoffix m: enum Country (|<China Canada USA>, Foo => False); 22:29
yoleaux2 18:32Z <viki> Zoffix: check rt.perl.org/rt3//Public/Bug/Displa...?id=126992
camelia rakudo-moar 4f581a: OUTPUT«===SORRY!===␤Incompatible MROs in P6opaque rebless for types Bool and Country␤»
yoleaux2 18:44Z <viki> Zoffix: and write a test for this one, while you're at it: rt.perl.org/Ticket/Display.html?id...et-history
Zoffix viki, shoo
viki ahh, I see where the bug is with the MAIN stuff 22:31
buut... I see another bug 22:47
Zoffix For some reason using enum as either positional or named works, but both together doesn't 22:50
Unless I'm passing the args incorrectly.
Zoffix devours a plate of chicken wings before proceeding with the fix
lizmat is back
yoleaux2 20:45Z <viki> lizmat: seems MAIN doesn't like the very first enum for some reason: irclog.perlgeek.de/perl6-dev/2016-...i_13592785
Zoffix lizmat, I'm about to push a fix for that. So nevermind :) 22:53
lizmat ah, cool
what did I miss ?
dalek kudo/nom: bca0ae5 | (Zoffix Znet)++ | src/core/Main.pm:
Fix sub MAIN(SomeEnum ...) not handling the falsy enum value

The check for whether we got an enum is checking for falsiness, but enum values can be false. Check for definedness instead.
IRC conversation: irclog.perlgeek.de/perl6-dev/2016-...i_13592785
Zoffix And I wrote this test, but the case where both positional and named are given fails for some reason, even though separately they work: gist.github.com/zoffixznet/42ed3b5...-p6-p6-L11
Zoffix & # food 22:55
lizmat Zoffix++ 22:56
Zoffix No bug. I was passing pos/named in the wrong order. 23:12
lizmat *phew* :-) 23:13
lizmat goes to get some shuteye
good night, #perl6-dev!
dalek ast: 8ff3ab7 | (Zoffix Znet)++ | S06-other/main.t:
Test sub MAIN can type-constrain using Enums

RT#130131: rt.perl.org/Ticket/Display.html?id=130131
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130131
Zoffix night
MasterDuke ah, i misspoke, it is getting the filename, i'm just not sure how to get that filename into the backtrace 23:58