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