Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
00:09 Zoffix Woot... watch out for snow tomorrow... There's a positive comment on Reddit: "Perl6 is such a wonderful language. It nicely hits a sweet point. No weird syntax like Haskell or too many parenthesis like in $LIPS. Allows a wide range of different programming paradigma. Has cherry picked a lot of nice stuff from other languages. Is a true Perl language without it ugly parts, which forced me to give up Perl5"
01:03 ugexe m: use Test:ver<6.c>
01:03 camelia rakudo-moar e5d7a1: ( no output )
01:03 ugexe m: use Test:ver<6>
01:03 camelia rakudo-moar e5d7a1: OUTPUT«===SORRY!===␤Cannot resolve caller Numeric(Version: ); none of these signatures match:␤    (Mu:U \v: *%_)␤»
01:03 ugexe m: use Test:ver<*>
01:03 camelia rakudo-moar e5d7a1: OUTPUT«===SORRY!===␤Could not find Test:ver<*> at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::R…»
01:04 ugexe m: use Test; use-ok("Test:alsjfalskjdflasdf")
01:04 camelia rakudo-moar e5d7a1: OUTPUT«ok 1 - The module can be use-d ok␤»
01:06 ugexe EVAL is not properly handling the pairs attached to the module name
01:24 ShimmerFairy joined #perl6-dev
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
06:33 [Tux] This is Rakudo version 2016.08.1-115-ge5d7a16 built on MoarVM version 2016.08-35-g5108035
06:33 [Tux] csv-ip5xs        9.470
06:33 [Tux] test            15.802
06:33 [Tux] test-t           7.343
06:33 [Tux] csv-parser      17.042
06:34 lizmat Files=1135, Tests=52707, 244 wallclock secs (13.41 usr  4.10 sys + 1493.71 cusr 138.76 csys = 1649.98 CPU)  # on a cold machine
06:37 nine lizmat: 13 seconds less than yesterday :)
06:37 lizmat well, yes, but yesterday the machine I ran this on, wasn't cold
06:49 nine Btw. time perl6 -e 'use Inline::Perl5' went down from 415ms to 310ms through the optimizations of the past two days.
06:52 lizmat $ time perl6 -e 'use Inline::Perl5'  real0m0.275s   # for reference
06:59 nine Btw. there is no measurable gain from removing RAKUDO_MODULE_DEBUG
07:14 dalek rakudo/nom: f648d3b | niner++ | src/core/CompUnit/PrecompilationStore/File.pm:
07:14 dalek rakudo/nom: Save a couple more microseconds by getting rid of a Hash
07:14 dalek rakudo/nom:
07:14 dalek rakudo/nom: lizmat++ for noticing
07:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f648d3bcfa
07:44 nine Fun fact: a precompiled GTK::Simple could load in 0.6s if they changed the require to use statements in https://github.com/perl6/gtk-simple/blob/master/lib/GTK/Simple.pm6
07:57 RabidGravy joined #perl6-dev
08:09 timotimo is that semantically equivalent in this case, nine?
08:16 nine timotimo: AFAICT yes.
08:18 timotimo *neat*
08:20 nine It's much faster because with require, the transitive dependencies were not included in GTK::Simple's own (which were none) so we process very similar dependency trees over and over again instead of a consolidated list.
08:21 timotimo ah
08:21 timotimo i'm opening an issue linking to this discussion
08:33 nine The most equivalent alternative is probably need, not use. Both improve load time just the same.
08:51 nine We spend 18 % of the time to load (the improved) GTK::Simple just checking if PrecompilationIds match /^<[A..Za..z0..9._-]>+$/
08:51 nine I.e. subset type checking. And only the regex part of that, not even the length checks.
08:52 jnthn Wowzer :)
08:52 jnthn Guess I should get on with trying to optimize how we compile simple regexes/grammars :)
08:53 timotimo that's true, yes. quite.
08:53 timotimo they are terribly slow at the moment
08:53 nine I guess I'm just glad that I could finally join the performance game. It's usually my favourite part of software development :)
08:54 timotimo \o/
08:54 timotimo do we have a way (with nqp ops) to check if a given string starts with a composite grapheme?
09:04 jnthn Still walking up, but nqp::chr(nqp::ord(str)) eq nqp::substr(str, 0, 1) is the obvious way
09:06 timotimo ah
09:06 timotimo that might be expensive
09:06 * timotimo AFK
09:07 jnthn Oh, you can use nqp::eqat to make it a bit cheaper :)
09:07 timotimo a bit, yeah
10:05 ShimmerFairy joined #perl6-dev
10:39 Zoffix m: sub foo { @_.join }; my $c = any (flat 'a'..'z', 'A'..'Z', 0..9, <- _ .>); my $what = 'zoffix'; say  $what eq foo $c xx $what.chars
10:39 camelia rakudo-moar f648d3: OUTPUT«False␤»
10:39 * Zoffix expected a True :/
10:44 Zoffix Ah, you can use @_ if you want it to Junct
10:44 Zoffix m: sub foo { ($^a, $^b, $^c, $^d, $^e, $^f).join }; my $c = any (flat 'a'..'z', 'A'..'Z', 0..9, <- _ .>); say so 'zoffix' eq foo $c xx 6
10:44 camelia rakudo-moar f648d3: OUTPUT«Too few positionals passed; expected 6 arguments but got 1␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:44 Zoffix m: sub foo { ($^a, $^b, $^c, $^d, $^e, $^f).join }; my $c = any (flat 'a'..'z', 'A'..'Z', 0..9, <- _ .>); say so 'zoffix' eq foo |($c xx 6)
10:45 Zoffix :}
10:45 camelia rakudo-moar f648d3: OUTPUT«(timeout)»
10:45 Zoffix *can't use
10:46 Zoffix m: sub foo { ($^a, $^b, $^c).join }; my $c = any flat 'a'..'z'; say so 'zof' eq foo |($c xx 3)
10:46 camelia rakudo-moar f648d3: OUTPUT«True␤»
10:46 Zoffix \o/
10:46 jnthn Yeah, it's like a *@_ signature, and an @foo can hold Mu
10:47 Zoffix Now, on to scaring people on reddit who think $a = 1|2|3 is too magical :P
10:47 * jnthn would probably have written it with X~ :P
10:48 stmuk people on reddit are delicate snowflakes
10:48 DrForr m: my $x = 3; 1|2|4 < $x < 9;
10:48 camelia rakudo-moar f648d3: ( no output )
10:48 DrForr m: my $x = 5; 1|2|4 < $x < 9;
10:48 camelia rakudo-moar f648d3: ( no output )
10:48 Zoffix m: my $x = 5; say 1|2|4 < $x < 9;
10:48 camelia rakudo-moar f648d3: OUTPUT«True␤»
10:48 DrForr Not sure what that'd mean though :)
10:49 DrForr Ah, still too used to the p5 bot.
10:51 TheLemonMan joined #perl6-dev
10:59 Zoffix stmuk, I think I'm actually starting to enjoy that crowd :) Set in their ways. Terrified of innovation. It's a fun game to try to write an article that will terrify them the most :}
10:59 Zoffix "Why not just use arrays/lists or another collection and use a "Contains" type of function?"  ah yes, why not. The language you use doesn't have Junctions, does it? ;) Scary
11:55 stmuk_ joined #perl6-dev
12:51 [Coke] TimToady: regarding http://irclog.perlgeek.de/perl6/2016-09-05#i_13155397 - we have a 6.d document in specs/ somewhere where you can write down those sorts of things.
13:37 masak TIL there's a word "yclept" in English, apparently still in tongue-in-cheek use.
13:50 TheLemonMan hmm, let's say an object O inherits two roles A and B that both define a method M, is there a way to forcefully invoke a specific one ?
13:51 nine m: role A { method m() { say "A"; } }; role B { method m() { say "B"; } }; class C does A does B {}; C.m # role clash
13:51 camelia rakudo-moar f648d3: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Method 'm' must be resolved by class C because it exists in multiple roles (B, A)␤at <tmp>:1␤»
13:51 nine TheLemonMan: ^^^
13:52 nine m: role A { method m() { say "A"; } }; role B { method m() { say "B"; } }; class C does A does B { method m() { self.B::m } }; C.m # resolved
13:52 camelia rakudo-moar f648d3: OUTPUT«B␤»
13:57 masak the `self.B::m` syntax is a wonderful "lie-to-children"
13:57 masak it really has nothing to do with packages. methods install in the `has` scope, not in the `our` scope
13:57 masak but it's irresistably appropriate nonetheless
14:05 [Coke] https://github.com/supernovus/perl6-http-easy/blob/master/lib/HTTP/Easy.pm6#L52 - there should be a start block somewhere in there, no?
14:07 [Coke] BTW, I'm still confounded by trying to add async processing to a Bailador app, let me gist some chunks.
14:07 ugexe there might have been, but you have to read the socket in the same thread you create it in
14:07 ugexe so maybe he just fell back to that in the mean time
14:09 [Coke] https://gist.github.com/coke/84389edf917a1a65b9f0e930f1c86848 - when I run this (and there's a lot elided on line 3), if the request is coming in, or if the promise is being worked on, I get output from the react block - otherwise, it goes silent; it should be emitting something every 5s or so.
14:11 TheLemonMan m: class :: {has $.x is rw;method a{$.x.item=[1,2,3];dd $.x;dd $!x}}.new.a
14:11 camelia rakudo-moar f648d3: OUTPUT«$[1, 2, 3]␤Array $!x = $[1, 2, 3]␤»
14:12 [Coke] (If I just have that react loop, it does reliably run every 5s or so.)
14:13 TheLemonMan I suspect it boils down to the fact '$.x' is desugared as 'self.x.item'
14:14 [Coke] so, something in the baile (http::easy.run) is, I'm guessing, getting "stuck" and preventing the async code from running.
14:15 [Coke] tempting to split up the "accept http requests" logic and the "do something about the request" logic into 2 separate programs and using redis/temp files/something to handle offloading the work instead of start{}. :|
14:17 TheLemonMan I also suspect it ends up calling the item method on the iterable object, but I have not managed yet to discover why
14:18 lizmat joined #perl6-dev
14:19 [Coke] (ah, it's not just the react that's hung up; it processes part of the start block and then hangs. then, when the second request comes in, it finishes processing the first request, gets started on the second one (which now gets even less far in processing), and then hangs again before completing the block. Yup, very borked.
14:19 * lizmat waves from Vaduz
14:19 [Coke] I will try to come up with a test case for this for Bailador, but it's probably really a core issue.
14:20 * Ulti waves from Cambridge
14:21 jnthn Been a while since I was there :)
14:21 jnthn And I had to look up Vaduz on the map :P
14:24 [Coke] (test) of course, simplifying it down to the minimum means it doesn't fail. :|
14:25 TheLemonMan m: class :: {has $.x is rw;method a{$.x=class :: {};dd $.x;dd $!x}}.new.a # doesn't happen with generic objects
14:25 camelia rakudo-moar f648d3: OUTPUT«<anon|83268576> $!x = <anon|83268576>␤<anon|83268576> $!x = <anon|83268576>␤»
14:25 lizmat it's the 5th country this trip that Wendy and I visit for the first time
14:26 TheLemonMan m: class :: {has $.x is rw;method a{$.x={};dd $.x;dd $!x}}.new.a # happens with hashes (implements Iterable)
14:26 camelia rakudo-moar f648d3: OUTPUT«${}␤Hash $!x = ${}␤»
14:26 TheLemonMan m: class :: {has $.x is rw;method a{$.x=[];dd $.x;dd $!x}}.new.a # happens with arrays (implements Iterable)
14:26 camelia rakudo-moar f648d3: OUTPUT«$[]␤Array $!x = $[]␤»
14:28 timotimo [Coke]:  sometimes exceptions will end your start block in the middle and not actually show up
14:29 [Coke] timotimo: that's why I keep the list of promises and examine their status
14:29 [Coke] none of them are dying. they're just... paused.
14:31 [Coke] ... and then the loop to check their status gets paused as well.
14:31 timotimo interesting
14:32 timotimo you are on very latest moar i assume? as jnthn recently fixed a bunch of problems where locks could move away from under a promise etc?
14:33 [Coke] 2016.08.1
14:34 timotimo inot sure if that has the fixes
14:35 timotimo i would update at least moar to be sure im not run ing against fixed bugs :)
14:35 timotimo the trouble came when mutexes were gc moved. or maybe semaphores
14:36 [Coke] can I get the abs. latest with 'rakudobrew triple master master master' ?
14:36 timotimo we did not habe them at an indirecton so calling lock or unlock suddenly arrived at semantically a distinctt lock while another lock got unlockable
14:36 [Coke] hah! misspelled as "rakudobrew tripe"
14:36 timotimo nom master maatee
14:37 timotimo ...
14:37 timotimo phone keyboard + shaking train + unreliable net connection
14:37 [Coke] got it.
14:38 timotimo commute continues by car, so no motre irc for now
14:38 [Coke] timotimo: ``
14:38 [Coke] timotimo: ~~
14:40 [Coke] huh. 'rakudobrew triple nom master master' dies with Couldn't determine correct make program. Aborting.
14:42 * [Coke] does it the old fashioned way
15:05 [Coke] I just built a one off rakudo. added it to my path. which perl6 shows the right perl6. run "perl6 bootstrap.pl" in panda. it ends with a note that I should add the rakudobrew dir to my path. :(
15:09 [Coke] ok. I suspect it was because I did a "perl6 bootstrap.pl" without adjusting away from rakudobrew first; hit ^C, fixed path, ran again. maybe something got stuck?
15:09 perlpilot_ joined #perl6-dev
15:18 [Coke] timotimo: AHAHAHAHA
15:18 [Coke] timotimo: now the start block hangs EVEN FASTER
15:22 [Coke] maybe this means I can at least come up with a test case that isn't my entire script.
15:36 literal joined #perl6-dev
15:36 geekosaur `which` can lie. use `type`
15:37 brrt joined #perl6-dev
15:37 geekosaur (and `type` will pribably tell you it's still using the rakudobrew one, because it found that one and remembered it; try `hash -r`)
15:41 * [Coke] updates https://gist.github.com/coke/84389edf917a1a65b9f0e930f1c86848 to highlight his bailador(socket) vs. async issue.
15:42 skids joined #perl6-dev
15:42 jnthn [Coke]: I'm guessing that doesn't simply return "OK" and then spit out "A" straight away and "B" soon after?
15:43 [Coke] jnthn: it returns OK immediately, emits "A" immediately. "B" doesn't show up until you invoke the curl line about 8 times.
15:43 [Coke] remove the start? "B" is emitted almost immediately.
15:43 jnthn ...oh.
15:43 [Coke] change the slurp to a sleep 4? "B" shows up reliably in 4 seconds.
15:44 [Coke] (with only one curl)
15:44 jnthn Do curls within that 4 seconds get blocked?
15:44 [Coke] real world use case: github web hooks that kick off a build. trying to return to the hook immediately, but do some long running process in the background that generates and runs a docker container.
15:45 [Coke] jnthn: nope
15:45 [Coke] they are all accepted, then in 4 seconds, you get that many B's back
15:46 jnthn [Coke]: OK. I've got Perl 6 tuits tomorrow, if I forget then poke me about it then...guess I can install Bailador and reproduce it easy enough.
15:46 [Coke] so it seems to need the http listener, the start, AND the IO.slurp (or a qqx/docker.../ or qqx/git/ )
15:46 [Coke] jnthn: want an RT?
15:47 jnthn [Coke]: Can do; stick [CONC] in the subject also :)
15:48 [Coke] aye
15:48 [Coke] jnthn++
15:48 nine Is there a faster way to check if a directory contains anything than $dir.dir.so?
15:49 jnthn I'd guess .so is smart enough to short-circuit...
15:52 AlexDaniel joined #perl6-dev
15:53 nine Oh, indeed. It will end up calling reify-at-least(1)
15:54 literal ?$dir.dir :)
15:59 [Coke] jnthn: #129213
15:59 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129213
15:59 [Coke] "I'm an IO object, dir.dir.dir"
16:13 nine Why does IO::Spec::UNIX::catdir canonicalize the path? Seems like a lot of work that's unrelated to the actual job.
16:15 mst also a bug
16:15 mst I should be able to build up a dirpath without reference to the filesystem
16:18 nine My suspicion is that it's just for not adding another / when the parent path already ends in one.
16:18 tadzik joined #perl6-dev
16:19 brrt then check for the suffix of the parent path..
16:20 brrt what if i want to catdir for something im going to access over a network
16:23 lizmat m: use nqp; say nqp::if("foo",0,1)  # is there a better way to revert any value to its not() ?
16:23 camelia rakudo-moar f648d3: OUTPUT«0␤»
16:24 lizmat in nqp, that is ?
16:24 brrt i think we have something like nqp::not
16:26 lizmat we have nqp::not_i, but that only works on ints
16:26 lizmat there's no nqp::not_o
16:26 lizmat or nqp::not
16:27 * lizmat is working on making Junction.Bool and Junction.ACCEPTS about 2x faster
16:43 nine Making IO::Path::child use catpath instead of catfile shaves off 17 % of GTK::Simples loading time. catpath is essentially the same without the canonicalizing.
16:45 dalek rakudo/nom: b3e442c | lizmat++ | src/core/Junction.pm:
16:45 dalek rakudo/nom: Make Junction.Bool|ACCEPTS about 2x faster
16:45 dalek rakudo/nom:
16:45 dalek rakudo/nom: - rewrite with nqp ops
16:45 dalek rakudo/nom: - be smarter with the loops: no need to "return" on success
16:45 dalek rakudo/nom: - store native list instead of List for states
16:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b3e442c899
16:47 lizmat autothreading next
16:49 nine The only failing test is this: is IO::Path::Unix.new(".").child('foo'), "foo", "append to cwd";
16:49 nine Because this now gives './foo' instead of 'foo'.
16:51 nine Hard to say which one is the correcter one
16:55 lizmat dinner&
17:03 pochi_ joined #perl6-dev
17:12 dalek roast: 413ec98 | titsuki++ | S06-multi/syntax.t:
17:12 dalek roast: Make sure where-blocked multi is prior to non-where-blocked multi (#155)
17:12 dalek roast: review: https://github.com/perl6/roast/commit/413ec98390
17:13 [TuxCM] joined #perl6-dev
17:14 [TuxCM] Hi, I get «Internal error: Unwound entire stack and missed handler» on a try-out with NativeCall
17:15 [TuxCM] what to do now? :)
17:15 DrForr joined #perl6-dev
17:20 hoelzro [TuxCM]: could you paste the code that causes it?
17:20 hoelzro (sounds like https://github.com/MoarVM/MoarVM/issues/159)
17:21 [TuxCM] http://www.xs4all.nl/~hmbrand/nc-c.pl
17:22 ilmari[m] joined #perl6-dev
17:22 [TuxCM] re-fetch. first post was the alternative
17:23 hoelzro ah, I imagine that one of your callbacks is raising an exception
17:24 hoelzro what happens for NC is MoarVM actually creates a new MoarVM interpreter for callbacks
17:24 [TuxCM] which is likely hard to debug?
17:24 hoelzro unless your callbacks catch all of their exceptions, yes
17:25 hoelzro the exception throwing logic is looking for its handler, but the call stack it's looking on is the new MoarVM interpreter, so it unwinds to the top and throws up its hands
17:26 [TuxCM] the callbach (at the moment) is just field-count, which doesn't (yet) use any of the arguments
17:26 hoelzro maybe it's from the use of Nil?
17:26 [TuxCM] The use of Nil actually got rid of many other errors
17:27 hoelzro interesting
17:27 [TuxCM] what should I use for NULL instead?
17:27 nine Any?
17:28 [TuxCM] Any coused havoc
17:28 [TuxCM] caused
17:29 [TuxCM] replacing Nill with an actual cb, got my the unwind error too
17:30 nine I use Pointer for NULL pointers
17:31 [TuxCM] nine, Nil -> Pointer still error, but reads more logical :)
17:36 dalek joined #perl6-dev
17:41 nine Oh nice! IO::Spec::join is IO::Spec::catpath + special handling of / or . as parent. With that spectest is clean :)
17:41 nine Does anyone have any objections to me committing that change?
17:54 nine I wonder if we actually have to look through all precomp stores when looking for dependencies of the precomp file we're currently loading.
17:55 nine I don't think it's possible to find it in a repo further up the chain or our original target would be located there.
18:10 timotimo i like the sound of faster loading times in any case :)
18:11 nine I guess turning CompUnit::PrecompilationId from a subset into its own class would get rid of a lot of checking and rechecking on every method call.
18:12 timotimo oh, probably
18:13 dalek rakudo/nom: 73c9dd5 | niner++ | src/core/IO/Path.pm:
18:13 dalek rakudo/nom: Speed up IO::Path::child by replacing catfile with join
18:13 dalek rakudo/nom:
18:13 dalek rakudo/nom: This change saves ~ 20 % of GTK::Simple's loading time by saving a lot of
18:13 dalek rakudo/nom: calls to IO::Spec::Unix::canonpath which is called by catfile.
18:13 dalek rakudo/nom: The semantic change is that .child no longer canonicalizes the path. But
18:13 dalek rakudo/nom: that seemed to be unrelated to the actual purpose of the method anyway.
18:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/73c9dd5c3d
18:17 nine So...how can I make my CompUnit::PrecompilationId $id = 'abcdefg'; work, i.e. assigning a Str to it?
18:18 timotimo that's ... a bit trickier :)
18:19 timotimo i know how you can make it boxable, but that'll require going through nqp::box_s
18:19 nine Add STORE multis?
18:19 timotimo not sure that helps; wouldn't you have an undefined PID object that that'd be called on?
18:19 timotimo maybe a STORE with an is rw invocant could work
18:22 timotimo m: class Test { method STORE($self is rw: $value) { self = self.new } }; my Test $foo = "hi"; say $foo.perl
18:22 camelia rakudo-moar b3e442: OUTPUT«Type check failed in assignment to $foo; expected Test but got Str ("hi")␤  in block <unit> at <tmp> line 1␤␤»
18:22 timotimo hm, it doesn't get to the underlying object's STORE method it seems
18:58 TheLemonMan joined #perl6-dev
18:59 Ven_ joined #perl6-dev
19:02 dalek rakudo/nom: bd3d430 | (Zoffix Znet)++ | tools/contributors.pl6:
19:02 dalek rakudo/nom: Make repo locations configurable from command line
19:02 dalek rakudo/nom:
19:02 dalek rakudo/nom: This will let release managers be more flexible when generating the contributors list.
19:02 dalek rakudo/nom: For automated releases, this will make the contributor generation step less
19:02 dalek rakudo/nom: dependent on the current state of the rakudo repo.
19:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bd3d430210
19:05 nine Turning CompUnit::PrecompilationId from a subset into a class saves another 13 % of GTK::Simple's loading time. Is now at 0.34s. Quite nice considering that it was 20s last week :)
19:10 japhb nine++  # Very nice improvements indeed!
19:12 japhb nine: Are you seeing more LHF in improving the loading time, or are you out of ideas (for "easy" stuff at least) at this point?
19:16 nine Starting to run out of ideas
19:21 japhb Well, given you're closing in on 2 orders of magnitude (when you subtract minimum rakudo startup time), that's still pretty darned impressive
19:22 dalek rakudo/nom: 72d3be6 | niner++ | / (5 files):
19:22 dalek rakudo/nom: Speed up passing CompUnit::PrecompilationIds around
19:22 dalek rakudo/nom:
19:22 dalek rakudo/nom: Turning CompUnit::PrecompilationId from a subset into a proper class saves
19:22 dalek rakudo/nom: the re-checking of its contents when passing them to methods.
19:22 dalek rakudo/nom: The downside is that we have to be more explicit in creating them.
19:22 dalek rakudo/nom:
19:22 dalek rakudo/nom: Saves 13 % of GTK::Simple's loading time.
19:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/72d3be68f7
20:11 jnthn With that nine++ has got it down to, could even be interesting to do a callgrind run to see what if there's MoarVM hotspots
20:24 nine Note that I test with https://github.com/perl6/gtk-simple/pull/64 merged
20:24 nine But even without that we're already down to ~ 1s. Less than I thought we would be.
20:25 japhb jnthn: Oh, good point.  It would be interesting to find something that is broadly applicable to general Perl 6 code that happens to be hotspotted by this benchmark.
20:26 japhb And the IO::* improvements are welcome too, because dang are we slow at filesystem stuff.
20:26 nine japhb: well we already know that regex matching can use all the speedups it can get :)
20:34 nine I wonder if we could actually get rid of the precomp file modification time check as we are already comparing the checksum anyway.
20:37 nine But even if, that's probably something for the next release. Because if it uncovers subtle issues, it'd be hard to pinpoint with all these changes.
20:41 nine Doing away with those checks brings unmodified GTK::Simple down to 0.78s and the improved on to 0.30s!
20:45 jnthn Wow
20:46 jnthn That's fairly decent
20:46 jnthn And amazing considering where we've come from :)
20:46 jnthn nine++ nine++ nine++ :)
20:47 moritz nine++ indeed
21:00 dalek rakudo/nom: f55e113 | niner++ | src/core/CompUnit/PrecompilationRepository.pm:
21:00 dalek rakudo/nom: Speed up loading dependencies by removing .modified checks
21:00 dalek rakudo/nom:
21:00 dalek rakudo/nom: Since we already compare the checksums, we know that if the loaded file is the
21:00 dalek rakudo/nom: same that we used for compilation. So we don't need the unreliable file
21:00 dalek rakudo/nom: modification timestamp as a proxy. Remove the check as it's redundant and
21:00 dalek rakudo/nom: costs quite some time.
21:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f55e113290
21:01 nine Ah screw the caution. Everything works just fine here and I have no idea why a sha1 would not be enough to clearly identify the precomp file's contents.
21:02 jnthn If it works for Git...
21:02 lizmat nine: agree, and even *if* it is modified according to the file system, if the sha1 is the same, what would it matter ?
21:03 mst nine: claim that you're doing it to add NFS support.
21:03 * [Coke] takes a deep, calming breath and tries not to think about $DAYJOB.
21:23 TheLemonMan jnthn, (WRT https://github.com/rakudo/rakudo/commit/fa1ca283bb4cdfc79b638aa5abe7478d04c259a2) shouldn't something like this be done for the Iterator item() ?
21:24 jnthn TheLemonMan: Where exactly?
21:24 jnthn (I don't see an item method in https://github.com/rakudo/rakudo/blob/nom/src/core/Iterator.pm)
21:25 jnthn (So not sure where you're talking about :))
21:26 TheLemonMan jnthn, https://github.com/rakudo/rakudo/blob/nom/src/core/Iterable.pm#L14
21:26 TheLemonMan gah, I should head to bed heh
21:27 jnthn Oh, hmmm
21:27 TheLemonMan for more context, I think that we have a problem with $. accessors and objects implementing Iterator on the RHS of the assignment
21:27 TheLemonMan m: class :: {has $.x is rw;method a{$.x=[1,2,3];dd $.x;dd $!x}}.new.a
21:27 camelia rakudo-moar f55e11: OUTPUT«$[1, 2, 3]␤Array $!x = $[1, 2, 3]␤»
21:27 TheLemonMan m: class :: {has $.x is rw;method a{$.x={};dd $.x;dd $!x}}.new.a
21:27 camelia rakudo-moar f55e11: OUTPUT«${}␤Hash $!x = ${}␤»
21:27 TheLemonMan m: class :: {has $.x is rw;method a{$.x=42;dd $.x;dd $!x}}.new.a
21:27 camelia rakudo-moar f55e11: OUTPUT«Int $!x = 42␤Int $!x = 42␤»
21:27 jnthn I think the https://github.com/rakudo/rakudo/commit/fa1ca283bb4cdfc79b638aa5abe7478d04c259a2 is dubious :(
21:28 TheLemonMan $.x is desugared as self.x.item and then 'assign''d
21:28 jnthn oh wait...
21:28 jnthn Well, .item on an Iterable needs to put a Scalar container around the thing really
21:28 jnthn Otherwise it won't behave like an item
21:29 jnthn Oh, which is why we get away with it in Mu
21:29 jnthn Because it doesn't actually matter there
21:29 jnthn I suspect Iterable.item maybe wants to look like method item(Iterable \SELF:) { nqp::iscont(self) ?? self !! nqp::p6bindattrinvres(nqp::create(Scalar), Scalar, '$!value', self) }
21:30 jnthn That is, it preserves an existing container
21:30 jnthn But creates one if needed
21:30 jnthn oh, and with "is raw" in the signature
21:30 jnthn gah wat
21:30 jnthn I should sleep too
21:30 jnthn with with is raw on the method
21:30 jnthn (so the return type survives)
21:30 TheLemonMan it seems to fix that particular case (I just made it return self instead)
21:31 jnthn yeah, but if we just return self then we break other things
21:31 jnthn m: my @a = [1,2,3].item; say @a.elems
21:31 camelia rakudo-moar f55e11: OUTPUT«1␤»
21:32 jnthn If we just return self there, I bet that will end up returning 3
21:32 TheLemonMan 'twas just a quick test heh
21:33 jnthn :)
21:34 jnthn I'm almost surprised you can compile CORE.setting and survive startup with that broken ;)
21:35 TheLemonMan let's see if it survives a spectest too heh
21:35 mst you'd be amazed how much of rakudo boots even when it's still mnostly buggered
21:35 mst I discovered this a lot while doing the Alien:: stuff
21:36 jnthn I guess it's fairly robust to that in so far as we've found most ways to break it over the years :)
21:36 jnthn (And the failure modes were often horrible :))
21:45 jnthn sleep &
21:59 dalek rakudo/nom: e29495e | moritz++ | src/core/CompUnit/PrecompilationRepository.pm:
21:59 dalek rakudo/nom: Try to make precompile backwards compatible again
21:59 dalek rakudo/nom:
21:59 dalek rakudo/nom: This should help for issues like https://travis-ci.org/perl6/doc/builds/157995993
21:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e29495e70b
22:07 dalek rakudo/nom: ef98f8f | (Zoffix Znet)++ | tools/create-release-announcement.pl:
22:07 dalek rakudo/nom: Make release announcement script more robust
22:07 dalek rakudo/nom:
22:07 dalek rakudo/nom: - Accept custom repo locations and rakudo dirs as args
22:07 dalek rakudo/nom: - We no longer care what directory the script runs from
22:07 dalek rakudo/nom: - Propagate custom repo locations to contributor generating script
22:07 dalek rakudo/nom: - Actually bail out if contributor script exits unsuccessfully
22:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ef98f8f202
22:07 TheLemonMan jnthn, sent a PR anyway so we don't forget about this
22:07 TheLemonMan 'nite
22:35 Zoffix joined #perl6-dev

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