timotimo MasterDuke: it should be possible to use a factor of 100 instead of 10 and get a noticable speedup - it'll be a bit more complicated, though 00:01
MasterDuke timotimo: ah, i think that fast integer printing link you pointed out a while ago said something similar. i'll take another look at what it does 00:07
timotimo right; that one's limited to integers, but that shouldn't stop us :) 00:08
MasterDuke what am i missing? isn't the `while $fract` here github.com/rakudo/rakudo/blob/mast...al.pm#L102 redundant given the `if $fract` here github.com/rakudo/rakudo/blob/mast...nal.pm#L97 ? 01:20
in a related question, is anyone else seeing a bunch of test and spectest fails at rakudo HEAD? 01:33
ok, looks like that `$fract and` in the while is needed 01:39
japhb Zoffix++ # Good post on versioning 01:49
lizmat Files=1235, Tests=76224, 317 wallclock secs (14.91 usr 5.34 sys + 2170.43 cusr 214.78 csys = 2405.46 CPU) 08:49
lizmat hopes nine or ugexe will be able to help at stackoverflow.com/questions/488991...-installed 08:58
m: chop(Nil) 09:14
camelia Cannot resolve caller chop(Nil); none of these signatures match:
(Cool:D $s --> Str:D)
(Cool:D $s, $n --> Str:D)
in block <unit> at <tmp> line 1
lizmat m: chomp(Nil)
camelia Parameter '$s' of routine 'chomp' must be an object instance of type 'Cool', not a type object of type 'Nil'. Did you forget a '.new'?
in block <unit> at <tmp> line 1
lizmat whar would be the better error message, assuming we want similar error messages for this ? 09:15
jnthn Hm, isn't that just a multi/only difference? 10:01
Geth nqp: 66f8da23c2 | pmurias++ | 3 files
[js] Implement a basic CStruct
10:06
rakudo: cdb45fa5a6 | (Elizabeth Mattijsen)++ | src/core/Cool.pm
Make sub chomp/flip/index/ord/lc/uc/fc/tc/tclc/indices a multi

sub rindex was already a multi, oddly enough
10:12
rakudo: e3c4db732b | (Elizabeth Mattijsen)++ | src/core/Date.pm
Fix various sleep() issues

  - sleep(*) didn't work
  - sleep-timer(Inf) returned immediately
