2017.26 Half Way There

Feels like everybody is either preparing for a conference, at a conference or recovering from a conference. A quiet week, with record temperatures at various Perl 6 core developers locations, which was not helping productivity.

Core Developments

  • Stefan Seifert made starting of installed scripts significantly faster by providing a faster, more specific interface to the CompUnit::Repository API (starting zef is now typically 1.5x faster).
  • Nick Logan made sure that the right %?RESOURCES is used for modules that get loaded using a CUR::FileSystem repository.
  • Zoffix Znet made .tail up to 2x faster by using the information of a count-only method if available in the iterator (e.g. when doing %hash.keys.tail).
  • Elizabeth Mattijsen did some more speedup work: calling BUILD or TWEAK is now 15x faster if objects are created without specifying any parameters. She also fixed some issues with inter-QuantHash coercers, such as coercing a mutable SetHash to an immutable Set. Finally she did a lot of work on the (-) (aka ) set difference operator, making it between 2x to 100x faster (depending on arguments).
  • Jonathan Worthington is working on a lot of low-level I/O improvements. This is a work in progress which I’m looking forward to tell more about next week.

Blog Posts

The Perl Conference – US

Last week saw The Perl Conference US (formerly known as YAPC::NA). The videos of the presentations are available on YouTube. The following videos are Perl 6 related. Or I find them in need of more exposure:

Meanwhile on Twitter

Meanwhile on StackOverflow

Meanwhile on perl6-users

Ecosystem Additions

Winding Down

Well, compared to the weeks before, not as much happened. But under the hood, things are brewing. And it’s not necessarily beer. So check in again next week for more freshly brewed Perl 6 news!

2017.25 [*] @perl-6-books

Yes, it looks like the Perl 6 books are multiplying! Almost a month ago, Gábor Szabó announced his crowdfunding campaign for “Web Application Development in Perl 6”. In the past week we also saw J.J. Merelo‘s book “Learning to program with Perl 6” appear on Amazon in a Kindle edition. And we saw Moritz Lenz publish the first chapters of his new “Searching and Parsing with Perl 6 Regexes” book. It’s great to see this many books arriving!

2017.06 Compiler Release

Zoffix Znet released Rakudo Compiler 2017.06 with his trusty bots and a full ecosystem toast. Claudio Ramirez was hot on his tail with the release of packages for several Unix systems. There is no Rakudo Star release planned for this month: next month should see one!

for ^1000 optimization is back

The optimization of for loops that run for a set number of times, has been re-instated by Timo Paulssen and then further refined by Jonathan Worthington (graph). So there will now be more situations where the overhead of running such a loop will be greatly reduced.

Proc overhauled

The internals of Proc have been completely overhauled by Jonathan Worthington, and is now also completely supported on the JVM backend as well.

Optimizer and JIT improvements

Jonathan Worthington also spent a lot of time on several static optimizer and spesh improvements, as well as adding more possibilities for code to get JITted. It has caused the canary in the goldmine benchmark to go almost go down below 4 seconds. Which means it got about 1.5x faster in the past 6 months!

Grant Extension Proposal

If you like the work that Jonathan did the past week, you should probably leave a comment at his proposal for extension of his Perl 6 Core Development Grant!

Other Core Developments

All of these developments made it to the 2017.06 compiler release, except where noted.

  • Zoffix Znet fixed an issue with labelled next‘s. He also fixed all of the methods on Proc that expect the Proc to be done. And fixed the debugger (but alas not in time for 2017.06).
  • Samantha McVey made sure that improper values for RAKUDO_MODULE_DEBUG do not break module loading in nqp. She also provided a new set of Collation features (alas also not in time for 2017.06).
  • Nick Logan made sure a source file of a module is only slurped once during installation. He also made sure the :merge functionality on run() and shell() no longer deadlocks.
  • Stefan Seifert added more checksum related information for when RAKUDO_MODULE_DEBUG is set.
  • Steve Mynott optimized $*KERNEL initialization for OpenBSD.
  • Elizabeth Mattijsen made sure that the default .WHY returns a Nil value that will point to the appropriate section of docs.perl6.org when being gisted (e.g. when it is being shown in the REPL). She also fixed some issues with Map (<) Map and made Str.subst(Str,Str) (substitute a string once in another string) 12x faster.
  • And many other smaller fixes and improvements.

Blog Posts

Meanwhile on Twitter

Not a lot going on that wasn’t already covered in this issue:

Meanwhile on StackOverflow

Meanwhile on perl6-users

Ecosystem Additions

