🦋 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.
grondilu not quite, see my $*name var exemple above. 00:00
lizmat yeah, dynvars will also work
guifa Feels fine to me -- just be aware taht if the child class declares with proto method talk also you won't get the parent's action
grondilu ok, I'll go for it 00:01
lizmat also, you can auto-init the dynvar 00:02
proto method foo(|) { if $*FOO { {*} } else { my $*FOO = bar; {*} }
grondilu noted 00:03
grondilu realizes he has twigilless constants to share too 00:04
*sigilless 00:05
I suppose if I want to declare a constant as dynamic, I need a sigil.
grondilu thinks of the dynamic trait
m: constant foo is dynamic = "bar" 00:06
camelia ===SORRY!=== Error while compiling <tmp>
Cannot resolve caller trait_mod:<is>(Str:D, :dynamic, :SYMBOL(Str)); none of these signatures matches:
(Mu:U $child, Mu:U $parent)
(Mu:U \child, Mu:U \parent, @subtypes)
(Mu:U $child, :DEPRE…
lizmat pretty sure "is dynamic" has been deprecated / removed by jnthn a few years ago
grondilu m: class Foo { proto method talk { constant $*name = "anon"; say "Hi"; {*} ; say "Bye" }; multi method talk { } }; class Bar is Foo { multi method talk { say qq{How are you, $*name?} } }; Bar.new.talk 00:07
camelia ===SORRY!=== Error while compiling <tmp>
Cannot use a '*' twigil on a ' $*name' constant because values cannot
be constant and dynamic at the same time.
at <tmp>:1
------> o method talk { constant $*name = "anon"<HERE>; say "Hi"; {*} ; say "By…
grondilu That and the fact that I would also need to access function names probably means I'm overcomplicating things. 00:10
I hate having to copy/paste the code though.
I guess I could create two methods "initialize" and "shutdown". 00:11
but they won't share a same lexical space :/ 00:12
00:21 guifa left 00:26 guifa joined 00:41 johnjay joined 02:16 justache left 02:20 justache joined 02:28 hulk joined, kylese left 02:35 stanrifkin joined 02:42 stanrifkin left 03:05 arkiuat_ left 03:15 hulk left, kylese joined 03:28 arkiuat joined 04:15 Aedil joined 04:30 lichtkind__ joined 04:32 lichtkind_ left 05:30 xinming left 07:34 hvxgr left, Sgeo left 08:29 arkiuat left 08:33 elcaro left 08:34 elcaro joined 08:36 abraxxa-home joined 08:39 arkiuat joined 08:44 arkiuat left 08:51 abraxxa-home left 08:54 arkiuat joined
ab5tract from what I understand, constant and dynamic can't mix because you cannot guarantee that somewhere in the dynamic lookup your $*name isn't replaced by another $*name. Also, as constants are found lexically, it's not even clear to me how adding dynamic lookup into the mix would actually work 09:02
m: class Foo { proto method talk { my $*name = "anon"; say "Hi"; {*} ; say "Bye" }; multi method talk { } }; class Bar is Foo { multi method talk { say qq{How are you, $*name?} } }; Bar.new.talk 09:03
camelia Hi
How are you, anon?
Bye
ab5tract grondilu: just curious as to how your needs aren't met by the above? 09:04
or rather, how the above is missing the mark with regards to your needs
11:31 arkiuat left 11:50 arkiuat joined
disbot7 <librasteve> guifa: fyi there is a new problem solving issue for this at github.com/Raku/problem-solving/issues/509 11:52
librasteve_ weekly: github.com/rakudo/rakudo/wiki/ChangeLog-Draft 11:54
notable6 librasteve_, Noted! (weekly)
11:55 arkiuat left 12:08 Aedil left 12:16 Aedil joined 12:23 arkiuat joined 12:28 arkiuat left 12:44 arkiuat joined
disbot7 <antononcube> What is a more correct reference: 1) "Pod6" or 2) "POD6" ? 12:45
lizmat RakuDoc ? 12:52
12:53 arkiuat left
disbot7 <antononcube> 🙂 Yeah, but there some existing references in the Jupyter and Markdown converters. 12:57
<antononcube> @lizmat 🫵 You are using both here: raku-advent.blog/2023/12/06/day-6-...e-of-pod6/ . (Which I am re-reading now.) 12:58
lizmat sorry, that post was by Kay Rhodes, not me
they didn't have a WP account (at least at that time) 12:59
disbot7 <antononcube> Ok. 13:00
<antononcube> So, I don't have to re-read it that much... 13:01
lizmat I don't know... depends I guess :-) 13:02
13:05 arkiuat joined 13:09 arkiuat left 13:29 arkiuat joined 13:34 arkiuat left 14:01 arkiuat joined 14:06 arkiuat left 14:08 tadzik left 14:22 tadzik joined 14:23 tadzik left, tadzik joined 14:31 arkiuat joined 14:36 arkiuat left 14:55 abraxxa-home joined, abraxxa-home left, abraxxa-home joined, abraxxa-home left 14:57 abraxxa-home joined 14:58 abraxxa-home left, abraxxa joined 15:04 arkiuat joined 15:12 arkiuat left 15:14 arkiuat joined 15:19 arkiuat left
tbrowder lizmat: i am looking for yr implementation of exits-ok being tested in roast but haven't yet found it. 15:32
15:32 arkiuat joined 15:36 arkiuat left 15:49 arkiuat joined 15:50 kathe joined
kathe Hi all. :) 15:50
Just wondered if Mr Wall still drops in every once in a while. 15:51
If he does, and if somebody could be kind, please notify him about my new favourite being "Pepsi".
Yes, I migrated over from ThumsUp and Coca Cola (regular, Diet, Zero-sugar). 15:52
And yes, Mr Wall is thoroughly responsible for brain-washing me in it. ;)
Be well all of you, and hope the new year would bring more blessings to you. 15:53
15:53 arkiuat left
kathe Bye. 15:54
15:54 kathe left
disbot7 <aruniecrisps> Mr Wall as in Larry Wall? 16:10
<aruniecrisps> I haven't seen him in here at all 16:11
16:15 arkiuat joined 16:20 arkiuat left 16:23 arkiuat joined 16:27 arkiuat left
ab5tract .seen TimToady 16:32
tellable6 ab5tract, I saw TimToady 2021-11-10T02:17:00Z in #raku: <TimToady> Thanks!
ab5tract It's been a minute indeed. 16:33
16:39 arkiuat joined 16:44 arkiuat left 16:53 arkiuat joined 17:24 arkiuat left 17:33 arkiuat joined
tbrowder i know in some place you showed how to use, but i can't find that,either. i'm trying to submit a PR for the docs but have to find the officiall implementation as a start. i see it mentioned in the new features of Rakudo 2025.09 but haven't decoded that yet, either. 18:02
18:06 hvxgr joined
guifa He did post recently on github tho 18:11
18:17 Guest54 joined 18:28 Guest54 left
lizmat tbrowder: could very well be there are no tests yet in roast 18:39
I guess the two examples from the 2025 review post could be used 18:40
ugexe do we have roast tests for modules? 18:42
lizmat you mean like "Test" ? 18:52
ugexe Test, NativeCall, etc 19:22
lizmat t/spec/S17-procasync/windows-print-raw-args.raku appears to be the only one, and that is not tested directly 19:25
20:00 arkiuat left 20:07 arkiuat joined 20:11 arkiuat left 20:18 arkiuat joined 20:24 arkiuat left 20:35 arkiuat joined 20:44 arkiuat left 20:46 arkiuat joined 21:22 itaipu left 22:13 itaipu joined 22:29 itaipu left
tbrowder ok, thnks 22:52
22:55 atcroft left
tbrowder that's,! i knew i saw it somewhere, the eeview 22:55
*review--just what i need 22:56
22:58 abraxxa left 23:17 Sgeo joined