Geth roast: 86c9a94371 | (Zoffix Znet)++ | S32-array/rotate.t
Test .rotate can be used on empty stuff

Rakudo fix: github.com/rakudo/rakudo/commit/f4cbdb64bc Bug find: irclog.perlgeek.de/perl6-dev/2017-...i_14522073
01:10
roast: 07f5a45ee8 | MasterDuke17++ | S10-packages/precompilation.t
Unfudge a passing test for JVM
02:51
[Tux] This is Rakudo version 2017.04.3-170-gf4cbdb64b built on MoarVM version 2017.04-57-g8d8a09b9 06:25
csv-ip5xs 3.082
test 13.113
test-t 4.276 - 4.356
csv-parser 12.863
lizmat Files=1192, Tests=56885, 206 wallclock secs (12.35 usr 4.94 sys + 1216.70 cusr 123.72 csys = 1357.71 CPU) 07:44
Geth rakudo/nom: 2fb6872b14 | (Elizabeth Mattijsen)++ | src/core/Map.pm
Make Map.pick()/roll() about 7x faster

  - on a 26 element Hash, larger hashes faster still
  - doesn't need to build a list of Pairs to select from
  - so much easier on the memory
  - instead loops the iter a random number of times
  - and *then* builds a Pair on the iteration where stopped