Winding Down

From a sweltering place in the south of the Netherlands, it’s yours truly wishing you all a good week. Please check in again next week for more Perl 6 news!

<plug>Oh, and if you want to attend The Perl Conference in Amsterdam, you can now order tickets at the price-level you want / need!</plug>

2017.24 Synchronicity Sorted

In his latest blog post Jonathan Worthington elaborates about the upgrading of synchronous I/O in Rakudo Perl 6 (Reddit comments). If you’re interested in knowing more about I/O and other internals of Rakudo Perl 6 and MoarVM without it getting too technical, this is a MUST READ!

Suggestions for unknown Methods

Daniel Green implemented method suggestions when a method is not found during execution. This great awesomization now shows:

> 42.Rar
No such method 'Rar' for invocant of type 'Int'. Did you mean 'Rat'?

A great addition for developers with slippery fingers and/or a slippery mind. Dyslexics Untie! 🙂

Infinite Range.elems Changed

The behaviour of Range.elems on ranges that are infinite (as in either end-point is a type of Inf) has changed to a Failure rather than returning Inf, as before. This to get it more in line with the behaviour of .elems on lazy Iterables (IRC discussion).

Other Core Developments

  • Zoffix Znet implemented Complex.cis. He also implemented Failure.self which provides a concise mechanism to explosively filter out unhandled Failures while letting all other values through. Finally he fixed a pesky issue with recursive calls to indir.
  • As part of the Unicode Grant Samantha McVey fixed a long standing issue with the use of ignorecase and ignoremark that would give false positive matches if the first grapheme of the needle matched any of the graphemes in the haystack. She also added support for the new Unicode 9.0 Prepend property and better Regional Indicators.
  • Elizabeth Mattijsen made sure lazy Iterables are no longer attempted to be coerced to Set, Bag or Mix, but return a Failure instead. She awesomified the throwing of Failures a bit and normalized the handling of coercion methods on Seq and Supply type objects.
  • And many other smaller fixes and improvements.

Other Blog Posts

Perl 6 Presentations at the Perl Conference

From 18 June until 23 June at the US Patent and Trademark Office in the Washington D.C. Metro area. So if you didn’t plan on attending yet, these might change your mind!

Meanwhile on Twitter

Meanwhile on StackOverflow

Meanwhile on perl6-users

Ecosystem Additions

Winding Down

With the conference season almost completely upon us, it feels like some people have less time to do development. But that’s only partly true as it appears we’re going to see quite some nice stuff before the next compiler release scheduled this Saturday. So there will be plenty to talk about next week. Please check in again then to verify yours truly is not just making things up!

2017.23 Fulfilled TAP

Zoffix Znet published his IO Grant Completion Report, signalling the end of his extensive work on the IO subsystem in Rakudo Perl 6. Apart from writing a lot of code and tests, he also provided a lot of documentation. Most notably the Input/Output – The Definitive Guide (Correctly use Perl 6 IO), which should be a good read for newbies and hard-core developers alike. And he also added meta-introspection tools such as the Map of Perl 6 Routines. Talk about value for money!

TAP.pm6 no longer core

The Perl 6 implementation of the Test Anything Protocol (TAP), originally written by Leon Timmermans, has been moved out of core by Zoffix Znet. This will allow updating the TAP module without needing to update Rakudo. It will be automatically installed/updated whenever you do a spectest/stresstest using the t/harness6 (activated by setting environment variable HARNESS_TYPE=6).

Passing file handles between threads

Jonathan Worthington refactored NQP‘s IO to have a file handle object, which then uses the VM-backed decoder, just like the Rakudo file handles now do. He also eliminated the char-level IO ops from MoarVM, thus finishing the work to decouple IO and encodings. Finally, he reworked synchronous file IO in MoarVM to no longer use libuv: this now makes it possible to pass file handles (such as $*IN) between threads, which is a pre-requisite for many GUI-type applications that want to do things with files in the background.

Other Core Developments

  • Daniel Green awesomified the “Too many positionals” error by also showing the name of the routine receiving the incorrect number of positional parameters. But more importantly, he made sure that if an attempt is made to call a non-existing method, it will now suggest similarly named methods, just like it was already when calling a non-existing subroutine.
  • Tom Browder made sure that the POD6 specification can actually be rendered without warnings.
  • Samantha McVey made sure that the REPL no longer suggests installing rlwrap when it is actually installed already. Less visible was her work on the Unicode grant, which she describes in her first grant update.
  • Julien Simonet awesomified the error when no candidates are found when calling a subroutine / method.
  • Zoffix Znet also fixed an infiniloop with deepmap. He speeded up access to $*KERNEL functionality and fixed various race conditions with Proc::Async.kill. Finally he made smartmatching with allomorphs more sane and made sure dynamic variables are not lost to Promise.then blocks.
  • Elizabeth Mattijsen made sure that a lone bail-out in a test-file will actually stop testing for the right reason. She also fixed some smaller issues with the (|) (AKA set union) operator.
  • And many other smaller fixes and improvements.

