2026.15 Hugs & Busses

Post image attribution: Eddie Leslie from Lancashire, CC BY-SA 2.0 https://creativecommons.org/licenses/by-sa/2.0, via Wikimedia Commons

Whateverables Corner

This week sees the release of 3 (yes, 3) new Whateverables.

The Whateverables are a collection of IRC bots primarily useful for Raku developers. They are written in Raku and are based on IRC::Client. Many of the use cases involve running Raku code using pre-built versions of the Rakudo compiler for each commit.

They work over the IRC-Discord bridge too mostly (make sure you are in the main #raku channel and note that sometimes the gremlins can get under the bridge – or is that the trolls).

Oh – and have something for the weekly? Then the Notable bot can be fed using weekly: my hot news

TPRC Submit your Talk

Don’t Miss the Perl and Raku Conference 2026 in Greenville, SC
SAVE THE DATES! Friday through Sunday, June 26-28

Registration is open: https://tprc.us/tprc-2026-gsp

Weekly Challenge

Weekly Challenge #369 is available for your giggles.

Raku Tips ‘n Tricks

This week, my eye was caught by an interesting post on Quora by Jan M Savage: Why do we use variables in programming languages?

Variables capture data that we can re-use, but more importantly, judicious use of variables lets our code tell a story.

sub sec-parser($secs) {
    my $rsecs =   $secs mod 60;
    my $rmins =  ($secs div 60) mod 60;
    my $rhrs  = (($secs div 60) div 60) mod 24; 
    my $days  = (($secs div 60) div 60) div 24;
    (:$days, :$rhrs, :$rmins, :$rsecs);
}

say sec-parser(240_000);    # (days => 2 hrs => 18 mins => 40 secs => 0)

Of course, you’ve made use of variables (declared with my) in order to capture data, but: your code is not telling a story since the variables are poorly named; pray what is rhrs???

Jan will show you how to write the same function such that all the div and mod operations occur underground (so to speak), so that all you can see is what matters:

sub sec-parser($total-sec) {
    my ($secs, $mins, $hrs, $days= $total-sec.polymod(60, 60, 24);
    (:$days, :$hrs, :$mins, :$secs);
}

say sec-parser(240_000);    #(days => 2 hrs => 18 mins => 40 secs => 0)

This code shows off a cool set of Raku features:

  • Destructuring into a list my declaration
  • the .polymod method to apply the mod operation multiple times
  • use of the Pair colon syntax :$hrs to output the name and value of each item

Very nice – thanks to Jan for combining great advice on variables and showing off some Raku.

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

Questions About Raku

Comments About Raku

New Doc & Web Pull Requests

New Raku Modules

Updated Raku Modules

Winding down

As we say in London, it’s like you wait forever for a bus and then 3 come along all at once. So it is with the spasm of activity this week on Whateverables (the last updates to that wiki were in 2023 … and 2020). Thanks to the authors for reviving the fun.

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

~librasteve

Leave a comment