2022.40 Learning to Core

Vadim Belman has started preparing for a set of teaching classes about developing the Rakudo core, and would like to know if you’re interested! It’s a great chance to get a flying start into contributing to the Raku Programming Language.

Adventing ahead

The 2022 Raku Advent Calendar is now open for presentations! Ever since 2009, the Raku community has been writing blog posts about interesting and funny parts of the Raku Programming Language. This is your chance to show yours!

Anton’s Corner

Anton Antonov has recorded two videos the past week about the conversion of Markdown to Mathematica (/r/rakulang comments) using the Markdown::Grammar module:

Wenzel’s Corner

Wenzel P.P. Peppmeyer looked at the handling of missing elements in arrays in Rabbitholeing.

Did You Know?

That you can conditionally adapt a lazy sequence “on the fly”? Let’s take a Range and map that to some other values:

my $seq = (^5).map: { print "$_ "; $_ + 97 }

Note that if you execute this, nothing happens. How do we know? Because the print inside the map body didn’t execute. That’s because you’ve just set up a Seq object and nothing actually requested the values.

You can change that object by e.g. calling .map on it:

my $s = (^5).map: { print "$_ "; $_ + 97 }
$s = $s.map: { print "$_ "; .chr }

Note that still nothing happened. That’s because still nothing actually requested the values. Now let’s show the result by doing a say $s:

my $s = (^5).map: { print "$_ "; $_ + 97 }
$s = $s.map: { print "$_ "; .chr }
say $s;  # 0 97 1 98 2 99 3 100 4 101 (a b c d e)

Note that the first map fires for the first value, then the second map fires for the adapted value, and then the first for the next value, etc. This mechanism depends on the Iterator role, and is used a lot under the hood with the App::Rak module.

Check out the “did you know” registry, started by Wenzel P.P. Peppmeyer. Suggestions as Pull Requests welcome!

Weeklies

Weekly Challenge #185 is available for your perusal.

New Pull Requests

Core Developments

  • Sergey Fedorov fixed a build issue with MoarVM on PowerPC Macs.
  • Christian Bartolomäus made the use of unicode numbers possible on the JVM backend.
  • Ben Davies tuned (de-)serialization of bytecode on the JVM backend.
  • Stefan Seifert fixed an issue with writing precomp files when packaging modules.

Questions about Raku

Meanwhile on Twitter

Comments about Raku

New Raku Modules

  • SQL::Abstract “Generate SQL from Raku data structures” by Leon Timmermans.
  • Template::Nest::XS “Template::Nest with Raku bindings” by whatnext.
  • envy “Dist environment manager for raku!” by Tony O’Dell.
  • UUID::V4 “Generate a random v4 UUID (Universally Unique IDentifier)” by Kay Rhodes.
  • Listicles “Adds convenience methods to Array” by Kay Rhodes.

Updated Raku Modules

Winding down

Quite a nice crop of new and updated modules this week!

This week an actual image from Ukraine, courtesy of Sarah Ashton-Cirillo, to remind us all of the beauty of Ukraine, while fighting the Russian aggression. Слава Україні!  Героям слава!

In the meantime, please stay safe, stay healthy, keep up the good work!

If you like what I’m doing, committing to a small sponsorship would mean a great deal!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s