Grapheme \r
eu\n
ification
The past week saw the demise of Carriage Return / Line Feed as a pair of graphemes. It is now a single grapheme in Rakudo Perl 6 as promised by jnthn++ last week:
say "\r\n".chars # 1
But the goodies didn’t stop at this. Handles now have both an nl-in
as well as an nl-out
attribute to replace the old nl
attribute. And the nl-in
can contain multiple strings that can be considered an end of line. The default is ("\r\n","\n","\r")
, thereby adding support for reading all standard text-files. There are more developments in this area, but still too much in flux to mention here and now. Most likely next week there’ll be more to tell about this.
Quote Of The Week
I wanted to give a quick thanks to everybody who has worked on #perl6. Our first perl6 code went into production today 🙂
More quotes from the ensuing discussion:
It uses supplies, which made the whole thing a breeze to write
and:
It solved a real pain of a problem for us in a very easy way.
What can I say?
More Than 50K Tests Passing
The Perl 6 spec test-suite now passes more than 50000 tests with Rakudo on MoarVM.
All tests successful.
Files=1070, Tests=50009, 245 wallclock secs (12.62 usr 4.31 sys + 1406.00 cusr 131.27 csys = 1554.20 CPU)
This is all part of the effort of getting more test coverage in light of the Christmas release of Rakudo Perl 6!
Dogfooding
Leon Timmermans++ came with an extensive pull-request that introduces a new asynchronous test harness completely written in Perl 6! It seems still a bit rough around the edges, but if it delivers on its promise to improve parallel testing on Windows systems, I’m pretty sure this will get merged real soon!
Blog Posts
Two posts this week!
- My First Perl 6 Module – Net::SSH by Aaron Baugher
- Yet Another Perl6 HTTP Client by Nick Logan
Noticeable Fixes And Additions
- jnthn++ implemented
chomp
functionality (automatically removing the line ending when reading a line) at the MoarVM level. This made a lot of Perl 6 level hacks unnecessary, which were promptly removed. - jnthn++ implemented
UTF-8 C-8
encoding. This basically maps the byte values128..255
to Unicode synthetics. This is intended to be used for all OS level calls for which we do not have a known encoding, like reading directories. - ilmari++ implemented a
:replacement
named parameter toStr.encode
to handle byte-sequences that could not be encoded. This was his first contribution to Perl 6, and involved work on MoarVM, nqp and Rakudo! - lizmat implemented
Str.split(@needles)
, and:k, :v, :kv, :p and :skip-empty
named parameters forSplit.str
. This sped up the canary in the coalmine test of Text::CSV by a factor of 2. - lizmat implemented a
Str.comb(Int $n)
candidate for looking at a string$n
characters at a time. This alternative is about 40x faster than the equivalent/.../
. - Various speedups:
IO::Handle.getc
2x faster,Buf/Blob.new(...)
upto 20x,for ^10 { ... }
is optimized again.
Ecosystem Additions
- Crust::Handler::SCGI by Andrew Egeler
- Cache::LRU by Fayland Lam
- JSON::Class by Jonathan Stowe
- POSIX by Cory Spencer
- Crust::Middleware::Syslog by Andrew Egeler
- Business::CreditCard by Fayland Lam
- RPi – Interface To Raspberry Pi’s GPIO And Other Peripherals by Cory Spencer
- Web::RF by Andrew Egeler
- Test::META by Jonathan Stowe
- Algorithm::True::libdatrie by zengargoyle
- Net::FTP by araraloren
- JSON::Name by Jonathan Stowe
- Search::Dict by zengargoyle