We devised a strategy to deal with smartmatch, starting with reverting its removal. A separate email with details will follow.
We spent too much time talking about putting the apostrophe package separator behind a feature. That too will be outlined in a separate email. A github issue will follow.
We want to revert the open undef patch, for a variety of reasons, such as breaking autodie. We decided the steps to handle this.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on September 22, 2024, at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 2: Valid Number
You are given a string, $str.
Write a script to find if it is a valid number.
Conditions for a valid number:
- An integer number followed by an optional exponent.
- A decimal number followed by an optional exponent.
- An integer number is defined with an optional sign '-' or '+' followed by digits.
Decimal Number:
A decimal number is defined with an optional sign '-' or '+' followed by one of the following definitions:
- Digits followed by a dot '.'.
- Digits followed by a dot '.' followed by digits.
- A dot '.' followed by digits.
The schedule for this year's London Perl & Raku Workshop is now visible: https://act.yapc.eu/lpw2024/schedule. Please please please (please please) make a point to mark those talks that you plan to attend as this will allow us to tweak the schedule a bit if some talks are more heavily favourited than others.
The venue opens for attendees at 9am and we plan to start talks at 9:30am. Drinks will be available throughout the day, hence no need to have dedicated breaks there. Lunch will be at midday for an hour, there are plenty of options close to the venue to grab something to eat. If we receive a couple more sponsors we can have lunch at the venue, but currently that won't be possible.
There are a couple of spots left for talks, otherwise the schedule is full. Please don't let this put you off submitting a talk as it's possible some speakers may have to change their plan.
We rehashed the Perl version number discussion from last meeting now that we are all present. We will put together a document with our thoughts on this.
We will create a GitHub issue to make apostrophe removal feature-guarded.
Smartmatch (not so surprisingly) turns out to be too big to fail. Given its unique history, we are considering options for how to proceed with it in a more gradual way without giving up on the deprecation.
Regarding open undef (GH #22490), we agreed that Perl should support undef as a value and not just as a literal for the filename (and warn for the useless modes)
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on September 8, 2024, at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 1: No Connection
You are given a list of routes, @routes.
Write a script to find the destination with no further outgoing connection.
Example 1
Input: @routes = (["B","C"], ["D","B"], ["C","A"])
Output: "A"
"D" -> "B" -> "C" -> "A".
"B" -> "C" -> "A".
"C" -> "A".
"A".
Yep, that's right - the first dozen talks have been accepted for this year's London Perl and Raku Workshop. This puts our schedule at approximately 50% full, so if you are thinking about talking at the workshop then submit your proposal now!
If you aren't thinking about talking then have a think about what you've been doing in the Perl and/or Raku space the last five years, or even just the general IT and development space. Perhaps there's something interesting you can talk about? If you don't feel it's a full fat talk then submit a lightning talk instead.
The London Perl and Raku Workshop will take place on 26th Oct 2024. Thanks to this year's sponsors, without whom LPW would not happen:
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on September 22, 2024, at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 1: Strong Password
You are given a string, $str.
Write a program to return the minimum number of steps required to make the given string very strong password. If it is already strong then return 0.
Criteria:
- It must have at least 6 characters.
- It must contain at least one lowercase letter, at least one upper case letter and at least one digit.
- It shouldn't contain 3 repeating characters in a row.
I created a function in Perl called pg_dt, that will convert PostgreSQL’s datetime values into Perl’s DateTime values and vice versa. This is useful both when you want to store DateTime values into the database, or want to convert the pg datetime/timestamp value from the database into a DateTime object value that Perl can use.
I really can’t seem to include code blocks in my posts on this platform (tried Preview with Markdown and Markdown With SmartyPants without success), so you can read the rest of this article on my blog.
The Dancer Core Team is happy to announce that Dancer2 1.1.1 is on its way to CPAN. This is a maintenance release that deals with the following issues:
[ BUG FIXES ]
* GH #1712: Fix use of send_as in templates (Andy Beverley)
[ DOCUMENTATION ]
* PR #1706: Document missing logging hooks and log format option;
fix typo in logging test (Jason A. Crome)
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on September 15, 2024, at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 2: Order Game
You are given an array of integers, @ints, whose length is a power of 2.
Write a script to play the order game (min and max) and return the last element.
Perl v5.40 introduced native true and false keywords. Unfortunately not all CPAN modules are ready to use them. One of those not yet ready is Mojo::Pg.
Normally you'd want to pass booleans to your queries as just 1's and 0's. However, since Mojo::JSON's true & false stringify to 1 and 0, my 5.38-using codebase is full of Mojo::Pg queries with Mojo::JSON's true and false as arguments.
This is a problem if I want to upgrade the perl interpreter of that project to Perl v5.40, because if I write "use v5.40;" in the file that contains those boolean keywords, Perl's builtin booleans will be used instead, which don't stringify to 1 and 0, but to 1 and the empty string, which can't be used by DBD::Pg in boolean fields and makes DBD::Pg throw an exception.
The solution I found was to subclass Mojo::Pg::Database, and wrap the query method, so that if Perl's builtin booleans are found, they are replaced in the query with native Pg booleans.
The source of the module and a lot more information can be found in my blogpost, here.
I have not been able to figure out how to run an async thread in the background while using a REPL like reply. The moment I run the main loop, it takes over the input from the REPL. Here's what a typical failed REPL session might look like.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on September 15, 2024, at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 1: Self Spammer
Write a program which outputs one word of its own script / source code at random. A word is anything between whitespace, including symbols.
Example 1
If the source code contains a line such as: 'open my $fh, "<", "ch-1.pl" or die;'
then the program would output each of the words { open, my, $fh,, "<",, "ch-1.pl", or, die; }
(along with other words in the source) with some positive probability.
Example 2
Technically 'print(" hello ");' is *not* an example program, because it does not
assign positive probability to the other two words in the script.
It will never display print(" or ");
All present, and this time the meeting actually ended on time.
We discussed the situation with the apostrophe package separator removal. We continue to keep an eye on things but it now feels close to inevitable that we will use a feature to disable it conditionally.
We briefly touched on the removal of smartmatch, where both the extent of the situation and our thoughts so far are much less clear.
Connected to all that, we discussed some general thoughts on how not to keep finding ourselves in the same situation with changes like this, but found we probably already have all the mechanisms we need.
We decided that the provisions of the PPC process are the right way for pre-PPC “Signature named parameters” to play out so it has now become PPC 0024 with status “Exploratory”.
We took another brief look at the closure memory leak which is now #22547 and resolved to prepare to put down a consensus next time we meet.
Yep, that's right - the second half dozen talks have been accepted for this year's London Perl and Raku Workshop. This puts our schedule at approximately 80% full, so if you are thinking about talking at the workshop then submit your proposal now!
The CFP will be closed at the end of September to give speakers sufficient time to finish their presentations and to allow the schedule to be created. We encourage all attendees to mark talks they are interested in as that will inform some of the schedule choices.
If you aren't thinking about talking then have a think about what you've been doing in the Perl and/or Raku space the last five years, or even just the general IT and development space. Perhaps there's something interesting you can talk about? If you don't feel it's a full fat talk then submit a lightning talk instead.
The London Perl and Raku Workshop will take place on 26th Oct 2024. Thanks to this year's sponsors, without whom LPW would not happen: