2015.48/49 Arrays Shape Up, Curli Lands and Supply Splits

It has been a busy two weeks.  It’s getting harder and harder to keep up.  So here we are with two weeks of goodies! Let’s first get some of the shorter items on the road:

Rakudo Star 2015.11 (Now In Beta!)

Moritz Lenz made sure we have another good starting place for people interested in trying out Rakudo Perl 6!

A New Perl 6 Introduction

Naoum Hankache has created another excellent online Perl 6 Introduction. Most of the comments on Hacker News were quite positive. Weird! :-)

Perl6 Advent Calendar

Jonathan Scott Duff wrote the the introduction to this year’s very special Perl 6 Advent Calendar. Be sure to check out a new blog post every day until Christmas!

London Perl Workshop

Quite a few Perl 6 related presentations at the London Perl Workshop on 12 December 2015:

Several other presentations appear to be interesting from the Perl 6 point of view as well, although they do not appear to be about Perl 6:

Blog Posts

And now, for the more in-depth, code related happenings:

Shaped Arrays

Jonathan Worthington hooked one of the last remaining bits of the GLR into the language: array shapes. That means you can now say:

my @a[3;3] = 1..3, 4..6, 7..9;
say @a;
# [[1 2 3] [4 5 6] [7 8 9]]

Since the system knows the shape of this two dimensional matrix, it can give good error messages:

say @a[4;2];
# Index 4 for dimension 1 out of range (must be 0..2)

Apart from making this feature well performant (which will not happen on this side of Christmas, as Jonathan Worthington points out in his blog post), there are still some features to be filled in:

say @a[2;*];
# Partially dimensioned views of arrays not yet implemented. Sorry.

This just means we have more to look forward to! :-)

Pre-Compilation Returns To Panda

Or in other words: The Curli Has Landed.

About a month ago Jonathan Worthington wrote a gist describing some of a design for better module management and pre-compilation. Since then, Stefan Seifert has been working on implementation of this design in the curli branch. It was felt that that work has sufficiently advanced to merge it back into the main branch, which happened yesterday. This now means that e.g. the standard core modules such as Test.pm and NativeCall.pm are now pre-compiled and installed as any other module from the ecosystem.

This also brings back pre-compilation to modules installed with panda. At the moment of this writing, there are still some rough edges being worked on, but things are looking good for Christmas in that respect. This should also make it (finally) possible to have multiple versions of the same module installed at the same time!

There was one casualty with this change: @*INC is no longer with us, but $*REPO is! I’m pretty sure we will see an advent post about what this all means soon!

A side effect of this merge, is that the bare startup time of Rakudo has dropped with about 10% to around .105 seconds. So, kudo’s to Stefan Seifert for hanging in there and unwind this gnarly set of issues to make Rakudo Perl 6 ready for the future!

Small Supply Refactor

While Jonathan Worthington was working on some Supply related Christmas RT tickets, he realised there was a logic error in the way a Supply can be made from another Supply, like my $mapped = $supply.map will give you another Supply $mapped. This $mapped is supposed to only get emitted values from the original $supply, but technically it would be possible to also emit values on $mapped yourself. And this creates all sorts of logic and composability issues. With Christmas this close, it was decided it would be better to bite this bullet now, rather than have to deal with this after Christmas. So a small refactor was done, which basically splits off the functionality of a Supply you can emit on, to a new Supplier class.

Or, as Jonathan Worthington described in the original commit message:

Supply is now much more like Seq, in that it’s a container around a large number of implementations. Those implementations now do the Tappable role. Tapping a Supply still returns a Tap, but now it only has a .close method. A Supply no longer has a list of taps; it’s just something that can be tapped. This allows for far cleaner and more efficient implementation of the Supply combinators. More importantly, it removes the design issues that rogue code could in theory take any Supply and emit values into it.