08:24
lizmat wonder if we would want to implement a Hash.grab 08:25
samcv grab?
oh i forget what baggy thing i wanted
maybe i will remember
lizmat m: my $b = <a b b c c c>.BagHash; dd $b.grab; dd $b 08:26
camelia "b"
BagHash $b = ("b"=>1,"a"=>1,"c"=>3).BagHash
lizmat afk&
samcv oh lizmat i wanted to be able to add more thnigs to a baghash 08:28
with the same semantics as (foo,bar).BagHash
my $bh = (1,2,3,3,2).BagHash; $bh.add(2,8,9)
lizmat, if you add that I will be very happy 08:29
you can grab things so would be nice if you can add things 08:30
jnthn m: say BagHash.^methods 09:01
camelia (total Bag BagHash Mix pick MixHash list fmt SANITY categorize-list Set of SET-SELF classify-list Int Num Real grabpairs pickpairs Numeric default grab Capture raw_keys clone kxxv roll SetHash keyof new-from-pairs raw_hash WHICH Method+{<anon|74186528>}.…
jnthn m: say BagHash.^find_method('push')
camelia Method+{<anon|74186528>}.new 09:02
jnthn wonders what semantics that has :)
m: my %bh is BagHash; $bh.push(2, 8, 9); dd $bh 09:03
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$bh' is not declared. Did you mean '%bh'?
at <tmp>:1
------> 3my %bh is BagHash; 7⏏5$bh.push(2, 8, 9); dd $bh
jnthn m: my %bh is BagHash; %bh.push(2, 8, 9); dd %bh
camelia Cannot resolve caller push(BagHash: Int, Int, Int); none of these signatures match:
(Any:U \SELF: |values is raw)
in block <unit> at <tmp> line 1
jnthn Ah
It doesn't implement it, just inherits the auto-viv from Any
But given Hash does implement .push that may be more consistent
lizmat noted 09:52
m: my $bh = BagHash.new; $bh<a> = 42; dd $bh # samcv: like this ? 09:53
camelia BagHash $bh = ("a"=>42).BagHash
samcv that edits the baghash, what i'm looking for is adding elements from an Array and have it be as easy as creating/semantically similar as creating a BagHash 09:57
sleep &
night o/
lizmat nighty night!
m: my %bh is BagHash; my @a = <a b c>; %bh{@a} = 1 xx *; dd %bh 09:58
camelia ("b"=>1,"a"=>1,"c"=>1).BagHash
jnthn m: my %bh is BagHash; my @a = <foo bar foo baz bar>; %bh{@a}>>++; say %bh
camelia BagHash.new(foo(2), baz, bar(2))
lizmat that too :-) 09:59
and better :-)
jnthn Yeah, I think the 1 xx * one doesn't do the right thing if there's repeated elements?
lizmat but that looks to me like the semantics that BagHash.push should allow
jnthn: yeah, that's why yours is better :-) 10:00
Zoffix There's a ticket on that topic: rt.perl.org/Ticket/Display.html?id...et-history 10:48
lizmat hmmm.. :-) 11:04
Geth rakudo/js: 136a5ccc8d | (Pawel Murias)++ | src/vm/js/perl6-runtime/runtime.js
[js] Remove incorrect extra argument
13:11
rakudo/js: 2c91f3c7d7 | (Pawel Murias)++ | src/vm/js/perl6-runtime/runtime.js
[js] Do type checking when storing stuff into scalars
MasterDuke_ what's the difference between a VMString and a BOOTStr? 14:01
jnthn BOOTStr is a boxed object, VMString corresponds to str 14:02
MasterDuke_ i think you were talking about this recently, but are VMStrings much more efficient than BOOTStrs? 14:03
jnthn Yes, in that they save an allocation 14:05
Zoffix What does BOOT stand for?
jnthn (Of the box)
Zoffix: Bootstrap
Zoffix Ah. Thanks.
timotimo strings powered by twitter 14:06
MasterDuke_ a heap profile of `-e ''` shows 35,705 VMStrings and 14,963 BOOTStrs. any way to see where the BOOTStrs came from? 14:13
AlexDaniel m: use experimental :macros; macro infix:<plus>($a, $b) { return quasi { {{{$a}}} + {{{$b}}} } }; say 2 plus 3; 14:17
camelia WARNINGS for <tmp>:
Useless use of constant integer 2 in sink context (line 1)
Useless use of constant integer 3 in sink context (line 1)
5
AlexDaniel wow
it's working
I'm sure there's a catch somewhere (besides this useless use message) 14:18
timotimo MasterDuke_: we don't have anything like "origin tracking" or something
if you mean that
but the regular profiler will tell you what function allocated how many BOOTStr and such
MasterDuke_ yeah, but a regular profile of `-e ''` just shows one BOOTArray and one BOOTCode allocated 14:19
timotimo did you --profile-compile? 14:22
MasterDuke_ hm. that shows 557 BOOTStrs and 151 Strs, but no VMStrings 14:26
timotimo but VMString is just the REPR, and BOOTStr is one class that uses that repr ... at least i thought so 14:27
Zoffix m: say .posix == .earlier(:second).posix with DateTime.new: :2017year 15:02
camelia True
Zoffix Never realized that.
So, if you were watching the clock tick, it'd stop for 1 sec? 15:03
TimToady yes, try not to get an X-ray right then 15:38
yoleaux 2 May 2017 21:52Z <AlexDaniel> TimToady: You may be interested in rt.perl.org/Ticket/Display.html?id=131247
3 May 2017 15:39Z <Zoffix> TimToady: what do we do: due to a sequence of 2 bugs, `is-deeply` currently converts a Seq arg into a List and so falsely makes `is-deeply (1,).Seq, (1,)` pass, which causes 69 roast tests to fail (67 of which are 6.c-errata) and likely many module test suite failures as well. So, do we bite the bullet and fix is-deeply and tests or do we document the flaw and call it by-design?
Zoffix it converts Seq -> List only *args* themselves, it still will fail the test when testing, say, is-deeply ((1,).Seq,), ((1,),) 15:44
Zoffix is leaning toward "leave as is" 15:52
Test.pm6 is yuky as it is, so it's just another yuk 15:53
TimToady still wishes there was some way to write ordinary comparison operators with an option to hook them to tap output
so that you could just explicitly use 'eqv' but still get diagnostics that know the args 15:55
but the last time I pushed that idea was before we had a decent compiler :)
Zoffix m: use Test; cmp-ok (1,).Seq, 'eqv', (1,)
camelia not ok 1 -

