2020.49 Shaped Shaping Up

Shaped arrays have been a thing since the initial release of what is now Raku. But they have always suffered from a severe performance hit that was understood to an extent, but never understood widely enough to be solved. Fortunately, thanks to some extensive extra-curricular digging by Jonathan Worthington and some additional tuning by Elizabeth Mattijsen, the performance of shaped arrays is now almost on par with normal arrays, which means it is up to 60x as fast as before. Thus making shaped arrays a viable alternative in production situations. The final goal is to have shaped arrays perform better than resizable arrays.

Adventing Raku

The first crop of this year’s Advent Posts!

If you want to stay up-to-date each day, you can check out the full list of Raku Advent Blog Posts.

Also, cggoebel has started to write a blog about their Advent of Code solutions in Raku (/r/rakulang comments). And Daniel Sockwell opened up a private leaderboard for Raku Advent Of Code solutions (/r/rakulang comments).

Other Assorted Blog Posts

Allowing Raku detection on GitHub

Andrew Shitov found out that there’s a bit of a chicken-and-egg problem with Github to recognize the new Raku file extensions. In short: please start using them in your Github repos! (/r/rakulang comments).

Using Raku in your company?

Patrick Böker has started an effort to get companies to acknowledge that they’re using Raku. So if your company is using Raku, please consider having the name of your company added. For better exposure of the Raku Programming Language and your company!


Alexey Melezhik introduces the Rakudo Issues Confirmation Helper (initially called RIP), which allows one to make sure that a test-case for an issue will get run with each subsequent commit to Rakudo, and produce a page with results. Yet another cool Raku tool! (/r/rakulang comments)

CFP for FOSDEM DevRoom

The Request for Presentations for the DevRoom at FOSDEM 2021 has been published. Be sure to submit your proposals pretty soon! (/r/perl comments)

Module Adopted

Tom Browder has been the first to adopt a module from the Module Adoption Center since the recent cleanup: Astro::Sunrise. Kudos!

Weekly Challenge

Weekly Challenge #90 is available for your perusal.

Core Developments

Another piece of hash optimization work by Nicholas Clark of the past months, was merged. Nicholas describes it as:

Regular readers will recall that MoarVM’s hashes are now “Robin Hood”
hashes. The design of a Robin Hood hash requires that in addition to the
key and value, the hash table stores some metadata for each hash entry, to
track how far away each entry is from its ideal location. This metadata is
stored in one byte – but it turns out that usually all entries in the hash
are close enough that we don’t need all 8 bits.

Hence the hash tables now use some of the metadata bits to store bits from the key’s 64 bit numeric hash value. This permits the lookup code to walk past some entries using just the metadata byte, without even having to chase pointers to look up the key proper. It’s a CPU for memory trade off which seems to work out on average. We use a bit more CPU, but suffer fewer stalls due to cache misses, so performance is slightly better.

There is a much longer explanation (with diagrams) in the 400 lines of comments at the start of MoarVM’s src/core/str_hash_table.h

In other core development news:

  • Stéphane Payrard made sure that Rakudo will build on the new M1 processor architecture of Apple.
  • Elizabeth Mattijsen and Will Coleda have worked on improving the NQP ops documentation.
  • Stefan Seifert fixed a race condition with the creation of mixins in NQP and is chasing some more compilation time race conditions.
  • Patrick Böker made sure that binary release archive names also include the toolchain used, allowing multiple release files with different toolchains on the same OS.
  • Elizabeth Mattijsen made the is DEPRECATED Routine trait introspectable, fixed some new REPL issues and added an :emit-timed parameter to Supply.batch(:$seconds).
  • Vadim Belman fixed some corner cases with regards to the new coercion protocol.
  • And an assortment of other smaller tweaks, fixes and improvements.

This week’s new Pull Requests:

Please check them out and leave any comments that you may have!

Questions about Raku

Meanwhile on Twitter

Meanwhile on the mailing list

Comments about Raku

New Raku Modules

Updated Raku Modules

Winding down

Wow, quite a heavy Rakudo Weekly News covering happenings in the Raku Programming Language world. Good to see and very inspirational. Keep up the good work, stay safe and stay healthy!

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