Creating an on-demand Supply is now the role of a separate class, at present called Supplier. A Supplier has a Supply method to obtain a Supply. The Supply can be tapped many times, and the Supplier used to emit/done/quit to all those tappers (thus making it the typical way to do live supplies). Code can therefore expose a Supply, but keep the right to publish values to itself, which will be more robust.

The on meta-combinator is gone, in favor of using supply blocks. Some of the built-in combinators using on have been rewritten in terms of Supply blocks. A number remain to be refactored.

Finally, the notion of serial and sane supplies has been introduced. A serial supply promises it’ll never emit more than one value at a time. A sane supply promises it’ll follow the Supply protocol, that is [emit* [done|quit]], and in addition implies serial. All of the built-in combinators provide sanity; Supplier also enforces this, but does provide an escape hatch just in case. This simplifies the implementation of many combinators, and will also help prevent a number of situations that existed before where it was all too easy to write code using supplies that had data races.

So, now you can no longer emit to a Supply:

Supplier.new.Supply.emit: "foo";
# Method 'emit' not found for invocant of class 'Supply'

Note that you create a Supply by coercing a Supplier. This also means you can no longer say:

my $s = Supply.new;
# Cannot directly create a Supply. You might want:
# - To use a Supplier in order to get a live supply
# - To use Supply.on-demand to create an on-demand supply
# - To create a Supply using a supply block

But as you can see, you get a very nice error message instead. The few people already using Supply, only had to do marginal fixes, and in many cases could simplify their code because of this small refactor.

Other Noticeable Happenings

  • Tim Toady added an approximately-equal operator, infix:<≅> (Texas version =~=), to do approximate numerical equal with a threshold as defined by the $*TOLERANCE dynamic variable.
  • Jonathan Worthington fixed several RT tickets by getting the interface to IO::Handle and IO::Socket::Async more in line. He also fixed a number of spurious data loss issues with async sockets.
  • Elizabeth Mattijsen implemented Range.rand, to give you a random number within the given Range.
  • To bring the List and Supply more in line, the Supply.last method was renamed to Supply.tail.
  • Tim Toady implemented numeric superscripts, inspired by the short-lived Operators::Math::Superscripts by Zoffix Znet. This means that say 3² will just work and do the right thing (9 for the mathematically challenged).
  • Elizabeth Mattijsen implemented gistseen and perlseen helper functions to allow classes to implement a .gist/.perl that potentially could contain recursive data-structures.
  • List.first will now just give the first element of the list. List.first(:end) will now just give the last element of the list.
  • IO::Handle.t now works on MoarVM: it indicates whether the handle is opened on a TTY (which is tech-speak for: is there any person watching this?).
  • Arne Skjærholt is still looking for people help him on the IPerl6 kernel project. There is some Low Hanging Fruit there that is just waiting for someone to be plucked!

Ecosystem Additions

Winding Down

It has been a busy 2 weeks. We’re about to enter December 2015. It’s this Christmas. The tension is mounting :-)

2015.47: The Knights Who Fail Nil

Ohai everyone!

This time it’s timotimo at the post editor again. Again, a whole bunch of thanks to lizmat for covering the last three, er … four .. actually … seven posts for me! I think I’ve become a bit rusty at this, so please bear with me as I cover the changes between the 10th and the 16th of November:

One of the biggest changes from a user’s perspective is, I expect, that Nil is now let through the return type check, just like Failure used to be. Failure itself is now derived from Nil. TimToady explains that  “The upshot is that Nil is now regarded as the simplest form of failure, and people will be less tempted to use type objects to indicate failure”.

Other than that, there’s a bunch of things best covered as a few bulleted lists!

[Edit: added a note about nine’s excellent work in the curli branch just a bit below]

