2015.12: A release. Also, lazy deserialization makes a comeback

On Friday, the 20th we got a Rakudo release, followed swiftly by a Star release on the 21st and a Rakudo Star .msi installer this monday. There’s also one Rakudo Star Docker Image based on Fedora 21 by mj41 and one Rakudo Star Docker Image based on Ubuntu 14.04 by hoelzro. On top of that, FROGGS wrote down how to create the Rakudo Star .msi packages. Big thanks to FROGGS for the Rakudo release and the MSI, moritz for the Rakudo Star release and everyone else involved in the Release process and all the tasks surrounding it!


A long time ago, MoarVM learned how to delay deserialization of a whole bunch of objects until they are referred to, but there was at least one bug that was caused by it and so it was disabled for a long while. That feature was re-enabled just after the release, so that we get quite some testing by the community to find out if it still causes issues and this time hopefully get rid of them, since the lazy deserialization gives us much better memory usage and speed when starting up a program that doesn’t use every class there is.

That’s not the only change we can look forward to, though. Jnthn is currently working on improving the impact of Frames on the garbage collector a whole lot, which (in my expectation) should improve memory usage as well as collection times.

In addition, Jnthn will fix my attempts at teaching NQP’s code-gen and Rakudo’s optimizer about references to local variables, which will recover the performance hit we took when our support for native variables and attributes has been vastly improved recently.

There was also a commit that prevented $*VM from being initialized on every startup that dramatically decreased startup time, but that caused a problem with installing modules, so it was reverted. Maybe we’ll end up getting it back this month with a proper fix for the underlying problem!

There’s also two things yours truly is working on: Making calls to a repr’s operations (attribute access, pushing/popping, positional and associative accesses, …) less overhead-ridden in the JIT compiler and merging facts about registers in spesh when Blocks in the Command Flow Graph come together. They aren’t ready for merging yet and also don’t seem to cause significant performance improvements, but I’ll keep looking for ways to make things faster …

Platform things

Rakudo used to follow parrot’s install directory layout, which put things in $PREFIX/languages. We changed that to $PREFIX/share instead; you may have to re-install modules and run Configure.pl again for all parts of your Rakudo installation if you’re staying on the bleeding edge via a git checkout. If things get very wonky with rakudobrew, consider nuking the subdirectories of ~/.rakudobrew …

This change was made to make rakudo and nqp much more friendly towards linux distributions.

Also, the docker image efforts by hoelzro and mj41 will be combined into a more official rakudo star docker repository.

What’s also very worth mentioning is Coke’s ongoing work to get our stuff into the official MacPorts repository. There’s only MoarVM so far, but NQP and Rakudo shall follow.

Language Features, Syntax, Bug fixes

usev6 fixed the interaction of “last” and the sequence operator, making sure that code like this

perl6 -e 'say 10, 9, 8, { $_ - 1 || last } ... *'
10 9 8 7 6 5 4 3 2 1 1

now properly drops the last entry in the list.

Raydiak (and Mouq) implemented the simplest case of an angle-bracketed Rat literal, like <1/5>. In the future, there’ll also be support for lists of Rat literals like <1/2 1/3 1/4>. I may have to bug them to also make Complex literals work in angle brackets :)

Psch fixed a problem in Rakudo-JVM’s Binder that’d cause coercive types to pass the original value rather than the coerced value to a function’s body. After that, he also implemented nqp::getuniname on Rakudo-JVM which powers Perl6’s uniname sub. A few improvements for the Eval Server have also landed.

Thanks to TimToady the “cannot call $sub_or_method, none of these signatures match:” error message also shows the capture that was passed and caused the “no match” exception. The robustness of Mu’s .perl method has also been improved and its output prettified a tiny bit.

Lastly, Mouq fixed the combination of Bag and hyper operators, such as “Bag.new(…) »-» 1″.

Another thing happening in a non-merged branch right now is more features and improvements for supporting CUnion meant for (but not limited to) NativeCall by FROGGS.


moritz, ptc and others have been improving the official doc.perl6.org contents again. That’s Way Cool if you ask me! As always: feedback is very welcome on the IRC channel or the perl6-users mailing list, or even in the comments section of this blog.

Finishing up

I feel like I’ve missed a few things, but I’ve been procrastinating this post far too long now and bedtime is coming up soon :)

Therefor I wish you a nice week and have fun trying out the newest Rakudo Star release!

