🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 8 June 2022.
00:00 evalable6 joined 00:07 reportable6 left, reportable6 joined 01:07 Colere left 01:09 Furor joined 01:52 Furor is now known as Colere 02:12 frost joined 02:52 frost left 03:12 frost joined 04:12 squashable6 left, unicodable6 left, committable6 left, bloatable6 left, tellable6 left, quotable6 left, nativecallable6 left, greppable6 left, coverable6 left, linkable6 left, reportable6 left, bisectable6 left, statisfiable6 left, notable6 left, shareable6 left, evalable6 left, benchable6 left, sourceable6 left, releasable6 left 04:13 evalable6 joined, notable6 joined, nativecallable6 joined, reportable6 joined, coverable6 joined, bloatable6 joined, greppable6 joined, quotable6 joined, linkable6 joined, unicodable6 joined 04:14 shareable6 joined, tellable6 joined, squashable6 joined 04:15 statisfiable6 joined, sourceable6 joined, releasable6 joined, bisectable6 joined, benchable6 joined, committable6 joined 04:26 pamplemousse joined 05:26 greppable6 left, squashable6 left, tellable6 left, committable6 left, linkable6 left, sourceable6 left, benchable6 left, notable6 left, nativecallable6 left, unicodable6 left, bloatable6 left, statisfiable6 left, reportable6 left, coverable6 left, bisectable6 left, quotable6 left, evalable6 left, shareable6 left, releasable6 left, benchable6 joined 05:27 releasable6 joined, statisfiable6 joined, linkable6 joined, evalable6 joined, greppable6 joined, bisectable6 joined, squashable6 joined, reportable6 joined, bloatable6 joined 05:28 tellable6 joined, nativecallable6 joined, committable6 joined, coverable6 joined 05:29 shareable6 joined, quotable6 joined, notable6 joined, sourceable6 joined, unicodable6 joined 06:07 reportable6 left 06:08 reportable6 joined 06:37 pamplemousse left 06:40 pamplemousse joined 06:48 habu joined, habu left 07:01 pamplemousse left 08:01 linkable6 left, evalable6 left, linkable6 joined 08:02 evalable6 joined, Kaipei is now known as Kaiepi 08:14 habere-et-disper joined 08:27 deoac left
habere-et-disper It would seem wonderful/magical to me if a recursive solution could be made dynamic with a single keyword, ie that `state` could apply to a `multi`... 08:28
But I see:
# Cannot use 'state' with individual multi candidates.
# Please declare an state-scoped proto instead
Nemokosch what would this mean? 08:31
habere-et-disper I'm hoping it would cache the results, so it reduces the number of calls a recursive solution makes... 08:34
Something like turning 08:35
m: multi fib (  0 ) { 0 }
camelia ( no output )
habere-et-disper multi fib (  1 ) { 1 }
multi fib ( \n ) {
    fib( n - 1 ) + fib( n - 2 )
}
Nemokosch why don't you use "is cached", then?
habere-et-disper Into just:
m: state multi fib (  0 ) { 0 }
camelia ===SORRY!=== Error while compiling <tmp>
Cannot use 'state' with individual multi candidates. Please declare an state-scoped proto instead
at <tmp>:1
------> state multi fib (  0 ) { 0 }⏏<EOL>
habere-et-disper state multi fib (  1 ) { 1 }
multi fib ( \n ) {
    fib( n - 1 ) + fib( n - 2 )
}
I don't know how to use `is cached`. Sounds wonderful. Reading docs now. :) 08:37
Nemokosch I didn't even know a function can be made static or how that would make sense
anyway, it really seems to me that you just want cached
habere-et-disper Hmmm... 08:44
m: use experimental :cached; 08:45
camelia ( no output )
habere-et-disper multi fib ( 0 ) is cached { 0 }
multi fib ( 1 ) is cached { 1 }
multi fib ( \n ) {
    fib( n - 1 ) + fib( n - 2 )
}
When I run this locally, I get: <Constraint type check failed in binding to parameter '<anon>'; expected 0 but got 10>
08:45 Sgeo left 08:46 Sgeo joined
lizmat habere-et-disper: confirmed 08:49
I'd suggest to drop the "is cached" 08:50
habere-et-disper That runs, but does not seem to cache it... 08:54
m: use experimental :cached;
camelia ( no output )
habere-et-disper my $GLOBAL = 0;
multi fib ( 0 ) { $GLOBAL++; 0 }
multi fib ( 1 ) { $GLOBAL++; 1 }
multi fib ( $n ) {
    fib( $n-1 ) + fib( $n-2 )
}
say fib 10;
say $GLOBAL;
lizmat ok, worthy of an issue 08:55
workaround: drop the "is cached" on the multis, add a "proto fib(|) is cached {*}" 08:56
habere-et-disper Or maybe it is? I'm trying to count the number of times it is called. I get 55/89
Thanks, that works! @lizmat++ 08:57
I get 55/2 now!
lizmat it is some kind of bug in dispatch of callsame, something that was semi-recently changed, so perhaps something has gone wrong there 08:58
habere-et-disper: please also remember that "is cached" is *not* threadsafe in its current implementation 08:59
habere-et-disper Noted. Experimental. Raku: the R&D division of perl. :) 09:00
lizmat that's not how I see that :-) 09:01
Nemokosch more like 09:06
Raku: "they promised us unicorns"
lizmat perhaps, but "they" left the project 09:08
so you will have to make do with what is here now 09:09
with an occasional rainbow
Nemokosch Well this opens up the possibility to make junctions less anglocentric among other things 😛 09:11
japhb Anyone know the process to send in a TRC talk recording? I must be missing something. 09:33
09:46 linkable6 left, evalable6 left
lizmat I've pinged @andrewshitov on Twitter 09:47
japhb Thanks lizmat. 09:48
09:49 linkable6 joined, evalable6 joined 09:57 Sgeo left
lizmat if I remember from last year, just make it available for download somewhere and tell Andrew the URL by mail / twitter / whatever :-) 10:02
japhb Yeah, he sent me email. I uploaded it and shared it with him. :-) 10:10
And now ... sleep?
lizmat well deserved!
10:18 habere-et-disper left 11:18 evalable6 left, statisfiable6 left, bisectable6 left, linkable6 left, notable6 left, committable6 left, unicodable6 left, tellable6 left, bloatable6 left, reportable6 left, releasable6 left, quotable6 left, shareable6 left, nativecallable6 left, squashable6 left, sourceable6 left, greppable6 left, benchable6 left, coverable6 left 11:19 tellable6 joined, bloatable6 joined, shareable6 joined 11:20 bisectable6 joined, notable6 joined, unicodable6 joined, nativecallable6 joined, linkable6 joined 11:21 squashable6 joined, evalable6 joined, sourceable6 joined, greppable6 joined, committable6 joined, coverable6 joined, benchable6 joined, statisfiable6 joined, reportable6 joined, releasable6 joined, quotable6 joined 12:07 reportable6 left 12:09 reportable6 joined 12:57 tejr left 13:12 andm joined 14:12 evalable6 left, statisfiable6 left, reportable6 left, unicodable6 left, bisectable6 left, squashable6 left, greppable6 left, bloatable6 left, shareable6 left, nativecallable6 left, quotable6 left, benchable6 left, releasable6 left, sourceable6 left, coverable6 left, notable6 left, tellable6 left, linkable6 left, committable6 left, tellable6 joined 14:13 reportable6 joined, sourceable6 joined, unicodable6 joined, linkable6 joined, bisectable6 joined, evalable6 joined, quotable6 joined, greppable6 joined, shareable6 joined 14:14 squashable6 joined, benchable6 joined, notable6 joined, coverable6 joined, committable6 joined, bloatable6 joined 14:15 statisfiable6 joined, nativecallable6 joined, releasable6 joined 14:33 [Coke] joined 14:41 TieUpYourCamel left
[Coke] . 14:42
14:45 dogbert11 left 14:56 frost left 15:03 dogbert11 joined 15:08 dogbert17 joined 15:09 dogbert11 left 15:12 solitario left 15:13 dogbert17 left 15:15 dogbert17 joined 15:22 TieUpYourCamel joined 15:23 solitario joined 15:27 perlbot left 15:28 perlbot joined 15:59 pamplemousse joined 16:15 squashable6 left 16:18 squashable6 joined 16:35 dogbert11 joined 16:37 dogbert17 left 16:40 dogbert11 left 16:43 dogbert11 joined 16:50 dogbert11 left 16:53 andm left 16:58 Xliff joined 17:05 sena_kun joined 17:19 dogbert11 joined 17:57 Altai-man joined, Altai-man left 17:58 dogbert11 left, dogbert11 joined
SmokeMachine m: proto sub fib(UInt) is pure { * }; multi sub fib(1) { 1 }; multi sub fib(UInt $num) { fib($n - 1) + fib $n - 2 }; say fib 10 18:02
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$n' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> ) { 1 }; multi sub fib(UInt $num) { fib(⏏$n - 1) + fib $n - 2 …
SmokeMachine 19:02 <SmokeMachine> m: proto sub fib(UInt) is pure { * }; multi sub fib(1) { 1 }; multi sub fib(UInt $n) { fib($n - 1) + fib $n - 2 }; say fib 10 18:03
18:03 pamplemousse left
SmokeMachine m: proto sub fib(UInt) is pure { * }; multi sub fib(1) { 1 }; multi sub fib(UInt $n) { fib($n - 1) + fib $n - 2 }; say fib 10 18:03
camelia Constraint type check failed in binding to parameter '<anon>'; expected UInt but got Int (-1)
in sub fib at <tmp> line 1
in sub fib at <tmp> line 1
in sub fib at <tmp> line 1
in sub fib at <tmp> line 1
in sub fib at <tmp> line 1
SmokeMachine m: proto sub fib(UInt) is pure { * }; multi sub fib(1) { 1 }; multi sub fib(0) { 1 }; multi sub fib(UInt $n) { fib($n - 1) + fib $n - 2 }; say fib 10 18:07
camelia 89
18:07 reportable6 left 18:09 reportable6 joined
SmokeMachine m: proto sub fib(UInt) is pure { * }; multi sub fib(1) { 1 }; multi sub fib(0) { 1 }; multi sub fib(UInt $n) { say “fib($n)”; fib($n - 1) + fib $n - 2 }; say fib 10; BAGIN say “BEGIN” 18:13
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared name:
BAGIN used at line 1
SmokeMachine m: proto sub fib(UInt) is pure { * }; multi sub fib(1) { 1 }; multi sub fib(0) { 1 }; multi sub fib(UInt $n) { say “fib($n)”; fib($n - 1) + fib $n - 2 }; say fib 10; BEGIN say “BEGIN”
camelia BEGIN
fib(10)
fib(9)
fib(8)
fib(7)
fib(6)
fib(5)
fib(4)
fib(3)
fib(2)
fib(2)
fib(3)
fib(2)
fib(4)
fib(3)
fib(2)
fib(2)
fib(5)
fib(4)
fib(3)
fib(2)
fib(2)
fib(3)
fib(2)
fib(6)
fib(5)
fib(4)
fib(3)…
18:14 dogbert17 joined, dogbert11 left 18:19 dogbert17 left 18:27 dogbert17 joined 18:40 deoac joined 18:42 dogbert17 left 18:46 dogbert17 joined 18:55 dogbert17 left, dogbert17 joined 19:08 dogbert17 left 19:13 sena_kun left 19:15 sena_kun joined 19:19 Sgeo joined
tbrowder [Coke]: doc master branch fails xtest without my pr. so what should i do? i don’t know how to fix the doc test harness problem. 19:41
but i want to submit the revised pr before i forget about it :-D 19:42
19:47 dogbert17 joined 20:47 notable6 left, evalable6 left, bisectable6 left, shareable6 left, bloatable6 left, statisfiable6 left, nativecallable6 left, quotable6 left, squashable6 left, sourceable6 left, committable6 left, linkable6 left, coverable6 left, benchable6 left, reportable6 left, tellable6 left, unicodable6 left, releasable6 left, greppable6 left, committable6 joined 20:48 greppable6 joined, tellable6 joined, squashable6 joined, releasable6 joined 20:49 evalable6 joined, bloatable6 joined, bisectable6 joined, nativecallable6 joined, linkable6 joined, sourceable6 joined, benchable6 joined, notable6 joined 20:50 shareable6 joined, quotable6 joined, statisfiable6 joined, unicodable6 joined, coverable6 joined, reportable6 joined
Util What is the difference of `$` and `$?` in a Signature, 20:55
as in github.com/rakudo/rakudo/blob/mast...ice.pm6#L3 ?
(SF.pm Raku Study Group wants to know)
lizmat $ means a required positional in which we're not interested, so we didn't bother to give it a name 20:56
$? is an optional positional in which we're not interested, also without name
Util ^^
Util lizmat: Thanks! 20:57
Nemokosch Raku Study Group? What is that? 20:58
Util Nemokosch: In progress right now on Zoom. Feel free to drop in. www.nntp.perl.org/group/perl.perl6...10612.html 21:02
tellable6 Util, I'll pass your message to Nemokosch
21:04 bdju left 21:11 bdju joined 21:42 sena_kun left 22:42 linkable6 left, statisfiable6 left, greppable6 left, coverable6 left, committable6 left, tellable6 left, quotable6 left, releasable6 left, unicodable6 left, sourceable6 left, squashable6 left, reportable6 left, bisectable6 left, notable6 left, benchable6 left, shareable6 left, bloatable6 left, nativecallable6 left, evalable6 left 22:43 benchable6 joined, squashable6 joined, tellable6 joined, releasable6 joined, linkable6 joined 22:44 unicodable6 joined, greppable6 joined, committable6 joined, bisectable6 joined, nativecallable6 joined, reportable6 joined, bloatable6 joined, statisfiable6 joined 22:45 shareable6 joined, notable6 joined, evalable6 joined, coverable6 joined, sourceable6 joined, quotable6 joined 23:45 evalable6 left, linkable6 left 23:46 linkable6 joined 23:48 evalable6 joined