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:18 Kaiepi joined 00:19 p6bannerbot sets mode: +v Kaiepi 01:33 Ven`` left 04:35 Ven`` joined, p6bannerbot sets mode: +v Ven`` 04:41 Ven`` left 07:49 squashable6 left, releasable6 left, committable6 left, evalable6 left, benchable6 left, shareable6 left, reportable6 left, quotable6 joined, ChanServ sets mode: +v quotable6 07:50 undersightable6 joined, p6bannerbot sets mode: +v quotable6, p6bannerbot sets mode: +v undersightable6 07:51 coverable6 joined, committable6 joined, notable6 joined, greppable6 joined, evalable6 joined, ChanServ sets mode: +v evalable6, p6bannerbot sets mode: +v coverable6, releasable6 joined, p6bannerbot sets mode: +v committable6, p6bannerbot sets mode: +v notable6, reportable6 joined 07:52 p6bannerbot sets mode: +v greppable6, bisectable6 joined, p6bannerbot sets mode: +v evalable6, bloatable6 joined, ChanServ sets mode: +v bloatable6, shareable6 joined, p6bannerbot sets mode: +v releasable6, p6bannerbot sets mode: +v reportable6, unicodable6 joined, ChanServ sets mode: +v unicodable6, p6bannerbot sets mode: +v bisectable6 07:53 p6bannerbot sets mode: +v bloatable6, benchable6 joined, p6bannerbot sets mode: +v shareable6, nativecallable6 joined, p6bannerbot sets mode: +v unicodable6, p6bannerbot sets mode: +v benchable6, squashable6 joined, ChanServ sets mode: +v squashable6 07:54 lizmat left, statisfiable6 joined, ChanServ sets mode: +v statisfiable6, p6bannerbot sets mode: +v nativecallable6, p6bannerbot sets mode: +v squashable6, p6bannerbot sets mode: +v statisfiable6 08:19 robertle joined 08:20 p6bannerbot sets mode: +v robertle 08:59 lizmat joined, p6bannerbot sets mode: +v lizmat
lizmat Files=1264, Tests=88002, 374 wallclock secs (20.08 usr 5.95 sys + 2669.44 cusr 226.93 csys = 2922.40 CPU) 09:04
Geth rakudo: 0797f93ec4 | (Elizabeth Mattijsen)++ | src/core/Rat.pm6
Add return signatures to FatRat returning candidates
09:26
09:27 pmurias joined, p6bannerbot sets mode: +v pmurias
lizmat ok: I think I have a very simple idea for making a pragma that will force all Rats to become FatRats in that scope 09:38
Geth rakudo: 5625ebc155 | (Elizabeth Mattijsen)++ | 2 files
Add full-precision pragma

Really a proof of concept, and name up for bike-shedding. The solution is really simple: just make Rat the same as FatRat in that scope. And this even covers rational literals automagically. :-)
09:42
lizmat 6 'dd 0.01; { use full-precision; dd 0.02; dd Rat }; dd 0.03'
0.01
FatRat.new(1, 50)
FatRat
0.03
this also elegantly bypasses any version issues, I would think, as we could also provide this in module space 09:43
(or in module space only, should we decide that that is where this is going to live) 09:44
jnthn: ^^ 09:48
10:07 pmurias left 10:09 pmurias joined, p6bannerbot sets mode: +v pmurias 10:27 robertle left
|Tux| Rakudo version 2018.12-122-g5625ebc15 - MoarVM version 2018.12-13-g473324ee3
csv-ip5xs0.929 - 0.937
csv-ip5xs-207.135 - 7.222
csv-parser23.052 - 23.495
csv-test-xs-200.426 - 0.435
test7.170 - 7.176
test-t1.887 - 1.900
test-t --race0.814 - 0.837
test-t-2031.744 - 31.904
test-t-20 --race9.617 - 9.842
11:11
lizmat bisectable6: dd < 42/17 > + 1 11:26
bisectable6 lizmat, Bisecting by exit code (old=2015.12 new=5625ebc). Old exit code: 0
lizmat, bisect log: gist.github.com/66cd49f6556cde5424...4e1aca5e20
lizmat, (2019-01-02) github.com/rakudo/rakudo/commit/29...8f66097d10
lizmat *sigh* 11:27
11:42 pmurias left
Geth rakudo: e29554f5c3 | (Elizabeth Mattijsen)++ | src/core/Rat.pm6
Revert using nqp::getattr instead of accessors

