Juhuu, released Kephra 0.401 in the spirit release early - release often. It is the start of a complete rewrite. So it's back to zero: now it can only edit one file at a time and has only Perl highlighting and UTF-8 or ASCII encoding. But some of you will still want to use it (beside vi, emacs, VStudio or atom - I know) because of the comfort in basic editing it provides. The following article explains what I mean by that.
We briefly discussed conversion from C89 to C99. We think it's not really worth updating old code proactively, but definitely writing new code in modern style. If significant changes are being made within a function it might be worth updating the entire function to C99, but otherwise don't bother doing huge sweeping changes to entire files.
We talked about announcing the deprecation of smartmatch. We will work on wording for a new post and send that out soon, outlining our current plans.
Paul has a (draft) PR to add pluggable infix operators, but it still needs more additions before it's considered core-worthy
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on August 13, 2023 at 23:59). This blog post offers some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 2: Two out of Three
You are given three array of integers.
Write a script to return all the elements that are present in at least 2 out of 3 given arrays.
I was reading recently about some significant Python 3.11 performance improvements, and I was wondering whether Perl 5 still gets significant performance improvements on each version - even though it might be more mature, thus more optimized in the first place.
I thought I'd compare the final releases of alternating versions starting with 5.12.5 released 10 years ago, using a benchmark I made for a cloud vm comparison. As is the case with any benchmark, it might not be representative of your own workloads - it benchmarks things that are relevant to me and also some things that I would avoid, but are used by many modules and are notoriously slow (mainly DateTime and Moose). However, it is more representative of "real-life", with results that are not lost in noise, than say, PerlBench (which has a different purpose of course). Here is the list of the tested Perl releases:
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on August 13, 2023 at 23:59). This blog post offers some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 1: Lexicographic Order
You are given an array of strings.
Write a script to delete element which is not lexicographically sorted (forwards or backwards) and return the count of deletions.
Example 1
Input: @str = ("abc", "bce", "cae")
Output: 1
In the given array "cae" is the only element which is not lexicographically sorted.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on August 6, 2023 at 23:59). This blog post offers some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 2: Empty Array
You are given an array of integers in which all elements are unique.
Write a script to perform the following operations until the array is empty and return the total count of operations.
If the first element is the smallest then remove it otherwise move it to the end.
DBD::SQLite 1.71_07 (with SQLite 3.39.4) is a release candidate for the next stable DBD::SQLite. This release is mainly to address a security hole found in SQLite, plus a few performance issues for perl built with -DDEBUGGING. See Changes for other fixes and changes.
This time I'll wait for about a week and release 1.72 at the beginning of November if there's no blocker nor request to wait for more. Thank you for your patience.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on August 6, 2023 at 23:59). This blog post offers some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 1: Unique Sum
You are given an array of integers.
Write a script to find out the sum of unique elements in the given array.
Example 1
Input: @int = (2, 1, 3, 2)
Output: 4
In the given array we have 2 unique elements (1, 3).
we hold the Frankfurter Perl Workshop on the 06. November 2022 in Frankfurt am Main. This is mostly a German-language event, so I'll just repost the German announcement:
Hallo zusammen,
am Sonntag, dem 06. November 2022 veranstalten wir wieder den Frankfurter Perl Workshop. Der Workshop findet wie 2019 im Haus der Jugend statt.
Hey! I know, I know: long time, no blog. I would love to blame the pandemic, but the truth is, I just haven’t been inspired with any sufficiently Perl-y topics lately. Until recently, when I ran into this.
Now, once upon a time, I wrote a post about a small buglet I had encountered. The post presented the problem, then asked you if you saw the problem, then explained what was going on. So let’s do that again. First, the code:
sub generate_temp_file { state $TMPFILES = []; END { unlink @$TMPFILES } my $tmpfile = `script-which-generates-tempfile`; chomp $tmpfile; push @$TMPFILES, $tmpfile; return $tmpfile; }
As before, the actual code does a bit more, but I promise I’ve omitted nothing that’s relevant to the bug. Do you see it? If not, click to find out more.
Previously I showed parts of the API of my new module Graphics::Toolkit::Color. This time I want to mention some bits about the code base, which demonstrate what I tried to say long ago (sorry for the long delay i hope I can complete the series).
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on July 30, 2023 at 23:59). This blog post offers some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 2: Roman Maths
Write a script to handle a 2-term arithmetic operation expressed in Roman numeral.
We're trying out new ways to send out these regular announcements of what we get up to on the Perl Steering Council. This will be a regular posting that gives a brief summary of what we discussed in our weekly (or at least, near-weekly, give or take scheduling clashes) meetings.
Internals docs (such as perlguts, perlapi) could be done better, but it's unclear how. Some new documents might be useful, but there's a risk of spending too much time on obscure internal specifics that almost nobody will ever need to read about or touch.
Smartmatch deprecation continues. Philippe has sent patches to CPAN modules that may be affected. autodie still needs some further work.
(As alluded to by this very blog post) we discussed communication strategies for user-facing news announcements. Thoughts are to post here on blogs.perl.org and send links elsewhere - such as Twitter, Reddit, etc.. We don't have a good feel for where folks will find it, so we'll just have to adapt as we go.
The module_true branch which implements the RFC is now merged and will be default in use v5.38. This will mean you no longer need to remember that final 1; line at the end of your module file.