Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-06-24

| Channels | #perl6-dev index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:15 geekosaur jdv79, that's over 2 months, note. there have been a bunch of individual smallish speedups that add up since then.
00:22 timotimo does anybody have a benchmark that involves a lot of single-grapheme strings?
01:14 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)␤»
01:15 MasterDuke timotimo: something like that ^^^ ?
01:15 MasterDuke i feel i've done things like that for a bunch of project euler problems
01:25 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:28 MasterDuke one-character strings (the output of .comb) aren't one-grapheme?
01:29 cognominal joined #perl6-dev
01:31 timotimo they are
01:32 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
01:35 MasterDuke size of what?
01:35 timotimo 20 numbers
01:36 timotimo also, there's a difference still between Str objects and the MVMStrings they box
01:36 timotimo so you'll still end up with a Str object each time, much unlike the boxed integer cache we also have
01:36 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
01:37 Zoffix m: join ^0xFFFFF».chr xx 20000; # 😜
01:37 camelia rakudo-moar 9b579d: OUTPUT«(signal SEGV)»
01:37 timotimo m: 5 does role { method omg { say "oh my" } }; say 5.omg
01:37 camelia rakudo-moar 9b579d: OUTPUT«oh my␤True␤»
01:37 timotimo m: 1024 does role { method omg { say "oh my" } }; say 1024.omg
01:37 camelia rakudo-moar 9b579d: OUTPUT«oh my␤True␤»
01:37 timotimo huh?
01:37 Zoffix ?
01:37 timotimo m: 99_999_999 does role { method omg { say "oh my" } }; say 99_999_999.omg
01:37 camelia rakudo-moar 9b579d: OUTPUT«oh my␤True␤»
01:38 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␤␤»
01:38 timotimo how does that cache i made actually work? :D
01:38 timotimo m: my @foo = ^10000.List; 99_999_999 does role { method omg { say "oh my" } }; say 99_999_999.omg
01:38 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␤»
01:38 timotimo m: my @foo = (^10000).List; 99_999_999 does role { method omg { say "oh my" } }; say 99_999_999.omg
01:38 camelia rakudo-moar 9b579d: OUTPUT«oh my␤True␤»
01:38 timotimo *shrug*
01:39 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␤»
01:40 MasterDuke m: say 99_999_999 ~~ Int; say 99_999_999 === Int
01:40 camelia rakudo-moar 9b579d: OUTPUT«True␤False␤»
01:42 MasterDuke m: say 99_999_999 ~~ Int; say 99_999_999 === Int; say 99_999_999.WHAT === Int
01:46 camelia rakudo-moar 9b579d: OUTPUT«True␤False␤True␤»
01:46 Zoffix m: "foo" does role { method foo { "foo" } }; say "foo".foo
01:46 camelia rakudo-moar 9b579d: OUTPUT«foo␤»
01:46 Zoffix m: "foo" does role { method foo { "foo" } }; say "foos".foo
01:46 camelia rakudo-moar 9b579d: OUTPUT«Method 'foo' not found for invocant of class 'Str'␤  in block <unit> at <tmp> line 1␤␤»
01:46 Zoffix m: { "foo" does role { method foo { "foo" } }; }; { say "foo".foo }
01:46 camelia rakudo-moar 9b579d: OUTPUT«foo␤»
01:46 Zoffix That's creepy :S
01:46 Zoffix star: { "foo" does role { method foo { "foo" } }; }; { say "foo".foo }
01:46 camelia star-m 2016.04: OUTPUT«foo␤»
01:46 Zoffix star: { "foo" does role { method say { "foo" } }; }; { say "foo".foo }
01:46 camelia star-m 2016.04: OUTPUT«Method 'foo' not found for invocant of class 'Str+{<anon|54957776>}'␤  in block <unit> at <tmp> line 1␤␤»
01:46 Zoffix star: { "foo" does role { method say { "foo" } }; }; { say "foo".say }
01:46 camelia star-m 2016.04: OUTPUT«foo␤»
01:46 Zoffix dafuq
01:48 ilbot3 joined #perl6-dev
01:48 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
01:51 Zoffix 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␤␤»
01:58 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␤»
01:59 Zoffix I wonder why the math operations give nonsense, but the ~ 42 is right
02:06 Zoffix 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»
02:06 Zoffix ^ I wonder if this should even be allowed :S
02:07 Zoffix 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…»
02:07 Zoffix :/
02:08 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␤»
02:08 Zoffix This ^. You can't augment a class method, but you can do considerable damage with mixing into core things.
02:10 Zoffix m: {{{{{ &sum does role { method CALL-ME (@els) { [-] @els } } }}}}};  {{{{{   say sum ^100 }}}} }
02:10 camelia rakudo-moar 9b579d: OUTPUT«-4950␤»
02:13 lizmat joined #perl6-dev
03:19 Zoffix Actually, I can "exploit" the augment to inject my stuff into core methods too
03:19 * Zoffix smells an exciting blog post
03:20 Zoffix 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␤»
03:21 Zoffix Interestingly, just stuffing where * into the sig in this case doesn't work. NIY, I'm guessing.
05:29 lizmat joined #perl6-dev
06:21 [Tux] This is Rakudo version 2016.06-25-g9b579d0 built on MoarVM version 2016.06
06:21 [Tux] test            16.514
06:21 [Tux] test-t           9.921
06:21 [Tux] csv-parser      22.532
06:22 [Tux] no fails. sad to see it go *up* again
06:28 skids joined #perl6-dev
07:29 Zoffix joined #perl6-dev
07:32 sno joined #perl6-dev
07:54 lizmat joined #perl6-dev
09:16 AlexDaniel joined #perl6-dev
11:25 RabidGravy joined #perl6-dev
12:08 brrt joined #perl6-dev
12:34 BrokenRobot hm... the augment multi trick doesn't work on my 2016.04
12:34 BrokenRobot m: use MONKEY-TYPING; augment class Str { subset MyOwn of Str where *; multi method uc (MyOwn $self:) { say "No uppercase for you!"; $self; }};
12:34 camelia rakudo-moar 9b579d: ( no output )
12:35 BrokenRobot Oh, never mind. I forgot to actually call the augmented method >_<
13:22 * [Coke] finally gets some p6 time this coming week, and tries to figure out what to hack on.
13:54 BrokenRobot https://rt.perl.org/Ticket/Display.html?id=128476 and https://rt.perl.org/Ticket/Display.html?id=128457 look very attractive :P
13:54 BrokenRobot #128457 should actually read "of Perl 6 and Perl 5 modules"
14:14 lizmat joined #perl6-dev
14:36 MadcapJake [Tux]: is there any way to download the csv you are using for those tests?
14:41 perlpilot joined #perl6-dev
14:47 brrt joined #perl6-dev
14:50 skids joined #perl6-dev
14:51 b2gills It doesn't appear that %*ENV works with nul characters, unless I'm doing something wrong
14:53 geekosaur I don't think that can be fixed, since it's reflecting process environment which is C strings
14:55 jnthn Was gonna say, we receive it and pass it along as C strings, which are NULL terminated.
14:58 b2gills It was for displaying the results of a CG, I worked around it by not decoding it first https://codegolf.stackexchange.com/questions/83673/bytes-character/83701#83701
14:59 b2gills The interesting thing is that the character that followed the nul made it in just fine
15:02 awwaiid joined #perl6-dev
15:33 psch grr
15:33 psch this is still all really opaque
15:36 psch especially with heisen failure modes
15:36 psch as in, a plain install-core-dist.pl run dies with an NPE
15:37 psch calling it in way that calls jdb-server it dies with the getexttype error instead
15:37 psch which i of course can't debug when i try to catch an NPE...
15:39 |Tux| MadcapJake, http://tux.nl/Talks/CSV6/speed.html - where I use 10000 instead of 1000000
15:41 MadcapJake cool thanks!
15:52 perlpilot joined #perl6-dev
16:41 jrusso joined #perl6-dev
16:41 lizmat joined #perl6-dev
16:56 bartolin psch: you should be able to avoid the getextype error if you revert (or special case with '#?!jvm') rakudo commit e5443765d4
16:57 bartolin #?if !jvm
16:58 psch bartolin: yeah, i saw that suggestion
16:58 psch bartolin: i'm more interested in figuring out why it happens right now though :)
16:59 psch i have a suspicion, fwiw
17:00 bartolin I see (just wanted to make sure that you did not miss it; you seemed to be desperate :-)
17:02 psch yeah, i seem to do that a lot :/
17:31 brrt joined #perl6-dev
17:37 MadcapJake |Tux|: oofta, only 16% of the way to finishing this csv file :P
17:41 brrt joined #perl6-dev
18:42 brrt joined #perl6-dev
19:09 FROGGS joined #perl6-dev
19:09 lizmat joined #perl6-dev
19:51 [Tux] oofta?
19:57 sno joined #perl6-dev
20:06 timotimo are you running it in valgrind or something? :)
20:13 MadcapJake oofta is a wisconsin saying :P means "gee wiz" or "oi vey" or somesuch
20:14 MadcapJake took 2 hrs and 30 mins :O
20:39 b2gills oofta is the sound that you make as someone hands you a box that is way heavier than you thought it was
20:42 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:43 FROGGS of course that person moves from the fifth floor of a building to the sixth floor of another
20:44 FROGGS ev-er-y-time
20:44 brrt that's not possible
20:44 brrt where did the extra floor go
20:44 brrt :-P
20:45 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
20:46 FROGGS it is not the same someone
20:46 FROGGS problem solved :o)
20:46 brrt clearly, within the time they lived there, one of the floors between the ground and the 6th must have disappeared
20:46 brrt :-D
20:47 geekosaur building sank from the weight of the books >.>
20:47 FROGGS and then they were requested to leave...
20:48 FROGGS because loosing paying ppl due to vanishing floors just sucks
21:02 * jnthn was most relived to move into a building with a lift this time around
21:02 jnthn I barely use it since I'm only on the third floor.
21:02 jnthn But darn was it welcome when moving in.
21:13 sno joined #perl6-dev
22:54 awwaiid https://github.com/rakudo/rakudo/pull/799 fixes the current known rakudo-REPL issues, if anyone has a chance to review
23:03 sno joined #perl6-dev
23:08 [Sno] joined #perl6-dev

| Channels | #perl6-dev index | Today | | Search | Google Search | Plain-Text | summary