Makes operations on Rats a tiny bit slower, but makes operations on RatStr's work again.
11:49
roast: 48223c25da | (Elizabeth Mattijsen)++ | S32-num/rat.t
Make sure we test ops on RatStr's
11:56
12:01 pmurias joined, p6bannerbot sets mode: +v pmurias
AlexDaniel lizmat: heh, that's lovely :) 12:12
commit, find a bug, bisect, revert, add tests :)
lizmat yeah, rather would have done: find a bug, adapt, commit 12:13
Geth rakudo: c47d95f217 | (Elizabeth Mattijsen)++ | lib/full-precision.pm6
Make sure we also make / create FatRats
12:17
rakudo: 4a152da504 | (Elizabeth Mattijsen)++ | lib/full-precision.pm6
Make sure we use old infix:</> logic

So we can handle also non-integer values on infix:</> when
   use full-precision;
is active.
12:27
12:27 robertle joined 12:28 p6bannerbot sets mode: +v robertle 12:39 lucasb joined, p6bannerbot sets mode: +v lucasb
AlexDaniel squashable6: next 13:06
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in ≈20 hours (2019-01-05 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
13:15 MasterDuke left 13:46 ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy
lizmat bisectable6: BEGIN my $*FOO = 42 13:51
bisectable6 lizmat, On both starting points (old=2015.12 new=4a152da) the exit code is 1 and the output is identical as well
lizmat, Output on both points: «04===SORRY!04=== Error while compiling /tmp/ZQmu4RdRnH␤An exception occurred while evaluating a BEGIN␤at /tmp/ZQmu4RdRnH:1␤Exception details:␤ Dynamic variable $*FOO not found␤ in code at /tmp/ZQmu4RdRnH line 1␤␤»
lizmat hmmm... I was convinced this worked at some time 13:52
should it?
jnthn m: BEGIN { my $*FOO = 42 } 13:56
camelia ( no output )
jnthn It's problematic because without the curlies the declaration is actually outside of the code that is compiled for the BEGIN block
And that is run in the compiler's dynamic scope 13:57
The enclosing block isn't yet compiled, let alone in dynamic scope :)
lizmat yeah... and I actually want to have it run outside of the block :-)
yeah, makes sense
jnthn But I thought in a context like this it'd do the initialization lexically 13:58
lizmat jnthn: I was testing an approach with a $*FULL-PRECISION dynamic variable
jnthn I'm not entirely sure why it's doing a dynamic lookup
lizmat m: BEGIN PROCESS::<$FOO> = 0; BEGIN $*FOO = 42; say $*FOO 13:59
camelia 42
lizmat perhaps the Failure gets thrown when it shouldn't ? 14:00
jnthn Even then, where's the Failure coming from? 14:07
14:08 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke
MasterDuke i just got a new flapper in t/spec/S04-exceptions/fail.t 14:21
the output when run directly: gist.github.com/MasterDuke17/70f83...34861ca616 14:22
jnthn Yeah, I've seen that too. 14:25
I tracked it down to being sensitive to MVM_SPESH_INLINE_DISABLE=1, but even with MVM_SPESH_BLOCKING=1 set it still only happens some of the time, which is weird. 14:26
14:26 pmurias left
jnthn Didn't see any access to uninit or other oddities under valgrind though, so no idea what the source of randomness is that makes it do different things on different runs. 14:26
MasterDuke does the env variable carry over to spawned threads? 14:27
jnthn Threads, or procs?
The env is per process, I believe, so threads shoudln't make a difference.
Geth rakudo/lower-topic: 64d08ad637 | (Jonathan Worthington)++ | 2 files
Differentiate required and optional implicit topic

