Progress Reports and Blog Posts

This week had some nice progress reports and blog posts again:

Swiss Perl Workshop 2015

The program of the Swiss Perl Workshop 2015 is online. Expect talks by Larry Wall, Jonathan Worthington, Carl Mäsak, vendethiel and John Haltiwanger. And of course a Perl 6 Hackathon! If you can’t make it to the YAPC:Europe, this is an excellent alternative!

Notable code changes

&?ROUTINE faster

Recently, Jonathan Worthington implemented &?ROUTINE , a Routine object describing the current routine / method. This however created a noticeable slowdown in rakudo execution: by making this properly lazy, the runtime cost of &?ROUTINE existing, has been greatly reduced.

Recently, implemented , a Routine object describing the current routine / method. This however created a noticeable slowdown in rakudo execution: by making this properly lazy, the runtime cost of &?ROUTINE existing, has been greatly reduced. Lingering P5ism now warns

If you -use- a module in Perl 5, you need to return a true value at the end to indicate the compilation was successful. In Perl 6, no such thing is needed. However, if you cargo culted the 1; as the last line in a module to Perl 6, it would take that, even though it should technically warn as you were using a value in a sink context. Jonathan Worthington made sure it now does. This may mean that loading modules with this cargo-culted property will now warn on being loaded.

If you a module in Perl 5, you need to return a true value at the end to indicate the compilation was successful. In Perl 6, no such thing is needed. However, if you cargo culted the as the last line in a module to Perl 6, it would take that, even though it should technically warn as you were using a value in a sink context. made sure it now does. This may mean that loading modules with this cargo-culted property will now warn on being loaded. Introducing Index

Elizabeth Mattijsen introduced a new type, namely Index . This is an Int for all practical purposes, except that it is also True for 0 (and False only if undefined). This special value of Int is now returned by index() , rindex() , grep-index() , first-index() and last-index() . This means you can now say:

if "foo".index("f") -> $pos { say "pos = $pos" } # pos = 0

without having to write special code when the value returned would be 0. This should prevent the common pitfall in the use of these functions if the needle was found at position 0.

introduced a new type, namely . This is an Int for all practical purposes, except that it is True for (and False only if undefined). This special value of Int is now returned by , , , and . This means you can now say: without having to write special code when the value returned would be 0. This should prevent the common pitfall in the use of these functions if the needle was found at position 0. Socket.print instead of .send

Rob Hoelz noted that users may confuse the send method (which is just a Str-friendly wrapper over write) with send(2), which is subtly different from write(2). To avoid this confusion, and open up the possibility of a true send(2) analogue in the future, he deprecated Socket.send and made Socket.print.

Recent additions to the Ecosystem

Not too many this week, but still:

File::Which by Ahmad M. Zawawi

IO::Glob by Sterling Hanekamp