2025.48 Advent is Here

Head on over to https://raku-advent.blog to see the first of this year’s posts from Nigel Hamilton… thanks for setting the trend!

Advent: Call for your Participation

We already have 9 days covered by 5 authors, same as this time last week. Don’t miss out and reserve your slot now for the festive fun at the authors.md page. All it takes to get on the schedule is to make a quick PR with your name and your proposed festive post title(s). Beginner, Intermediate or Genius level – your call. It would be great to see some RakuAST related posts and unique Raku things such as Slangs and Grammars are always a lot of fun … plus would be cool to see something about SBOM, since no one wants the festivities ruined by hackers.

I am picturing the Advent Calendar as a Raku Iterable – a Seq for example – everyday we will pull one and in the meantime, hopefully you will have stepped forward to claim a slot before we run out of material.

Raku Tips ‘n Tricks

Coming off the London Perl & Raku Workshop on Saturday – it was great to see a smattering of rakuteers among the perlites! I noted that the new release of perl 5.42 has a :writer decorator to define setter attributes on a class. Here is how to do that in Raku:

class Lemur {
    has $.name  is rw;
    has $.motto is rw;

    method greeting($text is copy = "Hi!") {
        $text ~= " My name is $!name." with $!name;
        $text ~= " And $!motto"        with $!motto;
        $text;
    }
}
my $king = Lemur.new;
$king.name = "King Julien XIII";
$king.motto = "I like to move it, move it!";
say $king.greeting("Welcome!");

Here’s some of the cool stuff:

  • Twigils: the dot in $. in a has attribute declaration auto builds getter and setter attributes, is rw gives you a read-write (mutable) variable.
  • Intepolation: works fine with Twigils like $. and $! … using the private accessor here, but if you have child class with the same public attrs, then $. is the same as self.
  • Definedness: the with keyword is similar to if, but it checks definedness instead of truthiness, like if it can be written naturally after a statement to avoid braces {}

Your contribution is welcome, please make a gist and share via the raku channel IRC or Discord.

Anton’s Corner

Anton published Data science over small movie dataset — «Part 1, Data transformations and analysis» that received some good feedback and shows Raku being used to to generate executable code for computational workflows in Wolfram Language (WL), R, Python, and Raku. My personal favourite comment: “it seems a useful foil to pull out if I decide to waste my time in counterproductive language advocacy wars :-)”

Weeklies

Weekly Challenge #350 is available for your discovery.

New Problem Solving Issues

New Pull Requests

Core Developments

Questions About Raku

Comments About Raku

Updated Raku Modules

Winding down

Had a fun time at the London Perl & Raku Workshop – thanks to the organisers Andrew Mehta, JJ Atria and Lee Johnson for a great job pulling this together at short notice.

Don’t forget to make your mark with a festive Advent post.

Please keep staying safe and healthy, and keep up the good work! Even after week 46 of hopefully only 209.

Meanwhile, still: Слава Україні!  Героям слава!

~librasteve

Leave a comment