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!
- Why Raku is the ideal language for Advent of Code by Daniel Sockwell (/r/rakulang, /r/adventcode comments).
- Perl is dead. Long live Perl and Raku by Nigel Hamilton.
- Literate Programming with Raku by Tim Van Den Langenbergh (/r/rakulang comments).
- Parsing Clojure namespace forms using Raku grammars by Samuel Chase.
- Raku & Pakku by Haytham Elganiny.
- Declarative APIs, easy peasy with Raku by Moritz Lenz.
- Mixing Bash and Raku Using Sparrow by Alexey Melezhik.
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
- Nomen Est Omen by Wenzel P.P. Peppmeyer.
- Santa is pseudo packaging by Wenzel P.P. Peppmeyer.
- Raku Modules in Gentoo’s Portage by Patrick Spek (/r/rakulang comments).
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!
R.I.C.H.
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 toSupply.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
- How do I declare a dependency that can be fulfilled by one of many differently named packages? by Nick Logan.
- Is it possible to have a capture within an interpolated regex? by Daniel Mita.
- How do I match using
:global
in a grammar? by Josh. - Installation of
Gnome::Gtk3
on Windows by Arne Sommer. - Active Online Raku Virtual Meetups? by s-ro_mojosa.
- Installation of
Termbox
on Windows by Arne Sommer. - Raku and cupsGetDests by Todd.
- Advent of Code: Day 4 – Off by One Error by trollerskates1 (/r/rakulang comments).
- Given that TIMTOWTDI, which is your preferred way to temporarily set the topic
$_
variable? by Daniel Sockwell. - Negated Named Regex, or Character Class Interpolation by JustThisGuy.
- Elusive Christmas Tree One-Liner by dusktigris.
- Does Raku have a paragraph-at-a-time mode? by zeekar.
- Method/Sub Binding by JustThisGuy.
- How to preserve formatting in Pod’s declarator blocks? by TheArtDealer.
- What’s going on here? by zeekar.
Meanwhile on Twitter
- Might be the best by JJ Merelo.
- Under 60 minutes by Mohammad S. Anwar.
- Make you a better programmer by Elizabeth Mattijsen.
- How convenient by Kang-min Liu.
- Not sure I want to blog about it by Andrew Shitov.
- My feet are cold by Joelle Maslak.
- Played with Raku by Renée Bäcker.
- A good amount of credits by Travis CI by JJ Merelo.
- Bags and the one by Andrew Shitov.
- No Raku plugin by Lily Ballard.
- Issue tracking / automated test coverage by Alexey Melezhik.
- Mixing documentation and code by JJ Merelo.
- Using an array as a loop variable by Andrew Shitov.
- A repo for my solutions by Renée Bäcker.
- As a craft by Thaddeus.
- Dredging up controversy for fun by Sam Sharpe.
- All this year’s blog posts by JJ Merelo.
- Unexpected state behaviour by k-mx.
- A little bit nicer by Alexey Melezhik.
- Had a great time writing it by Samuel Chase.
- Approachable and clear by Vedang Manerikar.
- Still some slots available by JJ Merelo.
- Taking a moment to appreciate by Kang-min Liu.
- Passport Passed by Renée Bäcker.
- Will make it simple by Simon Proctor.
- Liking Raku’s regular expressions better by David Pardo.
- My Christmas Wish List by Dr. Roy Schestowitz (罗伊).
- Boarding in Binary by Renée Bäcker.
- Is that what happened? by Mike Bowler.
- How building Raku made Haskell better by JJ Merelo.
- Extra cursed? by Leon Timmermans.
- Doing it in barely known languages by Michael Kohl.
- The same in 22! by Andrew Shitov.
- A great introduction by JJ Merelo.
- Simpler by Andrew Shitov.
- A single grep and a single regex by Julio.
- Again regex-centric by Julio.
- So cool! by Julio.
Meanwhile on the mailing list
- Raku modules in Gentoo’s Portage by Patrick Spek.
- Missing
NullPointerException
by Konrad Bucheli. - Pointer and OpaquePointer by Marcel Timmerman.
Comments about Raku
- A good starting point by Ralph Mellor.
- The
EVAL
based solution I just found makes me unreasonably happy by Daniel Sockwell. - Almost all programming languages by OskarS.
- How is Perl for automation? by fidodido.
- The true Perl 6 by Ericson1234.
- Fun fact by OskarS.
- Need to have dataframes by proverbialbunny.
- Too far removed from SQL
- Optimized for Fun by agytvfr.
- Not the only geeky tradition by Slashdot.
- Now for * by Ralph Mellor.
- Multiple dispatch like Raku by Lutz Hamel.
- The tradition of the Geeky Advent calendar continues in 2020 by jonallen.
- Advent of Code for Programmers by Sue Gee.
- ‘Advent of Code’ Builds a Programming Community Around Puzzles by David Cassel.
- On the use of Other by Ralph Mellor.
New Raku Modules
- Debug::Transput by Matthew Stuckwisch.
- Module2Rpm by wbiker.
Updated Raku Modules
- Astro::Sunrise by Tom Browder.
- Terminal::ANSI by Brian Duggan.
- Font::FreeType by David Warring.
- License::SPDX by Jonathan Stowe.
- HTTP::Tiny by José Joaquín Atria.
- Gnome::Glib, Gnome::Gtk3, Gnome::GObject by Marcel Timmerman.
- Lingua::EN::Numbers by Steve Schulze.
- Shell::Piping by Wenzel P. P. Peppmeyer.
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!