P.S.: I’m thinking about adding a second series of posts to this blog. Once a week I’d look through all the snippets evaluated with our evalbot on the IRC channel and pick out one or two and briefly describe what I like about them. What do you think about that idea?

2015.11 Native arrays arrive

Friday the Thirteenth turned out to be a very fruitful day, as jnthn++ could finally merge a lot of the work that he has been doing the past weeks in the background regarding native arrays. Native integer arrays come in the following flavours: int8, uint8 (one byte per element), int16, uint16 (two bytes per element), int32, uint32 (four bytes per element), and int64, uint64 (eight bytes per element). On top of that there are two generic native integer array types: int and uint, which are aliases for either the 32bit or 64bit version (depending on your hardware and/or build options). So what does that mean for performance in e.g. filling a 10M element array with an integer value:

my Int @A; my int $i;
while $i < 10000000 { @A[$i] = 1; $i = $i + 1 }   # 11.6 CPU seconds

Using an int array is more than 11x faster:

my int @a; my int $i;
while $i < 10000000 { @a[$i] = 1; $i = $i + 1 }   #  1.0 CPU seconds

If we compare this to Perl 5, we can see that Perl 5 is slower in this particular benchmark:

use integer;
my @a; my $i = 0;
while ($i < 10000000) { $a[$i] = 1; $i = $i + 1 } #  1.5 CPU seconds

However, Perl 5 optimizes the for idiom much better than using while. So if we use the for idiom, we get:

use integer;
my @a;
for (0 .. 9999999) { $a[$_] = 1 }             # 1.0 CPU seconds

So on par with Perl 5. Still, it is very exciting to see Perl 6 execution speeds approaching Perl 5’s!

Apart from native integer arrays, we also now have native numeric (real) arrays in 2 flavours: num32 (4 bytes) and num64 (8 bytes), and a generic num type that aliases to either.

The native arrays implementation is still a bit rough on the edges, specifically with regards to Listy functions such as .pick, .roll etc. The reason why these do not work yet, is clear: there is still some discussion as to how to resolve the issue, as it will involve some internal code shuffling.

Why is it so hard?

moritz++ wrote a very interesting blog post about why it is so hard to write a compiler for Perl 6. There were quite some comments on Reddit.

TheDamian in Amsterdam

Damian Conway gave his Everyday Perl 6 presentation in Amsterdam last week (like he did in Oslo the week before that). Some photo impressions from the lovely ambiance of the Tuschinski Theater. To quote TheDamian:

Perl 6 is a computer scientist’s dream come true. Its many advanced features (junctions, multiple dispatch, generics, delegation, grammars, lazy evaluation, infinite lists, hyperoperators, first class functions, coroutines, partial function application, macros, metadata, etc., etc.) offer the elite überhacker entirely new levels of awesome cosmic power.

Unfortunately, for the majority of us, those incredible new features are mostly just mysterious, scary, and off-putting. But all of those new features are also entirely optional. You don’t have to start out in Perl 6 writing autoparallelized infinite superpositions of multimorphic higher-order functions. You don’t even have to statically type your variables or encapsulate your objects.

Using attributes in regexes

jnthn++ added a compile time error when using class attributes inside a regex. From the commit message:

Regexes are methods on Cursor (or some subclass of it), meaning that
an attribute access inside of them is relative to that. Rather than
failing silently or exploding noisily at runtime, catch the problem at
compile time. The typed exception’s message explains the issue and
offers a suggestion.

Development Allsorts

  • FROGGS++ fixed a long standing bug on the JVM backend involving our scoped subs in combination with precompilation. This now allows e.g. the URI module to be used on the JVM backend.
  • hoelzro++ found a problem when multiple readers read from the same Channel. lizmat++ fixed this (at least for now) and hoelzro added a test for it.
  • lizmat kebab-cased some functionality (and added deprecations for the old names) in an effort to provide more naming consistency: is hidden-from-backtrace, is hidden-from-USAGE, use MONKEY-TYPING, RAKUDO-NO-DEPRECATIONS, Supply.on-demand, Supply.schedule-on.
  • If you’re running spectests regularly, you will see quite an increase in number of tests (36600+ tests now): these are mostly new native array tests.

Winding Down

timotimo++ was not feeling well enough yet to do the Perl 6 Weekly, so yours truly did it this time. timotimo, get and feel better soon!

