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 useslurp()
orspurt()
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 thewill 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
- How To Run A Rakudo Perl 6 Notebook by Suman Khanal.
- TIL in this Month’s Rakudo Perl 6 Bug SQUASHathon by Zak B. Elep.
- Golfing httpd by Wenzel P. P. Peppmeyer.
- We Need to Siege
Moar
by Wenzel P. P. Peppmeyer.
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 anyEND blocks
are guaranteed to be only run once by a single thread. She also reduced the memory usage of theBUILDALLPLAN
, 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
- A small Rakudo Perl 6 Grammar that parses indentation-based language by Zoffix Znet.
- Some
Sparrow
plugins to ease AWS routine jobs by Alexey Melezhik.
Meanwhile on StackOverflow
- Does Rakudo Perl 6 have the struct like case
Class
in Scala? by chenyf. - Running Rakudo Perl 6 kernel in
Docker
by Suman Khanal. - Is this Perl 6
grammar
broken, or is it exposing a bug? by piojo.
Meanwhile on perl6-users
- Thread example by Evan Miller by Norman Gaywood.
- What is Perl 6 for Perl 5
use Term::ReadKey
? by ToddAndMargo. - Perl 6 code to share:
RunNoShell
by ToddAndMargo. - How would I modify this to dump the buffer? by ToddAndMargo.
- Last Rakudo Perl 6 version from rakudobrew? by Marc Chantreux.
- takeWhile? by Marc Chantreux.
Ecosystem Additions
- Text::More by Tom Browder.
- Number::More by Tom Browder.
- NativeHelpers::CBuffer by Vittore F. Scolari.
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!
Actually my listed ecosystem additions aren’t new, they were updated entries. But I appreciate the mention anyway! -Tom Browder