Assorted fixes & changes

  • nqp and rakudo can now be cross-built with the sysroot and sdkroot options for cross-compilation and similar tasks (Jens Rehsack)
  • The third argument in a loop(;;) now gets sunk. (TimToady)
  • = (assignment) can now be used in meta-operators and always means item assignment there. (TimToady)
  • Putting curly braces directly after a trait (like in sub foo is export{ … }) will now give you a helpful error message when those curly braces were actually meant to be the body of the sub or method. (TimToady)
  • Added a “put” sub that uses .gist (like say), but puts no newline (like print). (TimToady)
  • There were some problems in regexes with Longest Token Matching and the | operator in regexes when synthetic graphemes were involved or when “ignoremark” was set. (jnthn)
  • Having subs or methods in multiple dispatch that differed only in RW-ness of parameters used to be trouble. Now it works as expected. (psch and jnthn)
  • Named arguments that come after a flattened hash in calls now properly override the nameds that were in the hash. (jnthn)
  • Multi submethods accidentally got inherited into other classes. That no longer happens. (jnthn)
  • Captures that were backtracked over in regexes used to still show up in the final match. They no longer do. (jnthn)
  • Backreferences to captures that have multiple matches now have a “most recent continuous match” logic to them. The backreference then matches the text between $first.from
  • nine has been hard at work fleshing out the new CompUnitRepo Installation concept with code in the “curli” branch of rakudo. This will – among other things – give back precompiled modules, but also matching versions in use statements and such. Mad Props to nine for this!


As always there’s a bunch of speedups all over the place:

  • The return typecheck of types with definedness or undefinedness type smileys is now quite a bit cheaper.
  • List.reverse is 4x as fast (6x on empty lists), List.rotate is 30% faster, List.roll(n) is 50% faster, List.sort is 30% faster
  • Buf.subbuf between 1.5x and 4x as fast
  • using [+], the reduce metaoperator on addition, is now special cased, so that adding up ranges of integers can be done with the O(1) algorithm instead. This also introduced a method “sum” on Any.
  • On the same note, the “sum” method on List is 30% faster than on a generic iterable.

Ecosystem and such

Zoffix has been putting a whole lot of work into the modules.perl6.org site, which has a branch in the works to turn it into a Mojo app.

On the documentation side, there’s of course always a bunch of changes and additions.

There’s also a little project underway to make sure modules in the ecosystem get more documentation. You can find the discussion in this github issue.

But in the ecosystem itself, there was a big number of modules added:

  • hartenfels’ Text::Markdown::Discount, a Text::Markdown compatible binding to libmarkdown (“discount”).
  • teodozjan’s Pod::Coverage, an important part of the “document all modules” project.
  • dwarring’s Crypt::RC4, for use in things like reading PDF.
  • cygx’ Image::PNG::Inflated, which writes an RGBA image to a PNG file without compression.
  • cygx’ Image::RGBA::Text, which lets you define images in a text format. Works well with Image::PNG::Inflated.
  • cbk’s Webservice::HazIP, which lets you get your machine’s public IP address from the HazIP service.
  • jonathanstowe’s  JSON::Infer, which creates class definitions for you from JSON objects like REST APIs based on JSON would provide, for example.
  • kolikov’s Lingua::EN::Conjugate, which conjugates english verbs.
  • Skarsnik’s Config::Simple, which supports JSON and Ini-like formats for storing configuration data.
  • vendethiel’s Hydrate, which lets you create an object hierarchy from hashes and lists.
  • bluebear94’s Terminal::WCWidth, which lets you find out how wide a given character will be printed in a terminal.
  • Not a Perl 6 module per se, but something worth a mention anyway: MadcapJake’s Perl 6 Support for Atom – Fun Edition.

Blog posts and videos

  • Larry Wall’s Perl 6 Release Talk at SF.pm has been online for a bit already, but I think it hasn’t been featured on the weekly yet and has recently made small waves on twitter again. That’s why I figured I’d link to it again.
  • Larry Wall gave an Interwiev on twit.tv’s “Triangulation” with Leo Laporte. You can find the video on twit.tv’s site.
  • Zoffix shares a bit of unicode fun for his HSV color module on twitter. Picture One, Picture Two.