When we have `for @a { }` then there is no need for the `$_` parameter to be optional, since we know we'll always be invoking the block with a parameter. This should lead to slightly more compact/efficient code for such cases, and will make the static optimizer's job easier with regard to having to try and track outer lexical accesses.
MasterDuke well, whatever get_out and is_run do 14:28
jnthn If they spawn a proc then yeah, I'd expect it to pass them along
Geth nqp: c4d2aa6f1b | (Daniel Green)++ | src/QRegex/NFA.nqp
Another micro-opt to NFA code

Move some list creations into a smaller scope.
MasterDuke hm, any easy way to check that? 14:29
14:32 Ven`` joined 14:33 p6bannerbot sets mode: +v Ven``, pmurias joined, p6bannerbot sets mode: +v pmurias
jnthn Just print the env var in the sub-proc? 14:36
timotimo MasterDuke: is $send <= 3 often in that piece of code? 14:40
MasterDuke it happens occasionally while building rakudo. not in the muldis grammar though 14:42
timotimo OK. probably still worth it, though
if that block is not inlined statically or dynamically it'll also reduce the lifetime of those arrays, so GC can get it earlier after the block is left 14:44
probably not worth thinking too much about the finer details 14:45
MasterDuke finer details?
timotimo whether the block gets inlined and stuff like that 14:46
MasterDuke ah 14:47
timotimo i wonder if it'd be worth it to count the number of remaining epsilon edges in step 2 and quit step 3 early when the same number of epsilon edges was found
MasterDuke timotimo: btw, do you see mergesubrule only half-jitted? 14:49
timotimo i at least don't see anything in the spesh log 14:52
MasterDuke was the jit log removed? 14:53
Geth rakudo/lower-topic: 2a33bb1a35 | (Jonathan Worthington)++ | src/Perl6/Actions.nqp
Don't emit unused parameter decont instructions

Sure, spesh will throw them out, but it's better to produce nicer code in the first place. The unused decont instructions could happen with Mu-typed `is raw` or `is rw` args.
14:54
jnthn MasterDuke: Yes, JIT log's important details were folded into spesh log, I believe
MasterDuke right, thanks 14:55
timotimo aye, could grep out the line following "After:" and "JIT was not" 14:56
looks like statistically the last edge with an epsilon is near the end and the first edge with an epsilon is near the start 14:58
MasterDuke ugh, i keep trying to use my smaller example and forgetting that it segfaults now
timotimo so starting where we know the first one to be and stopping where we know the last one to be is not worth anything
AlexDaniel robertle: any news? 15:01
Geth rakudo/lower-topic: 83c2070e4e | (Jonathan Worthington)++ | src/Perl6/Actions.nqp
Update default topic signature lowering

Now it can do its job on the required case also.
15:24
15:28 lucasb left
Geth rakudo/lower-topic: ab7f07dbbe | (Jonathan Worthington)++ | src/Perl6/Optimizer.nqp
Track usages of $_ during topic preservation

Once we will lower $_, then we shall need to be able to update these references.
16:22
rakudo/lower-topic: 91a4b3b1d9 | (Jonathan Worthington)++ | src/Perl6/Optimizer.nqp
Properly track and fixup getlexouter usages