Other Blog Posts

Meanwhile on Twitter

Meanwhile on StackOverflow

Meanwhile on perl6-users

Meanwhile on FaceBook

Jeffrey Goff:

Okay, here’s a radical notion. Perl 6 can now start to compile to JS. I don’t know how far along that is, but one of the reasons I can see for JS’ popularity is that it’s by now end to end. Most of the tools are built around a compiler of sorts. Maybe it’s time to try beating the Node people at their own game and figure out a wedge strategy to market Perl 6 as another alternative to React/Angular.

Ecosystem Additions

Winding Down

The past week yours truly has been busy with a lot of things other than Perl 6. So it was a bit of a surprise to see the amount of activity this week. Wow! Looking forward to reporting happenings in the Perl 6 world again. So please check in again next week!

2017.22 Up Handle Encoding

Jonathan Worthington‘s work on the IO::Handle encoding refactor has landed in Rakudo. It moves up all streaming encoding logic of reading / writing file handles to the Perl 6 level: this will make it easier to add yet unsupported encodings (like UTF-16be), and allow custom encodings to be easily added by an ecosystem module. This also simplifies what a VM backend should support regarding the encoding of data read or written using an IO::Handle: the backend only needs to support binary reading/writing (which should help on both the JVM as well as the JavaScript backends).

Short-term this may cause some performance degradation when reading / writing encoded file handles, which shall be regained when the Perl 6 encoding code gets better optimized.

Bag semantics for subset operators

The family of subset operators:(<) ⊂ ⊄ (proper subset), (<=) ⊆ ⊈ (subset), (>) ⊃ ⊅ (proper superset) and (>=) ⊇ ⊉ (superset) have gotten a lot faster and have gained Baggy semantics for Bags and Mixes. This means that the weight of an object in the Bag on the left side must be less (for (<)) or less than or equal (for (<=)) than that of an object in the Bag on the right side of the operator. Absence of an object in a Bag means it has a virtual weight of 0. The same logic is applied to Mixes. This change did not break any spectests (it even made some TODO tests pass). However, there may be some ecosystem fallout. So if you’re using these set operators in your code, you may want to verify they’re still doing the right thing.

Grep the Ecosystem

Anyone wishing to look in the ecosystem modules can now use the greppable6 bot on the #perl6 channel (on FreeNode). For example, if you would like to know which modules use the pack() command, you can do:

<lizmat> greppable6: pack\(
<+greppable6> lizmat, https://gist.github.com/0450cd99cf5bb95d70234687d457c0b7

For core developers and end-users alike it’s very nice that we have this capability, courtesy of Aleks-Daniel Jakimenko-Aleksejev!

Conferences

The conference season is almost upon us in full strength: David Oswald describes the perks of The Perl Conference (North-America), to be held from 18 to 23 June near Washington D.C. (talks).

But before that, we have another fine set of Perl workshops lined up: the Madrid Perl Workshop 2017 on 3 June 2017 (presentations en Español), and the French Perl Workshop on 9/10 June in Paris (presentations en Français). And then there’s also the German Perl Workshop on 26, 27 and 28 June in Hamburg) presentations auf Deutsch as well as in English).

Then fast forward to August with The Perl Conference in Amsterdam on 9, 10 and 11 August in Amsterdam, The Netherlands. Followed by the Swiss Perl Workshop on 25 and 26 August in Villars-sur-Ollon.

Believe it or not, but almost all of these conferences still accept talk proposals:

So please submit your Perl 6 related talk proposals now!

The Perl Conference (Europe) 2018

There are only a few days left to submit your letter of intent to organize next year’s Perl Conference in Europe. If you are involved with a local Perl Monger group, get together quickly and see whether you want to do this. Having been involved in the ones from 2001 and 2017, yours truly can confirm it will be a lot of work. But the satisfaction at the end of the conference is unbeatable!

