Perl 6 language and compiler development | Logs at colabti.org/irclogger/irclogger_log/perl6-dev | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
Set by Zoffix on 27 July 2018.
00:28 Kaiepi joined 01:14 dct left 01:15 Kaiepi left 01:17 Kaiepi joined
Kaiepi bisectable6, say [+] [0..1000000]; say [+] [0..1000000]; 01:21
bisectable6 Kaiepi, On both starting points (old=2015.12 new=3d581c8) the exit code is 0 and the output is identical as well
Kaiepi, Output on both points: «500000500000␤500000500000␤»
Kaiepi htrm 01:22
tht's no help with my issue
AlexDaniel Kaiepi: interesting… 01:34
Kaiepi: so how much memory does it use?
Kaiepi didnt check 01:39
i can't build on HEAD
oh i was on the wrong branch 01:41
MasterDuke Kaiepi: have you heard anything about your grant proposal? 01:55
Kaiepi i have 01:56
the voters' responses have been neutral to positive 01:57
so it'll probably go through
problem is with the amount of money i requested wont' fit in their 2018 budget and they haven't finished their 2019 budget
so i may get pushed back until the next round of proporals 01:59
MasterDuke cool to the first part, annoying to the second 02:06
btw, i tried to comment a +1, but it looks like it got lost
Kaiepi well thanks anyway 02:20
MasterDuke currently my default-int NQP branch still has prefix:<+> numifying instead of intifying. something broke when i made it intify, but i now realize what a solution might be 02:45
does anyone have an opinion on whether it remain as numifying or change to intifying? (assuming of course i do come up with a fix for whatever broke last time) 02:46
leont doesn't have enough details 02:49
02:59 MasterDuke left 03:03 leont left 03:13 tyil left 03:23 tyil joined 03:45 ufobat_ joined 03:49 ufobat left 06:10 robertle left
nine .tell MasterDuke I remember lots of +@some_arr in NQP code. In fact I think that that's the most common use of prefix:<+>. This use case would benefit from intification for sure. 06:49
yoleaux nine: I'll pass your message to MasterDuke.
07:56 patrickb joined
lizmat Files=1266, Tests=88056, 376 wallclock secs (20.13 usr 5.85 sys + 2685.12 cusr 227.66 csys = 2938.76 CPU) 09:17
10:21 robertle joined 11:03 leont joined 11:17 leont left
|Tux| Rakudo version 2018.12-266-g3d581c8d2 - MoarVM version 2018.12-38-g6f92a01d9
csv-ip5xs0.754 - 0.763
csv-ip5xs-206.397 - 6.569
csv-parser22.098 - 22.130
csv-test-xs-200.430 - 0.431
test7.188 - 7.679
test-t1.819 - 1.949
test-t --race0.849 - 0.908
test-t-2031.447 - 31.889
test-t-20 --race10.179 - 10.288
12:16
13:12 lucasb joined
lizmat .tell ugexe stackoverflow.com/questions/544214...nk-library 13:27
yoleaux lizmat: I'll pass your message to ugexe.
AlexDaniel releasable6: status
releasable6 AlexDaniel, Next release will happen when it's ready. 6 blockers. 160 out of 266 commits logged
AlexDaniel, Details: gist.github.com/7848e09958c1750cf0...172e3a0def
AlexDaniel jnthn: have you looked at R#2644 ? 13:28
synopsebot R#2644 [open]: github.com/rakudo/rakudo/issues/2644 [regression][⚠ blocker ⚠] Some regression with Cro::WebSocket
jnthn AlexDaniel: Not got to that one yet; working on my other blocker (debug info regression) 13:32
AlexDaniel ok!
AlexDaniel pokes Data::StaticTable again… 13:33
jnthn But that'll come afterwards :)
AlexDaniel jnthn: uh, it's probably obvious, but maybe you can help me understand 13:48
jnthn: so I did this patch to Data::StaticTable gist.github.com/AlexDaniel/719b855...d14d0862a8
jnthn: and the tests pass, great… however
why is that needed? $matcher in that case is a regex, in boolean context
so if it's not doing $matcher by itself is not doing $_ ~~ $matcher, what does it do then? 13:49
oops
I mean, I was expecting $matcher in boolean context to do $_ ~~ $matcher, am I wrong? 13:50
by the way, `use v6.c` does not help there
jnthn You'd need `use v6.c` in the place containing the regex that is passed in also
A regex in boolean context per 6.d captures the $_ at the point where the regex literal appears 13:51
It then matches agaisnt *that* `$_`, not the one of its caller
AlexDaniel yes, `use v6.c` in both the test file and the library are not fixing it
jnthn Hmm...that's odd, I'd expect they would 13:52
AlexDaniel m: say 42
camelia 42
AlexDaniel yea, I'm using the latest version… 13:53
jnthn A block { .defined && $matcher } would evaluate to $matcher provided .defined is True, I think? 13:54
So that should be ending up hitting the "we got a Regex back" case in grep, which I left in place 13:55
AlexDaniel oh, and True helps
so under v6.c this works: {.defined and $matcher and True} 13:56
jnthn github.com/rakudo/rakudo/blob/mast...s.pm6#L943
m: my $x = (True and /42/); dd $x 13:57
camelia Regex $x = /42/
jnthn I think that grep block should be evaluating to $matcher
And then hitting `nqp::istype(result, Regex) ?? result.ACCEPTS($_) !! result,`
AlexDaniel oh… 13:58
jnthn In the place I linked
Which I'd expect to then handle it
I wonder why it isn't...
AlexDaniel doesn't it mean that we will be using the regex twice? 13:59
jnthn Why?
`and` doesn't boolify it's second argument, it just evaluates to it if the first one is True 14:00
*its
And then the code in the grep implementation receives the Regex and calls .ACCEPTS on it, rather than boolifying it 14:01
Actually, that partiuclar code should work, per the code in .grep, *regardless* of my recent change, I think? 14:02
timotimo .o( missing decont? :P ) 14:29
i do believe istype deconts usually 14:30
jnthn It does, yes
14:44 j3nnn1 joined 15:17 b2gills left 15:26 b2gills joined
Geth nqp: 9058fc4479 | (Jonathan Worthington)++ | 2 files
Have MoarVM bytecode writer write debug locals