These are only normally emitted as part of $_ handling, so naturally need to be fixed up properly when doing block inlining or respected then doing lexical to local lowering.
jnthn With those two, I can now lower $_ from lexical to local and pass `make test`. 16:23
Next to try and get `make install` and `make spectest` working with it
dogbert11 jnthn, MasterDuke: the flapping test, i.e. t/spec/S04-exceptions/fail.t, seems to originate from github.com/rakudo/rakudo/commit/e7...d8c1dee6cf 16:36
jnthn dogbert11: Ah, which gives spesh more opportunities, so yeah, it's probably just exposing an existing bug 16:37
dogbert11 the thing is, it breaks with MVM_SPESH_DISABLE=1 ! 16:41
jnthn Oh? 16:43
I never got that to happen
dogbert11 for me it breaks more often if spesh is disabled. The previous commit, i.e. github.com/rakudo/rakudo/commit/c8...1322656069 is good 16:46
Geth rakudo: 9f956aff4a | (Elizabeth Mattijsen)++ | src/core/Rat.pm6
Introducing $*FULL-PRECISION

By default False. When set to True, it will *not* downgrade a Rat to a Num (float) but instead upgrade it to a FatRat.
This is an alternate approach to "use full-precision": whereas the pragma only functions in the lexical scope it is used, using the dynamic variable ... (6 more lines)
16:47
rakudo: 3f8fea9bc0 | (Elizabeth Mattijsen)++ | 2 files
Remove "full-precision" pragma

Mostly because it turned out to be very hard to transparently handle the case of creating a FatRat constant: it would get downgraded before it could be turned into a FatRat.
16:49
dogbert11 wonders if this comment is something to worry about: '# Seems good; lower it. Note we need to retain a lexical in case of binder failover to generate errors. (TODO: only retain them for parameters.)' 16:50
jnthn I think it's out of date by now 16:53
dogbert11 phew :)
jnthn I thought I edited it even...
We can't actually get rid of them after all, 'cus it breaks a spectest
We need to leave a trace that there used to be a leixcal 16:54
16:56 pmurias left
dogbert11 indeed, the comment was changed with a later commit, sorry for the noise 16:56
Geth rakudo/lower-topic: 6b44c5815a | (Jonathan Worthington)++ | src/Perl6/Optimizer.nqp
Track and fixup getlexouter in parameter defaults

This case will also need to be handled properly in order to lower $_.
16:58
rakudo/lower-topic: eb3917c260 | (Jonathan Worthington)++ | src/Perl6/Optimizer.nqp
Start to lower $_ from lexical to local

This almost passes spectest, thanks to the various preparatory changes that were done. It also gives a quite nice speedup on the empty range benchmark, since the unused `$_` now uses a local, which we can in turn see is completely unused, and therefore throw out a boxing operation, thus meaning it can JIT into a rather tighter loop. Alas, it seems that despite the wins, this costs us something on some benchmarks, which will need further examination.
17:04
17:06 Ven`` left
jnthn 2 spectests need attention, one actually hangs, looks like I busted -ne or something (curiously, that test has a comment saying it hangs on the JVM :P) 17:11
And the other one is 'cus I need to not do this opt under 6.c
Time for a break...will work on it some more tomorrow :) 17:27
lizmat jnthn++
m: dd Rat.new(1,999999999999999999999999999).^name # should we consider this a bug or a feature ? 17:59
camelia "Rat"
lizmat if the denominator on Rat would be really uint, then this would fail
so one could either expect it to return a Num (float) or a FatRat
I seem to recall jnthn complaining about it after I added some relatively long running test-files to spectest 18:00
when he was still mainly developing on Windown 18:01
*s
18:08 pmurias joined, p6bannerbot sets mode: +v pmurias 18:43 squashable6 left 18:44 squashable6 joined, ChanServ sets mode: +v squashable6, p6bannerbot sets mode: +v squashable6 18:51 Ven`` joined 18:52 p6bannerbot sets mode: +v Ven``
Geth nqp: 49f061242a | (Daniel Green)++ | src/QRegex/NFA.nqp
Another micro-opt to NFA code