# Failed test at <tmp> line 1
# expected: '1'
# matcher: 'infix:<eqv>'
# got: '1'
Zoffix boo at that output
TimToady I suspect we could now do it by overloading the comparison ops, and making 'ok' smart enough to look for "complicated" values of true/false 16:00
except, of course, that comparison ops have to be chaining, which might complicate things... 16:02
Zoffix m: class Foo {}; multi infix:<eqv>(Foo, Foo) { say "OK!" }; use Test; cmp-ok Foo, 'eqv', Foo 16:04
camelia OK!
ok 1 -
Zoffix Huh, weird. I thought that wasn't working
'cuase of this pos: www.reddit.com/r/perl6/comments/5l...h=69d8c6e1 16:05
Ahh.. that was using is-deeply
TimToady maybe cmp-ok is a macro? 16:06
or cheats by looking things up in the caller's lexical scope?
it's still notationally inconvenient 16:07
Zoffix You can use &[eqv] as well
It does: my $matcher = $op ~~ Callable ?? $op !! &CALLERS::("infix:<$op>") // &CALLERS::("infix:«$op»") // &CALLERS::("infix:<$op.subst(/<?before <[<>]>>/, "\\", :g)>"); 16:08
TimToady druther just write: ok Foo eqv Bar, "did stuff"
and make eqv smart enough to pass arg into to ok 16:09
and it still degrades gracefull even if your 'ok' isn't bootstrapped enough to do anything other than pure boolean
*fully 16:10
Zoffix What sort of arg?
Or both
TimToady *args
Zoffix Ah
TimToady m: say ([1,2] but False).perl 16:11
camelia [1, 2]
TimToady m: say ([1,2] but False).so
camelia False
TimToady m: say ([1,2] but False) ~~ Positional
camelia True
TimToady ok could see that it as a Positional and use that for its report 16:12
*has
timotimo role ComparisonOperation { has $.lhs; has $.rhs; has $.op }
TimToady can't typ ths mrnig
timotimo: or that
though it'd be nice to handle chains 16:13
so more likely a list that alternates args and ops
but that'll take more work in the parser (which we wanna do anyway)
on accounta chains are currently parsed as left-assoc and then reconstructed later as a hack 16:14
we need to teach EXPR how to return the alternating form 16:15
need that to allow proper user-level overloading of chains anyway
doubtless we could find a few additional yaks to add there... :) 16:16
mst only a few? 16:21
yoleaux 2 May 2017 13:01Z <Zoffix> mst: this looks like something you wanted to add to Perl 5. Any opinions? github.com/perl6/ecosystem/issues/334
mst I've seen toke.c
Zoffix holy crap. That's like a million comments on that Issue 16:22
mst comments with "no, fuck off, wait 2-3 years, btw I've spent 10 years working on this and think MY work should also wait 2-3 years" 16:24
samcv: my comments on github.com/perl6/ecosystem/issues/334 are totally down to how hard I found it to figure out an approach - basically "yes, we should have this if we can, but it may take as long to get this to work as it took us to get 6.c" 16:28
dogbert17 m: say (* + $_)(32) given 10 # tests old bug report 16:52
camelia Use of uninitialized value of type Any in numeric context
in whatevercode at <tmp> line 1
32
Zoffix m: $_ = 10; say (* + $_)(32) given 42 16:54
camelia 42
Zoffix Closes over (the wrong?) $_
dogbert17 Zoffix: RT #126413 16:55
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126413
Geth roast: 4ade099426 | (Zoffix Znet)++ | S32-exceptions/misc.t
Remove indirect test of `Exception.resumable`

That method is broken and will be removed for the time being and this test doesn't test the method itself, but only that concreteness exception gets thrown when this method is called on the type object.
  irclog.perlgeek.de/perl6/2017-05-04#i_14532712
  irclog.perlgeek.de/perl6/2017-05-04#i_14532815
17:06
TimToady * doesn't close over anything, or closes over everything, depending on how you look at it; but there is no $_ inside for it to NOT close over
TimToady * is the argument, so $_ can't be one
oh, wait, nevermind, I misread :) 17:07
Zoffix m: my $x = 42; say (* + $x)(10)
camelia 52
Zoffix m: $_ = 42; say (* + $_)(10)
camelia 52
Zoffix m: $_ = 42; say (* + $_)(10) with 42
camelia 52
Zoffix m: $_ = 42; say (* + $_)(10) with 100
camelia 52
Zoffix m: $_ = 42; for 100 { say (* + $_)(10) }
camelia 110
Zoffix m: $_ = 42; with 100 { say (* + $_)(10) } 17:08
camelia 110
TimToady perhaps it closes the $_ before parsing the with
Zoffix Looks like just postfixed stuff is affected
Ah, maybe
dogbert17 wonders if RT #126413 and RT #126984 are related 17:10
Geth rakudo/nom: f2af3db16d | (Zoffix Znet)++ | src/core/Exception.pm
Remove broken Exception.resumable

