Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-12-21

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

All times shown according to UTC.

Time Nick Message
00:05 pyrimidine joined #perl6-dev
00:22 pyrimidine joined #perl6-dev
00:41 pyrimidine joined #perl6-dev
00:51 pyrimidine joined #perl6-dev
01:01 pyrimidine joined #perl6-dev
02:48 ilbot3 joined #perl6-dev
02: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:51 kalkin-_ joined #perl6-dev
02:52 pyrimidine joined #perl6-dev
02:58 cowens joined #perl6-dev
03:01 pyrimidine joined #perl6-dev
03:11 pyrimidine joined #perl6-dev
03:19 stmuk_ joined #perl6-dev
03:20 pyrimidine joined #perl6-dev
03:29 pyrimidine joined #perl6-dev
03:39 pyrimidine joined #perl6-dev
03:49 pyrimidine joined #perl6-dev
03:58 pyrimidine joined #perl6-dev
04:07 pyrimidine joined #perl6-dev
04:26 pyrimidine joined #perl6-dev
04:35 pyrimidine joined #perl6-dev
04:53 pyrimidine joined #perl6-dev
05:01 pyrimidine joined #perl6-dev
05:03 pyrimidi_ joined #perl6-dev
05:21 pyrimidine joined #perl6-dev
05:31 pyrimidine joined #perl6-dev
05:40 pyrimidine joined #perl6-dev
05:58 pyrimidine joined #perl6-dev
06:16 pyrimidine joined #perl6-dev
06:26 pyrimidine joined #perl6-dev
06:35 pyrimidine joined #perl6-dev
06:45 pyrimidine joined #perl6-dev
06:51 RabidGravy joined #perl6-dev
06:54 pyrimidine joined #perl6-dev
07:03 pyrimidine joined #perl6-dev
07:22 pyrimidine joined #perl6-dev
07:32 pyrimidine joined #perl6-dev
07:50 pyrimidine joined #perl6-dev
08:12 sivoais_ joined #perl6-dev
09:34 pyrimidi_ joined #perl6-dev
10:10 pyrimidine joined #perl6-dev
10:42 dogbert17_ joined #perl6-dev
11:03 lizmat Files=1156, Tests=53964, 189 wallclock secs (10.75 usr  4.43 sys + 1129.17 cusr 123.35 csys = 1267.70 CPU)
11:03 yoleaux2 20 Dec 2016 21:19Z <jnthn> lizmat: Can you show me some code on the floor thing? :)
11:03 lizmat jnthn: the actual code I used was "my int $a; for <a b c>.roll(*) { last if ($a = $a + 1) > 100000 }"
11:08 lizmat .tell jnthn I've put it in a gist: https://gist.github.com/lizmat/afb86eeb90576ed32cb3f2b361fa2870
11:08 yoleaux2 lizmat: I'll pass your message to jnthn.
11:20 lizmat .tell jnthn the minimum case is: "my $a = 0.5e0; for ^100000 { $a.floor }" where floor takes between 60 and 194 msecs with rest remaining the same
11:20 yoleaux2 lizmat: I'll pass your message to jnthn.
11:54 dalek roast: df0b1a7 | jnthn++ | S12-meta/classhow.t:
11:54 dalek roast: Add test to cover RT #128516.
11:54 dalek roast: review: https://github.com/perl6/roast/commit/df0b1a7ba4
11:54 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128516
11:55 dalek rakudo/nom: ffd3817 | jnthn++ | src/Perl6/Metamodel/ (2 files):
11:55 dalek rakudo/nom: Make sure to decont arg to nqp::composetype.
11:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ffd3817e57
11:57 dalek rakudo/nom: a16fac4 | jnthn++ | t/spectest.data:
11:57 dalek rakudo/nom: Run S12-meta/classhow.t.
11:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a16fac495b
14:32 pyrimidi_ joined #perl6-dev
14:50 notviki m: Whatever.^mro.say
14:50 camelia rakudo-moar a16fac: OUTPUT«((Whatever) (Any) (Mu))␤»
14:50 notviki .oO( make Whatever a Numeric that numerically evaluates to Inf :o )
15:27 perlpilot_ joined #perl6-dev
15:29 perlpilot joined #perl6-dev
15:48 dalek roast: afef07e | (Zoffix Znet)++ | S32-str/lines.t:
15:48 dalek roast: Add note that :$eager param is not used and needs to be cleaned
15:48 dalek roast:
15:48 dalek roast: https://irclog.perlgeek.de/perl6/2016-12-21#i_13779310
15:48 dalek roast: review: https://github.com/perl6/roast/commit/afef07e2f2
16:27 notviki ZOFVM: Files=1206, Tests=130376, 160 wallclock secs (21.62 usr  3.40 sys + 2716.03 cusr 249.41 csys = 2990.46 CPU)
16:32 japhb notviki: Is that good or bad?
16:36 dalek rakudo/nom: 9eed276 | (Zoffix Znet)++ | src/core/DateTime.pm:
16:36 dalek rakudo/nom: Awesomify error in DateTime.new
16:36 dalek rakudo/nom:
16:36 dalek rakudo/nom: Due to the multi candidates we have, there's a potential for a silent
16:36 dalek rakudo/nom: bug. where you use form like:
16:36 dalek rakudo/nom:
16:36 dalek rakudo/nom:     DateTime.new: :year($something or $other), :month(%foo<bar>),
16:37 dalek rakudo/nom:         :$hour, $minute;
16:37 dalek rakudo/nom:
16:37 dalek rakudo/nom: It took me several minutes to find in my code: the missing ":" on $minute.
16:37 dalek rakudo/nom: The presence of a single Numeric positional uses the POSIX candidate,
16:37 dalek rakudo/nom: while ignoring all the other named args.
16:37 dalek rakudo/nom:
16:37 dalek rakudo/nom: Fix by crying about unexpected named args in the POSIX candidate.
16:37 notviki https://github.com/rakudo/rakudo/commit/9eed2768d4751b4585bbd335016ca0d9ef2d4495
16:38 dalek roast: dc6a39d | (Zoffix Znet)++ | S32-temporal/DateTime.t:
16:38 dalek roast: Test unexpected named args in DateTime.new POSIX multi throw
16:38 dalek roast:
16:38 dalek roast: Rakudo fix:
16:38 dalek roast: https://github.com/rakudo/rakudo/commit/9eed2768d4751b4585bbd335016ca0d9ef2d4495
16:38 dalek roast: review: https://github.com/perl6/roast/commit/dc6a39d61e
16:38 notviki japhb: there is nothing either good or bad, but thinking makes it so
16:39 notviki I see times as low as 129 in log: https://irclog.perlgeek.de/perl6-dev/search/?nick=&amp;q=ZOFVM
16:42 japhb That is a useful bit of context.
16:43 notviki japhb: it's the time for `make stresstest` run on my 24-core
16:43 notviki VM
16:44 japhb So either Rakudo's speed has slipped, or there are more time-consuming stresstests.
16:44 japhb (Or the same number, now set for "moar stress")
16:45 notviki Or Google is ripping me off and giving me a VM with less power :P
16:45 notviki But there are several files at the end that just run a long time, so it crunches a bunch of tests on all cores, but then sits and waits for the last few tests to finish off and those skew the timings
16:47 notviki and... well yeah, we added lots of new tests.
17:20 geekosaur joined #perl6-dev
17:31 pyrimidine joined #perl6-dev
17:32 lucasb joined #perl6-dev
17:41 pyrimidine joined #perl6-dev
18:34 stmuk joined #perl6-dev
18:36 cognominal joined #perl6-dev
18:50 pyrimidine joined #perl6-dev
19:52 SourceBaby joined #perl6-dev
20:14 pyrimidine joined #perl6-dev
20:20 pyrimidine joined #perl6-dev
20:34 pyrimidine joined #perl6-dev
20:36 arnsholt notviki: In that case, wallclock time probably isn't the most informative metric. Maybe better to look at total CPU time spent?
20:37 arnsholt For example, there's a hit on 9/12 that has 140 wallclock, but 3471 CPU, compared to the 160/2990 you gave just now
20:38 notviki arnsholt: ah, OK
20:49 notviki m: say 3471/24
20:49 camelia rakudo-moar 9eed27: OUTPUT«144.625␤»
20:50 notviki oh, that might've been a 32-core VM
20:50 notviki m: say 2990/24
20:50 camelia rakudo-moar 9eed27: OUTPUT«124.583333␤»
21:00 dalek rakudo/nom: 8debb1b | MasterDuke17++ | src/core/IO/ (2 files):
21:00 dalek rakudo/nom: Speed up perl6 -ne '' <large file> by ~40%
21:00 dalek rakudo/nom:
21:00 dalek rakudo/nom: By re-writing IO::ArgFiles.lines.pull-one and IO::Handle.lines.pull-one
21:00 dalek rakudo/nom: completely in NQP.
21:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8debb1bc86
21:00 dalek rakudo/nom: 541d127 | lizmat++ | src/core/IO/ (2 files):
21:00 dalek rakudo/nom: Merge pull request #960 from MasterDuke17/perl6-n_optimizations
21:00 dalek rakudo/nom:
21:00 dalek rakudo/nom: Speed up perl6 -ne '' <large file> by ~40%
21:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/541d127761
21:05 notviki :/
21:08 lizmat notviki: why ?
21:09 lizmat have I missed something ?
21:10 notviki not sure. I think MasterDuke was supposed to make changes to the limit thing, but I can't get my phone to even bring up that piece of code.
21:11 * lizmat looks again
21:11 notviki 'cause now passing say, 42/2 as the limit will treat it as Inf. I saw that in the morning, but unsure if the change was made
21:12 lizmat ah, ok, but that could be fixed in another PR
21:12 lizmat I mean, it spectests ok
21:13 notviki cool
21:13 lizmat also, I think $!ins is basically deprecated
21:13 lizmat it doesn't exist anymore in normal handles
21:14 lizmat I did a rewrite of the IO::ArgFiles functionality last January, but that is still waiting for a 6.d  :-(
21:14 notviki :(
21:17 pyrimidine joined #perl6-dev
21:24 timotimo right, $!ins is bad and should feel bad
21:26 masak $!ins is bad?
21:29 timotimo it's pretty bad for performance
21:29 lizmat it's overhead for the 1% of people that use that feature
21:30 lizmat which is now 0% for the general case with IO::Handle
21:30 lizmat because I removed that before last Christmas
21:30 lizmat .lines.kv is your friend
21:30 timotimo :)
21:33 masak how would I translate `perl -nle'print "$. $_"'` to Perl 6?
21:34 [Coke] Currently no obvious equivalent.
21:34 [Coke] er, for $.
21:35 lizmat you would need to do a "say" because of autochomping as well ?
21:35 masak ah
21:35 japhb m: for lines.kv -> $i, $line { say "$i $line" }   # Is this what you meant, masak?
21:35 camelia rakudo-moar 541d12: OUTPUT«0 »Wann treffen wir drei wieder zusamm?«␤1    »Um die siebente Stund‘, am Brückendamm.«␤2      »Am Mittelpfeiler.«␤3          »Ich lösche die Flamm.«␤4  »Ich mit«␤5 ␤6          »Ich komme vom Norden her.«␤7         »Und ich v…»
21:35 masak https://github.com/dnmfarrell/Perl6-One-Liners -- "Line numbering" has a good answer
21:35 masak {++$} is actually quite a decent replacement in this case
21:36 japhb Huh, I'm listed as a contributor in that repo.  I wonder what I contributed.
21:37 masak japhb: no, I meant when using -n
21:37 masak though I think I'm satisfied with the {++$} solution for now. it didn't occur to me.
21:37 japhb masak: Ah, I see.  Yeah, {++$} probably.
21:38 masak it's interesting to think of both $. and {++$} in terms of "which hook to hang things on", as TimToady likes to say
21:38 masak $. is "current line number of last filehandle accessed"
21:38 masak and "last filehandle accessed" is bound to be a rather dynamic thing, in general
21:39 perlpilot_ masak: now how would you do the equivalent of perl -nle 'print "$. $_"; close ARGV if eof'  ?
21:39 masak it's one hair's width away from being a global variable
21:39 perlpilot_ :)
21:39 masak whereas {++$} is a lexical feature; it responds to the surrounding sub being refreshed/cloned, etc
21:40 perlpilot_ joined #perl6-dev
21:40 masak perlpilot: well, you have me there. I don't know of an analogue to `eof` in Perl 6 :)
21:41 lizmat masak: .eof   ?
21:41 japhb A LAST block, if it's implemented as a dual loop around files and then lines
21:41 masak culturally, I guess $. is Perl saying "I'll keep track of the line number!" whereas {++$} is Perl 6 saying "you keep track of the line number!"
21:42 masak m: $.
21:42 camelia rakudo-moar 541d12: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Unsupported use of $. variable; in Perl 6 please use the .kv method on e.g. .lines␤at <tmp>:1␤------> $.⏏<EOL>␤»
21:42 masak maybe the above error message should recommend {++$} too...?
21:43 japhb masak: {++$} isn't going to reset across files, right?
21:43 japhb Non-trivial difference
21:43 masak nope. tried it.
21:43 masak but neither did $. when I tried.
21:43 japhb Maybe {++(my $)}
21:44 japhb Which begins to look rather opaque
21:44 japhb No, surrounding curlies.
21:44 japhb Gah
21:44 masak as in `perl -nle'print "$. $_"' A B` -- it kept going with one contiguous sequence of line numbers shared across A and B
21:44 japhb Wait, "{ }" Isn't actually a block, is it?
21:44 perlpilot yes, it is.
21:44 masak japhb: I'd say it is
21:44 masak japhb: how would you test it?
21:44 masak :)
21:45 masak declare a variable inside and see if it leaks outside
21:45 masak if it doesn't leak, it's a block
21:45 japhb Right
21:45 japhb m: say "{my $f = 4} $f"
21:45 camelia rakudo-moar 541d12: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Variable '$f' is not declared␤at <tmp>:1␤------> say "{my $f = 4} ⏏$f"␤»
21:45 lizmat is there a reason why .sort returns a List rather than a Seq ?
21:45 japhb Well I guess it is, sad me.
21:45 masak gosh, I love ostensive definitions :P
21:46 japhb Huh?
21:46 masak japhb: "it's a block, because variables don't leak from it" feels like an ostensive definition
21:46 notviki m: $*ARGFILES.lines(2/1).elems.say
21:46 camelia rakudo-moar 541d12: OUTPUT«88␤»
21:46 notviki hehe :)
21:46 * notviki will fix when home
21:48 japhb m: for lines() { say ++(my $) ~ $_ }   # I know, not -n ...
21:48 camelia rakudo-moar 541d12: OUTPUT«1»Wann treffen wir drei wieder zusamm?«␤1   »Um die siebente Stund‘, am Brückendamm.«␤1     »Am Mittelpfeiler.«␤1         »Ich lösche die Flamm.«␤1 »Ich mit«␤1␤1         »Ich komme vom Norden her.«␤1        »Und ich vom Süde…»
21:48 japhb Gah, no
21:49 perlpilot Clearly, not enough time has been spent on growing P6's one-liner features.  :)
21:49 masak yes, that's a sad truth
21:49 masak perlpilot: though jnthn did point out in a talk long ago that Perl 6 kind of wins some of that back by having excellent list manipulation
21:50 masak er, jnthn++, I mean
21:50 perlpilot I don't know about "sad".   I've used Perl 6 for some one-liner things that, while more verbose than P5, just as easily roll off of the finger tips *and* is generally clearer
21:50 masak japhb: don't `~` when you can `,` in print/say statements! :P
21:51 japhb m: for lines() { FIRST $*i = 0; say "{++$*i}$_" }   # I know, not -n ...
21:51 camelia rakudo-moar 541d12: OUTPUT«Dynamic variable $*i not found␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
21:51 masak perlpilot: I... I wouldn't mind if things were shorter sometimes. as long as sanity is retained all the way.
21:51 notviki masak, why not ~?
21:51 japhb masak: Torn writes unless a lower layer does a join.
21:51 perlpilot maybe there's room for a module that helps with one-liners and is bundled with Rakudo
21:52 masak notviki: because you don't need to concatenate all those strings in order to print them one after another
21:52 masak notviki: it's not really a performance argument, it's just unnecessary
21:52 notviki s: &say
21:52 SourceBaby notviki, Sauce is at https://github.com/rakudo/rakudo/blob/541d127/src/core/io_operators.pm#L20
21:52 perlpilot (or at least comes bundled with the setting that -n or -p uses)
21:52 japhb masak: It's necessary if you want to tell the lower layers to treat it as a single write.
21:53 notviki masak, it does it under the hood anyway
21:53 masak lower layers do do a join
21:53 masak right, I'm mainly arguing out of esthetics, I think
21:53 notviki And it makes it clear the string is one entity
21:53 japhb So then no win, and I make intent clear
21:53 notviki meh
21:53 * japhb shrugs
21:54 masak I'll join the shrugging, I think
21:54 notviki :)
21:54 * japhb built that habit from years dealing with r-p
21:54 travis-ci joined #perl6-dev
21:54 travis-ci Rakudo build failed. lizmat 'Merge pull request #960 from MasterDuke17/perl6-n_optimizations
21:54 travis-ci https://travis-ci.org/rakudo/rakudo/builds/185890414 https://github.com/rakudo/rakudo/compare/9eed2768d475...541d12776135
21:54 travis-ci left #perl6-dev
21:54 masak it just *looks* excessive to me with the concats :)
21:54 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
21:54 japhb m: for lines() { FIRST PROCESS::<$i> = 0; say "{++$*i}$_" }   # I know, not -n ...
21:54 camelia rakudo-moar 541d12: OUTPUT«1»Wann treffen wir drei wieder zusamm?«␤2   »Um die siebente Stund‘, am Brückendamm.«␤3     »Am Mittelpfeiler.«␤4         »Ich lösche die Flamm.«␤5 »Ich mit«␤6␤7         »Ich komme vom Norden her.«␤8        »Und ich vom Süde…»
21:55 notviki it looks weird to me without concats 'cause I can't ever remember if it'd stick \n between the args
21:55 notviki in fact, it's weird that it doesn't
21:55 japhb That might work inside -n, but dang it's gotten ugly.
21:56 japhb notviki: That's just the difference between `say` and `.say for`
21:56 japhb (Meaning, that's how I keep it straight.)
21:56 pyrimidine joined #perl6-dev
21:57 notviki I wonder if it behaves the same in Perl 5
22:00 perlpilot It would be interesting if something like perl6 -n.kv -e 'say "{$*lineno} $_";' could be made to work.
22:07 lizmat did we lose the contents of the Allocations tab in --profile ?
22:22 notviki perlpilot: what's wrong wtih {$++} ?
22:23 notviki or {++$} rather
22:23 notviki I get same result as p5: https://gist.github.com/zoffixznet/d932dd009f4d79e6a8c1d6c829d0bdab
22:43 perlpilot notviki: nothing.  but it doesn't reset on new files like  perl -nle 'print "$. $_"; close ARGV if eof' foo bar baz
22:49 notviki I see
23:48 dalek roast: 9ce96ae | (Zoffix Znet)++ | S16-filehandles/argfiles.t:
23:48 dalek roast: Remove duplicate comment
23:48 dalek roast: review: https://github.com/perl6/roast/commit/9ce96ae003
23:48 AlexDaniel joined #perl6-dev
23:55 dalek rakudo/nom: a9c0480 | (Zoffix Znet)++ | src/core/IO/ArgFiles.pm:
23:55 dalek rakudo/nom: Fix IO::ArgFiles.lines treating non-Int numerics as Inf
23:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a9c0480c61
23:56 dalek roast: f28bc33 | (Zoffix Znet)++ | S16-filehandles/argfiles.t:
23:56 dalek roast: Test IO::ArgFiles.lines can accept any Numeric type
23:56 dalek roast: review: https://github.com/perl6/roast/commit/f28bc338d5
23:56 * notviki blushes
23:56 notviki ooops
23:57 dalek rakudo/nom: 6873d7d | (Zoffix Znet)++ | src/core/IO/ArgFiles.pm:
23:57 dalek rakudo/nom: Revert "Fix IO::ArgFiles.lines treating non-Int numerics as Inf"
23:57 dalek rakudo/nom:
23:57 dalek rakudo/nom: This reverts commit a9c0480c61a7c79ad737e8947eb7bf35e02b2f66.
23:57 dalek rakudo/nom:
23:57 dalek rakudo/nom: The commit accidentally was based on old version of the file.
23:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6873d7db63
23:58 dalek rakudo/nom: c42b6bf | (Zoffix Znet)++ | src/core/IO/ArgFiles.pm:
23:58 dalek rakudo/nom: Fix IO::ArgFiles.lines treating non-Int numerics as Inf
23:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c42b6bf2f5

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