Since operations use floats by default in NQP, explicitly making an int variable out of an array access reduces the BOOTNums allocated during compilation.
18:54
MasterDuke timotimo: ^^^ 18:57
18:59 pmurias left 19:00 pmurias joined, p6bannerbot sets mode: +v pmurias
timotimo ah, that's not bad 19:20
do you know if the == just below that is working with nums? 19:21
MasterDuke i had a slightly more extensive patch, but it only removed about 14k nums more 19:37
might do that as another commit 19:38
20:08 AlexDaniel left
MasterDuke huh. got my nqp branch updated with a bunch of the recent changes and made new bootstrap files, but now actually building nqp give an `Attempt to read past end of string heap when locating string` , but then dies with `Malformed UTF-8 at line 1 col 1` 20:16
20:16 dct joined, p6bannerbot sets mode: +v dct
MasterDuke oh wait, the rebase didn't finish 20:21
hm, still getting those 20:32
first one happens during the configure
Geth rakudo: 91f674945c | (Elizabeth Mattijsen)++ | src/core/Rational.pm6
Shave off a few % off of Rational.new

  - only allow for instantiated NuT and DeT
  - create object at one place
  - use cheaper bindattr instead of bindattrvinres where possible
  - simplify -1 0 1 logic when denominator is 0
  - about 1-2% faster
20:49
20:57 MasterDuke left
Geth rakudo: f976c85e2a | (Elizabeth Mattijsen)++ | tools/build/NQP_REVISION
Bump NQP to get Daniel Green's NFA optimizations
21:05
rakudo: version bump brought these changes: github.com/perl6/nqp/compare/2018....5-g49f0612
cbc3e72e2b | (Elizabeth Mattijsen)++ | src/core/Duration.pm6
21:23 pmurias left 21:27 travis-ci joined, p6bannerbot sets mode: +v travis-ci
travis-ci Rakudo build failed. Elizabeth Mattijsen 'Shave off a few % off of Rational.new 21:27
travis-ci.org/rakudo/rakudo/builds/475031163 github.com/rakudo/rakudo/compare/3...f674945c83
21:27 travis-ci left
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 21:27
lizmat looks like a flapper in one of the jobs 21:28
dogbert11 lizmat: the error seems to be - Stage parse : Unknown constant 'BINARY_ENDIAN_NATIVE' 21:35
lizmat then it's using the wrong version of NQP
dogbert11 could it be that the JVM backend still expects it? 21:37
ah, so that's a new constant 21:40
22:14 lucasb joined, p6bannerbot sets mode: +v lucasb
japhb .tell jnthn OO::Monitors is failing tests on a fresh Rakudo build due to something about lexical lowering: 22:14
yoleaux japhb: I'll pass your message to jnthn.
japhb ===> Testing: OO::Monitors:ver<1.1>
No such method 'get_value' for invocant of type 'Rakudo::Internals::LoweredAwayLexical' 22:15
in any at t/condition.t line 44
jnthn japhb: Yeah, already got a ticket about that on OO::Monitors. It might or might not already be fixed in the branch I was working on today. 22:20
yoleaux 22:14Z <japhb> jnthn: OO::Monitors is failing tests on a fresh Rakudo build due to something about lexical lowering:
jnthn Will figure it out tomorrow; most issues like that have been quite obviously apparent once I look at the --target=optimize output. 22:21
22:28 lizmat left, lizmat joined, p6bannerbot sets mode: +v lizmat
timotimo i wonder if perhaps rakudo (or whatever is responsible for putting the files there) should make source files for installed modules read-only on the filesystem 22:41
lizmat that would actually not be a bad idea :-) 23:03
timotimo to give people a little weak signal of "don't change these, k?" 23:38
jnthn 23:43
timotimo CompUnit::Installation::Blockchain
jnthn
.oO( "I ran an UPDATE query to update the source but..." :) )
timotimo "but then a trigger ran that displayed a big red blinking text on screen" 23:44