🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | log inspection situation still under development | For MoarVM see #moarvm
Set by lizmat on 22 May 2021.
00:02 reportable6 left 00:03 reportable6 joined 01:03 bisectable6 left, coverable6 left, notable6 left, releasable6 left, squashable6 left, evalable6 left, nativecallable6 left, unicodable6 left, quotable6 left, greppable6 left, reportable6 left 01:04 notable6 joined, reportable6 joined, squashable6 joined, quotable6 joined, bisectable6 joined 01:05 greppable6 joined, evalable6 joined, nativecallable6 joined 01:06 releasable6 joined, unicodable6 joined, coverable6 joined 02:57 Kaipi left, Kaiepi joined 06:02 reportable6 left 06:05 reportable6 joined 06:24 Util left, jdv left, japhb left, frost left, vrurg_ left, kjp left, samcv left, smarton left, summerisle left, unicodable6 left, evalable6 left, nativecallable6 left, quotable6 left, Geth left, discord-raku-bot left, leont left, SmokeMachine left, nine left, kawaii_ left, sena_kun left, Kaiepi left, Voldenet left, linkable6 left, sourceable6 left, bloatable6 left, tellable6 left, statisfiable6 left, committable6 left, shareable6 left, benchable6 left, cognominal left, camelia left, nebuchadnezzar left, lucs left, jjatria left, bartolin_ left, reportable6 left, coverable6 left, releasable6 left, greppable6 left, bisectable6 left, squashable6 left, notable6 left, TempIRCLogger left, sivoais left, lizmat left, AlexDaniel left, [TuxCM] left, gfldex left, rba left, djinni` left, timo left, samebchase left, JRaspass left, tbrowder left, ugexe left, zostay left, rypervenche left 06:25 reportable6 joined, Kaiepi joined, coverable6 joined, unicodable6 joined, releasable6 joined, nativecallable6 joined, evalable6 joined, greppable6 joined, bisectable6 joined, quotable6 joined, squashable6 joined, notable6 joined, japhb joined, Voldenet joined, linkable6 joined, sourceable6 joined, bloatable6 joined, tellable6 joined, statisfiable6 joined, committable6 joined, shareable6 joined, benchable6 joined, cognominal joined, frost joined, Geth joined, vrurg_ joined, kjp joined, discord-raku-bot joined, smarton joined, samcv joined, summerisle joined, tbrowder joined, leont joined, SmokeMachine joined, ugexe joined, TempIRCLogger joined, nine joined, zostay joined, kawaii_ joined, AlexDaniel joined, Util joined, sena_kun joined, jdv joined, JRaspass joined, djinni` joined, bartolin_ joined, jjatria joined, lucs joined, nebuchadnezzar joined, camelia joined, lizmat joined, sivoais joined, [TuxCM] joined, rba joined, gfldex joined, samebchase joined, timo joined, rypervenche joined 06:45 sena_kun left 08:18 quotable6 left, benchable6 left, reportable6 left, unicodable6 left, notable6 left, nativecallable6 left, evalable6 left, bisectable6 left, coverable6 left, squashable6 left, tellable6 left, committable6 left, linkable6 left, sourceable6 left, bloatable6 left, statisfiable6 left, shareable6 left, releasable6 left, greppable6 left, shareable6 joined, releasable6 joined, nativecallable6 joined, squashable6 joined 08:19 bloatable6 joined, unicodable6 joined, tellable6 joined, bisectable6 joined, reportable6 joined, coverable6 joined, evalable6 joined 08:20 quotable6 joined, linkable6 joined, statisfiable6 joined, committable6 joined, benchable6 joined, notable6 joined, greppable6 joined 08:21 sourceable6 joined 09:21 evalable6 left, statisfiable6 left, committable6 left, releasable6 left, greppable6 left, sourceable6 left, squashable6 left, coverable6 left, bloatable6 left, notable6 left, quotable6 left, bisectable6 left, linkable6 left, shareable6 left, nativecallable6 left, unicodable6 left, reportable6 left, benchable6 left, releasable6 joined, evalable6 joined, committable6 joined, bisectable6 joined, statisfiable6 joined, shareable6 joined 09:22 reportable6 joined, linkable6 joined, bloatable6 joined, benchable6 joined, squashable6 joined, unicodable6 joined
Geth rakudo: f2959ad5c6 | (Elizabeth Mattijsen)++ | src/core.c/Any-iterable-methods.pm6
Re-imagine IterateOneWithoutPhasers.pull-one

This code path is taken for things like:
   my @a = ^10 .map( ... ).grep: ...;
This makes this loop handler a little smaller bytecode wise (so better inlineable), and saves one Scalar allocation per iteration.
09:23
09:23 greppable6 joined
09:23 nativecallable6 joined, coverable6 joined, notable6 joined, sourceable6 joined 09:24 quotable6 joined 10:06 Altai-man joined
Geth rakudo: 7a1b729bf1 | (Elizabeth Mattijsen)++ | 4 files
Narrow down test to loop phasers

When mapping / looping, the test for phasers was too large: only the NEXT / FIRST / LAST phasers have effect on the way a loop should run.
This improves code like:
... (6 more lines)
10:27
rakudo: 52ffc12550 | (Elizabeth Mattijsen)++ | src/core.c/Any-iterable-methods.pm6
Make .grep(Callable) about 3% faster

Well, depending on number of iterations. Benchmark was:
   my @a = ^10 .grep: { True }