10:47
Zoffix huggable: module source 12:12
huggable Zoffix, Get installed module's source: gist.github.com/niner/06792102587a79940294
Zoffix lizmat, based on ^ that gist, what the OP got is as simple as it gets. Here's a potential answer, if you wanted to post it: gist.github.com/zoffixznet/8a73776...c242dc8763
tbrowder ping: nqp PRs #414 and #417 are awaiting decisions from the head shed... 12:28
i have an rfc filed to remove :caption from the pod %config hash and would like to have it removed in 6.d. is there a branch of rakudo devoted to prep for 6.d so PRs can be made? 13:57
likewise for roast?
Geth nqp: 2ca86be25c | pmurias++ | src/vm/js/nqp-runtime/reprs.js
[js] Make nqp::bindpos_i return the value it gets when storing into uint array
15:33
nqp: 1aecfc7200 | pmurias++ | src/vm/js/nqp-runtime/ctx.js
[js] Handle the case when an exception is found in an outer no longer caller scope
nqp: b57d933fdc | pmurias++ | src/vm/js/Operations.nqp
[js] Make nqp::settypecache decont
dogbert17 m: sub double() is rw { my $storage = 0; Proxy.new( FETCH => method () { say "Fetch"; $storage * 2 }, STORE => method ($new) { say "Store"; $storage = $new }, ) }; my $doubled := double(); $doubled = 4; say $doubled; 17:38
camelia Store
Fetch
Fetch
Fetch
Fetch
Fetch
Fetch
Fetch
Fetch
Fetch
Fetch
Fetch
8
dogbert17 why is FETCH called so many times, I don't get it 17:39
[Coke] 15-year-old: Don't worry about it. 17:48
jnthn dogbert17: Multi-dispatch to say needs the value in the container to see what type it is. Signature binding needs similar. That probably accounts for much of it 17:56
And .say calls .gist
So that's potentially another dispatch and method call that needs the value to see its type
dogbert17 so it's me putting the say in there which skews the results? 17:58
jnthn m: sub double() is rw { my $storage = 0; Proxy.new( FETCH => method () { say "Fetch"; $storage * 2 }, STORE => method ($new) { say "Store"; $storage = $new }, ) }; my $doubled := double(); $doubled = 4; my $copy = $doubled; say $copy 17:59
camelia Store
Fetch
8
jnthn Yup, looks like :)
dogbert17 shouldn't STORE behave similarly then? 18:00
jnthn Why would it?
STORE only happens when assignment happens, which is an explicit operation in the program
FETCH happens as often as anything wants the value in the container
I sometimes think we want something a bit like Proxy but that only does the STORE half of it 18:01
That is, custom STORE logic
dogbert17 m: sub double() is rw { my $storage = 0; Proxy.new( FETCH => method () { $i++; $storage * 2 }, STORE => method ($new) { say "Store"; $storage = $new }, ) }; my $doubled := double(); $doubled = 4; say $doubled; say $i; 18:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$i' is not declared
at <tmp>:1
------> 3ge = 0; Proxy.new( FETCH => method () { 7ā5$i++; $storage * 2 }, STORE => method ($
jnthn But it's just putting it into a slot
dogbert17 m: my $i =0; sub double() is rw { my $storage = 0; Proxy.new( FETCH => method () { $i++; $storage * 2 }, STORE => method ($new) { say "Store"; $storage = $new }, ) }; my $doubled := double(); $doubled = 4; say $doubled; say $i;
camelia Store
8
11
dogbert17 remove the 'say' also shows 11 accesses to FETCH
*removing 18:03
jnthn The say is still there?
Home time, bbl 18:04
dogbert17 nope, removed it and incremented a variable instead
m: my $i = 0; sub double() is rw { my $storage = 0; Proxy.new( FETCH => method () { $i++; $storage * 2 }, STORE => method ($new) { $storage = $new }, ) }; my $doubled := double(); $doubled = 4; say $doubled; say "$i calls to FETCH"; 18:06
camelia 8
11 calls to FETCH
AlexDaniel tbrowder: fwiw it'd help if you write it like this: NQP#414 NQP#417 (so that the bot generates direct links to these PRs)
synopsebot NQP#414 [open]: github.com/perl6/nqp/pull/414 add a test for stderr in spawnprocasync
NQP#417 [open]: github.com/perl6/nqp/pull/417 rename IO sub "spew" to "spurt"
AlexDaniel tbrowder: as for v6.d, that's not how it works. Rakudo master should support *both: v6.c and v6.d 18:07
tbrowder: well, at least in theory. See this for more info: rakudo.party/post/Perl6-On-Specs-V...d-Breakage 18:08
dogbert17 jnthn: sorry, you meant the 'say $doubled' not the say I had put into FETCH, I get it now
tbrowder ok, so how is code done for 6.d only? 18:09
dogbert17 is a bit dense atm, perhaps due to not having had dinner yet
tbrowder iā€™ll try to remember how to refer to prs 18:10
AlexDaniel m: here's a short example: github.com/rakudo/rakudo/commit/cd043f2ae4
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3here's a short example: https:7ā5//github.com/rakudo/rakudo/commit/cd043f
expecting any of:
colon pair
AlexDaniel oops
tbrowder: ā†‘
didn't mean that to be evaled
m: use v6.c; use Test; is_approx 5, 5;
camelia ok 1 -
AlexDaniel m: use v6.d.PREVIEW; use Test; is_approx 5, 5;
camelia ok 1 -
AlexDaniel hmmmmmmmā€¦ 18:11
I wonder what I'm doing wrong
e: use v6.d.PREVIEW; use Test; is_approx 5, 5; 18:12
evalable6 ok 1 -
Saw 1 occurrence of deprecated code.
=============================================ā€¦
AlexDaniel, Full output: gist.github.com/cd7cddcb82dec95dd2...735ab59c6f
AlexDaniel using the wrong bot I guess
Zoffix releasable6: status 19:48
releasable6 Zoffix, Next release in 23 days and ā‰ˆ23 hours. Blockers: github.com/rakudo/rakudo/issues?q=...%9A%A0%22. Changelog for this release was not started yet
Zoffix, Details: gist.github.com/a33615552cdf93b8ce...1bcdc142dc
Zoffix I think I messed up the whatever currier and it made it into the release :'(
AlexDaniel Zoffix: what's the bug? How to reproduce? 19:49
Zoffix R #1550
R#1550
synopsebot R#1550 [open]: github.com/rakudo/rakudo/issues/1550 [regression] Segfault in one liner that used to work in 2018.01
AlexDaniel that's not cool :) 19:51
Zoffix m: my &f = *.self; .say for map 1/*.&f, ^250+1
camelia (signal SEGV)1
Zoffix slightly golfed version
AlexDaniel I think we can decide what to do with it once there's a fix on the table :) 19:54
Zoffix Yeah. Gonna take a look at it in ~3h
ZofBot: I thought Zoffixes were perfect! 19:55
ZofBot Zoffix, 460 csv-ip5xs 0
Zoffix That's it. Time for a brain reset.
AlexDaniel fwiw I don't mind doing a point release. I find it a bit surprising that none of the modules failed because of this, which tells me that we don't have enough modules in the ecosystem :P 19:58
Geth nqp: bf6067551c | (Tom Browder)++ | 3 files
rename IO sub "spew" to "spurt"

changes to file "src/core/IO.nqp":
  + rename sub "spew" to "spurt" for consistency with
   the rest of Perl
changes to file "t/nqp/019-file-ops.t": ... (8 more lines)
20:01
nqp: cb4297b37b | (Jonathan Worthington)++ (committed using GitHub Web editor) | 3 files
Merge pull request #417 from tbrowder/spew2spurt

rename IO sub "spew" to "spurt"
jnthn Zoffix: Even if you messed up, it's no excuse for a SEGV... 20:03
So there's probably some Moar bug too
Zoffix m: gist.github.com/zoffixznet/c03288a...c88ff9af5d 20:05
camelia Usage:
<tmp> <raw-brain>
Zoffix gah... got burned by running with `perl` :P 20:06
Or rather having it in the shebang
ZofBot: how was the procedure? 20:07
ZofBot Zoffix, International donations are gratefully accepted, but we cannot make any statements concerning tax treatment of donations received from outside the United States
dogbert17 if I run Zoffix example on MoarVM master it fails here: github.com/MoarVM/MoarVM/blob/mast...rp.c#L5591 20:27
Zoffix dogbert17: how do you find that out? 20:29
dogbert17 ./perl6-gdb-m -e 'my &f = *.self; .say for map 1/*.&f, ^250+1' 20:30
Zoffix Yeah and then? 20:31
dogbert17 bt
Zoffix And then? :)
bt just shows me this: gist.github.com/zoffixznet/71263c3...6979b298f3
dogbert17 look at the output, I get: #0 MVM_interp_run (tc=0x804c5f8, initial_invoke=0xb7c7c914 <toplevel_initial_invoke>, invoke_data=0x8096cb0) at src/core/interp.c:5591
Zoffix oh, those I have as ?? 20:32
dogbert17 you must build MoarVM with debug info
AlexDaniel Zoffix: have to compile moarvm with debug symbols
hmmm I have this in my command history: perl Configure.pl --gen-moar --gen-nqp --backends=moar --moar-option=--debug=3 20:33
I wonder if it works
dogbert17 perl Configure.pl --debug --no-optimize --prefix=../../install/
Zoffix Oh, right, I thought I had it turned on, but it was only doing -no-ptim,ze: github.com/zoffixznet/z/blob/maste...v.pm6#L197
dogbert17 an easy mistake to make 20:34
AlexDaniel huggable: breakage
huggable AlexDaniel, <AlexDaniel> don't worry, all important features are well-covered somewhere! :)
Zoffix Haha :)
Oh hey, and I said it *about whatever optimizer* didn't I? :)
AlexDaniel ā†‘ in this case it was covered by code-golf.io!
Zoffix *whatever currier I mean 20:35
AlexDaniel irclog.perlgeek.de/perl6/2018-02-04#i_15775868
xDDD
oh my xD
Zoffix lol yeah, the currier :)
dogbert17: do I need to rebuild rakudo too? I have it now as ` self!run-moar: Ā«perl Configure.pl "--prefix=$!inst" --no-optimize --debugĀ»;` but still get ?? for first lines 20:38
dogbert17 I don't
did your compiled MoarVM end up in the right place? 20:39
guess it depends on your setup
Zoffix dunno, but if I go in manually to do `perl Configure.pl --prefix=/home/zoffix/R/install --debug --no-optimize` it completes right away, 'cause presumably it did everything already 20:40
tbrowder AlexDaniel: i see you approved NQP#414 so that means it's ok for me to do the merge?
synopsebot NQP#414 [open]: github.com/perl6/nqp/pull/414 add a test for stderr in spawnprocasync
Zoffix and `cat perl6-gdb-m` shows it's calling `/home/zoffix/R/install/bin/moar` :S 20:41
dogbert17 Zoffix: what happens if you try this: MVM_JIT_DISABLE=1 ./perl6-gdb-m -e 'my &f = *.self; .say for map 1/*.&f, ^250+1' 20:43
Zoffix dogbert17: yeah, now it shows stuff. 20:44
dogbert17 cool
AlexDaniel tbrowder: I think it's ok, yea
Zoffix dogbert17: so what does that mean? :)
dogbert17 do you see the same thing as I do or do you see this line: github.com/MoarVM/MoarVM/blob/mast...rp.c#L5733 20:45
Geth nqp/master: 4 commits pushed by (Tom Browder)++ 20:46
Zoffix dogbert17: I see this now: gist.github.com/zoffixznet/9d0dab1...27e8d22720
(and without MVM_JIT_DISABLE, I see this: gist.github.com/zoffixznet/174c246...c915b9d885 ) 20:47
dogbert17 yeah, suspect that the JIT is innocent so it's a good idea to turn it off 20:48
Zoffix which I guess is different from yours, because mine actually points to code that does make sense to segv
dogbert17 yes, I suspect your location is the right one 20:49
Zoffix dogbert17: but what if the SEGV were only with JIT? Also, how come having JIT enabled doesn't produce the right backtrace?
So this is NULL (probably) `MVMFrame *f = ((MVMCode *)GET_REG(cur_op, 6).o)->body.outer;` and I guess something in whatever currier makes it so a thing has no outer...
dogbert17 try ' p f' in gdb 20:50
p f
I get: (gdb) p f 20:52
$1 = (MVMFrame *) 0x0
a null pointer, that's rarely a good sign :-)
it's now that jnthn or timotimo should appear and explain what's going on :-) 20:54
jnthn It's assuming that if the interpreted code survives long enough to be JITted, then it didn't have bounds errors on the outer chain
There's even a comment saying so, iirc :) 20:55
Zoffix jnthn: so is merely checking it for null the right fix or should it be fixed somewhere earlier in the food chain? 21:05
Zoffix relocates
Geth rakudo: 62242caafe | pmurias++ | src/core/VM.pm
Make $?COMPILATION-ID a proper string
21:08
dogbert17 in order to avoid confusion, caused by me, the crash is here: github.com/MoarVM/MoarVM/blob/mast...rp.c#L5733 21:09
seems like a MVMFrame object is null 21:11
Zoffix, jnthn: it seems as if MVM_SPESH_DISABLE=1 removes/hides the issue 21:14
more specifically MVM_SPESH_INLINE_DISABLE=1 21:15
jnthn Zoffix: Well, it means there's a bug in the code-gen, but we should probably do a better job of handling that too 21:23
Zoffix: And yeah, NULL guarding is probably the right thing 21:39
Though it's kind of annoying to have to do it on such a common thing (lexical lookup)
MasterDuke m: my $f = 1; --$f; my int $s = 0; for ^100_000 { ++$s unless $f }; say $s; say now - INIT now 22:04
camelia 100000
0.0352412
MasterDuke m: my $f = FatRat.new(1, 1); --$f; my int $s = 0; for ^100_000 { ++$s unless $f }; say $s; say now - INIT now
camelia 100000
0.21221936
22:05
MasterDuke the FatRat version goes through Numeric.Bool, which is just `self != 0` 22:06
but that causes a REDUCE-ME call in the FatRat
any reason Rational couldn't have a .Bool that was just `$!numerator != 0` ? 22:07
huh, that takes only half the time, but why does it still go through Mu.Bool first? 22:23
hm, `nqp::p6bool(nqp::istrue($!numerator) && nqp::istrue($!denominator))` or `$!numerator != 0 && $!denominator != 0` ? 22:27
fwiw, just making it `$!numerator != 0` passes spectest
AlexDaniel m: say ?NaN.FatRat 22:35
camelia True
AlexDaniel m: say NaN.FatRat.nude
camelia (0 0)
AlexDaniel MasterDuke: I think it means that the spec needs some extra tests 22:36
wait but why is it True 22:37
Zoffix dogbert17: yeah, I commented that on the ticket originally :) But I think the bug is in the currier (some info on ticket) 22:54
AlexDaniel: well, NaN is true
AlexDaniel hmā€¦ okay 22:55
Zoffix s: NaN.FatRat, 'Bool', \()
AlexDaniel but then the numerator != 0 trick is not going to work I guess?
Zoffix s: NaN.FatRat, 'Bool', \()
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/6224...ric.pm#L30
Zoffix AlexDaniel: "trick"? What trick? 22:56
AlexDaniel Zoffix: irclog.perlgeek.de/perl6-dev/2018-...i_15843579
dogbert17 Zoffix: that's what I get for not reading the original bug report :-) 22:57
Zoffix m: say so +"a" 22:58
camelia False
Zoffix AlexDaniel: well, it's something to think about... With zero-denominator Rationals, in Num view, they have meaning (all True), in Str or other numeric, they're a Failure, and in Rational they're two separate values. 22:59
Seems like them being False is captures the widest range of possibilities, maybe 23:00
m: with NaN { .so.say; .Rat.so.say; .Rat.Num.so.say }
camelia True
True
True
Zoffix But then ^ that would read True; False; True
Zoffix votes to make zero-denominator Rationals `False` 23:01
Though note the trick wouldn't work still: 42/0 would mean `False`, not True
lizmat wonders why $?COMPILATION-ID should be a Str rather than a str ? 23:03
Zoffix Actually, no idea what to vote for. If you think about it in terms of "All numerics that are zero are false; the rest are true" then it makes sense for ZDRs to be True 23:13
Filed as R#1552
synopsebot R#1552 [open]: github.com/rakudo/rakudo/issues/1552 [@LARRY][RFC] [@LARRY] Booliness of Zero-Denominator Rationals
Zoffix .ask TimToady would you like to weigh in on this Issue: github.com/rakudo/rakudo/issues/1552 [@LARRY][RFC] [@LARRY] Booliness of Zero-Denominator Rationals
yoleaux Zoffix: I'll pass your message to TimToady.
AlexDaniel Zoffix: why [@LARRY] in the title when already using the @LARRY label? 23:14
jnthn m: say so NaN
camelia True
Zoffix Force of habbit
lizmat jnthn: NaN is not zero and not an empty string, so seems correct ?
jnthn Zoffix: Is there anything in the floating point spec you're aware of either way on wether NaN should be truthy?
Zoffix jnthn: no, no idea. I didn't read the whole thing. 23:15
huggable: ieee
huggable Zoffix, temp.perl6.party/ieee.pdf
jnthn lizmat: Arguably yes, though given my num $x is (currently) initializzzzzzzzzzzzed to NaN (though that's under discussion) I did wonder about it :) 23:16
whoa
Guess my keyboard is getting sleepy or something :p
Geth nqp: tbrowder++ created pull request #421:
add a new built-in sub: run-command
23:17
teatime I imagine it takes a trooper of one to keep up w/ you, jnthn
Zoffix searching for "true" in that ieee doc didn't turn up anything to answer that question 23:19
$ ccc 'printf("NaN is %s\n", 0.0/0.0 ? "True" : "False")' 23:23
NaN is True
(that's C)
jnthn *nod* 23:24
I think it probably should be
And can imagine various numerical algorithms relying on that
Well, maybe
lizmat $ 6 'use MONKEY; EVAL {say 123}' 23:28
EVAL() in Perl 6 is intended to evaluate strings, did you mean 'try'?
a better error message for point #6 in perl6.online/2018/02/20/62-the-eva...-6-part-1/
Zoffix m: use MONKEY; EVAL {say 123} 23:29
camelia Constraint type check failed in binding to parameter '$code'; expected anonymous constraint to be met but got -> ;; $_? is raw { #`...
in block <unit> at <tmp> line 1
jnthn Huh...wonder why that error 23:30
Zoffix s: &EVAL
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/6224...ode.pm#L28
lizmat $code is copy where Blob|Cool
jnthn Hmm 23:31
lizmat jnthn: is there a specific reason why EVAL doesn't have a "standard" proto sub EVAL(|) {*} ?
jnthn What proto does it have?
lizmat proto sub EVAL($code is copy where Blob|Cool|Callable, Str() :$lang = 'perl6', PseudoStash :$context, *%n)
jnthn Curious 23:32
huh, EVAL moved to src/core/ForeignCode.pm? 23:33
Zoffix Yeah, for blob
lizmat apparently Zoffix moved it there last Oct
jnthn Oh, I see
I think that factoring was designed to make sure that we can add extra language EVALs as multi candidates 23:34
Zoffix Yeah, it was in a place too early to Blob and I thought the ForeignCode were an OK place to move it (stubbing Blob was meh, due to all the typing parts it needs)
jnthn Which was a problem in the past
Zoffix: I'd probably have moved it to its own EVAL.pm, but no biggie
lizmat but making it a "normal" proto now wouldn't prevent other languages, no? 23:35
in fact, wouldn't it make it easier ?
Zoffix Looking at code, it's basically done that way to throw X::Eval::NoSuchLang.new(:$lang).throw instead of X::MultiNoMatch 23:36
m: try EVAL "x", :lang<ZofCode>; say $!.^name
camelia X::Eval::NoSuchLang
jnthn Right
It looks like it's been done quite carefully
lizmat yeah, but that could be handled by a catch-all candidate, no?
jnthn To do that and to preference languages with compilers registered through the getcomp interface
Zoffix &
jnthn lizmat: Perhaps not, in that it's dispatching on the langauge name, which is a tie-breaker dispatch 23:37
lizmat ah, ok, I see
jnthn lizmat: Not saying it can't be changed, just that I remember this was factored differently in the past
lizmat: Along the lines of what you're describing, and there was some problem that led to how it is now :) 23:38
So at the very least I'd look back in the version control history
lizmat ok, will do, but not now :-)
jnthn yeah, fair enough :-)
Zoffix AlexDaniel: I lied about fixing R#1550 today. Too tired + just got myself a new fancy guitar amp to play with. Maybe tomorrow or Friday the latest is when I'll take care of it.
lizmat another 450km under the belt today
synopsebot R#1550 [open]: github.com/rakudo/rakudo/issues/1550 [regression] Segfault in one liner that used to work in 2018.01
AlexDaniel Zoffix: OK, thanks! 23:39
jnthn lizmat: I sure hope that isn't cycling :)
(Or it is, but a typo :P)
lizmat nonono, car...
fetching our stuff from FOSDEM and some visits to friends, families and CD stores :-) 23:40
jnthn ah, nice :) 23:41
lizmat also feeling much better, and the good sort of tired :-) 23:44
Geth rakudo: 5ae1bbe17e | (Elizabeth Mattijsen)++ | src/core/ForeignCode.pm
Make EVAL { ... } give a better error message

This should probably be caught at compile / optimize time. Inspired by point #6 on perl6.online/2018/02/20/62-the-eva...-6-part-1/
23:46
lizmat proof of concept ^^^ will look more into it tomorrow :-)
good night&
jnthn 'night, lizmat o/ 23:47