2017.37 Collating Sorted

Samantha McVey completed the Unicode Collation Algorithm support in Rakudo Perl 6 on the MoarVM backend. She describes the functionality in the commit that did the merge back into the main branch of MoarVM. She also gave a less complete review on the #perl6 channel. Also check out the temporary documentation! A code example may tell more than a thousand words:

say <9 ① 1 ② 8 one hi>.sort;    # (1 8 9 hi one ① ②)
use experimental :collation;     # activate collation
say <9 ① 1 ② 8 one hi>.collate; # (1 ① ② 8 9 hi one)

TPF Grant Proposals (Sep 2017)

Will Coleda tells us we have only a few days left for this round of TPF Grant Proposals. So if you would like to do some development work on Rakudo Perl 6, write a proposal, do your thing and profit! Well, be sure to write a good proposal that will get accepted, of course 🙂

Handling of unclosed files has changed

The ecosystem started showing issues (RT #132030) after non-TTY handles had buffering switched on by default last week. Solution #1 (as suggested by Jonathan Worthington) was subsequently implemented by Elizabeth Mattijsen. What does this mean?

  • If you don’t care about keeping resources tied up, just open your files for reading and writing. When the program exits, any buffers to be written will be automatically flushed before actually returning to the OS. This approach is fine for most applications, unless the application is about opening a lot of files: in that case you run the risk of running into the “too many open handles” OS resource error. Please note that if you’re using any of the IO::Path methods for reading or writing, or use slurp() or spurt() you do not have to worry about this, as those methods/subs will close the handle for you when they’re done.
  • If you do care about your resources, make sure that any open file will be closed as soon as you’re done with it. This can be as simple as having a LEAVE phaser in the scope where the file is opened, or by adding the will leave trait to the variable containing the opened handle.

Please note that this behaviour only applies to the MoarVM backend. The old semantics of only automatically closing files when they are garbage collected, still applies to the JVM backend. But since there is no output buffering on the JVM backend, you only run the risk of running out of open handles.

Blog Posts

Other Core Developments

  • Christian Bartolomäus started unbitrotting the JVM backend. Pretty sure he would appreciate more eyes and more hands on that!
  • Zoffix Znet made sure that .make can now pass on type objects again.
  • Jonathan Worthington fixed the scoping issues on "foo{$x}bar", which could show up with recursive calls inside the {} and/or when being run by multiple threads at the same time.
  • John Harrison fixed an issue with IO::Notification.watch-path($dir).
  • Elizabeth Mattijsen cleaned up program end / exit() handling to ensure they are identical, and that any END blocks are guaranteed to be only run once by a single thread. She also reduced the memory usage of the BUILDALLPLAN, which affects the memory footprint of each class: this may also make building objects slightly faster in some situations.
  • Timo Paulssen continued his work on the heap analyzer and also re-instated the literal junction optimizer.
  • And many other smaller fixes and improvements.

Meanwhile on Twitter

Meanwhile on StackOverflow

Meanwhile on perl6-users

Ecosystem Additions

Winding down

An exciting week once again! Next weekend will see the 2017.09 release of Rakudo Perl 6. After the release, a number of optimizer and JIT improvements will find their way into the main branch again. So check back next week for more exciting Rakudo Perl 6 news!

Advertisements

One thought on “2017.37 Collating Sorted

Got something to note?

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 )

Google+ photo

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

Connecting to %s