Other Core Developments

  • Jonathan Worthington also made synchronous sockets not use the underlying libuv library on MoarVM anymore. This fixed various issues when sockets were being shared between threads.
  • cono had a Pull Request merged that allows looking up the port number of an already open socket on MoarVM.
  • Zoffix Znet continued his work on the last 10% of the IO Grant, with some remarkable speedups. He also made a warning much more awesome and fixed a number of issues with smartmatching Numeric values.
  • Elizabeth Mattijsen also made some error reporting more awesome apart from her work on the set operators.
  • Stefan Seifert made RAKUDO_MODULE_DEBUG output more useful by not suffering from buffering.
  • And many other smaller fixes and improvements.

Meanwhile in Books

Laurent Rosenfeld‘s book Think Perl 6 is now for sale. The first reviews are pretty fantastic!

If you want to become proficient in Perl 6 in the minimum amount of time, and enjoy the process, this is the book for you.

In true Open Source tradition, you can also download a PDF of the book.

Andrew Shitov‘s Perl 6 At A Glance is now also available as an e-book! So if you want to save on trees, this is now also an option!

Blog Posts

Meanwhile on Twitter

All tweets this week that didn’t mention anything already mentioned in this Perl 6 Weekly are by courtesy of Zoffix Znet:

Meanwhile on StackOverflow

Ecosystem Additions

Winding Down

Wow, again, not a small Perl 6 Weekly this week. And there are so many other goodies in process of becoming available. But more about that next week. So please check in again then!

2017.21 YAP6B

Or in other words: there’s Yet Another Perl 6 Book in the works! Gábor Szabó has started a crowdfunding campaign to write Web Application Development in Perl 6. Subtitled: “Introduction to web application development using Perl 6. Including several sample applications.” Which would be the 6th Perl 6 book to come out this year! You can already support this effort for as little as 10 US$! I can only agree with Damian Conway in his endorsement: “Take my money, dammit! :-)”. So please support this effort in any way you can!

Unicode Property Names

Samantha McVey is soliciting comments on solving issues with the <:foo> Unicode property syntax that may have overlapping result sets. She’s working on this as part of the Improving the Robustness of Unicode Support grant. In her blog post she describes the issues at hand. Please join in if you think you can help!

Rakudo Compiler Release 2017.05

It’s getting almost as common as landing a rocket on a 10m x 10m spot after delivering a cargo to the edge of space. But it should be kept being mentioned nonetheless! Zoffix Znet and his trusted flock of bots have released the 2017.05 Rakudo compiler last Saturday, with quite an impressive set of changes: more than 300 commits in the rakudo repository alone. If you’re a Docker user: J.J. Merelo already provided a 2017.05 Docker image.

Camelia in the Wild

Well, not entirely in the wild, but a great sight nonetheless (courtesy Lee Johnson)! And here’s a more symbolical sighting (courtesy Nick Logan). But this one takes the cake (courtesy Zoffix Znet)!

Issues with modules of a specific author

If you are a Perl 6 module author, or if you want to find out which modules of an author currently have issues, you can now easily get a list: e.g. the list for Zoffix Znet can be seen at modules.perl6.org/todo/zoffix. Please substitute the name you want at the appropriate place. Or go to modules.perl6.org/todo if you want to see them all!

Perl 6 on Exercism

A Perl 6 track has been opened on Exercism, the place where you can level up your programming skills, especially if you are a (Perl 6) newbie! Personally, I really like the Exercism tagline:

write code like it’s prose

It shows an appreciation for the art of programming that is often seen missing in business.

400 Years of Perl 6 in Oslo

Damian Conway will be giving a freely-accessible presentation of his “400 Years of Perl 6” talk this Wednesday in Oslo, Norway. Highly recommended!

Core Developments

  • Zoffix Znet continued working on the IO Grant, which is now nearing completion: among other things done, IO::Handle.words now accepts a $limit positional parameter. He also made Promise and Promise.then more subclass friendly. Finally, prompt can now be called without any parameters.
  • Elizabeth Mattijsen did a lot of work on Sets, Bags and Mixes and various set operators again, making some operations between 1.1x and 50x faster. She also added support for Setty.pickpairs, which was somehow forgotten so far.
  • In preparation for the release, there were only a few more fixes and improvements this week.

Other Blog Posts

Meanwhile on Twitter

Meanwhile on StackOverflow

Ecosystem Additions

Winding Down

Didn’t think after last week’s Perl 6 Weekly that this week’s would be quite this large again. Perhaps I should start to schedule a whole day to write the Perl 6 Weekly in the future. Let’s see. Check in again next week for more Perl 6 news!

2017.20 Crossing The Alps

