2026.23 We’ve been expecting you, Mr Bond.

Featured image attribution: “1967–popular science autogyro” by James Vaughan, CC BY-NC-SA 2.0

TPRC

It is just over 12 days before the start of The Perl and Raku Conference 2026 in Greenville, SC, USA. See https://tprc.us for details.

Weekly Challenge

Weekly Challenge #377 is available for your scrutiny.

Liz’s Corner

Elizabeth Mattijsen has raised the issue of “No Macro Support in Raku 6.e“. This has surfaced some of the original RakuAST project goals and the various forays into macro prototypes such as 007 and ALMA (author Carl Mäsak). I share the opening lines of the Bond pastiche in the spirit of -Ofun.

Prague, Czech Republic. Around two o’clock at night.

A single car pulls up to the section headquarters. Section chief JOHN DRYDEN gets out and looks around him before getting into the empty building.

He takes one of the glass elevators up to his office. A silence hangs over the elevator as it rises up to his floor. The England-born station chief is wearing a western suit and tie; only the fur cap gives him a slightly Slavic look. An LED digital display quietly counts up the floor numbers: 3, 4, 5, 6…

The upper floor is all polished steel and glass. Dryden’s footsteps are the only sounds heard as he heads to his office.

He opens the door. The office is veiled in darkness. Some light from the street is coming in from the outside, casting a few stark shadows. Dryden walks across the room, takes off his ushanka and places it on his desk, turns on a desk light, and… stops, eyes wide.

Someone is already in the office.

A very good intro to the purpose of RakuAST (and Macros) is this 2020 paper by Jonathan WorthingtonRakuAST: a foundation for Raku macros.

Anton’s Corner

Anton Antonov serves up two scoops of Erdős unit distance conjecture examples … great for the math geeks and OpenAI LLM followers:

Steve’s Corner

I continue to build out the Slangify website … and to make the case for (Raku) DSLs to fix some of the shortcomings of LLMs in structured workflows.

Raku Tips ‘n Tricks

This week, let’s take a look at Raku twigils – this notion follows on from the more familiar sigils which are the $, @, % and & characters at the start of a variable name and denote what that variable contains.

twigil is the cute name for a second character, for example . (dot) or ! (exclamation point) that immediately follow the sigil. Here they are in action:

class Person { 
    has $.name;     #'.' dot twigil denotes public
    has $.age;

    method age-group { $!age >= 18 ?? 'an adult' !! 'a child' } 
    method age-check { "$.name is $.age-group" }
}

my $p = Person.new(name => 'Nick', age => 42);

say $p.age-check;       #Nick is an adult.
say $p.age;             #42

Raku has a powerful Object-Oriented (OO) model, yet it uses friendly keywords – has, is, does – that makes it easy to convey code intent with a human feel. Raku OO supports both a “Python-like” approach for ease of use / convenience and a “Java-like” approach for strict encapsulation supporting design principles like SOLID. Our first example above uses the . (dot) twigil to denote a public attribute – simple.

Now let’s tighten that up and keep the age private to the class.

class Person { 
    has $.name;             #'.' dot twigil denotes public
    has $!age is built;     #'!' exclamation twigil denotes private

    method age-group { $!age >= 18 ?? 'an adult' !! 'a child' } 
    method age-check { "$.name is $.age-group" }
}

my $p = Person.new(name => 'Nick', age => 42);

say $p.age-check;       #Nick is an adult.
say $p.age;             #No such method 'age' for invocant of type 'Person'...

Sure enough, that throws an exception if external code tries to access the private attribute. Note how these attributes are used inside the class scope – $.name and $!age respectively. More on this next weel. That needed just two changes:

  • change the declaration from $.age to $!age
  • add the is built trait

What is going on? Check out this third example, just focusing on the $!age attribute:

class Person { 
    has $!age;     #'!' exclamation twigil denotes private

    multi method age     { $!age }              #getter
    multi method age($x) { $!age = $x }         #setter
}

my $p = Person.new;
$p.age: 42;

say $p.age;             #42

This new Person class shows literally what the . (dot) twigil is doing … it is a shorthand that instructs the compiler to make boilerplate setter and getter methods – accessors. Otherwise, the ! exclamation defaults to a private attribute model – no accessors mean that the variable can only be accessed from within the class scope. Other notable things:

  • the value of $p.age must be explicitly loaded, private attributes cannot even be used in the .new constructor (unless you apply the is built trait as show in example 2).
  • the setter is a method and thus the $p.age: 42; method call syntax – you cannot assign a value with =

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

New Problem Solving Issues

New Doc & Web Pull Requests

Updated Modules

Winding down

A very interesting return to the Macros topic – reminding us of the original aims of RakuAST. This has been an amazing team effort over multiple years and a sensible proposal to ship RakuAST in 6.e and (hopefully) restart the Macro work to be ported over in module land so as not to delay the next major release.

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

~librasteve

Leave a comment