|
Perl Weekly
Issue #801 - 2026-11-30 - Call for online topics and speakers
latest | archive | edited by Gabor Szabo
|
|
|
Articles
|
|
|
by Lukas Mai (MAUKE)
The Damerau-Levenshtein edit distance between two strings is the minimum number of operations required to transform one string into the other.
|
|
A tiny command-line tool that lists the Islamic (Hijri) months with their Arabic names, number of days and a short note in your language, using the Hijri Calendar API from QuraniAPI
|
|
Discussion
|
Looking for some guidance here because I recently submitted something to PAUSE for the first time and am not clear what the next steps are. Would anyone be willing to discuss what's next with me?
|
|
Some good points in the response of brian d foy and others.
|
|
The Weekly Challenge
The Weekly Challenge by Mohammad Sajid Anwar will help you step out of your comfort-zone. You can even win prize money of $50 by participating in the weekly challenge. We pick one champion at the end of the month from among all of the contributors during the month, thanks to the sponsor Marc Perry.
|
by Mohammad Sajid Anwar (MANWAR)
Welcome to a new week with a couple of fun tasks "Letters Only Hex" and "Circular String Rotations". If you are new to the weekly challenge then why not join us and have fun every week. For more information, please read the FAQ.
|
|
|
by Mohammad Sajid Anwar (MANWAR)
Enjoy a quick recap of last week's contributions by Team PWC dealing with the "Fractional Addition Substraction" and "Reconstruct Digits" tasks in Perl and Raku. You will find plenty of solutions to keep you busy.
|
|
|
by Ali Moradi
This Perl code is very nice, and the code is clean, idiomatic, and full of thoughtful choices in the algorithm, such as the way of incremental GCD calculation that prevents integer overflows as well as the way of character elimination is very clever.
|
|
by Arne Sommer
Arne Sommer provides clear and idiomatic Raku-based code for Weekl Challenge #401. He applies built-in functions of Raku, including MAIN checking, Bag frequency counters, and nude fractions. His tutorial is supplemented by verbose switches, but the digit recovery loop has an issue since it uses an arbitrary order of extracting digits and skips zero division checks.
|
|
|
by Jaldhar H. Vyas
In this post, Jaldhar takes a neat and algorithm-based approach toward completing the fourth problem from the Weekly Challenge (PWC 401) using Raku and Perl languages. The solution to this problem makes use of cross-multiplication as well as the GCD concept when the problem requires performing calculations related to fractions. The second important point is about employing anchor characters as tools to represent some digits as words depending on the number of times they were used.
|
|
by Jorg Sommrey
The post takes a big rat evaluation via a regex-guarded approach with a J solution using J pipelines as solutions for TWC 401 Task 1. For Task 2, there is a discussion of the process from anagrams of regex and Set::Bag matching via a greedy approach to an ILP solution using GLPK.
|
|
by Luboš Kolouch
This TWC 401 write-up features clean and elegant Perl and Python implementations, all with O(N) time and O(1) space efficiency. The solution includes validation of runtime types and a means to mitigate overflow using math.gcd for reduction in Task 1, and also presents a clean, error-free solution that orders frequency deduction for Task 2.
|
|
by Matthias Muth
Matthias Muth's post provides excellent reasoning, useful letter frequency tables, and useful comparisons between a baseline implementation using Math::BigRat and one of his own that is much faster than the other. His explanation of the digit reconstruction walks through why the order of extraction prevents stealing from other "letters" using frequency counts rather than string mutation.
|
|
by Packy Anderson (PACKY)
Weeks Challenge #401 benefits significantly from Packy's engaging presence and effective modular decomposition. He compares solutions implemented in Perl, Elixir, and Python while capitalising on each of these languages unique qualities: for example, named captures in Perl, a better way to handle a gcd equal to zero, and maps with Enum.reduce in Elixir. The parse-combine-simplify structure is a big help with being able to walk through each example and solution.
|
|
|
by Reinier Maliepaard
This implementation in Perl cleanly utilises the Math::BigRat module to provide accurate rational arithmetic, and handles leading sign normalization, without having to perform any GCD calculation or bookkeeping for the purpose of avoiding overflows. It is very clean, and the tracing output makes it easy to examine each step.
|
|
by Reinier Maliepaard
This Perl solution breaks up the task cleanly into distinct helper functions and uses an ordered approach for elimination that ensures the validation of character availability and the leftover characters during the process. The code is self-explanatory and very simple to read since it includes all the input validations with appropriate error handling.
|
|
by Roger Bell West (FIREDRAKE)
Roger pens an astute, realistic polyglot review of Weekly Challenge #401 where he couples together a hand-written Perl state machine parser along with the Local::Rational class. All of this ties in nicely together with a Counter-style multiset to identify the digits in the puzzle.
|
|
by Simon Green (SGREEN)
Simon delivers a very clean and easily readable Python-to-Perl solution for Weekly Challenge #401 that makes use of fractions. Fraction, and Number::Fraction to ensure exact arithmetic and a multistep unique letter peeling technique to reconstruct the digits.
|
|
|
Videos
|
|
|
Weekly collections
|
|
|
Events
|
|
|
|
|
|
|
|
|
|
|
You know, you could get the Perl Weekly right in your mailbox. Every Week. Free of charge!
|