This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
01:40 teatwo left, teatwo joined 01:44 teatwo left, teatwo joined 11:43 teatwo left 11:45 teatime joined, teatime left 11:46 teatime joined 16:52 jgaz joined 17:11 jgaz left 17:12 jgaz joined 18:17 hxcdk joined 18:19 hxcdk left 18:59 stanrifkin joined
stanrifkin for Inline::Perl5 - Do I need libperl.a or 19:00
Is it the case that Perl 5.38 now defaults to *.so?
lucs How can I make this work?: 20:35
librasteve apt-get install libperl-dev -y was working for me 20:56
lucs: short answer say $.block(| @a); should be say $!block(| @a); 22:10
ab5tract_ lucs: what happens if you change `$.block(|@a)` to `$!block(|@a)`? 22:11
librasteve ha!
ab5tract_ net jinx 22:12
librasteve ;-)
lucs Yes! 22:14
librasteve a while back I wrote this ... the take away is that raku classes are formally quite tightly defined "SOLID" - but the simple $. is offered as an on ramp for beginners and a way for short simple stuff to be done without any hassle (which suits a lazy coder like me) 22:15
when you step beyond beginner stuff, then the boilerplate that $. confers can be overwhelmed and so we must graduate to the real raku class system which prefers private attributes and public methods 22:17
lucs It indeed works with $!, but I don't understand why not with $. 22:21
librasteve you have uncovered a limitation of the $. public attribute boilerplate which is (as I mentioned) a layer of sugar on the private attribute + public method core of raku 22:22
I tested it like this my $b = $.block; say $b(1,2);
and it works ... 22:23
so I think that you have found a bug in the raku compiler and I suggest you raise it as an issue over on github rakudo/rakudo
lucs I'll try to golf it down and report it. 22:24
librasteve cool - I often use the $. form for convenience ... but as I layer in class features (TWEAK) and so on, then I feel that raku is gently but firmly pushing me to the $! habit 22:31
also please note the 'is built' attr that eliminates the need for submethod BUILD in most cases
lucs Right. 22:32
23:22 jgaz left 23:44 teatwo joined 23:48 teatime left