One more thing…

arnsholt just revived my multiple-years-untouched iperl6kernel repository on github and added a pure-perl6 kernel for Jupyter. At the moment all it does is output on the terminal what it got from the front-end and react to heartbeats, but given a bit more time, I’m convinced it can be all you’d want it to be :)

Low Hanging Fruit for newcomers

With the Christmas Release fast approaching, most of our core developers are busy getting semantics right so that nobody accidentally relies on wrong behavior after The Release Everybody Looks At. That leaves a bunch of tasks on the wayside that aren’t necessarily hard.

I’ve got two [edit: three] little tasks that outsiders could reasonably easily pick up if they want to get into Perl 6 development. If you’re interested in trying or just want a few more hints, feel free to stop by on #perl6 on freenode or send a mail my way.

[HTML5, JS] Profiler App Improvements

Running any Perl 6 script with –profile spits out a HTML5 app based on Angular.js that lets you explore the gathered data interactively.

Unfortunately, there’s a few bugs still around, like the X button in some pop-ups not closing the pop-up.

More importantly the breadcrumb trail on the Call Graph portion of the profiler sometimes gets confused and you end up not being able to go up any more at all.

Also, the “icicle graph” in the top portion of the Call Graph section has terrible performance when the call graph is too deep, and quite often routines deep into the call graph are just 1px wide, rendering them useless.

All those things could be fixed in an example profile and then put into the profiler template.

[C] Fix an ABI compatibility issue between MoarVM and Rakudo

Adding more MoarVM ops causes spesh’s opcodes to shift. Rakudo accidentally compiles these opcode numbers into one of its .o files, and thus ABI breakage happens. I’ve described the problem as well as possible solutions in this github issue.

[Perl5] Add a probe to MoarVM’s build system for a too new compiler flag

This MoarVM github issue describes that RHEL5’s gcc doesn’t support -Werror=declaration-after-statement, a flag we’ve put in so that the linux-using or mac-using coders don’t accidentally break the build on windows.

Ideally, the probe.pm script would check if that flag is supported or not and then setup.pm would not include it.

That’s it!

This post took me a bit longer to write than I expected, but since that’s because so many nice things happened, I’m fine with that :)

Thanks to all our contributors Perl 6 looks better every day!

See you again next week!

2015.46 Production Today

Grapheme \reu\nification

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


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!


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!

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 values 128..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 to Str.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 for Split.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

2015.45 Grapheme Clustering

This week saw Jonathan Worthington++ finish off the last nook and crannies of the NFG work, specifically supporting the Unicode® Standard Annex #29:

(it) describes guidelines for determining default segmentation boundaries between certain significant text elements: grapheme clusters (“user-perceived characters”), words, and sentences.

Or, in other words, as Jonathan described in his commit message:

This aligns our definition of “grapheme” with that of grapheme cluster in Unicode Annex #29. There is one exception: we don’t treat \r\n as a single grapheme yet (we will, but need to further debug the fallout of doing so). The changes so far should hopefully cause little fallout in the ecosystem, aside from more correct semantics with the characters of various languages. The other notable changes is that we no longer produce synthetics for combining chars placed on control chars (so a combiner after a control char is now an isolated combiner).

The best Unicode support of the world in a programming language just got better still!

Deadline London Perl Workshop This Friday

The theme of this year’s London Perl Workshop is A Perl Christmas (?). Or more elaborately:

The theme for the London Perl Workshop will be A Perl Christmas. This year we have heard that Perl 6 will have a Development release and a Version 1.0 release for Christmas. In honour of that we will be devoting this event to all things related to Perl 6. What effect has Perl 6 had on the ecosystem, the modules, the libraries and the community? What does the future hold for Perl 5 and Perl 6? We will also accept talks and workshops on Perl 5 and Perl 6 related subjects as well as the existing Perl Frameworks and Libraries.

