This week in PSC (138) | 2024-02-28
Back to the usual three of us
Further chats on allowing a subsequent
use VERSIONof the same value as is already prevailingWe continued going through the bug list to tag release blockers
Back to the usual three of us
Further chats on allowing a subsequent use VERSION of the same value as is already prevailing
We continued going through the bug list to tag release blockers
These are some answers to the Week 276, Task 1, of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on July 7, 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.
You are given an array of integers, @hours.
Write a script to return the number of pairs that forms a complete day.
A complete day is defined as a time duration that is an exact multiple of 24 hours.
Example 1
Input: @hours = (12, 12, 30, 24, 24)
Output: 2
Pair 1: (12, 12)
Pair 2: (24, 24)
Example 2
Get ready for a night of code, community, and culinary delights at the TPRF Sponsored Dinner during FOSDEM! 🍽️✨ Join us on Saturday, February 3rd, for a three-course feast and vibrant conversations.
📅 When: Saturday February 3rd, evening
📍 Where: Bruxelles
🎉 What's Cooking: An unforgettable evening filled with tech talks, networking, and delicious bites!
🤩 How to Join:
RSVP now by filling in this form below and secure your spot! Let's make this dinner a celebration of code and camaraderie.
February 08, 6pm CT ~ Houston Perl Mongers Zoom Meeting 🔗 Thu Jan 25 2024
Title: Using Perl Prototypes
When: Thur February 8th at 6:00-8:00 PM CT (+6 UTC)
Where: (virtual, see below):
https://us02web.zoom.us/j/920069702
Meeting ID: 920 069 702
Password can be found by running this statement.
perl -e 'print +(0b1000100).((3<<2)*10).(010)."\n"' # 681208
Original post:
https://houstonperlmongers.org/posts/3a99ac5b-f9f9-4409-a38c-e9ef91d972c8
Paul was away this week.
These are some answers to the Week 254, Task 1, of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on February 4, 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.
You are given a positive integer, $n.
Write a script to return true if the given integer is a power of three otherwise return false.
Example 1
Input: $n = 27
Output: true
27 = 3 ^ 3
Example 2
2023 was a rather productive year for me on CPAN. Aided by taking some time off I managed to release a whopping 18 new modules.
Half of my new modules were related to my password framework Crypt::Passphrase. To be honest most of them are either small (± 100 LOC) glue two or three other pieces of code together. And then there was Crypt::HSM, a PKCS11 interface (to use cryptographic hardware without exposing cryptographic keys) that was probably more work (2600 LOC of XS) than the others combined.
Most of this was with the aim to add peppering support to Crypt::Passphrase, a subject extensive enough that I should probably dedicate a separate blogpost to it.
I missed last year but in 2024 I'm doing a dev release of Perl again. This time it is version 5.39.7.
And again, you can watch it live on Saturday 20th of January on Twitch.
These are some answers to the Week 275, Task 2, of the Perl Weekly Challenge organized by Mohammad S. Anwar.
You are given an alphanumeric string, $str, where each character is either a letter or a digit.
Write a script to replace each digit in the given string with the value of the previous letter plus (digit) places.
Example 1
Input: $str = 'a1c1e1'
Ouput: 'abcdef'
shift('a', 1) => 'b'
shift('c', 1) => 'd'
shift('e', 1) => 'f'
Example 2
Well, not actually wrong, just slow. But the exaggeration makes a punchier headline, you’ll admit.
This comes up when an interface takes a pattern to match things against. Sometimes you have some reason to want this match to always fail, so you want to pass a pattern which will never match. The customary way of doing this is to pass qr/(?!)/. There is a problem with that, though.
I’m not talking here about the fact that if possible, you really don’t want to pass an actual qr object. We’ve already covered that. It was a surprising enough discovery that I’ll take this opportunity to signal-boost that while we’re here, but this article is not about that.
We are happy to announce that Geizhals Preisvergleich supports the German Perl Workshop in 2024!
We’re given a grid with obstacles, we’re supposed to count all the reachable plots in the grid in a given number of steps (we can only move one plot at a time horizontally or vertically).
The sample input looks like this:
........... .....###.#. .###.##..#. ..#.#...#.. ....#.#.... .##..S####. .##..#...#. .......##.. .##.#.####. .##..##.##. ...........
where S is the starting position.
These are some answers to the Week 274, Task 1, of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on June 23, 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.
You are given a sentence, $sentance.
Write a script to convert the given sentence to Goat Latin, a made up language similar to Pig Latin.
Rules for Goat Latin:
1) If a word begins with a vowel ("a", "e", "i", "o", "u"), append "ma" to the end of the word. 2) If a word begins with consonant i.e. not a vowel, remove first letter and append it to the end then add "ma". 3) Add letter "a" to the end of first word in the sentence, "aa" to the second word, etc etc.
Example 1
We
We’re skipping next week due to Christmas, so next meeting should be on 2024-01-04
DBD::mysql has long provided the interface to connect to the MySQL database from Perl code. But as old as it is, it was implemented with some critical bugs that cannot simply be corrected without breaking mountains of existing code relying on those bugs. For this same reason, though DBD::MariaDB corrects these bugs, care must be taken when migrating existing code to avoid subtle breakage.
This blog post is far too short to explain Unicode and encodings like UTF-8; for anyone seeking a more solid grasp on the concepts, I recommend a read through The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) by Joel Spolsky.
My next dev article about the important concept of cognitive load of code and how to manage it.
These are some answers to the Week 273, Task 2, of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on June 16, 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.
You are given a string, $str.
Write a script to return true if there is at least one b, and no a appears after the first b.
Example 1
Input: $str = "aabb"
Output: true
Example 2
Input: $str = "abab"
Output: false
Example 3
Input: $str = "aaa"
Output: false
This week, the three of us:
use VERSION restrictions have had mostly positive responsesData::Printer can’t go in core as-is, but there’s a use case for a debugging helper, some of which might be hidden in D:P’s corebuiltin::numify function (and the corresponding OP in core)I am very pleased to announce that the 2024 Perl & Raku Conference Planning Committee (TPRC) is moving forward with the addition of a new track that targets academic, governmental, and industrial STEM applications. It will strive to be organized as a traditional science conference track; meaning the talks will be based on paper and poster submissions. (more on this in a future announcement!)
The decision by the TPRC Planning Committee is the result of an overwhelmingly positive response to the Science Track Survey that was held late in 2023. Everyone involved in organizing the survey deeply appreciates those who filled out the survey or shared it with others.
The track is being organized in tight cooperation with the TPRC, by the Science Perl Committee (SPC); a separately organized group of Perl and STEM enthusiasts that anyone of good will is welcome to join.
What to expect now: ...
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.