Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
00:30 Hotkeys 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
02:04 llfourn FROGGS++ nine++ # fixing precomp
02:53 MasterDuke joined #perl6-dev
04:18 skids joined #perl6-dev
04:39 edehont joined #perl6-dev
05:00 sortiz joined #perl6-dev
05:53 [Tux] This is Rakudo version 2016.05-143-g865bf36 built on MoarVM version 2016.05-18-g1339332
05:53 [Tux] test            16.870
05:53 [Tux] test-t           9.600
05:53 [Tux] csv-parser      21.308
05:55 FROGGS joined #perl6-dev
06:11 FROGGS that'd a bug, right?
06:11 FROGGS m: class Foo { has $.a = 1; has $.b = 2 }; $_ = Foo.new; say .WHAT; say .a.WHAT ~~ .b.WHAT
06:11 camelia rakudo-moar 865bf3: OUTPUT«(Foo)␤Method 'b' not found for invocant of class 'Int'␤  in block <unit> at <tmp> line 1␤␤»
06:27 FROGGS joined #perl6-dev
06:27 dalek nqp: 074f7fa | (Daniel Green)++ | docs/ops.markdown:
06:27 dalek nqp: Add some documentation for the nqp::stmts op
06:27 dalek nqp: review: https://github.com/perl6/nqp/commit/074f7fa4b6
06:27 dalek nqp: 5e1e41b | niner++ | docs/ops.markdown:
06:27 dalek nqp: Merge pull request #290 from MasterDuke17/add_stmts_to_ops_doc
06:27 dalek nqp:
06:27 dalek nqp: Add some documentation for the nqp::stmts op
06:27 dalek nqp: review: https://github.com/perl6/nqp/commit/5e1e41b390
06:32 FROGGS_ joined #perl6-dev
06:49 timotimo .tell FROGGS don't forget that ~~ sets the $_
06:55 sno joined #perl6-dev
07:12 Zoffix joined #perl6-dev
07:13 FROGGS joined #perl6-dev
07:13 FROGGS timotimo: yes, that's correct but still
07:14 FROGGS m: class Foo { has $.a = 1; has $.b = 2 }; $_ = Foo.new; say .WHAT; say .a ~~ .b
07:14 camelia rakudo-moar 865bf3: OUTPUT«(Foo)␤Method 'b' not found for invocant of class 'Int'␤  in block <unit> at <tmp> line 1␤␤»
07:14 FROGGS m: class Foo { has $.a = 1; has $.b = 2 }; $_ = Foo.new; say .WHAT; say .a ~~ $_.b
07:14 camelia rakudo-moar 865bf3: OUTPUT«(Foo)␤Method 'b' not found for invocant of class 'Int'␤  in block <unit> at <tmp> line 1␤␤»
07:14 FROGGS I'm not sure it should do that
07:15 FROGGS that it sets $_ behind the scenes should, well, stay behind the scenes
07:20 FROGGS_ joined #perl6-dev
07:20 psch m: class Foo { has $.a = 1; has $.b = 2 }; $_ = Foo.new; say .WHAT; say { my $outer_ = $_; $_ = .a; .b.ACCEPTS($_); $_ = $outer_ }() # is what we do
07:20 camelia rakudo-moar 865bf3: OUTPUT«(Foo)␤Method 'b' not found for invocant of class 'Int'␤  in block <unit> at <tmp> line 1␤␤»
07:20 psch well, pretty close at least
07:20 psch there's no way to keep that behind the scenes
07:20 psch well, more than it is already
07:20 psch except if we don't actually use $_ there, but then we break other things
07:21 psch m:  "foo" ~~ { .say } # like this
07:21 camelia rakudo-moar 865bf3: OUTPUT«foo␤»
07:21 psch heh, or $str ~~ rx// even
07:24 psch fwiw, i never really understood it as a "behind the scenes" thing
07:24 psch to me, setting setting $_ to the LHS inside the RHS thunk seems like an explicit feature
07:24 FROGGS_ well, I just wanted to say that "you cant see it in your code literally"
07:25 psch right, that's true.  it's something to learn
07:26 FROGGS_ still I think we could resolve .b earlier than we do now
07:27 psch but how do you decide if we should do that or not?
07:27 psch 'cause as mentioned, '$str ~~ /foo/' would either stop working, or we need heuristics to differentiate between those cases
07:27 FROGGS_ m: class Foo { has $.a = 1; has $.b = 2 }; $_ = Foo.new; say { my $outer_ = $_; my $rhs = .b; $_ = .a; $rhs.ACCEPTS($_); $_ = $outer_ }()
07:27 camelia rakudo-moar 865bf3: OUTPUT«Foo.new(a => 1, b => 2)␤»
07:28 FROGGS_ I dont see an issue (yet) with this line
07:29 FROGGS_ maybe I try to implement it and see what happens
07:29 psch actually, i'm probably low on coffee, yeah
07:29 psch POC is a good idea :)
07:35 psch m: "foo" ~~ .say
07:35 camelia rakudo-moar 865bf3: OUTPUT«foo␤»
07:35 psch FROGGS_: ^^^ i think *that* is the case to be concerned about
07:35 psch FROGGS_: i suppose it depends on whether that's in roast
07:36 AlexDaniel joined #perl6-dev
07:37 psch m: use Test; my $t = sub { Bool::True }; ok ($t ~~ .()),     '~~ .() sub call truth (+)';
07:37 camelia rakudo-moar 865bf3: OUTPUT«ok 1 - ~~ .() sub call truth (+)␤»
07:37 psch that's one test in S03-smartmatch/any-sub.t
07:40 FROGGS__ joined #perl6-dev
07:43 FROGGS joined #perl6-dev
07:43 FROGGS hmmm, true
07:43 FROGGS yeah, we probably dont want to break that
08:01 RabidGravy joined #perl6-dev
08:02 FROGGS eww, Missing or wrong version of dependency 'perl#sources/51E302443A2C8FF185ABC10CA1E5520EFEE885A1 (NativeCall::Types)'
08:15 nine meh
08:16 nine reproducible?
08:17 FROGGS probably by changing said source file and doing make install
08:28 psch hrm, this is troublesome
08:28 psch the hash i get from src/core/control in mast_frames is an actual Hash, not a BOOTHash or VMHash :/
08:29 nine psch: it is? I had hoped that my \mast_frames := nqp::hash(); is enough to avoid HLLization
08:30 psch nine: well, the case where it does have elems is the one that's hllized
08:30 psch nine: so i'd guess %*COMPILING<%?OPTIONS><mast_frames> hllizes
08:31 nine Or the call to $*W.add_additional_frames
08:31 psch yeah, or that
08:31 nine Probably the parameter needs to be \frames instead of $frames
08:33 psch actually, i'm wondering if i shouldn't detach the JCLASS carry-outer-around from what moar does there
08:33 psch it'd probably be easier to make that sensible that way
08:33 psch OTOH i'd probably also introduce a new #?if jvm
08:33 psch which i strongly dislike
08:34 psch oh, which reminds me, i wanted to try and see if we have the same kind of problem if we do BEGIN time EVAL-ish things in nqp
08:34 psch 'cause if so, we'd probably want to fix it there anyway
08:34 psch which is of course kinda annoying to check for too, because it means spoofing EVAL somehow :/
08:34 nine psch: I'd go with an #?if jvm if it brings you closer to a working solution. The job is hard enough as it is and we can try reducing #?if again once we have a working baseline.
08:36 psch yeah, it's probably a similar case as with "i don't want to drag a sort sub into JAST::Compiler" yesterday :)
09:35 cognominal joined #perl6-dev
10:11 cognominal joined #perl6-dev
11:15 dalek rakudo/nom: d927228 | lizmat++ | src/core/ (2 files):
11:15 dalek rakudo/nom: Give IO::Special its own .new
11:15 dalek rakudo/nom:
11:15 dalek rakudo/nom: Since that is faster with only one positional.  The reason for this
11:15 dalek rakudo/nom: is that every time you start rakudo, this method gets called.  So
11:15 dalek rakudo/nom: it's only a few microseconds, but it is for *every* invocation of
11:15 dalek rakudo/nom: rakudo.
11:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d927228a1e
11:49 cognominal joined #perl6-dev
12:42 cognominal joined #perl6-dev
13:07 skids joined #perl6-dev
14:43 cognominal joined #perl6-dev
14:47 edehont joined #perl6-dev
14:59 FROGGS joined #perl6-dev
15:27 edehont joined #perl6-dev
15:36 cognominal joined #perl6-dev
15:37 edehont joined #perl6-dev
15:39 FROGGS joined #perl6-dev
16:00 dalek rakudo/nom: ac0dcdd | FROGGS++ | / (4 files):
16:00 dalek rakudo/nom: move HAS scope implementation from NativeCall to src/Perl6/
16:00 dalek rakudo/nom:
16:00 dalek rakudo/nom: See http://irclog.perlgeek.de/perl6/2016-06-14#i_12661602
16:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ac0dcddb11
16:00 FROGGS joined #perl6-dev
17:13 mst joined #perl6-dev
17:13 mst joined #perl6-dev
17:46 lizmat .tell FROGGS could you explain what ac0dcdd fixes (e.g. in the ChangeLog) ?
17:55 yoleaux-7 joined #perl6-dev
17:56 yoleaux2 joined #perl6-dev
17:56 sexy-coder-girl .tell sexy-coder-girl about stuff
17:56 yoleaux2 sexy-coder-girl: Talking to yourself is the first sign of madness.
17:57 sexy-coder-girl yoleaux2: hey there, cheeky bot! Ctrl+C is a keystroke away!
17:57 sexy-coder-girl .tell sexy-coder-guy hello
17:57 yoleaux2 sexy-coder-girl: I'll pass your message to sexy-coder-guy.
17:57 sexy-coder-guy yo
17:57 yoleaux2 17:57Z <sexy-coder-girl> sexy-coder-guy: hello
17:58 sexy-coder-girl Works \o/
18:00 yoleaux2 joined #perl6-dev
18:01 sexy-coder-girl .join #perl6-release
18:18 vendethiel joined #perl6-dev
18:40 FROGGS[mobile] joined #perl6-dev
18:41 FROGGS[mobile] lizmat: will do (tomorrow)
18:41 * jnthn will get the JVM bits of the return stuff sorted out tomorrow :)
18:41 jnthn So hopefully it'll be mergable :)
18:42 FROGGS[mobile] is the release scheduled for this Thursday?
18:42 jnthn Possibly :)
18:43 FROGGS[mobile] heh
18:43 jnthn It feels a bit early in the month :P
18:43 sexy-coder-girl FROGGS[mobile]: Saturday
18:43 jnthn Oh...weeken
18:43 jnthn *weekend
18:43 jnthn OK, that means I'll feel OK about merging tomorrow :)
18:44 jnthn If the release was on Thursday it'd be cutting it a little close :P
18:44 jnthn Also in favor of the merge is that I can probably also fix a bug as part of the work
18:47 timotimo yay
18:48 FROGGS[mobile] all sounds nice :o)
18:49 timotimo and the performance implications for the future are also nice :)
18:50 FROGGS[mobile] timotimo: do you know if a profile exists for the Gtk::Simple precomp times?
18:50 jdv79 so does jnthn's recent remarks mean that explicit return could be the same cost of implicit?
18:52 timotimo i didn't make a profile
18:54 timotimo in particular, i'm not sure if running perl6 --profile-compile makes sense for that
18:54 timotimo but i can surely try
18:56 FROGGS[mobile] it spawns processes, right?
18:56 FROGGS[mobile] that would be a problem
18:56 timotimo i think it does, yes
18:58 jnthn jdv79: It eliminates some overhead from *all* routines whether they use return or not, and makes explicit `return` a good bit cheaper than it used to be
18:59 jnthn jdv79: And also opens the way to further optimizations to make it cheaper (close enough to "no difference") in the future
19:00 jdv79 cool
19:01 jnthn It also means that return is a real control exception and so will be possible to handle via CONTROL.
19:01 jnthn Which is probably of interest to nearly nobody :)
19:01 jnthn But does bring us in line with the design docs.
19:01 timotimo i can't install . in gtk-simple at the moment
19:01 jnthn Some day, somebody will probably do something terribly evil with it :)
19:02 dalek roast: 259cbf2 | (David Warring)++ | S02-types/pair.t:
19:02 dalek roast: fix test for RT #126369 - pair assignment
19:02 dalek roast: review: https://github.com/perl6/roast/commit/259cbf217b
19:02 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=126369
19:02 jdv79 one of my modules is still about an order of mag or a bit more slower than p5
19:02 timotimo https://gist.github.com/timo/246a9b4f5c69d8d72ff3bcd8809b28ef  -  FROGGS[mobile] no clue what's up with that, but i'm about to hop out the door anyway
19:02 jdv79 its grammars mostly i think though which are still not optimized, right?
19:03 jnthn There's still a lot of room for improvement on those, yes.
19:04 jnthn afk for a bit :)
19:06 sno joined #perl6-dev
19:07 FROGGS[mobile] timotimo: I wanted to look into it anyway tomorrow
19:07 FROGGS[mobile] timotimo: perhaps I can reproduce
19:09 timotimo i was able to just rm the Build.pm and now it gets further
19:12 lizmat sanity check: if I have a for loop, and inside the loop "Routine.HOW.add_method" from Bookstrap is executed
19:12 lizmat that would be a bad thing, right ?
19:12 lizmat FROGGS[mobile] timotimo jnthn  ^^^ ?
19:13 lizmat I mean, that's something you expect to run at compile time, no ?
19:16 FROGGS[mobile] since you can also programatically construct classes you can add methods in a loop
19:17 FROGGS[mobile] consider an ORM
19:17 lizmat yes, but sometthing like
19:17 lizmat for ^10000 { @a[4]:!delete:v }
19:17 lizmat shouldn't, right ?
19:17 FROGGS[mobile] but rakudo itself probably does not want to do this
19:18 FROGGS[mobile] what does that do?
19:19 FROGGS[mobile] what's the meaning of :!delete and :v?
19:19 lizmat well, I was looking at optimizing array / has slices with adverbs
19:19 lizmat :!delete:v is the worst case from the internal processing pov
19:20 FROGGS[mobile] do not delete the fifth element and return the value?
19:20 lizmat meaning: don't delete it, and give me the vaue
19:20 lizmat *value
19:20 lizmat yes
19:20 FROGGS[mobile] and this adds a method?
19:21 lizmat <anon> gen/moar/m-BOOTSTRAP.nqp:2048 is called  10009 for a 10000  iteration loop
19:21 lizmat taking 76.5% of CPU
19:21 FROGGS[mobile] what's the method name?
19:21 lizmat something is really wrong there
19:22 lizmat this is the code I profiled:
19:22 lizmat my @a = ^10; for ^10000 { my $b = @a[4]:exists }
19:22 lizmat actually:
19:22 lizmat my @a = ^10; for ^10000 { my $b = @a[4]:!delete:v }
19:22 lizmat ok, I should really be packing:
19:23 FROGGS[mobile] damn, now I have to boot up my laptop :o)
19:24 lizmat early trip to FRA tomorrow morning, then on to MCO
19:25 FROGGS joined #perl6-dev
19:26 vendethiel MCO?
19:27 sexy-coder-girl m: my @a = ^4; say @a[2]:!delete:v; say @a
19:27 camelia rakudo-moar ac0dcd: OUTPUT«2␤[0 1 2 3]␤»
19:27 lizmat vendethiel: Orlande
19:27 lizmat *Orlando
19:27 vendethiel oh, okay :).
19:27 sexy-coder-girl What is :!delete:v do? What does it mean "not delete it and return value" isn't that the same as just @a[2]?
19:27 sexy-coder-girl s/do/for/;
19:27 lizmat sexy-coder-girl: almost
19:28 lizmat m: my @a; dd @a[0]; dd @a[0]:v
19:28 camelia rakudo-moar ac0dcd: OUTPUT«Any @a = Any␤()␤»
19:28 FROGGS lizmat: it does not call add_method, it executes find_best_dispatchee
19:28 lizmat aaahhh, I think I know why...
19:29 lizmat sexy-coder-girl: the :v will not include missing values
19:29 sexy-coder-girl my @a[4]; say @a[2]:v; say @a[2]:!delete:v; say @a
19:29 sexy-coder-girl m: my @a[4]; say @a[2]:v; say @a[2]:!delete:v; say @a
19:29 camelia rakudo-moar ac0dcd: OUTPUT«()␤()␤[(Any) (Any) (Any) (Any)]␤»
19:29 sexy-coder-girl lizmat: ok, then what's the :!delete? :)
19:29 lizmat do not delete
19:29 FROGGS a nnop?
19:29 FROGGS noop*
19:29 lizmat usually you don't specify it like that
19:30 lizmat @a[4]:$delete
19:30 lizmat where $delete may be either True or False
19:30 sexy-coder-girl Ah, I see
19:30 * FROGGS .oO( True or False or FileNotFound )
19:31 * [Coke] hopes everyone has a good time in orlando at yapc.
19:32 FROGGS [Coke]: you wont be there?
19:33 [Coke] FROGGS: nope. only so much personal discretionary travel a year.
19:33 [Coke] ($dayjob won't cover my perl habit.)
19:33 FROGGS yeah, kinda the same here
19:35 [Coke] (though, really, if my kids and wife were out of school, orlando's a great place for family to visit while I'm hacking)
20:00 hankache joined #perl6-dev
20:19 edehont joined #perl6-dev
20:43 cognominal joined #perl6-dev
20:44 AlexDaniel joined #perl6-dev
20:54 Zoffix left #perl6-dev
21:15 mst joined #perl6-dev
21:15 mst joined #perl6-dev
21:19 mst joined #perl6-dev
21:21 mst joined #perl6-dev
21:27 lizmat jnthn: I found something very disturbing:
21:27 lizmat m: multi sub a($a) { "none" }; multi sub a($a,:$foo!) { "foo" }; for ^100000 { a(42) }; say now - INIT now   # this is fine!
21:27 camelia rakudo-moar ac0dcd: OUTPUT«0.041434␤»
21:28 lizmat m: multi sub a($a) { "none" }; multi sub a($a,:$foo!) { "foo" }; for ^100000 { a(42,:foo) }; say now - INIT now   # WTF ??
21:28 camelia rakudo-moar ac0dcd: OUTPUT«1.85012080␤»
21:28 lizmat m: say 1.85 / 0.04
21:28 camelia rakudo-moar ac0dcd: OUTPUT«46.25␤»
21:29 jnthn lizmat: Multi-dispatch caching doesn't know how to handle named parameters.
21:29 lizmat m: multi sub a($a,*%_) { "foo" }; for ^100000 { a(42,:foo) }; say now - INIT now  # still bad, but better
21:29 camelia rakudo-moar ac0dcd: OUTPUT«0.68580747␤»
21:29 cognominal joined #perl6-dev
21:30 lizmat jnthn: I thought that required named params where treated like positionals?
21:30 lizmat or is that just a future plan ?
21:30 jnthn No
21:30 jnthn No that either.
21:30 jnthn There's just a special case to fast-reject incoming arguments that don't have the required name.
21:30 sortiz joined #perl6-dev
21:31 lizmat m: multi sub a($a,*%_) { "foo" }; for ^100000 { a(42) }; say now - INIT now   # looks like I need to rewrite array_slice/hash_slice
21:31 jnthn (Which was put in to make trait dispatch a good bit faster)
21:31 camelia rakudo-moar ac0dcd: OUTPUT«0.041094␤»
21:32 lizmat ok, I guess I won't be translating perl6intro to Dutch while travelling after all
21:32 jnthn :)
21:33 lizmat but first, some sleep and some travel tomorrow
21:33 jnthn The caching mechanism can be extended to handle this.
21:33 jnthn It's just not entirely trivial.
21:33 jnthn And nameds on hot paths are relatively care.
21:33 jnthn *rare
21:33 lizmat except for things like @a[42]:exists
21:33 lizmat :-(
21:33 jnthn Right :)
21:34 jnthn Thing is
21:35 jnthn While that case isn't well-optimized *now*, it's the way that's most likely to be later
21:35 jnthn Because once the cache is smart enough, inlining can use it.
21:35 jnthn Meaning that :exists being present will be an optimization-time-resolved thing.
21:36 jnthn Uh, the was that's most likely to be *fastest* later
21:36 lizmat but until then, I guess we're better of with a single postcircumfix:<[ ]>($pos,*%_) candidate
21:36 jnthn I suspect I could get to trying the cache improvements this month.
21:37 jnthn I mean, in theory I can do them as the next thing I work on
21:37 jnthn Just means hyper/race get bumped down the list again.
21:38 jnthn But I'd rather do that than have you spend time rewriting them to a form that'll be somewhat faster now, but harder to make faster later.
21:38 lizmat no, fix hyper /race first
21:38 jnthn Well, guess I can look tomorrow how hard the cache improvement would be?
21:38 lizmat it will just be a matter of reverting the current state
21:38 jnthn I mean, if it's a day or two's work... :)
21:39 lizmat ok, can't stop you there
21:39 lizmat anyways, I think this should be lifted over the release anyay
21:39 lizmat anyway
21:39 sortiz FROGGS++ # Move HAS to perl6::GA, DBIish precomp time 1'34" -> 0'37", size 14M -> 3M
21:39 jnthn As in, solved after the release?
21:39 jnthn (In case it breaks anything)?
21:39 lizmat yeah
21:40 jnthn Sure...I can work in a branch :)
21:40 lizmat I won't be able to be much on the channel at least until Sunday
21:40 lizmat some R&R in Orlando  :-)
21:41 jnthn OK. Give me the next days to look into it. If it's going to be really fraught, then we can go with the *%_ plan.
21:42 jnthn Then I'll really get to hyper/race after it :)
21:42 jnthn Also: safe journey, and enjoy the R&R :)
21:46 lizmat will do!
21:46 jnthn Talking of rest...time to sleep
21:47 jnthn 'night
21:47 sortiz g'night jnthn
21:49 lizmat gnight!
21:52 sortiz g'night lizmat
21:53 mst joined #perl6-dev
21:54 mst joined #perl6-dev
21:57 timotimo wow, that precomp improvement could hit GTK::Simple noticably, too
21:58 mst joined #perl6-dev
21:59 mst joined #perl6-dev
22:02 mst joined #perl6-dev
22:03 mst joined #perl6-dev
22:04 sortiz Yep, I hope.
22:25 skids joined #perl6-dev
23:59 cognominal joined #perl6-dev

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