Please let me know of any errors, comments, suggestions, like always!

2015.10 FOSDEM Videos and Role Conflicts

Unfortunately, timotimo++ wasn’t feeling well enough to do the Perl 6 weekly this week. So yours truly will be stepping in again. Best wishes to timotimo: hoping he will feel better again soon!


The FOSDEM videos of the Perl DevRoom have appeared online. I’d like to highlight the Perl 6 ones in this context:

Role conflict resolution, wraps and claim

skids++ has written a drive-by summary/followup thoughts on “the role debate”, after colomon++ had a blog post about it. Food for thought, indeed. Comments welcome, of course!

TimToady on a roll

While fixing many grammar related buglets, TimToady++ also made it illegal to create operators with spaces in them. A sane choice, if you ask me. He also specced and implemented three more pseudo-packages: LEXICAL (Contextual symbols in my or any outer’s lexical scope), OUTERS (Symbols in any outer lexical scope) and CALLERS (Contextual symbols in any caller’s lexical scope). The use of $/ as Perl 5’s input line separator, is now better detected and frowned upon with a clearer error message.

Array/Hash Internals Shakeup

It was discussed many times over the past weeks. This Sunday, lizmat bit the bullet by renaming all of the Rakudo specific array / hash access internal methods, and providing deprecation logic for the old method names. What does that mean? As a user, it shouldn’t matter much. As a module and/or internals developer, you may need to change some calls to these internal methods. Please check the ChangeLog for more information.

Nativecall C++ Integration

FROGGS++ has been steadily working on the integration of C++ with NativeCall in a branch. It is getting close to a merge, so hopefully we’ll be able to chalk up “C++ integration” on the list of NativeCall features next week.

Development Allsorts

The following features / bug fixes were implemented in the past week:

  • PairMap (Hash with fixed set of keys on creation, but variable values)
  • .pairup() (Create a list of pairs from a List of scalars, pairs, lists and hashes)
  • UInt (sub)type and coercer for unsigned integer.
  • is DEPRECATED works on subs/methods even if they don’t have phasers.
  • MoarVM gc crash that was blocking work in Inline::Perl5 has been fixed.
  • Most, if not all Expected Array[Str] but got Array[Str] errors fixed.
  • my Role $a .= new does not error out anymore.

And of course, many, many other bug fixes and optimizations, both on the MoarVM as well as specifically on the JVM backend (Mouq++, avuserow++, nwc10++, donaldh++ on top of the usual suspects).

Winding down

Please let me know of any errors, comments, suggestions, like always!

2015.09: Highlights of the Week, and also native refs!

This week two independent people have worked on independent syntax highlighters: ashgti is working on a .tmbundle for perl6 so that we can have highlighted code on github again. at the same time, literal has made an incredible amount of improvements to the perl6 highlighter for vim. The performance has increased significantly, but the highlighting is also much more precise. The new highlighting code relies on a feature that’s been added in Vim 7.4, but if your vim is older, the makefile will strip the new features out for you. Many, many thanks go out to these two!

Bugs, bugs, bugs

I think I haven’t mentioned this for a long while, but usev6 has been continuously plowing through RT looking at bugs that need tests or have been fixed in the mean time and closing them. Of course, usev6 isn’t the only one, as Mouq did many bug fixes as well. Having a more reliable number in the “new” and “open” columns for the perl6 bug queue in RT is very helpful. So thanks!

JVM Interop improvements

psch made the marshalling used for calling into native java classes’ methods able to handle multi-dimensional arrays, so more stuff can be called now. Also, there’s a function that allows you to simply evaluate some Perl 6 code from java, so you can have some embedded Perl 6 code in a java program.

Native refs

jnthn has been busy porting the native reference support to the JVM, so that it could finally be merged yesterday. Not only is this a very important prerequisite for having native arrays work properly, but it also fixes a lot of annoying NYIs that you could encounter when using native variables and attributes for performance reasons, like using ++ or trying to assign to multiple slots in a Buf or having a native attribute “is rw” with an accessor automatically generated for you. In the future, our optimizer (both the static one in rakudo and the dynamic one in MoarVM) will learn to take advantage of these native references to hopefully generate much faster code!

Smaller bits

TimToady lets rakudo cope with “keywords” being used for custom stuff, like subs, methods and classes. Ever wanted to have a class called “class”? Well, I’m not saying you should, but if the need ever arises, now you can. Also, functions called “if”. Another place where this used to be troublesome were sub names like “not-foo” or “so-what”. These work now.