This includes a MoarVM version bump to support bytecode version 6, which we now produce.
15:40
nqp: 6cf6e9a721 | (Jonathan Worthington)++ | src/NQP/Optimizer.nqp
Add local debug names for NQP code

This means that the debugger will now include vastly more symbols. Prior to this change, any lexical lowered into a local (the majority in much code) would not be available through the MoarVM debug server interface.
rakudo: ba7827123c | (Jonathan Worthington)++ | tools/build/NQP_REVISION
Bump to NQP/MoarVM with local debug name support
15:43
rakudo: version bump brought these changes: github.com/perl6/nqp/compare/2018....4-g6cf6e9a
6fe537758c | (Jonathan Worthington)++ | src/Perl6/Optimizer.nqp

When we lower lexicals into locals, it makes them invisible to all that uses the MoarVM debug server interface. This was already the case, but became rather more serious of late, since we now lower many further variables. With this change, we now record the mappings of registers into debug names, which are on the MoarVM backend now passed along to the VM for its use in debugging. Since we did lower some things prior to this change, however, this not only keeps the debug experience from getting worse with this release, but also makes it better than it was before.
15:43 lucasb left
15:48 pmurias joined
jnthn So, now onto another blocker... 15:55
AlexDaniel: Which test file in StaticTable were you looking at? 16:05
AlexDaniel jnthn: t/StaticTable-query.t 16:06
jnthn: you can delete all tests after the first failing one
ok($q2.grep(rx/6/, "Dim3"):n ~~ (2, 4), "Grep test returns rows 2,4");
that's the first one that fails
jnthn AlexDaniel: Thanks 16:09
Think I know what's going on 16:21
16:24 robertle left
jnthn Oh goodness... 16:27
I can fix test 8 just fine
But test 9 onwards with the junctions...uff 16:28
Well, maybe
jnthn tries something 16:29
AlexDaniel yeah, these junctions xD 16:34
16:34 lucasb joined
jnthn Now I'm really confused. I added Junction to the set of things we just .ACCEPTS on, and now it passes...most of the tests, but fails a few still, and I don't quite see why 16:34
yoleaux 16:33Z <atroxaper> jnthn: Hello. We have talked about debugger and mac in CommaIDE 2018-06-23. MoarVM uses 'localhost' word and CommaIDE uses '127.0.0.1'. That is why I'm getting CouldNotConnectException while starting a debug. You were going to change the word in CommaIDE, but as I see in decompiled code you didn't :) This is right? Could you fix it in the next release?
AlexDaniel whenever I see some code with junctions I'm like “wow, well… and it works?”
jnthn bah, why'd I open this code in Vim...it manages to hang it... 16:41
I don't see at all why this one fails, though. Hm. 16:45
timotimo jnthn: it could just be the syntax highlighter; does the file have comments with many - or = or something in it? 16:47
jnthn timotimo: yes 16:50
Ctrl+C fixes it
timotimo aye, that's this particular vim highlighting bug that i see often enough 16:51
but i'm not sure i want to descend into vim debugging
jnthn I write a lot less Perl 6 in Vim than I used to. :)
I'm still very confused by how this almost works but not quite...
16:51 patrickb left
timotimo i haven't looked at the code in question yet, but i'll also be AFK for a bit soon 16:52
jnthn Ah, d'oh, think it was a silly thinko 16:57
Well, now it fails just two tests near the end :/ 16:59
AlexDaniel: Was this test file completely clean before?
oh wat
Now it passed them all
Oh, right, the original ticket mentioned it was flappy 17:00
AlexDaniel jnthn: it may flap a bit
other tests should not flap though
jnthn Yeah, it does, I bet it's hash ordering
Alright, running now 17:01
In theory, I have a fix such that it won't be needed to patch the module at all
AlexDaniel my PR was already merged :)
jnthn All Tests Successful 17:02
AlexDaniel \o/
jnthn Without the PR 17:03
AlexDaniel jnthn++ # awesome!
jnthn Next question: will it blend^Wspectest? :)
AlexDaniel
.oO( blind? )
17:04
jnthn
.oO( I didn't say that one coming... )
*see
d'oh! 17:05
AlexDaniel btw R#2642 is interesting, I'll try to take a look tomorrow if not today 17:06
synopsebot R#2642 [open]: github.com/rakudo/rakudo/issues/2642 [SEGV][regression][⚠ blocker ⚠] Algorithm::LibSVM and segfaults
AlexDaniel I don't think that the tests are ok on 2018.12, but on HEAD it segfaults 17:07
jnthn valgrind it 17:08
AlexDaniel I think I did, and even though my moar is not stripped it still gave me a useless stacktrace
but I really didn't spend much time looking at this issue yet, so who knows… 17:09
jnthn Hm, that might mean it's crashing inside of the libsvm
AlexDaniel I think it does, yeah, but how did we manage to cause that? 17:10
jnthn Potentially, better memory management
One result of the lexical to local lowering is that some things are reachable for a shorter amount of time 17:11
And so the GC can get them earlier
I wonder if it was relying on us being a bit tardy to collect things... 17:12
Looking at the WebSocket test now
It does indeed seem to nom 3GB of memory...wow 17:13
AlexDaniel yeah, that sounds about right. gist.github.com/AlexDaniel/46ffa7a...304eecf3f9 17:14
jnthn: note that I don't know if the memory issue is a regression… the failing test is 17:15
timotimo i think soon as part of my grant i'll have to give the heap snapshot profiler a good look-over; i sometimes see data that seems odd, but i couldn't yet tell if it's just surprising data or borked writing/reading 17:16
in case you want to use the heap profiler for that websocket test and it's giving you surprising data, perhaps it's actually not quite correct 17:17
jnthn I'm now at the point of "I wonder how this ever worked..." :) 17:35
m: loop { $_ = 42; when 42 { } } 17:37
camelia ( no output )
jnthn committable6: 2018.12 loop { $_ = 42; when 42 { } }
committable6 jnthn, ¦2018.12: «»
17:38 pmurias left
jnthn So, this: perl6 --optimize=0 -e 'loop { $_ = 42; when 42 { } }' 17:38
Will loop forever
And, this: perl6 -e 'loop { $_ = 42; when 42 { } }'
Terminates
AlexDaniel c: 2018.12 run <perl6 --optimize=0 -e>, 「loop { $_ = 42; when 42 { } }」 17:40
jnthn c: 2018.12 loop { $_ = 42; when 42 { my $a = 10 } } 17:41
AlexDaniel well… we'll have to wait for mine to terminate :)
jnthn hah
.oO( I spend years building parallelism support, and get a bot that can do one thing at a time?! :) )
17:42
AlexDaniel well make rakudo relocatable then we'll talk :)
jnthn I don't quite have a golf that captures the different between 2018.12 and HEAD yet, but...it's probably going to be in this space.
Basically, I think that a `when` doing a `suceed` was terminating a loop 17:43
17:43 pmurias joined
jnthn And then it ceased to do so 17:43
*succeed 17:44
AlexDaniel committable6: vars
committable6 AlexDaniel, timeout=25
AlexDaniel stupid creature… that's definitely not 25
lizmat jnthn: when you're working on "when", there's also a ticket about when returning False instead of Empty if it doesn't match
jnthn In its slight defense, it didn't specify units ;)
lizmat: Given I'm going to be offline Thu-Sun, I'm planning to work on just the release blocker things for now :-) 17:45
AlexDaniel
.oO( defensi? )
jnthn :D
lizmat jnthn: sounds like a plan
jnthn star: perl6 -e 'loop { $_ = 42; when 42 { my $a = 10 } }' 17:46
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3perl6 -e7⏏5 'loop { $_ = 42; when 42 { my $a = 10 }
expecting any of:
infix
infix stopper
postfix
statement end
jnthn star: loop { $_ = 42; when 42 { my $a = 10 } }
camelia ( no output )
jnthn wow, that's old :)
But anyway, that now hangs on HEAD 17:47
AlexDaniel kicks committable6
17:47 committable6 left
AlexDaniel bisectable6: old=2017.07 loop { $_ = 42; when 42 { my $a = 10 } } 17:48
bisectable6 AlexDaniel, Bisecting by exit signal (old=2017.07 new=6fe5377). Old exit signal: 0 (None)
17:49 committable6 joined, ChanServ sets mode: +v committable6
bisectable6 AlexDaniel, bisect log: gist.github.com/9715620a85ff869641...d350ef9502 17:50
AlexDaniel, (2019-01-07) github.com/rakudo/rakudo/commit/54...6f7b736104
AlexDaniel jnthn: there it is, though maybe not that helpful 17:51
jnthn Well, sort of, but hmm 17:52
AlexDaniel bisectable6: vars
bisectable6 AlexDaniel, On both starting points (old=2015.12 new=6fe5377) the exit code is 1 and the output is identical as well
AlexDaniel, Output on both points: «04===SORRY!04=== Error while compiling /tmp/Ze_uJqhQcn␤Undeclared routine:␤ vars used at line 1. Did you mean 'VAR'?␤␤»
17:52 pmurias left
AlexDaniel
.oO( Consistency? Nah… )
17:53
17:54 pmurias joined
jnthn bisectable6: old=2017.07 run 'perl6', '--optimize=off', '-e', 'loop { $_ = 42; when 42 { my $a = 10 } }' 17:55
Am I don't it wrong, or will it just take a bit if it hangs at both starting points? 17:56
*doing
AlexDaniel jnthn: yeah, it's trying to figure out what to do by doing a run on each point
jnthn OK
But anyway, that confirms my fear :(
It seems that the optimizer accidentally made the succeed exist the loop 17:57
Before recent changes
AlexDaniel these timeouts used to be much smaller, but then they were too small… then I bumped them… now they're too big :)
jnthn And with optimization disabled it seems it always looped forever
Cro::WebSocket depends on `succeed` after a `when` terminating the enclosing loop
17:58 bisectable6 left
AlexDaniel also it seems like using `run` like this ends up not propagating sighup, or something like that… 17:59
18:00 bisectable6 joined
Geth rakudo: c2e272ef68 | (Jonathan Worthington)++ | src/core/Any-iterable-methods.pm6
Further fix grep with regex returns

A fix was applied, but did not cover the case where we had adverbs. Additionally, fix the case where we have a Junction of Regex being returned from the `grep` block. This fixes the regressions reported in #2643.
18:01
synopsebot RAKUDO#2643 [open]: github.com/rakudo/rakudo/issues/2643 [⚠ blocker ⚠] Something going on in Data::StaticTable
AlexDaniel bisectable6: old=2017.07 run 'perl6', '--optimize=off', '-e', 'start { sleep 5; exit 42 }; loop { $_ = 42; when 42 { my $a = 10 } }'
bisectable6 AlexDaniel, On both starting points (old=2017.07 new=6fe5377) the exit code is 1 and the output is identical as well 18:02
AlexDaniel, Output on both points: «The spawned command 'perl6' exited unsuccessfully (exit code: 42)␤ in block <unit> at /tmp/sZwdXrtTAN line 1␤␤»
AlexDaniel jnthn: yeah, both time out.
18:05 robertle joined
jnthn committable6: 2018.12 run 'perl6', '--target=optimize', '-e', 'loop { $_ = 42; when 42 { my $a = 10 } }' 18:07
committable6 jnthn, gist.github.com/620c516773c1f73422...57502fd678
jnthn Yeah, in 2018.12 the optimizer flattened in the loop block 18:08
Now it does not
committable6: 2018.12 loop { $_ = 42; when 42 { my $a = 10 } }; say "after the loop" 18:09
committable6 jnthn, ¦2018.12: «»
jnthn Wow!
AlexDaniel O_O
jnthn And because it wrongly flattened it in, the SUCCEED handler's p6return op then caused the enclosing block to be returned from, which was the main program 18:10
So the succeed leaving the loop both worked by accident *and* caused code in the same block as the loop not to be executed. 18:11
lizmat
.oO( what a way to succeed :-)
18:11 pmurias left
jnthn The optimizer changes - perhaps by luck, admittedly, since I don't look for p6return yet - don't make this mistake. 18:11
However, they break code relying on it 18:12
This is a pretty awful situation, in that we have a situation where a `when` would *sometimes* leave the enclosing loop, and that could be relied on in programs where it happend, and not relied on in programs where it did not.
Um, I didn't phrase that the best, but... 18:13
The point is that we can make the behavior caused by the bug "official" and break other code too.
18:13 pmurias joined
lizmat I guess in that situation, standardize on the situation it is supposed to be and see how that breaks the ecosystem 18:13
jnthn I don't actually know which is correct :P
Maybe a careful reading of S04 will give some clue to original intent 18:14
But my gut feeling would be that `when` causes us to leave the enclosing block
lizmat I don't think "when" is actually in S04
it was a late addition
argh
jnthn Late? Smartmatch came pretty early? 18:15
lizmat confused with "with" :-)
jnthn Oh :)
Anyway, my feeling is that `when` causes us not to execute any further statements in the enclosing block, but not to end a loop
m: for 1,2,3,4 { when * %% 2 { say "even" }; default { say "odd" } }
camelia odd
even
odd
even
jnthn There we rely on it *not* terminating the loop, for example
(Because the optimizer can't flatten in the body of a `for`) 18:16
And I'm pretty sure *that* will be used extensively in the wild
In fact, I bet that very example is in the spectests and design docs 18:17
So, now I think I am sure which is correct: a successful `when` should not terminate the enclosing loop, and Cro::WebSocket relies on a bug in the optimizer that has now been fixed.
And in fact, would always have been broken if compiled with the optimizer disabled 18:18
And while there's some things in the optimizer that aren't purely optimizations, this sure isn't one of them :)
lizmat sounds about right: fwiw, if it doesn't work when untouched by the optimizer, it sounds broken to me
jnthn So probably the bset I can do is to release a fixed Cro::WebSocket. If it only tripped up one module, it seems rare enough. 18:19
And then I should also patch the optimizer to look out for p6return and make it imply the block is unflattenable
Since the reason it isn't being now is as much fortune as anything
timotimo impressive bughunt 18:21
jnthn github.com/croservices/cro-websock...its/master 18:25
um, github.com/croservices/cro-websock...f64346b418 is better
Updated github.com/rakudo/rakudo/issues/2644 with notes about this 18:29
Dinner time :)
18:33 patrickb joined 19:14 lucasb left 19:34 pmurias left 19:50 pmurias joined 20:10 pmurias left 20:19 japhb left 20:52 pmurias joined 21:16 lizmat_ joined 21:19 lizmat left 21:22 patrickb left
gfldex jnthn: why could moarvm say: „continuationinvoke expects an MVMContinuation“ ? 21:32
timotimo it doesn't say what it got instead? 21:35
can you breakpoint that and print STABLE(whatever-object-variable-it-has)? 21:36
jnthn Because something tried to invoke a continuation, but the thing it was given wasn't one
21:36 pmurias left
timotimo it could be as simple as "it's a Scalar with a continuation in it" 21:37
jnthn There's very few instances of continuationinvoke
In fact, probably 2: gather/take, and the thread pool.
timotimo or it's a type object or a null
gfldex I'm starting quite a lot of threads and there is recursion as well. If I can reproduce it I will golf.
21:48 pmurias joined
gfldex is there a way to tell how many threads there are already running or waiting to run? 21:49
jnthn When you say threads, do you actually mean `Thread`, or tasks on the thread pool? 21:50
I think the Telemetry module might provide such info, though
For both cases
gfldex actually both. I'm trying to implement a cuncurrent dir('loads/of/files') that actually gets faster. Just starting loads of threads is not cutting it. 21:51
21:52 |Tux| left, |Tux| joined
jnthn Since I think it reads the whole directory and hands back an eager array, then there's probably not much to be had in the actual listing 21:53
21:54 pmurias left
gfldex I'm at 2x speed by 10x load. My power company will like it, I don't. :-> 21:54
timotimo you could try a "perf record" to see if it's actually spending lots of time in syscalls already or if it's doing mostly MVM_interp_run (may need -g for this purpose, and either deactivate the jit or set MVM_JIT_PERF_MAP to 1) 22:00
22:10 pmurias joined 22:12 robertle left
gfldex I'm getting pretty repeatable: 22:26
Unhandled exception in code scheduled on thread 7
continuationinvoke expects an MVMContinuation
Unhandled exception in code scheduled on thread 7
continuationinvoke expects an MVMContinuation
I shall golf tomorrow. 22:27
my $workers = nqp::atpos_i($*SCHEDULER.usage, 2); 22:29
^^^ seams to be at least close to the culprit.
22:45 pmurias left
gfldex Telemetry::Instrument::ThreadPool::Snap.new<gw> > 4 # <-- what i was looking for (I shall blog!) 22:56
gfldex sleep & 22:57
23:01 leont joined 23:16 lizmat_ is now known as lizmat 23:33 entonian joined 23:40 entonian left 23:44 leont left