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
mydeclaration - the
.polymodmethod to apply themodoperation multiple times - use of the Pair colon syntax
:$hrsto 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
- destructuring and placeholders by jaldhar
Comments About Raku
- a thing in #RakuLang to see what was going on the Bluesky firehose feed by Jonathan Stowe
- a #RakuLang thingy to put the stats from the Bluesky firehose feed on the web by Jonathan Stowe
- some fun Artemis II armchair physics using the CragCLI calculator by Steve Roe
- a #rakulang terminal emulator heavily inspired by #XMonad by Adrian
- I actually find e.g. #Rakulang’s approach quite interesting too by Felix
- If you want a language that is full on transparently Unicode by b2gills
- see what people who take their regex seriously came up with by Huxton_2021
- judicious use of variables lets our code tell a story by Jan M. Savage
New Doc & Web Pull Requests
- fix broken links to /nav/1 Steve Roe
- Stubs Steve Roe
New Raku Modules
- LLM::Resources, WWW::HorizonsEphemerisSystem by Anton Antonov
- ComfyUI::API, Roaring::Tags, HuggingFace::API, CRoaring, Template::Jinja2, LLM::Data::ContentTag, LLM::Data::Inference, Selkie, LLM::Chat::Backend, MCP::Server, Notcurses::Native by Matt Doughty
Updated Raku Modules
- LLM::Functions, DSL::Examples by Anton Antonov
- PDF::Tags, Pod::To::PDF, PDF::Tags::Reader by David Warring
- Data::Dump by Tony O'Dell
- Air by Steve Roe
- DBIish by Various Artistes
- Monad, LLM::Chat by Matt Doughty
- rak, P5pack, P5built-ins by Elizabeth Mattijsen
- Sparrowdo, Sparrow6 by sp1983
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
