🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). 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 6 September 2022.
00:07 reportable6 left 00:08 reportable6 joined 00:30 dextercd left 00:43 zara joined 00:44 holyghost left 01:44 sourceable6 left, shareable6 left, nativecallable6 left, coverable6 left, bloatable6 left, committable6 left, greppable6 left, bisectable6 left, quotable6 left, notable6 left, unicodable6 left, evalable6 left, reportable6 left, benchable6 left, statisfiable6 left, linkable6 left, tellable6 left, releasable6 left, squashable6 left 01:45 shareable6 joined, nativecallable6 joined, statisfiable6 joined, unicodable6 joined 01:46 sourceable6 joined, greppable6 joined, bloatable6 joined, coverable6 joined, releasable6 joined 01:47 benchable6 joined, tellable6 joined, committable6 joined, squashable6 joined, quotable6 joined, evalable6 joined, notable6 joined, linkable6 joined 01:48 reportable6 joined, bisectable6 joined 02:19 frost joined 02:34 squashable6 left 02:37 squashable6 joined 03:00 razetime joined 03:51 razetime left 04:05 Lemniscate is now known as Sauvin 04:11 bigdata joined, bigdata left 04:37 razetime joined 04:53 eseyman left 05:41 eseyman joined 06:06 reportable6 left, reportable6 joined 07:06 greppable6 left, shareable6 left, benchable6 left, bloatable6 left, statisfiable6 left, reportable6 left, sourceable6 left, notable6 left, squashable6 left, committable6 left, unicodable6 left, tellable6 left, quotable6 left, releasable6 left, linkable6 left, coverable6 left, evalable6 left, nativecallable6 left, nativecallable6 joined, sourceable6 joined, evalable6 joined 07:07 reportable6 joined, squashable6 joined, benchable6 joined, linkable6 joined, committable6 joined 07:08 shareable6 joined, greppable6 joined, releasable6 joined, coverable6 joined, quotable6 joined, bloatable6 joined, unicodable6 joined, statisfiable6 joined 07:09 notable6 joined, tellable6 joined 07:34 razetime left 08:13 lichtkind joined 08:37 razetime joined 08:41 zara is now known as holyghost 08:49 Sgeo left 08:50 Manifest0 left 09:17 sena_kun joined, razetime left 10:17 shareable6 left, reportable6 left, bloatable6 left, unicodable6 left, linkable6 left, squashable6 left, tellable6 left, statisfiable6 left, coverable6 left, nativecallable6 left, benchable6 left, releasable6 left, committable6 left, evalable6 left, greppable6 left, sourceable6 left, quotable6 left, notable6 left, squashable6 joined, bloatable6 joined, notable6 joined, coverable6 joined, benchable6 joined 10:18 committable6 joined, sourceable6 joined, greppable6 joined, tellable6 joined 10:19 nativecallable6 joined, shareable6 joined, linkable6 joined, quotable6 joined, reportable6 joined 10:20 releasable6 joined, statisfiable6 joined, unicodable6 joined, evalable6 joined 10:24 habere-et-dispet joined 11:24 greppable6 left, bloatable6 left, committable6 left, quotable6 left, statisfiable6 left, notable6 left, evalable6 left, linkable6 left, squashable6 left, sourceable6 left, coverable6 left, reportable6 left, nativecallable6 left, benchable6 left, unicodable6 left, tellable6 left, shareable6 left, releasable6 left 11:25 nativecallable6 joined, benchable6 joined, shareable6 joined, greppable6 joined, unicodable6 joined, quotable6 joined, tellable6 joined 11:26 sourceable6 joined, bloatable6 joined, releasable6 joined, squashable6 joined, linkable6 joined, committable6 joined, statisfiable6 joined, coverable6 joined 11:27 reportable6 joined, notable6 joined, evalable6 joined 11:51 sena_kun left 11:52 sena_kun joined 12:02 jetchisel joined, jetchisel left 12:04 jetchisel joined 12:06 reportable6 left 12:08 reportable6 joined 12:24 sena_kun left, dextercd joined 12:25 sena_kun joined
tbrowder g'day \o/ 12:31
lizmat tbrowder o/
tbrowder excitement reigns -- i used EVAL to create a formatted class successfully, thnx for the idea. now to see if i can make a class generator for it 12:33
formatter 12:34
lizmat :-)
tbrowder i feel sorry for python users. i could nevef get used to adding all those preamble things just to say something at the CLIo 12:35
back to work... 12:36
13:13 habere-et-dispet left 13:22 sena_kun left 13:23 bigdata joined 13:30 frost left 13:41 energizer left 13:47 energizer joined 13:49 Kaiepi left 14:26 Kaiepi joined 14:29 MoC joined
tbrowder i would appreciate any security experts to look at my eval sub to see if there is anything that looks like it could be turned into an breach: 14:35
gist.github.com/tbrowder/ac1857907...c27e9f15cc
thanks 14:36
*a breach 14:52
s/to look/looking/ 14:53
14:53 holyghost left 15:03 epony left
tonyo tbrowder: what is this to be used for? It doesnt look like eval is necessary 15:09
tbrowder for my dynamic creation of a formatter for DateTime. 15:16
tonyo Seems like you could just return a sub without eval 15:27
m: sub gen-fmt { return class :: does Callable { submethod CALL-ME (self, |c) { dd self; dd c; };};}; my $formatter = gen-fmt(); dd $formatter 15:29
camelia ===SORRY!=== Error while compiling <tmp>
Invalid typename 'self' in parameter declaration.
at <tmp>:1
------> does Callable { submethod CALL-ME (self⏏, |c) { dd self; dd c; };};}; my $format
tonyo m: sub gen-fmt { return class :: does Callable { submethod CALL-ME ($self, |c) { dd $self; dd c; };};}; my $formatter = gen-fmt(); dd $formatter 15:30
camelia <anon|1 $formatter = <anon|1>
tonyo tbrowder: ^^^ 15:31
m: sub gen-fmt { return class :: does Callable { submethod CALL-ME ($self, |c) { dd $self; dd c; };};}; my $formatter = gen-fmt(); $formatter()
camelia Too few positionals passed; expected at least 2 arguments but got only 1
in submethod CALL-ME at <tmp> line 1
in block <unit> at <tmp> line 1
tbrowder but i need to create on on the fly, a new one for each “info” 15:32
tonyo That will create a new one each time gen-fmt is called
m: sub gen-fmt { return class :: does Callable { submethod CALL-ME ($self, |c) { dd $self; dd c; };};}; my $f1 = gen-fmt(); my $f2 = gen-fmt(); dd $f1; dd $f2 15:33
camelia <anon|1 $f1 = <anon|1>
<anon|1 $f2 = <anon|1>
tbrowder it has to work with DateTime
tonyo Sorry, on my phone typing that in..that will work with datetime 15:34
Just restrict $self with DateTime:D and then it's not Callable by not a datetime
15:35 jetchisel left
tbrowder look at my gist, how would you create a new fmt with new content and a custom, varying string after the DT attrs? 15:37
for instance, i want to be able to replace the Z with X. 15:39
or any string after the DateTime attributes. 15:41
16:12 sena_kun joined
tonyo Is your plan to have a lot of these factories? 16:21
(For different formats)
tbrowder yes 16:34
guifa You can avoid EVAL by returning an formatting algorith with an assuming, or an anon sub with closure.
RakuAST can do basic formatting stuff already, btw. I converted over Intl::Format::Numbers and it works well, although it hasn't been released to the ecosystem pending RakuAST 16:35
guifa is afk 16:37
tbrowder guifa: hm, sounds interesting. i should have looked at your code a long time ago but i wasn’t this deep into DT then 16:39
16:42 bigdata left
lizmat guifa: .assuming is just EVAL under the hood :-( 16:50
ugexe m: multi foo($*_ where { $_ == v6.c } = $*RAKU.version ) { say v6.c }; multi foo() { say $*RAKU.version }; foo() 17:06
camelia v6.d
ugexe m: use v6.c; multi foo($*_ where { $_ == v6.c } = $*RAKU.version ) { say v6.c }; multi foo() { say $*RAKU.version }; foo()
camelia v6.c
ugexe huehuehue 17:07
17:28 Sgeo joined 17:32 derpydoo joined
tbrowder lizmat: good to know. using the EVAL, my class generator seems ready for use. 17:43
hooray!
lizmat 🎉 17:44
17:47 sena_kun left 17:48 sena_kun joined 18:07 reportable6 left 18:10 reportable6 joined 18:20 linkable6 left 18:21 linkable6 joined, epony joined 18:31 derpydoo left 19:31 linkable6 left, evalable6 left, evalable6 joined 19:32 linkable6 joined
guifa lizmat: ah yikes, is that why it's so slow? 20:04
20:22 coleman left 20:27 coleman joined 21:03 coleman left, coleman joined 21:18 benchable6 left, bisectable6 left, unicodable6 left, notable6 left, reportable6 left, evalable6 left, coverable6 left, shareable6 left, quotable6 left, sourceable6 left, releasable6 left, linkable6 left, greppable6 left, statisfiable6 left, tellable6 left, nativecallable6 left, committable6 left, squashable6 left, bloatable6 left 21:19 linkable6 joined 21:20 committable6 joined 21:21 benchable6 joined, notable6 joined, statisfiable6 joined, releasable6 joined, coverable6 joined, greppable6 joined, bisectable6 joined, bloatable6 joined, reportable6 joined, sourceable6 joined, squashable6 joined 21:22 quotable6 joined, nativecallable6 joined, evalable6 joined, shareable6 joined, tellable6 joined, unicodable6 joined 21:35 sena_kun left 21:36 lichtkind left, lichtkind joined 21:37 bigdata joined 21:48 lichtkind left 21:56 greppable6 left, coverable6 left, notable6 left, evalable6 left, statisfiable6 left, nativecallable6 left, squashable6 left, benchable6 left, reportable6 left, committable6 left, tellable6 left, bloatable6 left, unicodable6 left, shareable6 left, linkable6 left, bisectable6 left, sourceable6 left, releasable6 left, quotable6 left 21:57 greppable6 joined 21:58 tellable6 joined, sourceable6 joined, bloatable6 joined, benchable6 joined 21:59 releasable6 joined, statisfiable6 joined, reportable6 joined, quotable6 joined, linkable6 joined, nativecallable6 joined, notable6 joined, bisectable6 joined 22:00 evalable6 joined, committable6 joined, shareable6 joined, coverable6 joined, unicodable6 joined, MoC left, squashable6 joined
lizmat guifa: well, most of the reason, yes 22:12
22:15 kjp left 22:17 kjp joined 22:29 bigdata left 22:57 djerius left, djerius joined 23:08 bigdata joined 23:43 clarjon1 left