If you think you can do a presentation there, please submit it before this Friday. London is a magical place in December. Let’s make it extra Perl 6 Magical this year! And make sure that question mark is a mistake :-)

Cluj.pm Event On 19 November

The next Cluj.pm Event has a quite an interesting schedule from a Perl 6 point of view:

  • Perl 6 In Production by Andrew Shitov (keynote)
  • From Regular Expressions To Parsing Javascript – Learn Perl 6 Grammars by Jeff Goff
  • Zero To Infinity And Beyond – Rethinking The Rational by Jeff Goff

Only 16 days to go! Not a lot of time to register and book your flight!

Noticeable Fixes And Additions

  • Tobias Leich++ made it possible to use a generic type in a coercive type:
    sub accum( ::T \a, T(Cool) \b ) { a += b } now works. In this example the second positional will be coerced to the same type of the first positional, as long as it was Cool.
  • Pepe Schwarz++ and Will Coleda++ worked a lot on at least investigating and categorizing the post-GLR fallout on the JVM. Some problems were fixed, others merely properly ticketed. Fortunately, the “wall” that was mentioned in the previous Perl 6 Weekly, has been, at least temporarily, taken care off by smarter handling of internal constant strings. Hopefully, we will not run into that wall again until after Christmas (this year!).
  • TimToady++ worked on auto-generating meta-operators without actually needing to use them:

    There’s a sense in which none of the metaoperators are really there, but are abstractions; up till now they’ve autovivified themselves as needed only when used in a normal operator slot, but now they autovivify when mentioned as nouns or function names too, in any of &foofix:<op>, foofix:<op>, or &[op] now also honor the abstraction

    Or as Moritz Lenz++ said it:

    There are infinitely many operators that you can create from basic operators and meta operators. For example from infix:<+>, you can create X[ZR+] or so. We don’t create them up-front, but on demand. That used to work for calls, but not for references to those operators. Now it works for references too.

  • Timo Paulssen++ started on making my Rat $a = 42 a compile error, rather than a runtime error. TimToady++ expanded on that work, and made it all happen just like Timo imagined it.
  • Elizabeth Mattijsen stole a recent idea from Perl 5 and implemented this as a .head and .tail method on List. The advantage of .tail specifically is that it will only use memory for the list elements actually returned.
  • Jonathan Worthington++ also fixed a long standing infiniloop bug in grammars if you were quantifying something without width: /^+/ being the golfiest version of that. This now complains with
    Can only quantify a construct that produces a match
  • Various speedups: Buf.list and Blob.list (26x faster). Str.split (2x to 15x). "a" .. "z" (15x to 25x). List.kv (1.5x to 6x). s:g/from/to/ (2x). tr/a/b/ (2x). tr/a// (2x).

More Doc, Better Doc

The documentation repository of Perl 6 (which is where the documentation website is generated from, saw more than 30 commits last week. Lloyd Fournier++ tells us the search on the website has been much improved (like being able to search on if). Of course, this is still a work in progress, so if you find any problems (or can’t find something), let us know. Preferably by a Pull Request :-)

Blog Posts

Only one the past week:


Only one this week as well, a bootleg even!

Perl6 On Facebook

The Perl6 public discussion group on Facebook now has more than 200 members and the group has seen some lively discussions already. So I’m told :-)

Ecosystem Additions

Works In Progress

  • Jonathan Worthington is working on I/O in MoarVM. New features and significant performance improvements could very well materialize the coming week.
  • Stefan Seifert has been working a lot on the curli branch that should bring us the final implementation of distribution installing and module loading.
  • Pawel Murias is making progress on the Javascript backend for Rakudo. Now, having 3 backends for Rakudo Perl 6 by Christmas 2015, that would really be a very nice surprise. If you would like to see that happen as well, contact Pawel (pmurias on the #perl6 channel): he sure can use our help!

Winding Down

It’s been an exciting week. The coming week promises to be even more exciting still! So tune in next week, same time, same channel :-)

