🦋 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 [Coke]_ left, dutchie left, timo left, donpdonp|z_ left, leah2 left, GreaseMonkey left, archenoth left, phogg left, mtj left, dpk left, sftp left, greaser|q joined, dpk joined, timo joined, [Coke] joined, donpdonp|z_ joined, mtj joined 00:01 leah2 joined 00:02 archenoth joined, sftp joined, phogg joined, dutchie joined 00:07 reportable6 left, reportable6 joined 00:15 MitarashiDango[m left, crystalfrost[m] left, AlexDaniel left 00:18 MitarashiDango[m joined 00:19 phogg left, phogg joined, crystalfrost[m] joined 00:21 frost joined 00:45 Sankalp left 00:46 guifa left 00:47 simcop2387 left, AlexDaniel joined, perlbot left 00:52 simcop2387 joined 00:53 Garbanzo joined 00:54 perlbot joined 00:59 greaser|q left, greaser|q joined, greaser|q is now known as GreaseMonkey 01:59 benchable6 left, unicodable6 left, greppable6 left, linkable6 left, quotable6 left, releasable6 left, bisectable6 left, shareable6 left, coverable6 left, committable6 left, notable6 left, statisfiable6 left, reportable6 left, nativecallable6 left, sourceable6 left, evalable6 left, bloatable6 left, tellable6 left 02:00 committable6 joined, bisectable6 joined 02:01 linkable6 joined, shareable6 joined, reportable6 joined, bloatable6 joined, nativecallable6 joined, sourceable6 joined, evalable6 joined 02:02 notable6 joined, tellable6 joined, quotable6 joined, unicodable6 joined, releasable6 joined, greppable6 joined, coverable6 joined, statisfiable6 joined 02:03 benchable6 joined 02:17 guifa joined 02:25 Kaiepi left 02:57 discord-raku-bot left, discord-raku-bot joined 03:01 guifa left 03:02 drakonis left
jdv codesections: afaik the parser is the major perf issue, right? i dont get how a nailgun helps much. 03:27
03:31 frost left
lucs What's the difference (if any) between 「my Foo $bar = 42」 and 「my Foo() $bar = 42」? (that 「()」 has me confused). 03:46
japhb "Can be cast to Foo" I believe 03:47
lucs Hmm... Not sure what you mean...
japhb Coerced, sorry
The first says "Is already type Foo (or a subclass or role composer, or whatever)" 03:48
The second merely says you can get to Foo() by pushing on it.
jdv is it that "()" implies "action"
or something:) 03:49
japhb This is used for example for IO(), which will take a Str (not an IO already), assume the string is a path, and convert it to an IO::Path -- which actually *is* an IO
Yeah
lucs I'll reflect on that and ask again tomorrow if it's still unclear (when I'm sober that is). 03:52
jdv good night 03:53
lucs Thanks, you too :-)
03:59 Sgeo_ joined, Furor joined 04:01 ProperN[out] joined, ProperNoun left 04:02 kjp left, discord-raku-bot left, discord-raku-bot joined, Sgeo left, djerius left, tejr left, Colere left 04:03 djerius_ joined 04:04 tejr joined, kjp joined 04:17 irc_user joined
Voldenet m: class Foo { method COERCE(Int $i) { Foo.new() }; }; my Foo $x = 42; 04:26
camelia Type check failed in assignment to $x; expected Foo but got Int (42)
in block <unit> at <tmp> line 1
Voldenet m: class Foo { method COERCE(Int $i) { Foo.new() }; }; my Foo() $x = 42;
camelia ( no output )
Voldenet lucs: ^ the difference 04:27
in first case assigned value must be accepted by Foo, in the latter it can be coerced into Foo 04:29
imo coercing is usually like operator overloading - leads to surprising code and difficult to debug behaviours if you abuse it 04:39
05:12 Furor is now known as Colere 05:46 Garbanzo left
Nemokosch The question is, what counts as abuse 05:59
as usual
06:08 reportable6 left, abraxxa joined 06:09 reportable6 joined
Voldenet the answer is fairly obvious, "using it when you don't need it" :) 06:10
like using shift left as stream writing operator 06:11
I'm glad that nobody would've considered that a good idea
06:12 abraxxa left 06:13 abraxxa joined
Nemokosch regardless which operator it is, it did solve an actual problem compared to printf 06:14
let alone in a low-level environment where you don't want to create unnecessary objects
Voldenet just kidding, I still like it more than `format("%1% %2% %3%") % what % the % hell` 06:17
although `cout.say(1, 2, 3, 4).say(hex, setw(8), 42).say(3)` would sound more sane 06:20
and doesn't require magic operators
or `cout.say(what, " ", the, " ", hell)` 06:21
06:41 Sgeo_ left
Nemokosch `cout.say(1, 2, 3, 4).say(hex, setw(8), 42).say(3)` this doesn't look sane for me at least 😛 06:51
in fact, out of habit, I still use C-style format strings in Python xD
not always but definitely most of the time
for C++, the key idea was that the "conversion" (which usually doesn't require memory allocation since it's not a real conversion) is given at compile time 06:53
Voldenet it's sane imo because all of those are simple methods with obvious resolution 06:55
Nemokosch indeed, they could use a method call, like cout.push(...).push(...)
and I think that would even work with templates
although that would also kinda raise problems
because you'd still need to describe what can be pushed
sure about either of those? 06:57
it looks like a chainable variadic method
why both chainable and variadic?
Voldenet Well, variadic – not necessarily
Nemokosch also, what is "hex, setw(8), 42"? 06:58
Voldenet > say(digit_specifier, padding_specifier, number) 06:59
Nemokosch okay, if you have an integer 07:00
Voldenet as C# have shown, `variadic` actually can mean defining methods with 1..4 args :D
Nemokosch tbh if this is for integer only, maybe it doesn't even need an overload; it can be a standalone thing for integers 07:01
Voldenet for std::floating_point you'd have something like std::hefloat here 07:02
hexfloat
Nemokosch anyway, I'm not 100% sure you could define your own types on the fly with this 07:03
the operators are like cheating with global functions 😄
Voldenet we're going too deep into C++ :P 07:05
Nemokosch yeah tbh I haven't used enough C++ for this
it's just, there is a reason why noone else did this 07:06
and there is also a reason why _they_ in particular did this
Voldenet well, the `say` would be not very useful without modern features 07:14
Geth ecosystem: 47fecc4cc2 | (Elizabeth Mattijsen)++ | META.list
Remove ake