On top of that, “smart quotes” are now supported:

perl6 -e 'say “quoting” ~ ‘quoting’ ~ ‚quoting’ ~ „quoting”'

The perl6 testers website has also seen some more work (by yours truly, actually!), which means that the list of recent reports is back and report pages now allow you to navigate to the corresponding distribution in the breadcrumb list. You can check out the “most recent reports” page here.

Also, japhb implemented IO::Path.resolve, so that we can handle paths with symlinks in them. Kudos!

There’s also a bit of sad news: The Perl Foundation was not accepted into GSoC this year. That’s especially sad as there were multiple interesting suggestions for projects to have that relate to Rakudo and MoarVM.

That’s all from me for this week, but of course we’re not giving up yet ;) I heard from pmichaud that this week is the one he allocated time for GLR work in!

2015.08 – A Release, a Star and still picking up more speed


Last week lizmat did a Rakudo release and on Saturday moritz did a Rakudo Star release (grab it on rakudo.org or get hoelzro/rakudo-star off the docker registry). Since the release happened on Thursday, a few of the changes mentioned in this blogpost are already part of the latest release.

Speed Improvements

This week I did a little contribution to performance as well! I made Bool.pick() (and Bool.roll()) 2x as fast and stumbled upon a problem in the compiler’s inlining decision-making that I’ve been chasing down over the last few evenings… But lizmat did a lot more than me, just like last week: Str.trans with single letter strings is now 2x as fast and Str.subst(Str, Str, :global) is 12x faster! There’s an additional gain of between 10% and 30% if you use Str.trans for replacing a number of characters with a single character. There’s also a tiny startup time improvement, but I didn’t measure it yet.

NativeCall improvements

FROGGS landed a branch that adds a “nativesizeof” op that will give you the size of … well, things :)

Later this week we’ll probably see support for unions (finally!) and a proper Pointer[…] role that’ll allow control over inlined vs non-inlined structs and unions in other structs.

Another branch that’s in the works, but will not be ready for merge this week, is “cpp”, which allows you to bind C++ classes. Currently only the name mangling scheme of gcc is supported, but it probably works with clang, too. Later on, more support will probably land.

Documentation changes

Many people have – rightfully – complained that documentation is still kind of weak for Perl 6. Thankfully, ptc and moritz have been busy (and not just this week)! Check out the latest state of the documentation or look at the recent changes. If there’s anything wrong or missing, feel free to drop by on IRC and report, or open an issue on github.

Miscellaneous fixes and changes

brrt fixed a bug where MoarVM’s file copy routine would stop copying data after 2gb.

Cool stuff in the ecosystem

There’s been a module called “Inline::Perl5” for a while now. It allows you to import and use modules written in perl5 in your Perl 6 program. There’s also “Inline::Python” which is basically the same thing but with Python instead of perl5. Both also allow you to derive Perl 6 classes from classes in the inlined language and then derive from Perl 6 classes in the inlined language.

Now there’s also “Inline::Perl6” – though I’m not sure if it allows the same subclassing thing I’ve described in the previous paragraph.

Those three modules were made by nine, but now there’s also “Inline::Lua” by raydiak.

It seems like Perl 6 is becoming quite useful as a glue language between many other languages. I wonder what Inline::$lang will be next! I heard rumors of Inline::AWK :)

There’s also a new interesting Slang out there now. It’s called Slang::Piersing and allows identifiers (like method names) to end in ! or ? (Technically that was the week before, but I neglected to cover it back then).


moritz added a new command to our lovely irc eval bot camelia that automatically uploads a profile of the snippet to the web. Here’s moritz’ blog post about this feature.

Ovid is praising subset types and gradual typing as found in Perl 6 in his blog post titled “Avoid a Common Software Bug By Using Perl 6“.

David Golden shares his “Thoughts on getting Perl 6 for Christmas” on his blog. Both positive and negative. He’s got a few good points as well as worries. I have a few notes on that post:

  • We are aware of the up-to-dateness problem of documentation – that it’s hard to see whether or not something is still relevant or correct. The “Perl 5 to Perl 6″ guide on moritz’ website (as linked to in the first paragraph) does have old dates in it, but it has been checked for correctness as recently as last September.
  • The “composable concurrency” talk is still relevant, though things have changed names (“Supply” instead of “Observable”, “start” instead of “async”, “vow” instead of “keeper”, …)
  • A brief survey of the Perl 6 IRC channel shows that nobody seems to know what “Synchronization” was even meant to refer to in the feature matrix. Given that we’ve got Locks and Semaphores and stuff implemented, I’m also not sure why it has a +/- entry.