2015.44 Niceville

From the site of the EuroOSCON in Amsterdam, NL, a new Perl 6 Weekly is about to hit your eyes. Please stand by! 5, 4, 3, 2, 1…..

Perl 6 Beta released!

This week saw the official Rakudo compiler release of Perl 6 beta. Thanks to the hard work of Will Coleda++. Looking for inspiration for a good name, he came up with Niceville, FL. An indication of sunny times ahead indeed! Please note that as of now, there is no Rakudo Star release available yet, but this is expected soon now that jnthn++ is back from a well deserved week of being offline and enjoying ancient culture!

This week in short

According to flussence:

a bunch more of lizmat++’s “x% faster” commit messages, someone asking for a solaris tracing feature in moarvm, a long debate over qx{} being nasty and should go away etc, some other stuff.

Here’s the other stuff:

Rakudo’s core settings too large for JVM

It seems we have hit a bit of a wall last Saturday.

Class file too large!

FROGGS++ was the first one reporting it. There seems to be no immediate solution available, but there appears to be a way forward. Question remains how much effort we want to put into that or start thinking about alternate solutions (like reducing the size of the core setting). Fortunately, it was already foreseen that Rakudo on the JVM might not make it for Christmas.

.split/.comb On Handles

lizmat++ implemented the already known methods .split and .comb on file handles. This means you can now lazily split your text files on things other than a CRLF by e.g. specifying a regular expression. Or search your text files for some captured text using a regular expression. Without having to load the entire file into memory. It does not give us the mythical Cat object yet, but for some uses it now gets pretty close.

Blog Posts

Alas, only one blogpost in the past week.

Ecosystem Additions

Winding down

A bit meagre this week. We’re confident things will be picking up again now the Beta release is out the door. So tune in next week for more!

2015.43 Vernacular English

A week without any big events, just many smaller and larger fixes, additions and overall progress!

s/// In for Loops now work

A long standing bug regarding the use of s/// in for loops has finally been fixed by FROGGS++. Quite a bit of effort to make this work on both MoarVM and JVM backends. Extra kudos are in place!

grep/first/last-index Are Dead

lizmat++ implemented a long standing feeling in the community, that the functionality of grep-index/first-index/last-index, should really be accessible by named parameters on grep/first. So, now some of the same adverbs that can be used on slices can now be used as as named parameters: :k, :kv, :p, :v on grep/first. Additionally, :end can be specified with first, to start searching from the end of the list.

Erratum – No Words Starting With ß

daxim++ pointed out I made an error in the last Perl 6 Weekly:

“Officially” is wrong because there is no office that can generally prescribe use or disuse of ß in languages that have that letter.

“No words starting with ß” is wrong because counter examples:

  1. ßo is the abbreviation for Schock.
  2. ßtata is an echomimetic word used the in the folk song “In einen Harung“.
  3. Unreformed Sorbian has dozens of words: ßadzachu, ßebi, ßej, ßlepe, ßmercz, ßmy, ßnadz, ßo, ßobu, ßu, ßudzicz, ßurowje, ßurowych, ßwjerni, ßwoj, ßwužachu, ßydom, ßym to name a few.

My sincere apologies: I’m just glad there is a reason we should be able to titlecase ß! And use it whenever and wherever we want. Don’t you just ♡ Unicode? Anyways, I’m also looking forward to daxim’s Perl 6 Ecosystem addition!

Quote Of The Week

perl is vernacular english, and python is polygoon-journaal dutch (by Bart Wiegmans). For the non-Dutchies among us: Polygoon Journaal and an example of the voice of Philip Bloemendal.

Other Notable Additions And Fixes

