Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-10-23

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

All times shown according to UTC.

Time Nick Message
01:32 Zoffix What's the <-42/2> <-42+2i> syntax (with the angles around it)? It follows a different parsing path. Is that to prepare compile-time values for Rats and Complex instead of computing them at runtime?
01:33 Zoffix m: multi foo (<1/3>) {}
01:33 camelia rakudo-moar 127b3b: ( no output )
01:33 Zoffix m: multi foo (<1/3>) {}(1/3)
01:33 camelia rakudo-moar 127b3b: ( no output )
01:33 Zoffix Well, that's good enough for me to reject RT#129911
01:33 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129911
01:49 ilbot3 joined #perl6-dev
01:49 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
02:15 benchable6 joined #perl6-dev
02:57 geekosaur joined #perl6-dev
04:42 hankache joined #perl6-dev
07:29 psch m: say <1/3>.WHAT
07:29 camelia rakudo-moar 127b3b: OUTPUT«(Rat)␤»
07:31 psch r: class A { has $.a; method m($.a) { } }; A.m(a => 1)
07:31 camelia rakudo-moar 127b3b: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
07:31 camelia ..rakudo-jvm 8d357a: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
07:31 psch r: class A { has $.a; method m($.a) { } }; A.m(1)
07:31 camelia rakudo-jvm 8d357a: OUTPUT«java.lang.RuntimeException: $.x parameters NYI␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
07:31 camelia ..rakudo-moar 127b3b: OUTPUT«Cannot look up attributes in a type object␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
07:32 psch r: class A { has $.a; method m($.a) { say $.a } }; A.new(:1a).m(2)
07:32 camelia rakudo-moar 127b3b: OUTPUT«Cannot find method 'STORE' on object of type Int␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
07:32 camelia ..rakudo-jvm 8d357a: OUTPUT«java.lang.RuntimeException: $.x parameters NYI␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
07:57 psch r: class A { has $.a is rw; method m($.a) { say $.a } }; A.new(:1a).m(2)
07:57 camelia rakudo-jvm 8d357a: OUTPUT«java.lang.RuntimeException: $.x parameters NYI␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
07:57 camelia ..rakudo-moar 127b3b: OUTPUT«2␤»
08:01 psch r: class A { has int $.a; method m($!a) { say $.a } }; A.m(:2a)
08:01 camelia rakudo-moar 127b3b: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:01 camelia ..rakudo-jvm 8d357a: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:01 psch r: class A { has int $.a; method m(:$!a) { say $.a } }; A.m(:2a)
08:01 camelia rakudo-moar 127b3b: OUTPUT«Cannot bind attributes in a type object␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:01 camelia ..rakudo-jvm 8d357a: OUTPUT«Cannot look up attributes in a type object␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:01 psch r: class A { has int $.a; method m(:$!a) { say $.a } }; A.new.m(:2a)
08:01 camelia rakudo-moar 127b3b: OUTPUT«2␤»
08:01 camelia ..rakudo-jvm 8d357a: OUTPUT«org.perl6.nqp.sixmodel.reprs.P6OpaqueBaseInstance$BadReferenceRuntimeException: Cannot access a native attribute as a reference attribute␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:01 psch well, spam
08:02 psch anyway, the interesting bit here is that the moar Binder has a comment that says "Ensure it's not native; NYI"
08:02 psch which apparently isn't quite true
08:29 RabidGravy joined #perl6-dev
08:44 psch r: class A { has int $.a; method m(:$!a) { say $.a } }; A.new.m(a => my int 2)
08:44 camelia rakudo-jvm 8d357a: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Malformed my␤at <tmp>:1␤------> :$!a) { say $.a } }; A.new.m(a => my int⏏ 2)␤»
08:44 camelia ..rakudo-moar 127b3b: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Malformed my␤at <tmp>:1␤------> :$!a) { say $.a } }; A.new.m(a => my int⏏ 2)␤»
08:45 psch r: class A { has int $.a; method m(:$!a) { say $.a } }; A.new.m(a => my int $ = 2)
08:45 camelia rakudo-jvm 8d357a: OUTPUT«org.perl6.nqp.sixmodel.reprs.P6OpaqueBaseInstance$BadReferenceRuntimeException: Cannot access a native attribute as a reference attribute␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:45 camelia ..rakudo-moar 127b3b: OUTPUT«2␤»
08:45 psch anyway.  the jvm issue is the actually annoying one, especially because i have no idea how to get a container for a native attribute
09:08 nine o/
09:08 yoleaux2 22 Oct 2016 21:10Z <japhb> nine: Is there a way that works in Rakudo *now* that makes it non-super-painful to write convenience modules that pull in lots of other modules (with attendent types and other exports), that will still work with the changes in your lexical_module_load branch?
09:08 yoleaux2 22 Oct 2016 21:13Z <japhb> nine: Use case: I want to separate my large pile of code into lots of small-to-medium modules for ... well, modularization.  But I'd still like to start a consuming program with a single "use Foo;" and get everything imported in for me, because essentially I'm defining a new language with all the parts of speech in different modules, and I just want to "use English;" and not "use English::Pronoun; use English::Adverb; ..."
09:11 nine .tell japhb I guess exporting is the way to go but I'm not sure that would work right now. Alternatively one could copy the imported types from MY:: to GLOBAL:: in the top level module. Right now you won't find them in MY:: but that would just shorten the copy loop :)
09:11 yoleaux2 nine: I'll pass your message to japhb.
09:17 hankache joined #perl6-dev
09:38 vendethiel- joined #perl6-dev
09:58 lizmat Files=1150, Tests=53682, 210 wallclock secs (12.54 usr  3.46 sys + 1282.12 cusr 118.37 csys = 1416.49 CPU)
10:28 hankache joined #perl6-dev
10:32 FROGGS joined #perl6-dev
10:32 FROGGS o/
10:59 cygx joined #perl6-dev
10:59 cygx o/
10:59 cygx m: class { has @.mat handles <AT-POS>; method new(Int $m, Int $n) { self.bless(mat => my @[$m;$n] = (0 xx $n) xx $m) } }.new(4, 5).mat[1;2]
10:59 camelia rakudo-moar 127b3b: OUTPUT«Index out of range. Is: 2, should be in 0..0␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
10:59 cygx ^ segfaults for me
11:00 cygx 'Actually thrown at: Segmentation fault'
11:00 timotimo haha, ouch! :D
11:01 timotimo your exact versions of everything, please?
11:02 cygx Rakudo 2016.09-169-ge2cd7a3, Moar 2016.09-42-g5d45c56, built using Strawberry Perl (iw MinGW64)
11:03 cygx (NQP 2016.09-115-gb903a05)
11:05 FROGGS works on head
11:05 FROGGS (like camelia showed)
11:13 cygx can confirm the segfault is gone on HEAD
11:16 cygx m: class { has @.mat handles <AT-POS>; method new(Int $m, Int $n) { self.bless(mat => my @[$m;$n] = (0 xx $n) xx $m) } }.new(4, 5).shape.say
11:16 camelia rakudo-moar 127b3b: OUTPUT«No such method 'shape' for invocant of type '<anon|74087296>'␤  in block <unit> at <tmp> line 1␤␤»
11:16 cygx m: class { has @.mat handles <AT-POS>; method new(Int $m, Int $n) { self.bless(mat => my @[$m;$n] = (0 xx $n) xx $m) } }.new(4, 5).mat.shape.say
11:16 camelia rakudo-moar 127b3b: OUTPUT«(*)␤»
11:16 cygx hm...
11:17 cygx m: class { has $.mat handles <AT-POS>; method new(Int $m, Int $n) { self.bless(mat => my @[$m;$n] = (0 xx $n) xx $m) } }.new(4, 5).mat.shape.say
11:17 camelia rakudo-moar 127b3b: OUTPUT«(4 5)␤»
11:18 cygx so @-sigilled attributes apparently get assigned, not bound
11:18 cygx learn something new every day
11:25 * lizmat mentions #129945 and continues to work on that
11:25 lizmat RT #129945 even
11:25 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129945
11:32 lizmat m: say "abcdefghi".match(/./,:nth(Any))   # undef value means not specified
11:32 camelia rakudo-moar 127b3b: OUTPUT«「a」␤»
11:32 lizmat m: say "abcdefghi".match(/./,:nth(Mu))   # why is Mu different ?
11:32 camelia rakudo-moar 127b3b: OUTPUT«Type check failed in binding to $nth; expected Any but got Mu (Mu)␤  in block <unit> at <tmp> line 1␤␤»
11:33 lizmat and why is this considered to be a good thing?
11:33 lizmat apparently RT #77408
11:33 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=77408
11:33 masak probably because parameters are Any-typed by default, which in turn is because junctions
11:34 masak just a guess
11:34 lizmat jnthn's comment was "jnthn           bbkr: Not accepting Mu is fine."
11:34 stmuk_ I can't "gmake install" on windows anymore various  tools/build/upgrade-repository.pl errors
11:34 lizmat so that doesn't feel like a strong "it must be that way" but more like "don't spend time on it to fix that"
11:35 lizmat now I need spend time to re-install the Mu behaviour
11:35 Ven joined #perl6-dev
11:35 lizmat jnthn TimToady:  ^^^ opinions?
11:37 * masak doesn't have a pony in the race, but is interested to hear the outcome
11:41 dalek roast: 9a26611 | lizmat++ | S05-modifier/counted-match.t:
11:41 dalek roast: Changes related to RT #129945
11:41 dalek roast:
11:41 dalek roast: Fixes RT #125026 and bypasses issues mentioned in RT #124279 as
11:41 dalek roast: gather/take is no longer used internally.  Still need to look at the
11:41 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129945
11:41 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=125026
11:41 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=124279
11:41 dalek roast: behaviour tested for RT #77408
11:41 dalek roast: review: https://github.com/perl6/roast/commit/9a266114ab
11:46 Ven joined #perl6-dev
11:54 lizmat http://www.iclarified.com/57138/apple-adds-arm-support-to-macos-sierra-kernel   # can't wait for next Thursday
11:57 [Tux] This is Rakudo version 2016.10-37-g127b3be built on MoarVM version 2016.10-15-g715e39a
11:57 [Tux] csv-ip5xs        3.344
11:57 [Tux] test            15.642
11:57 [Tux] test-t           6.937
11:57 [Tux] csv-parser      17.254
11:57 * geekosaur had been wondering when Apple would toss its hat into the ARM netbook ring...
11:58 geekosaur (of course Microsoft's still smarting over their failed attempt, but it's their own fault for not riding herd on the Office devs.)
12:03 Ven_ joined #perl6-dev
12:15 Ven joined #perl6-dev
12:19 AlexDaniel joined #perl6-dev
12:47 Ven joined #perl6-dev
13:01 Ven joined #perl6-dev
13:06 dalek roast: 0389447 | lizmat++ | S05-substitution/subst.t:
13:06 dalek roast: More changes related to RT #129945
13:06 dalek roast: review: https://github.com/perl6/roast/commit/03894478ed
13:06 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129945
13:17 Ven_ joined #perl6-dev
13:38 RabidGravy if anyones bored RT #129946 has only crept in the last few weeks or so
13:38 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129946
13:39 lizmat afk&
13:50 Ven joined #perl6-dev
14:47 Ven_ joined #perl6-dev
15:14 Zoffix left #perl6-dev
16:01 Ven joined #perl6-dev
16:33 dalek star: 2d1914c | (Steve Mynott)++ | tools/star/release-guide.pod:
16:33 dalek star: note 2016.10
16:33 dalek star: review: https://github.com/rakudo/star/commit/2d1914ce2e
16:37 cygx m: my @a = <a b c>, <d e f>; my @b[2;3] = @a; my (@c[2;3]) = @a; say @b; say @c
16:37 camelia rakudo-moar 127b3b: OUTPUT«[[(a b c) (Any) (Any)] [(d e f) (Any) (Any)]]␤[(a b c) (d e f)]␤»
16:37 cygx ^ bug?
16:57 AlexDaniel cygx: what is?
16:59 cygx AlexDaniel: @b[2;3] = @a should behave like (@c[2;3]) = @a
17:00 cygx single-argument rule and all that...
17:01 AlexDaniel m: my @a = <a b c>, <d e f g>; my @b[2;3] = @a; my (@c[2;3]) = @a; say @a; say @b; say @c
17:01 camelia rakudo-moar 127b3b: OUTPUT«[(a b c) (d e f g)]␤[[(a b c) (Any) (Any)] [(d e f g) (Any) (Any)]]␤[(a b c) (d e f g)]␤»
17:03 AlexDaniel cygx: if anything, it definitely should not behave like that…
17:05 cygx m
17:05 cygx m: my @a = <a b c>, <d e f g>; my @b; @b = @a;
17:05 camelia rakudo-moar 127b3b: ( no output )
17:05 bartolin joined #perl6-dev
17:06 cygx m: my @a = <a b c>, <d e f g>; my @b[2;3]; @b = @a;
17:06 camelia rakudo-moar 127b3b: ( no output )
17:06 cygx m: my @a = <a b c>, <d e f g>; my @b[2;3]; @b = <a b c>, <d e f g>;
17:06 camelia rakudo-moar 127b3b: OUTPUT«Index 3 for dimension 2 out of range (must be 0..2)␤  in block <unit> at <tmp> line 1␤␤»
17:06 * cygx shrugs
17:12 AlexDaniel m: my @a = <a b c>, <d e f>; my @b[2;3] = @a.map(*.list); say @a; say @b
17:12 camelia rakudo-moar 127b3b: OUTPUT«[(a b c) (d e f)]␤[[a b c] [d e f]]␤»
17:14 AlexDaniel cygx: I have no idea what it means
17:32 Ven joined #perl6-dev
17:51 Ven joined #perl6-dev
18:09 dogbert17 getting spectest failures in S05-substitution/subst.t and S05-modifier/counted-match.t, is it due to work in prograss?
18:10 timotimo if your rakudo is up to date, it should be clean, ideally
18:10 timotimo i believe liz recently made changes in that area
18:11 dogbert17 my rakudo is up to date
18:12 dogbert17 last commit is 'ntroduce R::I.LastFromIterator'
18:13 dogbert17 I'll check with lizmat when she turns up
18:14 bartolin dogbert17: and your copy of roast? i think liz made some changes there, too
18:14 dogbert17 isn't it updated automatically when you type 'make spectest'?
18:15 dogbert17 last roast change seems to be 03894478ed864647
18:16 cygx yikes, another segfault
18:17 dogbert17 that commit is from today; 'More changes related to RT #129945'
18:17 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129945
18:17 bartolin dogbert17: yes, that's one the changes I've seen. don't know what's going on, then
18:17 bartolin *one of
18:17 dogbert17 perhaps because I'm on 32 bit
18:19 lizmat dogbert17: yes, it is as a result of work in progress
18:19 lizmat I thought I had the last Str.match bug fixed... :-(
18:19 dogbert17 lizmat: suspected as much
18:19 lizmat but there's always another one  :-(
18:20 lizmat this time it involves the :p parameter of Str.match
18:20 dogbert17 "another day another bug" :_)
18:20 lizmat well, I've been working on the Str.match refactor close to 2 weeks now
18:20 lizmat I'll be glad when it's done
18:21 timotimo \o/
18:21 dogbert17 there must be plenty of other stuff to sink your teeth into
18:21 lizmat speed increase of 1.5x for simpel matches, to up to 14x for things like :nth(1,3...*), :3x
18:21 bartolin lizmat++ # persistence
18:21 dogbert17 lizmat++
18:21 lizmat dogbert17: Str.match is one of the top entries in *many* profiles
18:21 timotimo :3x  -  cat with bowtie
18:22 lizmat Cursor.MATCH being the other one
18:22 dogbert17 work well worth doing in other words :-)
18:22 lizmat one of the reasons is :nth(1,3..*) becoming faster, is not having to call Cursor.MATCH for the even numbered matches
18:22 timotimo oh yes, MATCH, that's an expensive one ...
18:23 lizmat whereas it isn't needed for things like subst
18:23 lizmat but that's for another round of opts
18:23 dogbert17 what code are you profiling to find these bottlenecks?
18:24 lizmat variations on "1234567890".match(/./, ... )
18:24 timotimo lizmat: i wonder if we can gain anything much by generating extra code at the end of the regex code that calls different stuff on the Cursor to make results generated faster
18:25 lizmat timotimo: if you can tell me a way on how to make $code := foo.can("method")[0]; $code(self,params) work faster
18:25 lizmat I'd be very interested
18:26 nine That looks awefully slow.
18:26 yoleaux2 16:21Z <japhb> nine: Hmmm, thank you re: My:: --> GLOBAL:: hint.
18:26 timotimo is that very different from if nqp::can(foo, "method") { foo.can($code:, params) }?
18:26 timotimo oh, the params has to be flattened or something?
18:27 timotimo BBIAB
18:27 lizmat no, basically there's a matrix of possibilities
18:27 lizmat :g :ov :ex on one axis
18:27 lizmat and Match object, Str object, pos,length Pair on the other axis
18:28 lizmat .comb needs .Str
18:28 lizmat .subst needs pos/length Pair
18:28 lizmat .match needs Match
18:28 lizmat for performance te
18:29 lizmat for performance reasons, there's now 3 iterators: one for :g, one for :ov and one for :ex
18:29 lizmat they generate expensive Match objects, which aren't needed for comb and subst
18:30 lizmat ($!cursor := $!cursor.CURSOR_MORE),
18:30 lizmat $pulled.MATCH
18:30 lizmat I'd like to parameterize the methods being called here
18:31 lizmat so I could do it in one iterator, instead of 3 now, 9 in the future
18:32 RabidGravy anyone got commit to merge https://github.com/perl6-community-modules/uri/pull/31
18:32 RabidGravy I thought I did but apparently not
18:38 * lizmat apparently has
18:38 lizmat RabidGravy: merged
18:39 RabidGravy cool
18:39 RabidGravy cheers lizmat++
18:39 RabidGravy I can get one with what I was doing again
18:44 lizmat m: say "1234567890".match(/..?/, :2p, :ov)  # expected to see 34 here ?
18:44 camelia rakudo-moar 127b3b: OUTPUT«(「34」 「45」 「56」 「67」 「78」 「89」 「90」 「0」)␤»
18:44 lizmat m: say "1234567890".match(/..?/, :2p, :ex)  # compare with :ex
18:44 camelia rakudo-moar 127b3b: OUTPUT«(「34」 「3」)␤»
18:44 lizmat jnthn TimToady: is that behaviour of :ov correct ?
18:50 lizmat combined with :p I mean
18:56 lizmat .oO( down to one bug to fix )
18:57 timotimo what's :p(2) for in match?
18:58 timotimo interesting, method match doesn't come up when searching "match" in doc.perl6.org
18:59 lizmat yeah  :-(
18:59 lizmat timotimo: it's to anchor the match at that position in the string
18:59 timotimo ok, method match is also neither in Str nor in Cool in the docs
18:59 timotimo do we write those pieces of docs manually?
18:59 timotimo ah, right, position
19:00 timotimo lizmat: if you could get me a speshlog that contains the code for the .can + invocation stuff, maybe i can find something that's faster
19:00 timotimo off the top of my head, i'd replace .[0] with .AT-POS[0], but that's about it :\
19:00 nine \o/
19:00 timotimo maybe we can even nqp::atpos if we can get around hllization
19:01 nine Got a fix for the final (known) lexical_module_loading issue :)
19:01 timotimo oh yeah!
19:01 lizmat yeah, but the overhead is in the fact that the call cannot be optimized
19:01 lizmat anyways, I'll do some benchmarks
19:01 timotimo right ...
19:02 Ven joined #perl6-dev
19:13 lizmat http://rakudo.org/2016/10/23/announce-rakudo-star-release-2016-10/   # stmuk++
19:14 timotimo # stmuk++
19:17 cognominal joined #perl6-dev
19:18 japhb .seen abstract
19:18 yoleaux2 I haven't seen abstract around.
19:18 japhb .seen ab5tract
19:18 yoleaux2 I haven't seen ab5tract around.
19:19 lizmat .seen ab6tract
19:19 yoleaux2 I saw ab6tract 26 Aug 2016 08:41Z in #perl6-dev: <ab6tract> consolidating the discussion :)
19:19 japhb Ah, interesting
19:20 japhb ab5stract_ is still in #perl6 but hasn't spoken in almost a year
19:31 lizmat hmmm....  could be more recent on perl6-dev
19:31 lizmat ah, it was  :-)  *duh*
19:36 Ven joined #perl6-dev
19:38 gfldex m: say match("", "");
19:38 camelia rakudo-moar 127b3b: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared routine:␤    match used at line 1. Did you mean 'CATCH'?␤␤»
19:44 lizmat gfldex: that's called m//  ?
19:44 gfldex i just checked to see if I have to doc it
19:47 gfldex lizmat: could you comment on the following when you are done with Str.match please? https://github.com/perl6/doc/issues/919
19:49 lizmat was it really 26 days ago already?  wow
19:51 gfldex the only place where it wasn't 26 days ago already is Samoa. :->
19:51 lizmat gfldex: apart from the changed behaviour of :nth (being always lazy, and not overal matching), the API to Str.match has not changed
19:52 lizmat so the overhaul was just for making it faster
19:52 Ven joined #perl6-dev
19:52 lizmat so, from a doc point of view, those things still need to be documented, I guess
19:56 gfldex yes, as long as there are test for all variations in roast you dont need to intervene
20:00 lizmat yes, there are a lot of them  :-)
20:00 lizmat I found out
20:00 * timotimo has eated
20:02 lizmat aten?
20:03 timotimo yes, i ated
20:05 * masak .oO( having been *being* eating )
20:07 arnsholt And what was et, by timotimo? =D
20:08 timotimo spaghetti noodles
20:10 lizmat So, a profile on "for ^10000 { "1234567890".madch(/./, :nth(* - 3)) }" reveals now that 38% of CPU is now spent in Cursor.MATCH
20:12 timotimo that's mad ch
20:13 timotimo got an idea how to make it better yet?
20:13 dalek rakudo/nom: b7201a8 | lizmat++ | src/core/Str.pm:
20:13 dalek rakudo/nom: Completely re-imagine Str.match internals
20:13 dalek rakudo/nom:
20:13 dalek rakudo/nom: Simple matches without any modifying adverbs is about 1.5x faster.
20:13 dalek rakudo/nom: Complicated setups like with :nth(1,3..*), :3x are about 14x faster.
20:13 dalek rakudo/nom: Other mixes of parameters are generally in the 2x to 3x faster range.
20:13 dalek rakudo/nom:
20:13 dalek rakudo/nom: Two semantic changes: (see RT #129945): the family of :nth (as in :st,
20:13 dalek rakudo/nom: :nd, :rd and :th) are now lazy and will return whatever they can find.
20:13 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129945
20:13 dalek rakudo/nom: Before all matches would be cached to find out if enough matches were
20:13 dalek rakudo/nom: found and none would be returned if not enough were found.  Please
20:13 lizmat sorry dalek
20:13 lizmat timotimo: madch is the name of the method I had in my augment class Str code
20:14 timotimo ooooh
20:14 lizmat so I could more easily compare old/new
20:15 timotimo yeah, good idea
20:15 gfldex does the following example actually work given the lazy nature of .map? https://github.com/perl6/doc/commit/8de94c929c
20:16 timotimo oh you mean because it might pull one entry at a time from the directory and unlink it, so you're modifying the directory while you're iterating it?
20:17 timotimo we're already using opendir and the other op that goes with it
20:17 timotimo i'm not sure how exactly the semantics are for all our platforms
20:22 Ven joined #perl6-dev
20:26 dalek roast/6.c-errata: 92928e3 | lizmat++ | S05-modifier/counted-match.t:
20:26 dalek roast/6.c-errata: RT #129945 related fixes
20:26 dalek roast/6.c-errata: review: https://github.com/perl6/roast/commit/92928e356e
20:26 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129945
20:30 dogbert17 lizmat++, looks much better, only one spectest fail (was six before)
20:31 dalek roast/6.c-errata: 437a6cf | lizmat++ | S05-substitution/subst.t:
20:31 dalek roast/6.c-errata: More RT #129945 related fixes
20:31 dalek roast/6.c-errata: review: https://github.com/perl6/roast/commit/437a6cf12d
20:31 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129945
20:31 lizmat dogbert17: yeah, the one fail is really up to TimToady / jnthn to decide on
20:31 dogbert17 oO :-)
20:31 cygx lizmat++ # performance improvements
20:31 cygx cf https://gist.github.com/cygx/db998502d493dfae53c9
20:32 lizmat basically, :nth(Mu) is now allowed, it didn't use to be so
20:32 lizmat and it tests for that
20:33 lizmat cygx: 39 seconds -> 12 seconds...  that's more than 3x as fast  :-)
20:34 cygx it used to be 86.7s a year ago
20:35 cygx (and perl5 does it in 0.18s :p)
20:35 lizmat well, yes, there's that
20:35 lizmat please note this is all optimizations in Perl 6 land
20:36 lizmat I bet some opts are possible in nqp land as well
20:36 lizmat but I won't be going there, as Cursor.MATCH seems to be now the one to look at
20:39 * lizmat hopes for some improvements in test-t as well
20:43 lizmat but it will most likely be marginal there, as most regex based matches were already removed
20:45 lizmat TimToady: btw, nth(* - 3) basically does a .tail(4).pull-one
20:45 lizmat TimToady: which means that indeed all matches are created fully, but only the last 4 are ever kept in memory
20:47 timotimo with tail we can't actually know if any given element must be fully created until we've hit the end and then it's too late
20:47 timotimo unless we can know the number of elements up front without consuming
20:47 lizmat yeah
20:47 lizmat BTW, if we can more easily create custom iterators for this
20:48 lizmat an iterator that would produce the Cursor objects only, would be much faster
20:48 lizmat it would then basically become: .tail(4).pull-one.MATCH
20:48 lizmat so call MATCH only once
20:49 lizmat but that would be another entry on the iterator matrix, basically going from 3x3 to 3x4
20:51 nine Ha! use Foo::Bar; class Foo { } is now fixed, but class Foo { use Foo::Bar; } is still broken.
20:51 nine Both patters are used by panda...
20:51 lizmat nine: :-(
20:53 nine I guess it's again nothing a metric ton of debug output can't explain. But that's tomorrow :)
20:54 timotimo ooooh, i might just have fixed the mini fsa cache i made the other day
21:35 cognominal joined #perl6-dev
22:26 dalek rakudo/nom: 41e2572 | lizmat++ | src/core/Str.pm:
22:26 dalek rakudo/nom: Optimize Str.match a bit more
22:26 dalek rakudo/nom:
22:26 dalek rakudo/nom: Basically found a way to create a configurable iterator that doesn't
22:26 dalek rakudo/nom: take more than the previous approach using several different iterators.
22:26 dalek rakudo/nom: This easily allowed a much cheaper iterator that just returns Cursor
22:26 dalek rakudo/nom: objects to be made, and used specifically in the :nth(*) and :nth(*-1)
22:26 dalek rakudo/nom: cases, which are now about 2x as fast (for a regexp with 10 matches)
22:26 dalek rakudo/nom: because only on the last pulled value a .MATCH needs to be done.
22:27 dalek rakudo/nom:
22:27 dalek rakudo/nom: Also built the infrastructure to support iterators returning Str and
22:27 dalek rakudo/nom: Pairs with from/length information, for later usage in .comb and .subst.
22:29 timotimo in the future i'll always be using rand_i < 0 instead of rand_n(1e0) < 0.5e0
22:29 timotimo for my extremely-fast stuff
22:29 timotimo let me actually bench that
22:30 timotimo benchable is down :(
22:33 timotimo okay, in this test case it's hardly a difference at all
22:36 timotimo yeah, basically 0 difference
22:41 benchable6 joined #perl6-dev
22:57 benchable6 joined #perl6-dev
22:58 dalek rakudo/nom: 4fc17df | lizmat++ | src/core/Str.pm:
22:58 dalek rakudo/nom: Simplify Cursor initialization
22:58 dalek rakudo/nom:
22:58 dalek rakudo/nom: This seems to shave off another 5% on all matches
22:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4fc17dfe1a
22:58 lizmat and that concludes my hacking for today
22:58 lizmat good night, #perl6-dev!
22:59 lizmat looking forward to tomorrows test-t!
23:04 geekosaur joined #perl6-dev
23:05 timotimo gnite lizmat :)
23:12 travis-ci joined #perl6-dev
23:12 travis-ci Rakudo build failed. Elizabeth Mattijsen 'Optimize Str.match a bit more
23:12 travis-ci https://travis-ci.org/rakudo/rakudo/builds/169989870 https://github.com/rakudo/rakudo/compare/b7201a8f2233...41e257205196
23:12 travis-ci left #perl6-dev
23:12 buggable [travis build above] ☠ Did not recognize some failures. Check results manually. All failures are on JVM only.
23:17 dogbert17 joined #perl6-dev
23:23 MasterDuke is there any way to get the jvm rakudo to use fewer threads (or whatever it uses) when running make j-spectest?
23:23 yoleaux2 21 Oct 2016 17:24Z <iBakeCake> MasterDuke: well, I've just killed it. Almost everything fails and I suspect it's just my box trying to do too many tests at once: http://fpaste.scsys.co.uk/537400
23:53 travis-ci joined #perl6-dev
23:53 travis-ci Rakudo build errored. Elizabeth Mattijsen 'Simplify Cursor initialization
23:53 travis-ci https://travis-ci.org/rakudo/rakudo/builds/169993824 https://github.com/rakudo/rakudo/compare/41e257205196...4fc17dfe1a66
23:53 travis-ci left #perl6-dev
23:53 buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), or GitHub connectivity (0). All failures are on JVM only.

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