All right, that’s it from me for this week. Have a pleasant Last Week Of February, everyone!

2015.07 – I like trains! Fast trains, that is …

This week I’m taking back over from lizmat who thankfully stepped in when other responsibilities kept me away from Perl 6 for a while. I kind of like her format a bit better than my big list of bullet points; I’ll try to do it more like her. Feedback is, of course, always welcome.

Performance improvements

After TimToady posted an implementation of the Textonyms task on RosettaCode that was too slow for comfort, lizmat had a look at the .trans method (which also powers the tr/// operator) and quickly made the common case of having only a Pair of two strings at least 20x faster. Another case of trans – only removing characters instead of replacing characters with others – got between 10x and 200x faster (depending on whether you remove all characters (200x faster) or no characters (10x)). These changes made TimToady’s code run 36x faster, the run time went from 6 minutes down to 10 seconds. Yay!

Availability of “long” type

FROGGS made a type “long” available – especially useful for use with NativeCall – to use whatever the current machine thinks a “long” is. This work also includes the ability to specify sizes for other things. In a related change, Buf objects will now report the correct size in “.bytes” when the size of an individual element is not one byte.

NativeCall’s in Rakudo now

NativeCall has been moved into the same repository that holds Rakudo. The reason for that is that their versions usually have to track each other very closely and having both in the same repository makes things a lot less strenuous.

Stricter laxness

Starting a Perl 6 script with a literal or a bare “v6;” is no longer considered obvious enough for parsing a script in lax mode. Especially since code run on the commandline with perl6 -e are lax by default.

An Interview and also a Blog Post

Paul Krill of Infoworld interviewed Larry Wall last wednesday (comments on reddit). On sunday our very own masak wrote a blogpost on mazes.

Syntax highlighting on doc.perl6.org

Thanks to paul t cochrane ([ptc] on the IRC) we now have syntax highlighted code blocks on doc.perl6.org and avuserow has a branch that uses Inline::Python instead of shelling out for a great performance improvement.

Native references

jnthn has been working on a branch “native-ref” that’s just recently been merged in MoarVM, but currently isn’t being taken advantage of in nqp and rakudo. It will – once merged – allow native values to be lvalues properly for things like having ++ on native values and having rw-accessors on native attributes in classes and working with values in Buf objects and friends. As far as I can tell, the code making use of the changes in the branch will be merged after the 2015.02 release has been tagged.

That’s it from me for this week. I hope I didn’t forget too much; I kind of have to get back into the swing of things :) As always, feel free to point out things that are missing or wrong. See you next week!

2015.06 In the wake of FOSDEM

Although this Perl 6 Weekly post only covers about 5 days worth of events, it was pretty busy. And of course I missed a few things in the last report, so I’ll mention them this week.

Interview with TimToady

Miyagawa++ held an interview with TimToady after his presentation at FOSDEM. The entire podcast can be downloaded, the transcript is partly paywalled.

Don’t you just love Rats?

CurtisOvidPoe expressed his love for Perl 6 and COBOL at just about the same time last week’s Perl 6 Weekly was published.

Sprouting Up in Brussels

Although not strictly about Perl 6, mdk++ published a very nice impression about his first visit to FOSDEM. And there are also pictures.

All Perl 6 Modules in a Box

moritz++ has created an experimental perl6-all-modules repository, which he mentions in a recent blog post. He used it to find out how many modules in the ecosystem were using Rakudo/NQP specific nqp::xxx() calls. It turned out to be about 8% of the modules: these will need a use nqp; command in the future.

Stats / Directions for doc.perl6.org

moritz++ has been very busy indeed. Apart from his tireless work in the background for doc.perl6.org (among many other things), he has also blogged about it. Of course, help in documenting Perl 6 stays welcome as ever! In this, I should also mention [ptc]++, for being an excellent editor (in the newspaper sense).

Rakudo Star 2015.01

Did I mention that moritz++ has been very busy? He released yet another Rakudo Star! And mj41++ made a Docker image!

Rakudo todo list

