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? :)
lizmat jnthn: the actual code I used was "my int $a; for <a b c>.roll(*) { last if ($a = $a + 1) > 100000 }"
.tell jnthn I've put it in a gist: gist.github.com/lizmat/afb86eeb905...b361fa2870 11:08
yoleaux2 lizmat: I'll pass your message to jnthn.
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.
dalek ast: df0b1a7 | jnthn++ | S12-meta/classhow.t:
Add test to cover RT #128516.
11:54
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128516
dalek kudo/nom: ffd3817 | jnthn++ | src/Perl6/Metamodel/ (2 files):
Make sure to decont arg to nqp::composetype.
11:55
kudo/nom: a16fac4 | jnthn++ | t/spectest.data:
Run S12-meta/classhow.t.
11:57
notviki m: Whatever.^mro.say 14:50
camelia rakudo-moar a16fac: OUTPUT«((Whatever) (Any) (Mu))␤»
notviki
.oO( make Whatever a Numeric that numerically evaluates to Inf :o )
dalek ast: afef07e | (Zoffix Znet)++ | S32-str/lines.t:
Add note that :$eager param is not used and needs to be cleaned

  irclog.perlgeek.de/perl6/2016-12-21#i_13779310
15:48
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:27
japhb notviki: Is that good or bad? 16:32
dalek rakudo/nom: 9eed276 | (Zoffix Znet)++ | src/core/DateTime.pm: 16:36
rakudo/nom: Awesomify error in DateTime.new
rakudo/nom:
rakudo/nom: Due to the multi candidates we have, there's a potential for a silent
rakudo/nom: bug. where you use form like:
rakudo/nom:
rakudo/nom: DateTime.new: :year($something or $other), :month(%foo<bar>),
rakudo/nom: :$hour, $minute; 16:37
rakudo/nom:
rakudo/nom: It took me several minutes to find in my code: the missing ":" on $minute.
rakudo/nom: The presence of a single Numeric positional uses the POSIX candidate,
rakudo/nom: while ignoring all the other named args.
rakudo/nom:
rakudo/nom: Fix by crying about unexpected named args in the POSIX candidate.
notviki github.com/rakudo/rakudo/commit/9e...d9ef2d4495
dalek ast: dc6a39d | (Zoffix Znet)++ | S32-temporal/DateTime.t:
Test unexpected named args in DateTime.new POSIX multi throw

Rakudo fix:
  github.com/rakudo/rakudo/commit/9e...d9ef2d4495
16:38
notviki japhb: there is nothing either good or bad, but thinking makes it so
I see times as low as 129 in log: irclog.perlgeek.de/perl6-dev/searc...mp;q=ZOFVM 16:39
japhb That is a useful bit of context. 16:42
notviki japhb: it's the time for `make stresstest` run on my 24-core 16:43
VM
japhb So either Rakudo's speed has slipped, or there are more time-consuming stresstests. 16:44
(Or the same number, now set for "moar stress")
notviki Or Google is ripping me off and giving me a VM with less power :P 16:45
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
and... well yeah, we added lots of new tests. 16:47
arnsholt notviki: In that case, wallclock time probably isn't the most informative metric. Maybe better to look at total CPU time spent? 20:36
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:37
notviki arnsholt: ah, OK 20:38
m: say 3471/24 20:49
camelia rakudo-moar 9eed27: OUTPUT«144.625␤»
notviki oh, that might've been a 32-core VM 20:50
m: say 2990/24
camelia rakudo-moar 9eed27: OUTPUT«124.583333␤»
dalek kudo/nom: 8debb1b | MasterDuke17++ | src/core/IO/ (2 files):
Speed up perl6 -ne '' <large file> by ~40%

By re-writing IO::ArgFiles.lines.pull-one and IO::Handle.lines.pull-one completely in NQP.
21:00
kudo/nom: 541d127 | lizmat++ | src/core/IO/ (2 files):
Merge pull request #960 from MasterDuke17/perl6-n_optimizations