We don't need to call "sequential-map" and its overhead, we know that the IterateOneWithoutPhasers is the one that will be selected.
11:19
11:31 linkable6 left, evalable6 left, evalable6 joined 11:33 linkable6 joined
Geth rakudo: 0761d4b2d4 | (Elizabeth Mattijsen)++ | src/core.c/Any-iterable-methods.pm6
Fix "next value" in .grep(Callable) with >1 argument

This was forgotten when support for "next value" was added. This makes:
   my @a = ^10 .grep: -> \a, \b { next True }
work correctly.
11:39
rakudo: ddc7c9ff22 | (Elizabeth Mattijsen)++ | src/core.c/Any-iterable-methods.pm6
Missed one case of needing to use .has-loop-phasers
12:01
12:02 reportable6 left
Geth rakudo: gfldex++ created pull request #4449:
add Assoc HyperWhatever support
12:03
12:05 reportable6 joined 12:19 dogbert11 joined 12:21 frost left 12:36 squashable6 left, squashable6 joined
Geth rakudo: bb09bbb858 | (Elizabeth Mattijsen)++ | src/core.c/Any-iterable-methods.pm6
Improve performance of .grep(Callable) and cleanup

  - about 1% for single arg Callable
  - more than 2x as fast for 2 arg Callable
  - a few percent for 2+ arg Callables
This gets rid of the CheatArity hack, that turned out to be only in ... (7 more lines)
12:58
lizmat bisectable6: old=2021.06 my @a = ^10 .grep: { NEXT die; True }; dd @ 13:11
bisectable6 lizmat, On both starting points (old=2021.06 new=1bd0411) the exit code is 0 and the output is identical as well
lizmat, Output on both points: «Array @ = []␤»
lizmat bisectable6: old=2021.06 my @a = ^10 .grep: { NEXT die; True }; dd @a 13:12
bisectable6 lizmat, On both starting points (old=2021.06 new=1bd0411) the exit code is 0 and the output is identical as well
lizmat, Output on both points: «Array @a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
lizmat bisectable6: old=2021.01 my @a = ^10 .grep: { NEXT die; True }; dd @a
bisectable6 lizmat, Cannot find revision “2021.01” (did you mean “2021.06”?)
lizmat bisectable6: old=2020.12 my @a = ^10 .grep: { NEXT die; True }; dd @a
bisectable6 lizmat, On both starting points (old=2020.12 new=1bd0411) the exit code is 0 and the output is identical as well
lizmat, Output on both points: «Array @a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
lizmat m: ^10 .grep: { NEXT die; True }
camelia ( no output )
lizmat shouldn't that... die ? 13:13
m: dd ^10 .grep: { next; True } 13:14
camelia ().Seq
lizmat loop semantics *are* being applied for "next"
gfldex Does Roast demand next in grep? 13:15
lizmat pretty sure
gfldex I just check, it does. So grep is a loop construct so a NEXT phaser should work. 13:16
m: ^10 .grep: { NEXT { die }; True } 13:17
camelia ( no output )
gfldex Are exceptions legal in phasers?
lizmat well... loop semantics are applied for "next" and "last" is what I think the official description is.
I don't think phasers are mentioned in this
gfldex IIRC LAST and LEAVE are special in regard of Exception. 13:18
Only LEAVE is ment to be exception safe. So `NEXT die` should just throw. 13:22
lizmat hmmm... of course, a LAST phaser would never work inside a .grep
as it could not know when the last call was made (except with an explicit "last" statement) 13:23
gfldex I'm not so sure. LAST should fire when IterationEnd is hit. 13:24
lizmat yeah, but the Callable that you specify with grep, will never get called with IterationEnd
and there has been thought about disallowing "next" and "last" inside .grep anyway 13:25
as hit hinders hypering consistently
I guess if you do need NEXT phaser functionality inside a .grep Callable, you could use LEAVE 13:26
gfldex Makes it harder to read.
lizmat anyways... going to mull over this while cycling before the rains are going to hit& 13:27
gfldex does chaning the last line in tools/templates/RAKU_SPECS change the default language version to .e? 13:32
13:47 rypervenche left 14:13 rypervenche joined 14:45 Voldenet left 15:45 Voldenet joined 16:15 melezhik joined 16:23 melezhik left
lizmat vrurg_ might know 16:51
18:02 reportable6 left 18:04 reportable6 joined
gfldex RAKU_SPECS does indeed control the default verion. I'm kinda calling from the future and can remore that `make spectest` doesn't look to bad for 6.e . 20:07
20:38 evalable6 left, linkable6 left, linkable6 joined 20:40 evalable6 joined 20:44 vrurg_ is now known as vrurg
vrurg Spectest passing must not depend on default language revision. Moreover, it feels to me that most of unversioned tests must get `use v6.c` because they are supposed to spec it. 20:46
gfldex Test driven programming works best when you acutally run the test. :-> 21:31
lizmat
.oO( you need to have a test for that )
21:34
Geth rakudo: 38626c6860 | (Elizabeth Mattijsen)++ | src/core.c/Any-iterable-methods.pm6
Lose one level of indirection with .map

We no longer need the "sequential-map" sub, so remove it. Results in about 10% less overhead for each .map. Also be smarter about handling the :item argument.
21:58
japhb lizmat++ # Iteration optimization 22:00
22:21 squashable6 left 22:22 squashable6 joined 22:26 casaca joined 23:10 dogbert11 left, dogbert17 joined