colomon++ made his own todo list for Perl 6.0. I can’t help but agree that currently seen precompilation issues, as well as instability when stressing parallel execution, are high on my list as well.

Parameter Coercers work!

jnthn++ has been very busy behind the scenes in Moar and nqp, in the “6pe” (for parametric extensions) branch. As jnthn explains:

6pe in Moar/NQP is a very general mechanism for type parameterization and (once I get to it) interning them across compilation units. The primary motivation was typed data structures, but it turns out the exact same mechanism is also a great way to implement coercion types and cache mixins. The reason I did coercion types and the mixin cache first is ‘cus (a) they’re useful, and (b) they’re a gentler first test for the 6pe implementation.

This branch was merged by moritz++, which made things like
     sub a(Str(Any) $foo) { }
(take Any, but coerce to Str) work, and make mixins such as:
     C.new does R
about 10x as fast, and make the core setting about 700KB smaller through re-use. More goodies will come from this work soon, but I’m going to defer telling you about them until next week.

Movement on the JavaScript backend for nqp front

hoelzro++ took all of the work that pmurias has done on the JS backend into a branch in the nqp repository. A big step forward into getting a truly functional JS backend for nqp, and in turn for Rakudo Perl 6!

Development Allsorts

psch++ fixed a problem with [R~], found by avuserow++. FROGGS++ fixed some issues with nativecast on the JVM. FROGGS++ also fixed some warnings regarding anonymous variables. Mouq++ improved the = meta-op, for cases such as $a >== $b, and enabled lexical term definitions like
     my \term:<∞> = Inf
lizmat implemented the nqp::readlink function on MoarVM/NQP with a lot of help from jnthn++ and FROGGS++. For now, it is only used in the newio branch.

Signing off for this week

As always, please let me know of any errors, omissions, additions!

2015.05 FOSDEM happened

The past week (well, actually 10 days by now), was mostly dominated by the FOSDEM happening in Brussels. The roster of Perl 6 related presentations was quite impressive:

Videos of all of the presentations in the Perl devroom, and TimToady’s presentation will become available in the coming weeks.

Production Ready Release This Year

TimToady++ announced that he expects that September 2015 will see a Release Candidate of Perl 6. And that barring any unforeseen circumstances of the “getting hit by a bus” type, we should see a Production Ready Release of Perl 6 before Christmas 2015. This got the intertubes buzzing. Before we all can rejoice, a lot of work will need to be done, specifically on the Great List Refactor (GLR), the Native, Shaped Arrays (NSA) and the Normalization Form Grapheme (NFG). And many other cleanups, as well as documentation patches and tests to be written. Your help is very welcome!

Public Service Announcements

  • pmichaud++ is preparing a blog post about the discussions within the Rakudo team while in Brussels. Be sure to follow his blog.
  • pmichaud++ also announced that in the future, non-core code will need to do a use nqp; to be able to access NQP functions.

Development Allsorts

You would think that not a lot happened in the past week because many contributors were working on their FOSDEM slides and/or travelling to Brussels. But it appears the reality is different. hoelzro++ worked on the sanity of type coercions. lizmat worked again on making adverbed slices faster (only 10% though, this time). Mouq++ allowed for indented code blocks in pod to contain empty lines (without breaking the code into separate entities). moritz++ moved the Real.sleep method to Numeric, and then DEPRECATED it. Mouq++ made auto-vivification on LoL’s work and implemented the semi-colon version of the MAIN sub. FROGGS++ and retopmuca++ allowed passing of Buf/Blob to NativeCall functions directly. And retopmuca++ and sergot++ got IO::Socket::SSL to wrap existing socket connections.

Signing off for this week

Sorry for this issue to be so late in the week. But FOSDEM messed enough with my daily rhythm as to need some time to recuperate. As always, please let me know of any errors, omissions, additions!

2015.04 Gotanda Lands

This week saw the landing of the Rakudo compiler release 2015.01, named Gotanda. Not much happened before the release was done by [Coke]++. Unfortunately, yours truly caused a problem in slices that would break some modules in the ecosystem, so within 24 hours, a hotfix release 2015.01.1 was made. This means that a new Rakudo Star release is likely: but as of yet nobody had the tuits to do this.

All of the exciting new developments happened after the release, so unless you’re living on the bleeding edge, you will have to wait for the next compiler release to see them.

Rakudo on MoarVM got 20% faster