Speed up perl6 -ne '' <large file> by ~40%
notviki :/ 21:05
lizmat notviki: why ? 21:08
have I missed something ? 21:09
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:10
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
lizmat ah, ok, but that could be fixed in another PR 21:12
I mean, it spectests ok
notviki cool 21:13
lizmat also, I think $!ins is basically deprecated
it doesn't exist anymore in normal handles
I did a rewrite of the IO::ArgFiles functionality last January, but that is still waiting for a 6.d :-( 21:14
notviki :(
timotimo right, $!ins is bad and should feel bad 21:24
masak $!ins is bad? 21:26
timotimo it's pretty bad for performance 21:29
lizmat it's overhead for the 1% of people that use that feature
which is now 0% for the general case with IO::Handle 21:30
because I removed that before last Christmas
.lines.kv is your friend
timotimo :)
masak how would I translate `perl -nle'print "$. $_"'` to Perl 6? 21:33
[Coke] Currently no obvious equivalent. 21:34
er, for $.
lizmat you would need to do a "say" because of autochomping as well ? 21:35
masak ah
japhb m: for lines.kv -> $i, $line { say "$i $line" } # Is this what you meant, masak?
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…»
masak github.com/dnmfarrell/Perl6-One-Liners -- "Line numbering" has a good answer
{++$} is actually quite a decent replacement in this case
japhb Huh, I'm listed as a contributor in that repo. I wonder what I contributed. 21:36
masak japhb: no, I meant when using -n 21:37
though I think I'm satisfied with the {++$} solution for now. it didn't occur to me.
japhb masak: Ah, I see. Yeah, {++$} probably.
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
$. is "current line number of last filehandle accessed"
and "last filehandle accessed" is bound to be a rather dynamic thing, in general
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
perlpilot_ :)
masak whereas {++$} is a lexical feature; it responds to the surrounding sub being refreshed/cloned, etc
perlpilot: well, you have me there. I don't know of an analogue to `eof` in Perl 6 :) 21:40
lizmat masak: .eof ? 21:41
japhb A LAST block, if it's implemented as a dual loop around files and then lines
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!"
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>␤»
masak maybe the above error message should recommend {++$} too...?
japhb masak: {++$} isn't going to reset across files, right? 21:43
Non-trivial difference
masak nope. tried it.
but neither did $. when I tried.
japhb Maybe {++(my $)}
Which begins to look rather opaque 21:44
No, surrounding curlies.
Gah
masak as in `perl -nle'print "$. $_"' A B` -- it kept going with one contiguous sequence of line numbers shared across A and B
japhb Wait, "{ }" Isn't actually a block, is it?
perlpilot yes, it is.
masak japhb: I'd say it is
japhb: how would you test it?
:)
declare a variable inside and see if it leaks outside 21:45
if it doesn't leak, it's a block
japhb Right
m: say "{my $f = 4} $f"
camelia rakudo-moar 541d12: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Variable '$f' is not declared␤at <tmp>:1␤------> say "{my $f = 4} ⏏$f"␤»
lizmat is there a reason why .sort returns a List rather than a Seq ?
japhb Well I guess it is, sad me.
masak gosh, I love ostensive definitions :P
japhb Huh? 21:46
masak japhb: "it's a block, because variables don't leak from it" feels like an ostensive definition
notviki m: $*ARGFILES.lines(2/1).elems.say
camelia rakudo-moar 541d12: OUTPUT«88␤»
notviki hehe :)
notviki will fix when home
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…»
japhb Gah, no
perlpilot Clearly, not enough time has been spent on growing P6's one-liner features. :) 21:49
masak yes, that's a sad truth
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
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
masak japhb: don't `~` when you can `,` in print/say statements! :P
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␤␤»
masak perlpilot: I... I wouldn't mind if things were shorter sometimes. as long as sanity is retained all the way.
notviki masak, why not ~?
japhb masak: Torn writes unless a lower layer does a join.
perlpilot maybe there's room for a module that helps with one-liners and is bundled with Rakudo
masak notviki: because you don't need to concatenate all those strings in order to print them one after another 21:52
notviki: it's not really a performance argument, it's just unnecessary
notviki s: &say
SourceBaby notviki, Sauce is at github.com/rakudo/rakudo/blob/541d...ors.pm#L20
perlpilot (or at least comes bundled with the setting that -n or -p uses)
japhb masak: It's necessary if you want to tell the lower layers to treat it as a single write.
notviki masak, it does it under the hood anyway 21:53
masak lower layers do do a join
right, I'm mainly arguing out of esthetics, I think
notviki And it makes it clear the string is one entity
japhb So then no win, and I make intent clear
notviki meh
japhb shrugs
masak I'll join the shrugging, I think 21:54
notviki :)
japhb built that habit from years dealing with r-p
travis-ci Rakudo build failed. lizmat 'Merge pull request #960 from MasterDuke17/perl6-n_optimizations
travis-ci.org/rakudo/rakudo/builds/185890414 github.com/rakudo/rakudo/compare/9...1d12776135
masak it just *looks* excessive to me with the concats :)
buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
japhb m: for lines() { FIRST PROCESS::<$i> = 0; say "{++$*i}$_" } # I know, not -n ...
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…»
notviki it looks weird to me without concats 'cause I can't ever remember if it'd stick \n between the args 21:55
in fact, it's weird that it doesn't
japhb That might work inside -n, but dang it's gotten ugly.
notviki: That's just the difference between `say` and `.say for` 21:56
(Meaning, that's how I keep it straight.)
notviki I wonder if it behaves the same in Perl 5 21:57
perlpilot It would be interesting if something like perl6 -n.kv -e 'say "{$*lineno} $_";' could be made to work. 22:00
lizmat did we lose the contents of the Allocations tab in --profile ? 22:07
notviki perlpilot: what's wrong wtih {$++} ? 22:22
or {++$} rather 22:23
I get same result as p5: gist.github.com/zoffixznet/d932dd0...c829d0bdab
perlpilot notviki: nothing. but it doesn't reset on new files like perl -nle 'print "$. $_"; close ARGV if eof' foo bar baz 22:43
notviki I see 22:49
dalek ast: 9ce96ae | (Zoffix Znet)++ | S16-filehandles/argfiles.t:
Remove duplicate comment
23:48
kudo/nom: a9c0480 | (Zoffix Znet)++ | src/core/IO/ArgFiles.pm:
Fix IO::ArgFiles.lines treating non-Int numerics as Inf
23:55
ast: f28bc33 | (Zoffix Znet)++ | S16-filehandles/argfiles.t:
Test IO::ArgFiles.lines can accept any Numeric type
23:56
notviki blushes
ooops
dalek kudo/nom: 6873d7d | (Zoffix Znet)++ | src/core/IO/ArgFiles.pm:
Revert "Fix IO::ArgFiles.lines treating non-Int numerics as Inf"

This reverts commit a9c0480c61a7c79ad737e8947eb7bf35e02b2f66.
The commit accidentally was based on old version of the file.
23:57
kudo/nom: c42b6bf | (Zoffix Znet)++ | src/core/IO/ArgFiles.pm:
Fix IO::ArgFiles.lines treating non-Int numerics as Inf
23:58