Coming in at about 70 commits in the rakudo repository alone in the past week:

  • Supply.throttle for throttling the throughput of a Supply (number of emissions on the supply), either by time-unit (e.g. per second) or for a piece of code to be executed asynchronously.
  • grep { // }, @list works again. It is however still advisable to just use grep //, @list as that is better optimised, for the same effect!
  • A number of REPL fixes, e.g. regarding tab-completion
  • with and without now topicalize properly
  • Hash.append added, for adding lists to Hashes (like List.append)

Blog Posts

Presentation Slides

Ecosystem Additions

2015.42 Unveiling

The world seems to be warming up to Perl 6. I hope this will not destroy morale!

The Night Larry Wall Unveiled Perl 6

It was quite an event, at Craigslist, when TimToady introduced a large audience to the concept of Perl 6 actually existing, happening and being released soon! A blog post here and there caused quite some discussions. Some of them with answers. And for a change, there weren’t that many haters! Even InfoWorld gave it a mention! The world is warming up to Perl 6!

Windows MSI installers for Rakudo Star 2015.09

Tobias Leich has been busy: he made two Windows MSI installers available. One for 32bit, and the other for 64bit Windows. So, if you’re on Windows without a compiler, you can still try out Rakudo Star!

The Continuing Saga Of Smileys

Last week, FROGGS++ implemented the initial stages of :U and :D on variable types (now commonly referred to as smileys). This week, FROGGS made these type suffixes first class citizens in the world of Perl 6. So, this now works:

say Int ~~ Int:D; # False, as not all Int's are defined
say Int:D ~~ Int; # True, because all Defined Int's are Int!

Alongside this work, lizmat++ implemented the variables and attributes pragmas, that allow you to set the default smiley for variables and attributes. So, now you can say:

use variables :D;
my $a = 42; # $a must always contain a defined Any
$a = Any; # fails with:
# Type check failed in assignment to $a;
#   expected Any:D but got Any

If you prefer your code’s variables to always have defined values only, you can now easily set that default in that scope with use variables. And the same for the attributes of a class (with use attributes). Work is still being done on the parameters and invocant pragmas.

Unicode/NFG Odds And Ends

jnthn++ has been working on getting almost all outstanding Unicode / NFG tickets fixed. One of them, was to implement the case folding functionality, aka the fc method:

say "Leffe".fc; # leffe because ligature ff expands to ff

Another corner of Unicode that now got properly implemented, is title casing, aka the tc method:

say "ßar".tc; # Ssar
# even though there are officially no words starting with ß

And the Christmas ticket list got significantly shorter again!

Facelift Of Ecosystem

Gábor Szabó, Zoffix and others, have worked on giving the frontpage of the Perl 6 Ecosystem a facelift! Apart from the re-styling, now also the Travis Build Status and last update are shown!. Meanwhile, Justin DeVuyst is working on a prototype of a META-CPAN for Perl 6. See his blog posts below!

Perl6 On Facebook

Yes, Perl6 is a public discussion group on Facebook about anything and everything “Perl” version 6. Perl6 intends to carry forward the high ideals of the Perl community. If you’re on Facebook, and you want to be up-to-date on things happening in the Perl 6 world, and you don’t want to lurk on the #perl6 channel (on irc.freenode.org), and can’t wait for the next Perl 6 Weekly, visiting that group could be your ticket!

Other Notable Additions

  • Handling of exceptions in phasers, e.g. not running POST/LEAVE when a PRE fails
  • Byte-Order-Mark (BOM) now correctly handled when reading files
  • SetHash.pairs/values/kv now return left-values, so you can remove something from a SetHash by setting the value to False
  • Add produce method and sub to do triangle reduce
  • Generalize N-ary reduce/produce to [op] & [\op]
  • Addition of ZEN-KEY and ZEN-POS methods, to allow module developers to customize the zen-slice for their objects
  • Categorical sub declarations have been improved. Delimiting with [] is now supported, and delimiting with <<>> properly interpolates contained *sigiled* constants
  • Many, many other bug fixes and optimizations, coming in at 120 commits in the rakudo repo this week alone!

Blog Posts

Ecosystem Additions