It now lives in the zef ecosystem
07:15
07:41 linkable6 left, evalable6 left 07:43 evalable6 joined 07:44 linkable6 joined 07:46 Kaiepi joined 07:57 frost joined 08:00 dakkar joined 08:31 sena_kun left 08:33 sena_kun joined 08:41 lichtkind joined 09:41 evalable6 left, linkable6 left 09:42 evalable6 joined 09:43 linkable6 joined 09:50 leah2 left, leah2 joined 09:58 guifa joined, guifa left 10:00 kiti_nomad[m] left, sienet_ja_LSD[m] left 10:01 ecocode[m] left, andrea[m]1234 left, uzl[m] left, Matthew|m left, crystalfrost[m] left, MitarashiDango[m left, CIAvash left, AlexDaniel left 10:08 Xliff joined 10:25 uzl[m] joined 10:29 uzl[m] left, RakuIRCLogger__ joined, RakuIRCLogger left 10:33 RakuIRCLogger__ left, RakuIRCLogger joined 10:34 CIAvash joined
Geth problem-solving/add-heah-skip-tail-subs: bd514d6da2 | (Elizabeth Mattijsen)++ | solutions/language/Add-head-skip-tail-subs.md
Add solution for #328
11:04
11:04 AlexDaniel joined, kiti_nomad[m] joined, uzl[m] joined, Matthew|m joined, andrea[m] joined
Geth problem-solving: lizmat++ created pull request #329:
Add solution for #328
11:04
11:04 sienet_ja_LSD[m] joined, MitarashiDango[m joined, ecocode[m] joined, crystalfrost[m] joined
lizmat clickbaits rakudoweekly.blog/2022/06/27/2022-...-seasoned/ 11:24
11:32 wingfold joined 11:52 jaguart joined 11:58 lizmat_ joined 12:02 lizmat left 12:07 reportable6 left 12:09 reportable6 joined 12:14 lizmat_ is now known as lizmat 12:22 jgaz joined 13:22 reportable6 left, bloatable6 left, releasable6 left, bisectable6 left, evalable6 left, notable6 left, tellable6 left, sourceable6 left, greppable6 left, shareable6 left, coverable6 left, committable6 left, quotable6 left, linkable6 left, benchable6 left, unicodable6 left, nativecallable6 left, statisfiable6 left, committable6 joined, unicodable6 joined 13:23 shareable6 joined, greppable6 joined, statisfiable6 joined, bloatable6 joined, benchable6 joined 13:24 notable6 joined, sourceable6 joined, evalable6 joined, releasable6 joined, quotable6 joined, coverable6 joined 13:25 linkable6 joined, bisectable6 joined, reportable6 joined, nativecallable6 joined, tellable6 joined 13:32 dpk left, dpk joined 13:35 frost left 13:50 jgaz left 13:55 abraxxa left 13:57 jgaz joined 14:04 Garbanzo joined, wingfold left 14:13 Sgeo joined 14:32 morte_ joined 14:51 Garbanzo left 14:52 morte_ left 15:00 morte_ joined
Geth doc/cpanfile-versioning: 29b8d7397c | (Daniel Mita)++ (committed using GitHub Web editor) | cpanfile
Set max AssetPack version in cpanfile
15:44
doc: m-dango++ created pull request #4094:
Set max AssetPack version in cpanfile
15:45
15:49 morte_ left 15:57 morte_ joined 15:58 morte_ left 16:19 morte_ joined 16:20 jgaz left
[Coke] can I support a numeric arg to MAIN, e.g. '-3' ? 16:23
Getting an error ATM, "cannot declare a numeric parameter" (trying to use the common-args trick that japhb showed yesterday) 16:24
trying to mimic 'cal -3' 16:31
ugexe m: sub MAIN(Num() :$n) { say $n.raku }; BEGIN @*ARGS = <--n=3.0> 16:37
camelia 3e0
ugexe although to me it seems like Num without the coercion should have worked
[Coke] I don't want -n=3, I want -3 16:40
Looking like I'd need to manually process it.
16:42 dakkar left
[Coke] m: sub MAIN(:$3) { say "hi"}; BEGIN @*ARGS=<-3>; 16:42
camelia ===SORRY!=== Error while compiling <tmp>
Cannot declare a numeric parameter
at <tmp>:1
------> sub MAIN(:$3⏏) { say "hi"}; BEGIN @*ARGS=<-3>;
[Coke] m: sub MAIN(:${3}) { say "hi"}; BEGIN @*ARGS=<-3>;
camelia ===SORRY!=== Error while compiling <tmp>
Shape declaration is not yet implemented; please use whitespace if you meant something else
at <tmp>:1
------> sub MAIN(:$⏏{3}) { say "hi"}; BEGIN @*ARGS=<-3>;
expecting any of:
16:52 vrurg_ joined, vrurg left 17:04 jayant joined 17:07 irc_user left 17:17 jaguart left 17:23 jayant left
[Coke] www.youtube.com/playlist?list=PLA9...T93dPUdtpE - is there any easy way to pick out the Raku ones? 17:31
(i mean, title title's a good place to start, but not everything has raku or perl in it) 17:32
ugexe i thought every raku talk had raku in the title 17:33
i guess not
[Coke] Maybe they do, but the lack of "perl" made me suspicious. :)
ugexe Three Ways to Make Code Look Wronger 17:34
17:36 sena_kun left 17:37 sena_kun joined
Nemokosch good one 18:03
18:06 discord-raku-bot left, discord-raku-bot joined 18:07 reportable6 left 18:09 reportable6 joined 18:23 Garbanzo joined 18:27 guifa joined 18:36 lichtkind left 18:38 lichtkind joined 18:49 abraxxa joined 18:54 abraxxa left, abraxxa joined 19:12 morte_ left, abraxxa left 19:13 abraxxa joined 19:19 morte_ joined 19:35 djerius_ is now known as djerius 19:49 morte_ left 19:58 morte_` joined 20:01 Altreus left, synthmeat left, m_athias left, rjbs left, Maylay left, jdv left, jmcgnh left, xkr47 left, tobs left, perryprog left, destroycomputer- left, samebchase left, jast left, amenonsen left, SmokeMachine left, aqua1 left, mykhal_ left, thowe left, corwin left, _________ left, silug left, eof left, markmarkmark left, lichtkind left, discord-raku-bot left, vrurg_ left, clarjon1 left, xinming left, Woodi left, lizmat left, sienet_ja_LSD[m] left, leah2 left, oodani left, peder left, vasko left, KvL left, guifa left, Garbanzo left, rypervenche left, nebuchadnezzar left, spacekookie left, mtj left, gcd left, bdju left, Tirifto left, abraxxa left, sena_kun left, Sgeo left, dpk left, avuserow left, codesections left, masak_ left, dustinm` left, dutchie left, gfldex left, sjn left, tellable6 left, nativecallable6 left, coverable6 left, sourceable6 left, notable6 left, statisfiable6 left, greppable6 left, unicodable6 left, Kaiepi left, tejr left, sftp left, archenoth left, [Coke] left, timo left, ecocode left, perlmaros left, gugod left, ilogger2 left, kaskal left, Util left, Geth left, DarthGandalf left, gordonfish left, elcaro left, Sevalecan left, Scotteh left, a3r0 left, tib left, reportable6 left, bisectable6 left, linkable6 left, quotable6 left, releasable6 left, evalable6 left, benchable6 left, bloatable6 left, shareable6 left, committable6 left, bd3i left, sevvie left, ugexe left, moritz left, KotH left, leont left, skaji left, kjp left, phogg left, japhb left, tailgate left, zmoment_ left, sivoais left, bartolin_ left, JRaspass left, Voldenet left, El_Che left, goblin left, renormalist left, PotatoGim left, ecocode___ left, dcx left, tbrowder left, esh left, rba left, ingy left 20:02 morte_ joined
lizmat [Coke]: the weekly has the Raku ones available at press time 20:02
20:04 sena_kun left, morte_` left 20:07 sena_kun joined 20:14 sena_kun joined, morte_ joined, abraxxa joined, lichtkind joined, guifa joined, Garbanzo joined, reportable6 joined, discord-raku-bot joined, vrurg_ joined, Sgeo joined, dpk joined, tellable6 joined, nativecallable6 joined, bisectable6 joined, linkable6 joined, coverable6 joined, quotable6 joined, releasable6 joined, evalable6 joined, sourceable6 joined, notable6 joined, benchable6 joined, bloatable6 joined, statisfiable6 joined, greppable6 joined, shareable6 joined, unicodable6 joined, committable6 joined, lizmat joined, sienet_ja_LSD[m] joined, leah2 joined, Kaiepi joined, kjp joined, tejr joined, dutchie joined, phogg joined, sftp joined, archenoth joined, mtj joined, [Coke] joined, timo joined, gcd joined, japhb joined, bdju joined, avuserow joined, clarjon1 joined, xinming joined, Woodi joined, rypervenche joined, oodani joined, nebuchadnezzar joined, Tirifto joined, peder joined, gfldex joined, vasko joined, spacekookie joined, sjn joined, KvL joined, ecocode joined, perlmaros joined, tailgate joined, gugod joined, Altreus joined, ilogger2 joined, codesections joined, SmokeMachine joined, aqua1 joined, synthmeat joined, mykhal_ joined, masak_ joined, m_athias joined, rjbs joined, Maylay joined, kaskal joined, Util joined, bd3i joined, jmcgnh joined, jdv joined, zmoment_ joined, sivoais joined, xkr47 joined, bartolin_ joined, tobs joined, perryprog joined, destroycomputer- joined, samebchase joined, jast joined, thowe joined, corwin joined, _________ joined, dustinm` joined, silug joined, eof joined, markmarkmark joined, JRaspass joined, Geth joined, amenonsen joined, Voldenet joined, DarthGandalf joined, El_Che joined, PotatoGim joined, ecocode___ joined, goblin joined, sevvie joined, gordonfish joined, tbrowder joined, esh joined, ugexe joined, elcaro joined, Sevalecan joined, Scotteh joined, a3r0 joined, tib joined, moritz joined, KotH joined, leont joined, skaji joined, rba joined, renormalist joined, dcx joined, ingy joined
guifa 's still haven't been posted but for the LT 20:23
20:25 Xliff left 20:45 Guest1862 joined 20:46 Guest1862 left 21:31 abraxxa left 21:32 sena_kun left 22:32 reportable6 left, benchable6 left, notable6 left, evalable6 left, statisfiable6 left, nativecallable6 left, shareable6 left, committable6 left, greppable6 left, unicodable6 left, tellable6 left, bloatable6 left, bisectable6 left, releasable6 left, quotable6 left, linkable6 left, coverable6 left, sourceable6 left, shareable6 joined, statisfiable6 joined, linkable6 joined, committable6 joined 22:33 bisectable6 joined, greppable6 joined, unicodable6 joined, releasable6 joined 22:34 sourceable6 joined, tellable6 joined, reportable6 joined, notable6 joined, bloatable6 joined, benchable6 joined, evalable6 joined, coverable6 joined 22:35 quotable6 joined, nativecallable6 joined 23:03 perlbot left 23:04 simcop2387 left 23:28 simcop2387 joined, perlbot joined