Because jnthn bumped the optimization level on the MoarVM compiler (something that would previously break Rakudo), we now have a faster Rakudo on MoarVM. Typical startup time is 20% less, and the spectest runs 20% faster as well. And without breaking things as far as we know.

Much more documentation

Many people have been working on documentation, so it gets more and more worth it to check doc.perl6.org if you have a question or want to look up specific subjects. moritz++ for instance, has documented Proc::Async for the first time (other than what S17 already specified in a less readable manner).

Claiming a method when composing

CurtisOvidPoe++, while preparing for his presentation at FOSDEM, found that the current way conflicts are handled when composing roles into other roles, and roles into classes, may be confusing and present a “silently do the wrong thing” issue. In a discussion with, among others, TimToady and jnthn, a claim keyword was suggested. Which was promptly implemented by jnthn in a branch.

Programming in Perl 6 considered hazardous

CurtisOvidPoe was very busy in the past week. He also tweeted about it:

I strongly recommend *NOT* programming in Perl 6. Do it long enough and you won’t want to go back to Perl 5.

Now, if that isn’t good news, I don’t know what is :-)

Development Allsorts

moritz++ fixed a number of issues with Proc::Async and Supply.categorize. Yours truly made slices with adverbs, such as %h<a b c>:delete, up to twice as fast. atroxaper++ provided a –git-reference option to the configuration of Rakudo, as well as NQP, allowing you to specify local repositories, instead of fetching from Github all the time.

Already 25+ patches since this month’s release!

Signing off for this week

Please let me know of any errors, omissions, additions!

2015.03 Gathering Up Steam Again

It seems the dry spell of the Holiday Season has come to an end. Apart from the usual bug fixes and optimizations, and many new tests written or unfudged, the past week saw a few new features, some of them previously unspecced!

Quick way to make an Object (aka Typed) Hash

TimToady++ implemented a new construct:

As in: create a typed hash that can take Any object as a key without resorting to stringification (which is what the default hashes do). Compare:
say :{ ^10 => 42 }.keys[0].WHAT; # object hash
# (Range)
say { ^10 => 42 }.keys[0].WHAT;  # "normal" hash
# (Str)

This work was done as part of making the .classify and .categorize methods create Object Hashes, rather than normal hashes.

Include attributes in suggestion list

hoelzro++ provided a patch that will include names of attributes if an unknown variable is referenced.
class A {
    has $!foo;
    method a {
        $foo = 42;
===SORRY!=== Error while compiling -e
Variable '$foo' is not declared. Did you mean '$!foo'?

Work behind the scenes

jnthn++ has been busy again, but most of that work is the 6pe branches, so is not visible yet.

6pe = 6model parametric extensions. It’s a small extension to the 6model primitives (that all of our type and OO support is built using) that support parameterized types, including interning of them across compilation units; our inability to do so to date has led to various issues with typed arrays/hashes especially in a pre-compilation setting. The 6pe branches in MoarVM and NQP focus around providing the handful of new nqp::ops that expose this, along with the serialization improvements to go with it. Meanwhile, the 6pe-mop branch in Rakudo is about exploiting these new things to get nice Perl 6 improvements; so far, mixin interning and coercion types, soon typed data structures, and a little later native arrays.

One of the results of this work, is that the 2015.02 release of Rakudo will see coercion types, as in:
sub foo(Str(Any) $x) {
    say $x.WHAT
# (Str)

Furthermore, mixins will be 10x faster, the CORE settings will be 1MB smaller, and other memory savings.

How to create a Grammar in Perl 6

A very nice article was written by sillymoose++.

The for ^100 { } optimization is restored

Somewhere in the past 2 months, we lost the optimization that speeds up simple loops like:
for ^100 { ... }
This probably happened because of some preliminary work on the GLR. As part of other streamlining work, lizmat figured out what the problem was. After some breakage on the JVM was fixed, this change (which makes these loops about 2.5x as fast) is now functional on every backend again.

Development Allsorts

psch++ did a lot of work on the JVM. raydiak++ spotted that there was no method version of substr-rw. lizmat implemented that, and made it about 3 times as fast. Various other array slice related optimizations / code cleanup were also done by lizmat++. donaldh++ did some amazing work with annotations, and optimizing bytecodes for integer constants 0..5, resulting in a smaller CORE setting.

Signing off for this week

Please let me know of any errors, omissions, additions!