Per:
  irclog.perlgeek.de/perl6/2017-05-04#i_14532712
  irclog.perlgeek.de/perl6/2017-05-04#i_14532815
17:12
dogbert17 m: sub foo($x) { say (* ~ $x)($_) given $x }; foo(1); foo(2) 17:13
camelia 11
21
Geth roast/6.c-errata: d7d8f03b17 | (Zoffix Znet)++ | S32-exceptions/misc.t
Remove indirect test of `Exception.resumable`

That method is broken and will be removed for the time being and this test doesn't test the method itself, but only that concreteness exception gets thrown when this method is called on the type object.
  irclog.perlgeek.de/perl6/2017-05-04#i_14532712
  irclog.perlgeek.de/perl6/2017-05-04#i_14532815
17:14
TimToady how in the world is it getting a 1 the second time? 17:17
Zoffix m: sub foo($x) { given $x { say (* ~ $x)($_) } }; foo(1); foo(2) 17:18
camelia 11
22
Zoffix dogbert17: looks related, yeah
TimToady m: sub foo($x) { say (* ~ $x)($_) given $x }; foo(3); foo(2)
camelia 33
23
TimToady something's acting like 'state'
Zoffix m: sub foo($x) { -> $_ { (* ~ $x)($_) }($_) with "x" }; my $c1 = foo 3; my $c2 = foo 2; dd [ $c1, $c2, $c1.^name ] 17:44
camelia ["x3", "x2", "Str"]
Zoffix m: sub foo($x) { -> { (* ~ $x)($_) } with "x" }; my $c1 = foo 3; my $c2 = foo 2; dd [ $c1(), $c2() ]
camelia Use of uninitialized value $_ of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in whatevercode at <tmp> line 1
Use of uninitialized value $_ of type Any in string context.…
Zoffix m: sub foo($x) { -> $_ { (* ~ $x)($_) } with "x" }; my $c1 = foo 3; my $c2 = foo 2; dd [ $c1, $c2, ] 17:45
camelia ["x3", "x2"]
Zoffix wonders why that version doesn't return a Block :/
m: -> $ { say "hi" }
camelia ( no output )
Zoffix m: -> $_ { say "hi" }
camelia ( no output )
Zoffix oh it wants explict return... Fine 17:47
m: sub foo($x) { return -> { (* ~ $x)($_) } with "x" }; my $c1 = foo 3; my $c2 = foo 2; dd [ $c1(), $c2(), ]
camelia ["x3", "x2"]
Zoffix ZofBot: how is your day going? 19:23
ZofBot Zoffix, Used primarily in "macro" parlance, a gensym acts as a "handle" on something anonymous, allowing a macro author to refer to synthetically created bits of a program after creating them
Geth star: 6b415fc151 | (Steve Mynott)++ | ports/build_msi.bat
temporary hack to build standalone MSI
20:16
stmuk I'm going to have a look at ARM tomorrow and hopefully finally tag 20:33
jnthn I did an SO post giving details on the array sharing question: stackoverflow.com/questions/4378286...8#43792718 21:04
lizmat gory and again, so much better :-) 21:11
Zoffix quickly deletes his answer 21:12
lizmat tries to do as well, but apparently can not 21:13
jnthn Well, some of the other answers said what to do instead, which I didn't :)
Looks like I finally get my new hardware tomorrow. \o/
Zoffix \o/ 21:16
lizmat takes an early night for a change 21:20
samcv good * 21:42
Zoffix \o
Is there a way to eval a QAST tree to see how it runs? 22:14
m: use QAST:from<NQP>; $ = QAST::WVal(Nil)
camelia ( no output )
Zoffix Like that, but I want it to actually execute the QAST stuff
timotimo you can manually run the individual stages of the compiler
Zoffix How?
timotimo each stage is "just" a method
Zoffix oh
m: use nqp; use QAST:from<NQP>; nqp::getcomp("perl6").ast: QAST::WVal(Nil) 22:16
camelia Cannot find method 'ast' on object of type (null)
Zoffix decides to repurpose perl7 compiler into a QAST debug tool 22:17
timotimo hm, i don't think that's it
Zoffix m: use nqp; use QAST:from<NQP>; nqp::getcomp("perl6").ast: QAST::Op.new: :name<say>, QAST::SVal.new: :value<Hi>
camelia Cannot find method 'ast' on object of type QAST::Op
timotimo you'd likely .mast and put in the qast 22:18
and the result of that you can then feed into .mbc
whihc, if you don't have a :output adverb, will run the code for you 22:19
Zoffix I got it. 22:27
Gonna turn it into a bot feature
timotimo neato 22:28
how do you feed the qast into the bot then? just as perl6 literal stuff with QAST::blah? 22:31
it'd be kinda cool if you didn't have to write QAST:: every time, as well as .new 22:32
Zoffix 0.o Stage parse : 159.183 22:42
I thought hack was a meaty machine
timotimo you do realize it's running at all cores maxed at the moment? 22:43
hm
Zoffix Ah, samcv's script is doing something
samcv hmm? 22:44
timotimo samcv: do you think a few of your tests are infinilooping or something?
Zoffix module install stuff, I'm guessing
timotimo because two of them have over 100 hours of cpu time
another i sat 99, one at 46, 49, 60 hours
Zoffix samcv: looks like some of the test files from modules hung and no one killed them 22:45
samcv hmm looks like i have moar running
timotimo you have moar than just moar running :P
samcv looks like it. i'll kill all the moar's
Zoffix \o/
timotimo it's dead, jim
samcv maybe should have it kill all of my users moar processes at the end of the script :P
Zoffix w00t
timotimo did it actually reach the end of the script?
samcv prolly 22:46
timotimo we should probably put a limit into collectd so it warns if the cpu utilization has been at >95% for all cores for over 24h or so
so we can check if anything is hanging
samcv gist.github.com/samcv/5339208c44a4...8e02dd0cee
timotimo alternatively, put in some ulimit d)
samcv it got 885 modules 22:47
timotimo :)
samcv on the run 3 days ago
Zoffix There's also user "go" with two jvm things that've been running for hours. One is eatin 35% CPU and been up for 9hr
ZofBot: I thought go was fast! 22:49
ZofBot Zoffix, This "Cat" is also lazy
Zoffix ZofBot: all cats are lazy
ZofBot Zoffix, infix:[$op]($y) $x
samcv my @pids = qqx{pgrep moar | grep -v $*PID} 22:50
yeah if a script hangs i'll just kill all the moar scripts that aren't that one
Zoffix weird. I swapped chdir $.dir; run().... to indir $.dir, sub { run() ... } in sourceable and it refuses to respond :/ 22:56
timotimo will changing sub to -> change anything? 22:59
Zoffix ...
And now it works.
ZofBot: the robot's just screwing with me!
ZofBot Zoffix, git The distributed source revision system used by many, if not all Perl 6 projects, generally hosted on "github"
Zoffix I couldn't change it anyway, 'cause there's a couple of returns. But works now all of a sudden 23:00
Oh. I just upgraded perl6 it was recompiling IRC and a bunch of other modules
(I have them as files in a dir)
... maybe 23:01
samcv hm
Zoffix qast: QAST::Op.new: :op<say>, QAST::SVal.new: :value<Hi> 23:20
SourceBaby Zoffix, OUTPUT: «Hi␤»
Zoffix timotimo: that's how
qast: ▸Op: :op<say>, ▸SVal: :value<Hi>
SourceBaby Zoffix, OUTPUT: «Hi␤»
Zoffix And this is the shortcut to avoid typing QAST and new. ▸(\w+) gets changed to QAST::$0.new
timotimo neat. 23:21
yeah, i kinda like that
Zoffix qast: ▸WVal: :value(Nil) 23:22
SourceBaby Zoffix, OUTPUT: «»
Zoffix I guess this isn't where the bug I was hunting is at....
And it only took me 70 minutes to answer it!
timotimo %) 23:23
samcv Zoffix, gonna try running the serever again 23:51
Zoffix has no idea what that means 23:52
samcv the module build script. sorry XD
Zoffix Ah 23:53
Zoffix isn't doing anything on hack anymore