geekosaur jdv79, that's over 2 months, note. there have been a bunch of individual smallish speedups that add up since then. 00:15
timotimo does anybody have a benchmark that involves a lot of single-grapheme strings? 00:22
MasterDuke m: (^20).map(*.comb.sum).say 01:14
camelia rakudo-moar 9b579d: OUTPUT«(0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10)␤»
MasterDuke timotimo: something like that ^^^ ? 01:15
i feel i've done things like that for a bunch of project euler problems
timotimo thing is, i've implemented a cache for one-grapheme strings in moarvm, and i'd like to have some measurements from some benchmarks where you can see it kick in 01:25
MasterDuke one-character strings (the output of .comb) aren't one-grapheme? 01:28
timotimo they are 01:31
MasterDuke but the cache wouldn't kick in if you significantly increased the range you're doing the map over? 01:32
timotimo it kicks in with the first one, but it wouldn't really be noticable at that size
MasterDuke size of what? 01:35
timotimo 20 numbers
also, there's a difference still between Str objects and the MVMStrings they box 01:36
so you'll still end up with a Str object each time, much unlike the boxed integer cache we also have
MasterDuke i just put 20 since the output gets truncated by say (and camelia), in my project euler problems the number is much much larger
Zoffix m: join ^0xFFFFF».chr xx 20000; # 😜 01:37
camelia rakudo-moar 9b579d: OUTPUT«(signal SEGV)»
timotimo m: 5 does role { method omg { say "oh my" } }; say 5.omg
camelia rakudo-moar 9b579d: OUTPUT«oh my␤True␤»
timotimo m: 1024 does role { method omg { say "oh my" } }; say 1024.omg
camelia rakudo-moar 9b579d: OUTPUT«oh my␤True␤»
timotimo huh?
Zoffix ?
timotimo m: 99_999_999 does role { method omg { say "oh my" } }; say 99_999_999.omg
camelia rakudo-moar 9b579d: OUTPUT«oh my␤True␤»
timotimo m: 99_999_999 does role { method omg { say "oh my" } }; say 1.omg 01:38
camelia rakudo-moar 9b579d: OUTPUT«Method 'omg' not found for invocant of class 'Int'␤ in block <unit> at <tmp> line 1␤␤»
timotimo how does that cache i made actually work? :D
m: my @foo = ^10000.List; 99_999_999 does role { method omg { say "oh my" } }; say 99_999_999.omg
camelia rakudo-moar 9b579d: OUTPUT«Potential difficulties:␤ Precedence of ^ is looser than method call; please parenthesize␤ at <tmp>:1␤ ------> my @foo = ^10000⏏.List; 99_999_999 does role { method omg␤oh my␤True␤»
timotimo m: my @foo = (^10000).List; 99_999_999 does role { method omg { say "oh my" } }; say 99_999_999.omg
camelia rakudo-moar 9b579d: OUTPUT«oh my␤True␤»
timotimo *shrug*
Zoffix m: say 99_999_999 === 99_999_999; say 99_999_999 === Int; say 99_999_999 === 1 01:39
camelia rakudo-moar 9b579d: OUTPUT«True␤False␤False␤»
MasterDuke m: say 99_999_999 ~~ Int; say 99_999_999 === Int 01:40
camelia rakudo-moar 9b579d: OUTPUT«True␤False␤»
MasterDuke m: say 99_999_999 ~~ Int; say 99_999_999 === Int; say 99_999_999.WHAT === Int 01:42
camelia rakudo-moar 9b579d: OUTPUT«True␤False␤True␤» 01:46
Zoffix m: "foo" does role { method foo { "foo" } }; say "foo".foo
camelia rakudo-moar 9b579d: OUTPUT«foo␤»
Zoffix m: "foo" does role { method foo { "foo" } }; say "foos".foo
camelia rakudo-moar 9b579d: OUTPUT«Method 'foo' not found for invocant of class 'Str'␤ in block <unit> at <tmp> line 1␤␤»
Zoffix m: { "foo" does role { method foo { "foo" } }; }; { say "foo".foo }
camelia rakudo-moar 9b579d: OUTPUT«foo␤»
Zoffix That's creepy :S
star: { "foo" does role { method foo { "foo" } }; }; { say "foo".foo }
camelia star-m 2016.04: OUTPUT«foo␤»
Zoffix star: { "foo" does role { method say { "foo" } }; }; { say "foo".foo }
camelia star-m 2016.04: OUTPUT«Method 'foo' not found for invocant of class 'Str+{<anon|54957776>}'␤ in block <unit> at <tmp> line 1␤␤»
Zoffix star: { "foo" does role { method say { "foo" } }; }; { say "foo".say }
camelia star-m 2016.04: OUTPUT«foo␤»
Zoffix dafuq
m: $_.Int does role { method gist { self + 2 } } for ^100; say 2 + 2 01:51
camelia rakudo-moar 9b579d: OUTPUT«This type cannot unbox to a native string: P6opaque, Int+{<anon|73702160>}␤ in block <unit> at <tmp> line 1␤␤»
Zoffix m: module { { { { { .Int does role { method Str { (self + 2).Str } } for ^1000; } } } } }; { { { { say "2 + 1 is {2 + 1}"; say "2 * 0 is {2 * 0}"; say "the-answer is " ~ 42} } } } 01:58
camelia rakudo-moar 9b579d: OUTPUT«2 + 1 is 15␤2 * 0 is 16␤the-answer is 42␤»
Zoffix I wonder why the math operations give nonsense, but the ~ 42 is right 01:59
m: {{{{{ &say does role { method CALL-ME ($s) { "You wanted to print `$s`, eh? Well... YOU CAN'T! Muahaha".print } } }}}}}; {{{{{ say "Foo" }}}} } 02:06
camelia rakudo-moar 9b579d: OUTPUT«You wanted to print `Foo`, eh? Well... YOU CAN'T! Muahaha»
Zoffix ^ I wonder if this should even be allowed :S
m: use MONKEY-TYPING; augment class Sub { method CALL-ME ($) { say "wat" } }; 02:07
camelia rakudo-moar 9b579d: OUTPUT«Unhandled exception: Too many positionals passed; expected 2 arguments but got 4␤ at <tmp>:1 (<ephemeral file>:CALL-ME)␤ from gen/moar/m-BOOTSTRAP.nqp:2841 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/Perl6/BOOTSTRAP.moarvm:)␤ from gen/moar/m-BOO…»
Zoffix :/
m: use MONKEY-TYPING; augment class Int { method abs { "can't do this" } }; 02:08
camelia rakudo-moar 9b579d: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Package 'Int' already has a method 'abs' (did you mean to declare a multi-method?)␤at <tmp>:1␤»
Zoffix This ^. You can't augment a class method, but you can do considerable damage with mixing into core things.
m: {{{{{ &sum does role { method CALL-ME (@els) { [-] @els } } }}}}}; {{{{{ say sum ^100 }}}} } 02:10
camelia rakudo-moar 9b579d: OUTPUT«-4950␤»
Zoffix Actually, I can "exploit" the augment to inject my stuff into core methods too 03:19
Zoffix smells an exciting blog post
m: use MONKEY-TYPING; augment class Str { subset MyOwn of Str where *; multi method uc (MyOwn $self:) { say "No uppercase for you!"; $self; }}; say "foo".uc; 03:20
camelia rakudo-moar 9b579d: OUTPUT«No uppercase for you!␤foo␤»
Zoffix Interestingly, just stuffing where * into the sig in this case doesn't work. NIY, I'm guessing. 03:21
[Tux] This is Rakudo version 2016.06-25-g9b579d0 built on MoarVM version 2016.06 06:21
test 16.514
test-t 9.921
csv-parser 22.532
no fails. sad to see it go *up* again 06:22
BrokenRobot hm... the augment multi trick doesn't work on my 2016.04 12:34
m: use MONKEY-TYPING; augment class Str { subset MyOwn of Str where *; multi method uc (MyOwn $self:) { say "No uppercase for you!"; $self; }};
camelia ( no output )
BrokenRobot Oh, never mind. I forgot to actually call the augmented method >_< 12:35
[Coke] finally gets some p6 time this coming week, and tries to figure out what to hack on. 13:22
BrokenRobot rt.perl.org/Ticket/Display.html?id=128476 and rt.perl.org/Ticket/Display.html?id=128457 look very attractive :P 13:54
#128457 should actually read "of Perl 6 and Perl 5 modules"
MadcapJake [Tux]: is there any way to download the csv you are using for those tests? 14:36
b2gills It doesn't appear that %*ENV works with nul characters, unless I'm doing something wrong 14:51
geekosaur I don't think that can be fixed, since it's reflecting process environment which is C strings 14:53
jnthn Was gonna say, we receive it and pass it along as C strings, which are NULL terminated. 14:55
b2gills It was for displaying the results of a CG, I worked around it by not decoding it first codegolf.stackexchange.com/questio...3701#83701 14:58
The interesting thing is that the character that followed the nul made it in just fine 14:59
psch grr 15:33
this is still all really opaque
especially with heisen failure modes 15:36
as in, a plain install-core-dist.pl run dies with an NPE
calling it in way that calls jdb-server it dies with the getexttype error instead 15:37
which i of course can't debug when i try to catch an NPE...
|Tux| MadcapJake, tux.nl/Talks/CSV6/speed.html - where I use 10000 instead of 1000000 15:39
MadcapJake cool thanks! 15:41
bartolin psch: you should be able to avoid the getextype error if you revert (or special case with '#?!jvm') rakudo commit e5443765d4 16:56
#?if !jvm 16:57
psch bartolin: yeah, i saw that suggestion 16:58
bartolin: i'm more interested in figuring out why it happens right now though :)
i have a suspicion, fwiw 16:59
bartolin I see (just wanted to make sure that you did not miss it; you seemed to be desperate :-) 17:00
psch yeah, i seem to do that a lot :/ 17:02
MadcapJake |Tux|: oofta, only 16% of the way to finishing this csv file :P 17:37
[Tux] oofta? 19:51
timotimo are you running it in valgrind or something? :) 20:06
MadcapJake oofta is a wisconsin saying :P means "gee wiz" or "oi vey" or somesuch 20:13
took 2 hrs and 30 mins :O 20:14
b2gills oofta is the sound that you make as someone hands you a box that is way heavier than you thought it was 20:39
FROGGS like you help someone (probably a girl) changing flats and you get the box that says 'livingroom' and which is full of books? 20:42
of course that person moves from the fifth floor of a building to the sixth floor of another 20:43
ev-er-y-time 20:44
brrt that's not possible
where did the extra floor go
:-P
FROGGS heh, I dont even understand :o) 20:45
brrt well, you assert that someone is always moving from the 5th to the 6th floor
FROGGS it is not the same someone 20:46
problem solved :o)
brrt clearly, within the time they lived there, one of the floors between the ground and the 6th must have disappeared
:-D
geekosaur building sank from the weight of the books >.> 20:47
FROGGS and then they were requested to leave...
because loosing paying ppl due to vanishing floors just sucks 20:48
jnthn was most relived to move into a building with a lift this time around 21:02
I barely use it since I'm only on the third floor.
But darn was it welcome when moving in.
awwaiid github.com/rakudo/rakudo/pull/799 fixes the current known rakudo-REPL issues, if anyone has a chance to review 22:54