2017.34 Going ⚛

This week Rakudo Perl 6 went Atomic! Well, in the sense of “forming a single irreducible unit or component in a larger system”.

Locking is one of the evils in multi-threaded programming: Rakudo Perl 6 now has several lock-free primitives for updating native integer variables from several threads simultaneously. They’re all described on a brand new documentation page. In short, the new operators are:

So when would an “ordinary” module developer need to use these, even when they’re not writing threaded programs? Well, your module might be used in a threaded program. And any situation where a variable is incremented to produce something unique, would need this, or run the risk of two or more threads running away with the same “unique” (not!) value. Observe:

my int $a;
await do for ^10 { start { $a++ for ^1000 } }
say $a    # something less than 10000, like 9628, so 372
          # increments lost because of simultaneous updates

versus:

my atomicint $a;
await do for ^10 { start { $a⚛++ for ^1000 } }
say $a    # always 10000, because no updates are overwritten

Apart from these, a working version of cas (Atomic Compare and Swap) was also implemented. All thanks to the work of Jonathan Worthington, which was made possible by the kind sponsorship of Nick Logan.

AlexDaniel++ for his first release

Aleks-Daniel Jakimenko-Aleksejev has done his first Rakudo compiler release! This signals the end of an era in which Zoffix Znet did 14 consecutive Rakudo compiler releases. For which I can only give a big Thank You!

If you look at announcement for Rakudo Perl 6 2017.08, you will see quite a number of fixes and improvements this month. Let’s hope AlexDaniel will be able to do many more of these with an even larger number of new features and improvements!

Other core developments

  • Samantha McVey fixed several issues with ignoremark and a number of edge cases when concatenating strings.
  • Stefan Seifert fixed an issue with native closures failing on a second run. He also made sure that Rakudo Perl 6 will exit with a value of 0 if invoked with --help.
  • And some other smaller fixes and improvements.

Swiss Perl Workshop

The schedule of the Swiss Perl Workshop has been published. It contains the following Perl 6 related presentations (in chronological order):

For what it’s worth: you can still register!

TPCiA Followup

Unfortunately, the official videos of TPCiA have not arrived yet. But we do have some pictures that have been shared:

Wendy also gave an interview. And informed me that 80 copies of Perl 6 books (Perl Fundamentals, Think Perl 6 and Perl 6 At A Glance) and 52 copies spanning 13 different Perl 5 related books were sold during TPCiA.

Blog Posts

Meanwhile on Twitter

Meanwhile on StackOverflow

Meanwhile on perl6-users

Ecosystem Additions

Winding down

Yours truly spent most of the past week recovering from TPCiA. And now needs to focus on slides for the Swiss Perl Workshop. Wish me strength. See you next week for more Perl 6 news!

2 thoughts on “2017.34 Going ⚛

Got something to note?