Four days of continuous hacking on the future of Perl. Whether that be Perl 5 or Perl 6. That was what the Perl Toolchain Summit was about. Thanks to the sponsors, 36 developers worked on the Perl Toolchain: from fixing bugs and security issues on PAUSE, adding features to MetaCPAN and CPAN Testers to integrating the Perl 6 Ecosystem into the Perl toolchain. Yes, you can now upload your Perl 6 module to CPAN using Shoichi Kaji‘s mi6, and install it using Nick Logan‘s zef. And that all without interfering with the indexing and testing of Perl 5 modules. We’re also very close to being able to submit results of Perl 6 module testing as CPAN Testers smoke reports!

Stefan Seifert describes it very well in his first blog post ever. For yours truly it felt that finally the ideas that had circulated almost 5 years before at the Perl Reunification Summit, had finally come to fruition.

By the way, there is also a complete list of results of the 2017 Perl Toolchain Summit. Currently visible changes to Rakudo Perl 6 itself are:

  • perl6 -V output now contains more information and is sorted for better optical searchability. It also includes any information from the new System::Info module if that module is installed.
  • Compiler.verbose-config now returns a two-layer Hash, which allows easy lookup of particular values. This Hash however stringifies to perl6 -V output.
  • $*KERNEL now has an .archname method, for integration with CPAN-Testers.
  • VM.osname is now a quick way to get at the identifier name of the Operating System under which the backend was configured, similar to $^O in Perl 5.

Speeding up Perl 6 Development

Jonathan Worthington is looking for further funding of his excellent work on Rakudo Perl 6 and the MoarVM backend. As he states:

Making MoarVM run Perl 6 faster means working on the dynamic optimizer, which needs a good deal of care to avoid doing the wrong thing really fast. And driving forward the design and implementation of Perl 6’s concurrent and parallel features also requires careful consideration.

Please check out the details of the proposal in his blogpost: if the company you’re working for wants to be serious about supporting Perl 6 development, this is an easy and low-threshold way to do it! Please have a look at his latest grant report to get an idea about the quality and scope of the work that Jonathan does!

Perl Events Photostream

At the Perl Toolchain Summit Lee Johnson started a Perl Events Photostream. It’s good to see the Camel and Camelia living together side by side!

Other Blog Posts

The End Of An Era

For over 6 years, panda has been the de-facto module installer on Rakudo Perl 6. But it seems to be that all good things must come to an end. In the past 2 years, panda started to fall behind the new shiny zef. At the Perl Toolchain Summit, Tadeusz Sośnierz (tadzik) marked the project, that he started in 2011 in the very early days of Rakudo Perl 6 and worked on for so long, as deprecated. We all owe a lot to tadzik and all the other contributors, such as Tobias Leich, Moritz Lenz and Stefan Seifert for their work on panda. So I think a big Thank You! is in order.

It’s at moments like these that it is hardest to realize that many times it is about the journey, not about reaching the goal!

Other Core Developments

  • Zoffix Znet did a tremendous amount of work for the IO grant again. Apart from that he also fixed testing with Junctions.
  • Samantha McVey fixed +> (aka right bit shift) for Ints.
  • Elizabeth Mattijsen worked on Bags and Mixes: some efficiency improvements and some bug fixes needed because of earlier efficiency improvements.
  • First time contributor eater submitted a Pull Request to add a .ready method to Proc::Async, which was accepted after some tuning.

Meanwhile on Twitter

Meanwhile on FaceBook

  • Jeffrey Goff:

    The OSCON Perl 6 tutorial seemed to go well yesterday, now that I’ve had some time to reflect on it, and a bit of unknotting at the party, not to mention a few chances to exercise my rusty Mandarin Chinese. People were actively participating, doing exercises and I caught a few people even typing in code from random slides in disbelief, “does that really work?”

  • H. Merijn Brandt:

    Text::CSV now also successfully uploaded to the Perl 6 section on CPAN!

  • Jonathan Stowe:

    Quick heads-up if you happen to be using, or planning to use, Pg::Notify. I discovered an annoying flaw that prevents it from listening for more than one notification on the same database connection, I’m pretty certain no-one has tried this as I haven’t had a bug report with a rather upsetting memory dump and stacktrace 🙂

    If you need to have more than one instance of Pg::Notify in your application you *must* open a new DBIish connection to the database for each one for the time being. Not doing so cause BOOM!

Ecosystem Additions

I think this is a new record for number of new modules in a week!

Winding Down

It’s hard to wind down after such an intense week. Pretty sure there will be more exciting things to report next week. So, until then!