MESSAGE
| DATE | 2026-04-13 |
| FROM | Gabor Szabo
|
| SUBJECT | Subject: [Hangout - NYLXS] [Perlweekly] #768 - Perl and XS
|
From hangout-bounces-at-nylxs.com Mon Apr 13 06:18:57 2026 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www2.mrbrklyn.com (www2.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id B60791640F2; Mon, 13 Apr 2026 06:18:54 -0400 (EDT) X-Original-To: hangout-at-www2.mrbrklyn.com Delivered-To: hangout-at-www2.mrbrklyn.com Received: by mrbrklyn.com (Postfix, from userid 1000) id EA5E41640E8; Mon, 13 Apr 2026 06:18:50 -0400 (EDT) Resent-From: Ruben Safir Resent-Date: Mon, 13 Apr 2026 06:18:50 -0400 Resent-Message-ID: <20260413101850.GA25862-at-www2.mrbrklyn.com> Resent-To: hangout-at-mrbrklyn.com X-Original-To: ruben-at-mrbrklyn.com Delivered-To: ruben-at-mrbrklyn.com Received: from s.wfbtzbpn.outbound-mail.sendgrid.net (s.wfbtzbpn.outbound-mail.sendgrid.net [159.183.235.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mrbrklyn.com (Postfix) with ESMTPS id BD6F41640E7 for ; Mon, 13 Apr 2026 04:44:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szabgab.com; h=content-type:date:from:mime-version:subject:to:cc:content-type:date: from:subject:to; s=s1; t=1776069888; bh=Z0jP6MrPYeMkQsENW7gbglu7tu1xDTuhjArguU/At+k=; b=H7UWvSAm7sPXhC9cA0P4QesphzIfEcI/wKCu8fzP0jyJZGF0qpoIOaQ+63AZDt8Eh5rY ofbo53cfMXxnYXqLtrovDw5v/ULScPCbbW0wxSzyoncNVcFsiatQ7fNUnJAZA7SNHodWp3 L7G40Ds+YGQ83vFTGZ1cbLi+o8bB6kP//DwSyA6wjMZda80WDJbQRIqqaogIlEqrP3b5xB uRXn9G50b2q6qeSlm8meDinABfCxnJl+w+UuNqbkpc2PVKcGu7nZzXSG5Xr2fI1jDSCsIM Y6auniUNp23K9DGHaXawEIpqvmG6xr1ojNwqVHdcV3paTVZXIKtMjwie32+yiKlQ== Received: by recvd-78d9866fff-nkqf8 with SMTP id recvd-78d9866fff-nkqf8-1-69DCAD00-2D 2026-04-13 08:44:48.704306342 +0000 UTC m=+262921.560967907 Received: from MjA0MzMyMDc (unknown) by geopod-ismtpd-1 (SG) with HTTP id -yveEQgBSnikpQrnGYYT5A Mon, 13 Apr 2026 08:44:48.669 +0000 (UTC) Date: Mon, 13 Apr 2026 08:44:48 +0000 (UTC) From: Gabor Szabo Mime-Version: 1.0 Message-ID: <-yveEQgBSnikpQrnGYYT5A-at-geopod-ismtpd-1> X-SG-EID: =?us-ascii?Q?u001=2EfEeT3imdomNYTgM3CPMr=2F5Dkst8c96g=2FUCTCSTQhFzPFq1p+hf5OYWVNg?= =?us-ascii?Q?tIP=2F6Aprn3+QPbZ1hiuiyOn3eqfuz+MfgfnzZMF?= =?us-ascii?Q?OXDacFa2UbW5debE382RvNAbVLUijvnpHxnYKmz?= =?us-ascii?Q?Los8lpi19=2Fr+rHMI4LAvNlVQ=2FhoG0TU=2Fxcr9n7d?= =?us-ascii?Q?hhylRFbdAqxvk3uos9W6UE6VL2x6iXwJuVItLAq?= =?us-ascii?Q?g=3D=3D?= To: ruben-at-mrbrklyn.com X-Entity-ID: u001.JvYq+PmxR+Jk4HAvLs9YyA== Subject: [Hangout - NYLXS] [Perlweekly] #768 - Perl and XS X-BeenThere: hangout-at-nylxs.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: NYLXS Tech Talk and Politics List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2096022046==" Errors-To: hangout-bounces-at-nylxs.com Sender: "Hangout"
--===============2096022046== Content-Type: multipart/alternative; boundary=744ae79fe5646e7a2076bedfd5385db97b1434728247a626d5d5166a6241
--744ae79fe5646e7a2076bedfd5385db97b1434728247a626d5d5166a6241 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0
Perl Weekly=20
https://perlweekly.com/
You can read the newsletter on the web, if you prefer. https://perlweekly.com/archive/768.html
Hi there,
Nearly a year ago, Robert Acock shared a complete tutorial, Learning XS ( https://dev.to/lnation/learning-perl-xs-how-to-create-an-object-24lj ). I promised myself that one day I would go through the tutorials start to finish in one go without interruptions, but life had other plans. A couple of days ago, Robert, added one more post to the series: Custom Ops ( https://dev.to/lnation/learning-xs-custom-ops-4lag ). It made me realise how far behind I am. Time management is something, I need to learn, and learn quickly, before it is too late. My upcoming book on DBIx::Class is also on hold after I finished the first draft. Well, in this case, I have a perfect excuse. While I was working on the book, someone dropped the idea of making DBIx::Class operations asynchronous. The idea blew me away for quite a while and resulted in a CPAN module: DBIx::Class::Async ( https://metacpan.org/pod/DBIx::Class::Async ). I am happy with the end result, but it delayed the book and I am yet to start on it again. So what else is keeping me busy now? Well I just published my first mobile app for Android device: The Weekly Challenge ( https://play.google.com/store/apps/details?id=3Dorg.theweeklychallenge.app = ). For those who don't know, this is my pet project started seven years ago where I throw out two challenges every Monday and members solve them in Perl, Raku and many other programming languages. So the real question is: finish the book on DBIx::Class or Learn XS?
I noticed, Robert, published a handful of Perl modules to CPAN with a flavour of XS. You can find the list on MetaCPAN ( https://metacpan.org/author/LNATION ). Now to understand the workings of these modules, I need XS knowledge. This is going on my TODO list for the time being. If you have the time and energy, I would highly recommend the tutorial.
For the first time in a long while, I saw so many new Perl modules published to CPAN back to back. Nearly every module deserves a closer look. For example, WebService::Bugzilla ( https://metacpan.org/dist/WebService-Bugzilla ), SimpleMock ( https://metacpan.org/dist/SimpleMock ), LRU::Cache ( https://metacpan.org/dist/LRU-Cache ) and many more. If you don't want to miss the fun then watch this MetaCPAN page ( https://metacpan.org/recent ) regularly.
The latest monthly newsletter ( https://perlhacks.com/2026/04/summarising-a-month-of-git-activity-with-perl -and-a-little-help-from-ai/ ) of Dave Cross was fun to read as always. I am not an AI fan yet but this is interesting.
I am sure you have plenty to read this week in the newsletter, so enjoy!!
-- Your editor: Mohammad Sajid Anwar.
Articles
=20 Summarising a Month of Git Activity with Perl (and a Little Help from AI) https://perlhacks.com/2026/04/summarising-a-month-of-git-activity-with-pe= rl-and-a-little-help-from-ai/ =20 Newsletter from Dave to keep you busy and entertain. --------------
=20 CPAN Dependencies, static and dynamic https://blogs.perl.org/users/grinnz/2026/04/cpan-dependencies-static-and-= dynamic.html =20 Dependencies or prerequisites are an integral feature of the CPAN softwar= e repository. They define what other CPAN modules are required for a particular CPAN distribution to be built, tested, or ultimately to function, as well as optionally to improve or add functionality. --------------
=20 Quick and dirty string dumping https://blogs.perl.org/users/mauke/2026/04/quick-and-dirty-string-dumping= .html =20 Sometimes, when you're trying to debug encoding issues in Perl code, it i= s useful to quickly get an idea of what code points Perl thinks are in your string. Explore the different ways to look at the encoding issues. --------------
=20 Evolution strategy for SQL::Abstract::More : call for feedback https://blogs.perl.org/users/dami/2026/04/evolution-strategy-for-sqlabstr= actmore-call-for-feedback.html =20 I am going to watch this closely. Unfortunately no time to give constructive feedback right now. If you have then please do share with him. --------------
=20 575 Pull Requests in Three Weeks: What Happens When AI Meets CPAN Mainten= ance https://blogs.perl.org/users/todd_rinaldo/2026/04/575-pull-requests-in-th= ree-weeks-what-happens-when-ai-meets-cpan-maintenance.html =20 This is not for faint heart. Have a coffee before you start reading this post. I find it very engaging and informative. --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Discussion
=20 How you too can improve Perl 5 https://blogs.perl.org/users/karl_williamson1/2026/04/how-you-too-can-imp= rove-perl-5.html =20 This is interesting and handy for anyone wants to contribute the core Per= l. The post gives a detailed instructions how to. This is the best so far I have come across inviting first timer to join the team, --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
CPAN
=20 Net::Nostr https://metacpan.org/pod/Net::Nostr =20 The Net::Nostr module is a clean, idiomatic Perl module for communicating with and performing tasks that comply with the Nostr Protocol. Net::Nostr abstracts away many of the complexities associated with signing events, relaying data, and converting between different formats. This technical assessment describes how modular design can successfully use Schnorr signatures as well as other advanced signature types when creating decentralised social networks using Perl. Developing applications based on the decentralised social space will only be possible if you can successfully communicate and implement these functions within your program. --------------
=20 LRU::Cache https://dev.to/lnationorg/lrucache-a-fast-least-recently-used-cache-for-p= erl-42de =20 Robert presents LRU::Cache, a high-performance cache for Perl written in = XS that achieves O(1) performance on the caching layer for Perl. Using an OP-optimised functional API that avoids method dispatch for the standard Perl OOP model; this module is capable of achieving 5-20 x faster than pure Perl alternative caches, making it an ideal choice for your performance-critical applications. --------------
=20 Net::BART https://metacpan.org/dist/Net-BART =20 Net::BART offers both IPv4 and IPv6 routing using Balanced Routing Tables (BART). By implementing two layers of routing tables, one in pure Perl and one using C/XS, Net::BART achieves a high level of performance. Net::BART has great technical value for developers looking for fast routing lookups, offering efficient Longest Prefix Match (LPM) calculations and sparse array handling capabilities. --------------
=20 Heap::PQ https://dev.to/lnationorg/heappq-a-binary-heap-priority-queue-implementat= ion-for-perl-p7o =20 Priority Queue is a top performing C extension for binary Heaps written i= n Perl and can outperform pure Perl by an astonishing 55 times.=C2=A0The pu= rpose of this article is to document the features of Heap's Priority Queue: Versatile APIs (procedural functional as well as traditional OO) and specialised NV Heaps that minimise the overhead of SV creation/maintenance and increase the throughput of C doubles (represented as raw C doubles). --------------
=20 DateTime::Lite https://metacpan.org/pod/DateTime::Lite =20 The DateTime::Lite library offers a lightweight technical alternative to the standard DateTime library while still providing a drop-in API replacement. The use of one SQLite database file instead of hundreds of timezone files, along with a three-level memory cache, significantly improves startup performance and throughput making it a desirable solution for both high-concurrency micro-services and low-memory constrained environments. --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
The Weekly Challenge The Weekly Challenge ( https://theweeklychallenge.org ) by Mohammad Sajid Anwar ( https://manwar.org ) 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 Lance Wicks. =20 The Weekly Challenge - 369 https://theweeklychallenge.org/blog/perl-weekly-challenge-369 =20 Welcome to a new week with a couple of fun tasks "Valid Tag" and "Group Division". 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 ( https://theweeklychallenge.org/faq ). --------------
=20 RECAP - The Weekly Challenge - 368 https://theweeklychallenge.org/blog/recap-challenge-368 =20 Enjoy a quick recap of last week's contributions by Team PWC dealing with the "Make it Bigger" and "Big and Little Omega" tasks in Perl and Raku. You will find plenty of solutions to keep you busy. --------------
=20 Perl Weekly Challenge 368: Make It Bigger https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-368-1.html =20 Abigail composed extensive analysis for each of the paradigms mentioned, which include advanced Perl regex arithmetic and multiple versions of the same generalised procedure used within related formats (Bash & C). An excellent example of this was modern Perl's character class arithmetic (?[ ]) as an extremely useful method of completing this challenge for multiple types of code. --------------
=20 Perl Weekly Challenge 368: Small and Big Omega https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-368-2.html =20 This article examines how Abigail's method for finding prime factorisatio= n avoids the overhead of running a primality test, using a single loop to increment both the 'small omega' and 'big omega' counts while performing a single optimised division. The result is an efficient and mathematically elegant solution, combining mathematical reasoning and computational speed. --------------
=20 A Bigger Big https://raku-musings.com/bigger-big.html =20 The blog post shows a nice, straightforward technical solution for the "Bigger Big" challenge using Raku's strong functional programming capability such as combinations and map. The expressive syntax of the language allows for complex list manipulations to be reduced to easy-to-read one-liner logic with clear validation of logic using Raku's strong type system. --------------
=20 A Bigger Omega https://github.sommrey.de/the-bears-den/2026/04/12/ch-368.html =20 There is an algorithmically sound answer to the problem of how to maximis= e a number after removing digits, as well as a mathematically sophisticated generalisation of counting the number of prime factors using a variable, or flexible, exponent in the second problem. The Perl and J implementations of the two tasks demonstrate instructive examples of two original implementations: one with direct solvers that can use iterative loops, and one that uses functional programming concepts to achieve the same goals without the use of loops. --------------
=20 The Weekly Challenge 368 https://kolouch.net/perlweeklychallenge/blog-368.html =20 In an excellent blog post, Lubos compares the two programming languages Perl and Python. He explains how to solve complicated algorithms in both programming languages, while adhering to the idioms of each language. He provides extremely complete solutions to the algorithmic problems, using Perl's succinct use of regular expressions and arrays and Python's logical, clear, and concise syntax to provide a comprehensive and cross-platform tutorial on how to solve problems. --------------
=20 Perl Weekly Challenge 368 https://wlmb.github.io/2026/04/06/PWC368/ =20 This post stands out among other examples of technical excellence from W. Luis Moch=C3=A1n due to its very high level of Perl support and its extre= mely compact and elegant code for solving problems using minimal resources. I really enjoyed his clever use of the Math::Prime::Util module, which allows him to create an effective and concise one-liner for calculating prime factors, along with his very clever approach to optimizing string numbers by reading from left to right, which allows him to provide both concise code as well as a very efficient algorithm. --------------
=20 Big, Big and Little https://github.com/MatthiasMuth/perlweeklychallenge-club/tree/muthm-368/c= hallenge-368/matthias-muth#readme =20 This solution set demonstrates string manipulation using regular expressions (regex) and manipulate numbers efficiently (number theory). The idea of using conditional regex patterns to remove an optimal digit in Task 1 is clever, and using Math::Prime::Util and List::Util in Task 2 shows how simple it is to use Perl for a project or write production-quality scripts. Each solution is clearly explained, has a minimal amount of code, and follows a clear mathematical logic based on the problem statement. --------------
=20 And the 2013 Tony Award for Best Coding Challenge goes to=E2=80=A6 https://packy.dardan.com/b/n5 =20 The multi-language showcase provided by Packy demonstrates a great deal o= f skill when developing code solutions to week 368. The review emphasises how architecture can influence an elegant response to solve the challenge. By comparing the built-in indices and uniqueness of methods within Raku with the elaborate recursive solution used in Elixir, you will see an extensive technical competency of Packy based on various programming paradigms. --------------
=20 Bigger, big and little http://ccgi.campbellsmiths.force9.co.uk/challenge/368 =20 This note from Peter provides an outstandingly efficient method for solvi= ng Challenge 368, especially with regard to the "bits of conflict" analysis. The technical evaluation also features exceptional high-level mathematical intuition used in conjunction with using circular arithmetic to solve the problem of complex interval overlaps. Additionally, his Perl solutions are uniquely clean and optimized for speed. --------------
=20 The Weekly Challenge - 368: Make It Bigger https://reiniermaliepaard.nl/pwc/index.php?id=3Dpwc368-1 =20 This approach is very straightforward because the next step is to compare the digits/values created after removing both the first and the second occurrence of the target digit. Using the index to find each location of the digit and then using substr to create the candidate strings is efficient, and you can easily see this through its implementation. The use of input validation will give the code additional robustness because the validation checks that there was exactly two occurrences of the digit. The structure of the code will help support the intent of the algorithm, and the test cases will be able to show the expected outcome. --------------
=20 The Weekly Challenge - 368: Big and Little Omega https://reiniermaliepaard.nl/pwc/index.php?id=3Dpwc368-2 =20 This approach clearly distinguishes two omega functions by using Math::Prime::Util's factor_exp function, which returns all prime factorization as well as their respective exponents. The source code is extremely clear; it uses the number of exponent pairs (for little omega - count of distinct prime numbers) in conjunction with summing together all the exponent values (for big omega - total number of prime factors). There is also an explanation (for the math) in conjunction with the examples to make this both an educational and production-quality example. --------------
=20 The Weekly Challenge #368 https://hatley-software.blogspot.com/2026/04/robbie-hatleys-solutions-in-= perl-for_7.html =20 Robbie's work on Challenge 368 is an impressive example of a technical review that is mathematically precise; particularly in the Conflicting Events task where he treated time as a circular interval. His implementation of this task in Perl is also equally impressive because it solves the problem of certain events that cross midnight using highly accurate minute-normalization and very creative "wrap-around" logic for the solutions. This, along with an excellent defensive coding style, results in Robbie having created an excellent implementation of the task. --------------
=20 Omega is Bigger https://blog.firedrake.org/archive/2026/04/The_Weekly_Challenge_368__Omeg= a_is_Bigger.html =20 The post provides good versatility in different languages as well as impressive implementations of the string manipulation problem in both Perl and Raku utilising assignable substr for efficiency. The method for performing prime factorisation has been implemented in a very solid and organised manner, including a custom prime sieve and factoriser that successfully addresses both non-distinct and distinct numbers of prime factors; the Typst solution gives a readable and clear option for the initial problem. --------------
=20 Little, Big and Bigger https://dev.to/simongreennet/weekly-challenge-little-big-and-bigger-jpe =20 Simon provides practical method for creating easily-readable and dependab= le programs through clear examples of brute force and iterative algorithms. He has made the transition from using Python to using Perl (both programming languages) by keeping the original algorithms intact, to maximise the usability of these algorithms for the greatest number of programmers (regardless of computer programming expertise). --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Rakudo
=20 2026.14 Trim Flip-flops https://rakudoweekly.blog/2026/04/06/2026-14-trim-flip-flops/ =20 =20 --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Weekly collections
=20 NICEPERL's lists http://niceperl.blogspot.com/ =20 Great CPAN modules released last week ( https://niceperl.blogspot.com/2026/04/dxcv-13-great-cpan-modules-released .html ). --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Events
=20 Boston Perl Mongers virtual monthly https://boston.pm.org/ =20 April 14, 2026 --------------
=20 Perl Maven online: Testing in Perl - part 4 https://luma.com/perl-maven =20 April 16, 2026 --------------
=20 Perl Toolchain Summit 2026 https://www.perl.com/article/announcing-the-perl-toolchain-summit-2026/ =20 April 23-26, 2026 --------------
=20 The Perl and Raku Conference 2026 https://tprc.us/tprc-2026-gsp/ =20 June 26-29, 2026, Greenville, SC, USA --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
You joined the Perl Weekly to get weekly e-mails about the Perl programming= language and related topics.
Want to see more? See the archives ( https://perlweekly.com/archive/ ) of a= ll the issues.
Reading this as a non-subscriber? Join us free of charge. https://perlweekl= y.com/
(C) Copyright Gabor Szabo https://szabgab.com/ The articles are copyright the respective authors.
You can freely redistribute this message if you keep the whole message intact, including the Copyright notice and this text.
If you don't want to receive mails any more you can unsubscribe here: https://perlweekly.com/unsubscribe.html
--744ae79fe5646e7a2076bedfd5385db97b1434728247a626d5d5166a6241 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Mime-Version: 1.0
1.0, user-scalable=3Dyes"> Perl Weekly Issue #768 - 2026-04-13 - Perl and XS
color=3D"#ffffff">
background-color: #004065; color: #FFF; text-decoration: none; font-size: 40px; font-weight: bold; font-family: Gadget; =20 border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border: 1px solid #000; padding: 10px; ">Perl Weekly =20
style=3D"border-bottom: 1px solid #ccc; padding-bottom: 8px; font-size: 18px;"> Issue #768 - 2026-04-13 - Perl and XS
latest | https://perlweekly.com/archive">archive | edited by manwar.org/">Mohammad Sajid Anwar
=20 =20
=20
|
=20 Hi there,
=20 Nearly a year ago, Robert Acock shared a complete = tutorial, an-object-24lj">Learning XS. I promised myself that one day I would go = through the tutorials start to finish in one go without interruptions, but = life had other plans. A couple of days ago, Robert, added = one more post to the series: custom-ops-4lag">Custom Ops. It made me realise how far behind I am. Ti= me management is something, I need to learn, and learn quickly, before it i= s too late. My upcoming book on DBIx::Class is also on hol= d after I finished the first draft. Well, in this case, I have a perfect ex= cuse. While I was working on the book, someone dropped the idea of making D= BIx::Class operations asynchronous. The idea blew me away for quite a while= and resulted in a CPAN module: lass::Async">DBIx::Class::Async. I am happy with the end result, but it= delayed the book and I am yet to start on it again. So what else is keepin= g me busy now? Well I just published my first mobile app for Android device= : hallenge.app">The Weekly Challenge. For those who don't know, this is m= y pet project started seven years ago where I throw out two challenges ever= y Monday and members solve them in Perl, Raku and many other programming la= nguages. So the real question is: finish the book on DBIx::Class or Learn X= S?
=20 I noticed, Robert, published a handful of Perl mod= ules to CPAN with a flavour of XS. You can find the list on s://metacpan.org/author/LNATION">MetaCPAN. Now to understand the workin= gs of these modules, I need XS knowledge. This is going on my TODO list for= the time being. If you have the time and energy, I would highly recommend = the tutorial.
=20 For the first time in a long while, I saw so many new Perl modules = published to CPAN back to back. Nearly every module deserves a closer look.= For example, Web= Service::Bugzilla, Sim= pleMock, LRU::Cache= and many more. If you don't want to miss the fun then watch this =3D"https://metacpan.org/recent">MetaCPAN page regularly.
=20 The latest monthly sing-a-month-of-git-activity-with-perl-and-a-little-help-from-ai/">newslett= er of Dave Cross was fun to read as always. I am not a= n AI fan yet but this is interesting.
=20 I am sure you have plenty to read this week in the newsletter, so e= njoy!!
=20 Your editor: Mohammad Sajid Anwar.
| mg/mohammad_anwar.png" /> |
|
Articles =20 | =20 | m/img/dave_cross.png" title=3D"Dave Cross" width=3D"80" /> | =20 | =20 =20 | =20 =20 | =20 | m/img/laurent_dami.png" title=3D"Laurent Dami" width=3D"80" /> | =20 | =20 =20 | =20 =20
Discussion =20 | =20 =20 | =20 =20
CPAN =20 | =20 =20 > font-size: 18px; font-weight: bold; ">Net::Nostr =20 by Nicholas Hubbard =
The Net::Nostr module is a clean, idiomatic Perl module fo= r communicating with and performing tasks that comply with the Nostr Protoc= ol. Net::Nostr abstracts away many of the complexities associated with sign= ing events, relaying data, and converting between different formats. This t= echnical assessment describes how modular design can successfully use Schno= rr signatures as well as other advanced signature types when creating decen= tralised social networks using Perl. Developing applications based on the d= ecentralised social space will only be possible if you can successfully com= municate and implement these functions within your program.
=20 =20 | =20 | =20 =20 | =20 =20 | =20 =20 | =20 =20 > " font-size: 18px; font-weight: bold; ">DateTime::Lite =20 by Jacques Deguest (ttps://metacpan.org/author/JDEGUEST">JDEGUEST) =
The DateTime::Lite library offers a lightweight technical = alternative to the standard DateTime library while still providing a drop-i= n API replacement. The use of one SQLite database file instead of hundreds = of timezone files, along with a three-level memory cache, significantly imp= roves startup performance and throughput making it a desirable solution for= both high-concurrency micro-services and low-memory constrained environmen= ts.
=20 | m/img/jacques-deguest.jpeg" title=3D"Jacques Deguest" width=3D"80" /> | =20 | =20 =20
The Weekly Chall= enge =20 nge.org">The Weekly Challenge by Mohamma= d 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 o= ne champion at the end of the month from among all of the contributors duri= ng the month, thanks to the sponsor Lance Wicks. =20 | =20 | m/img/mohammad_anwar.png" title=3D"Mohammad Sajid Anwar" width=3D"80" /> | =20 | =20 | m/img/mohammad_anwar.png" title=3D"Mohammad Sajid Anwar" width=3D"80" /> | =20 | =20 =20 | =20 =20 | =20 =20 > =3D" font-size: 18px; font-weight: bold; ">A Bigger Big =20 by ings.com/">Arne Sommer
=3D"font-size: 16px"> The blog post shows a nice, straightforward technical solu= tion for the "Bigger Big" challenge using Raku's strong functional programm= ing capability such as combinations and map. The expressive syntax of the l= anguage allows for complex list manipulations to be reduced to easy-to-read= one-liner logic with clear validation of logic using Raku's strong type sy= stem. =20 | m/img/arne-sommer.jpeg" title=3D"Arne Sommer" width=3D"80" /> | =20 | =20 =20 > 2/ch-368.html" style=3D" font-size: 18px; font-weight: bold; ">A Bigger Omega =20 by ommrey.de/">Jorg Sommrey
e=3D"font-size: 16px"> There is an algorithmically sound answer to the problem of= how to maximise a number after removing digits, as well as a mathematicall= y sophisticated generalisation of counting the number of prime factors usin= g a variable, or flexible, exponent in the second problem. The Perl and J i= mplementations of the two tasks demonstrate instructive examples of two ori= ginal implementations: one with direct solvers that can use iterative loops= , and one that uses functional programming concepts to achieve the same goa= ls without the use of loops. =20 =20 | =20 | =20 =20 > html" style=3D" font-size: 18px; font-weight: bold; ">The Weekly Challenge 368 =20 by Lubos Kolouch =
In an excellent blog post, Lubos compares the two programm= ing languages Perl and Python. He explains how to solve complicated algorit= hms in both programming languages, while adhering to the idioms of each lan= guage. He provides extremely complete solutions to the algorithmic problems= , using Perl's succinct use of regular expressions and arrays and Python's = logical, clear, and concise syntax to provide a comprehensive and cross-pla= tform tutorial on how to solve problems.
=20 =20 | =20 | =20 =20 > =3D" font-size: 18px; font-weight: bold; ">Perl Weekly Challenge 368 =20 by hub.io/">W Luis Mochan
=3D"font-size: 16px"> This post stands out among other examples of technical exc= ellence from W. Luis Moch=C3=A1n due to its very high level of Perl support= and its extremely compact and elegant code for solving problems using mini= mal resources. I really enjoyed his clever use of the Math::Prime::Util mod= ule, which allows him to create an effective and concise one-liner for calc= ulating prime factors, along with his very clever approach to optimizing st= ring numbers by reading from left to right, which allows him to provide bot= h concise code as well as a very efficient algorithm. =20 | m/img/luis-mochan.jpeg" title=3D"W Luis Mochan" width=3D"80" /> | =20 | =20 =20 > ge-club/tree/muthm-368/challenge-368/matthias-muth#readme" style=3D" font-size: 18px; font-weight: bold; ">Big, Big and Little =20 by Matthias Muth =
This solution set demonstrates string manipulation using r= egular expressions (regex) and manipulate numbers efficiently (number theor= y). The idea of using conditional regex patterns to remove an optimal digit= in Task 1 is clever, and using Math::Prime::Util and List::Util in Task 2 = shows how simple it is to use Perl for a project or write production-qualit= y scripts. Each solution is clearly explained, has a minimal amount of code= , and follows a clear mathematical logic based on the problem statement.
=20 =20 | =20 | =20 | m/img/packy-anderson.jpeg" title=3D"Packy Anderson" width=3D"80" /> | =20 | =20 | m/img/peter-campbell-smith.png" title=3D"Peter Campbell Smith" width=3D"80"= /> | =20 | =20 =20 > wc368-1" style=3D" font-size: 18px; font-weight: bold; ">The Weekly Challenge - 368: Make It Bigger =20 by Reinier Maliepaard =
This approach is very straightforward because the next ste= p is to compare the digits/values created after removing both the first and= the second occurrence of the target digit. Using the index to find each lo= cation of the digit and then using substr to create the candidate strings i= s efficient, and you can easily see this through its implementation. The us= e of input validation will give the code additional robustness because the = validation checks that there was exactly two occurrences of the digit. The = structure of the code will help support the intent of the algorithm, and th= e test cases will be able to show the expected outcome.
=20 =20 | =20 | =20 =20 > wc368-2" style=3D" font-size: 18px; font-weight: bold; ">The Weekly Challenge - 368: Big and Little Omega =20 by Reinier Maliepaard =
This approach clearly distinguishes two omega functions by= using Math::Prime::Util's factor_exp function, which returns all prime fac= torization as well as their respective exponents. The source code is extrem= ely clear; it uses the number of exponent pairs (for little omega - count o= f distinct prime numbers) in conjunction with summing together all the expo= nent values (for big omega - total number of prime factors). There is also = an explanation (for the math) in conjunction with the examples to make this= both an educational and production-quality example.
=20 =20 | =20 | =20 =20 | =20 =20 | =20 | m/img/simon-green.png" title=3D"Simon Green" width=3D"80" /> | =20 | =20 =20
Rakudo =20 | =20 | m/img/elizabeth_mattijsen.png" title=3D"Elizabeth Mattijsen" width=3D"80" /= > | --===============2096022046== Content-Type: multipart/alternative; boundary=744ae79fe5646e7a2076bedfd5385db97b1434728247a626d5d5166a6241
--744ae79fe5646e7a2076bedfd5385db97b1434728247a626d5d5166a6241 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0
Perl Weekly=20
https://perlweekly.com/
You can read the newsletter on the web, if you prefer. https://perlweekly.com/archive/768.html
Hi there,
Nearly a year ago, Robert Acock shared a complete tutorial, Learning XS ( https://dev.to/lnation/learning-perl-xs-how-to-create-an-object-24lj ). I promised myself that one day I would go through the tutorials start to finish in one go without interruptions, but life had other plans. A couple of days ago, Robert, added one more post to the series: Custom Ops ( https://dev.to/lnation/learning-xs-custom-ops-4lag ). It made me realise how far behind I am. Time management is something, I need to learn, and learn quickly, before it is too late. My upcoming book on DBIx::Class is also on hold after I finished the first draft. Well, in this case, I have a perfect excuse. While I was working on the book, someone dropped the idea of making DBIx::Class operations asynchronous. The idea blew me away for quite a while and resulted in a CPAN module: DBIx::Class::Async ( https://metacpan.org/pod/DBIx::Class::Async ). I am happy with the end result, but it delayed the book and I am yet to start on it again. So what else is keeping me busy now? Well I just published my first mobile app for Android device: The Weekly Challenge ( https://play.google.com/store/apps/details?id=3Dorg.theweeklychallenge.app = ). For those who don't know, this is my pet project started seven years ago where I throw out two challenges every Monday and members solve them in Perl, Raku and many other programming languages. So the real question is: finish the book on DBIx::Class or Learn XS?
I noticed, Robert, published a handful of Perl modules to CPAN with a flavour of XS. You can find the list on MetaCPAN ( https://metacpan.org/author/LNATION ). Now to understand the workings of these modules, I need XS knowledge. This is going on my TODO list for the time being. If you have the time and energy, I would highly recommend the tutorial.
For the first time in a long while, I saw so many new Perl modules published to CPAN back to back. Nearly every module deserves a closer look. For example, WebService::Bugzilla ( https://metacpan.org/dist/WebService-Bugzilla ), SimpleMock ( https://metacpan.org/dist/SimpleMock ), LRU::Cache ( https://metacpan.org/dist/LRU-Cache ) and many more. If you don't want to miss the fun then watch this MetaCPAN page ( https://metacpan.org/recent ) regularly.
The latest monthly newsletter ( https://perlhacks.com/2026/04/summarising-a-month-of-git-activity-with-perl -and-a-little-help-from-ai/ ) of Dave Cross was fun to read as always. I am not an AI fan yet but this is interesting.
I am sure you have plenty to read this week in the newsletter, so enjoy!!
-- Your editor: Mohammad Sajid Anwar.
Articles
=20 Summarising a Month of Git Activity with Perl (and a Little Help from AI) https://perlhacks.com/2026/04/summarising-a-month-of-git-activity-with-pe= rl-and-a-little-help-from-ai/ =20 Newsletter from Dave to keep you busy and entertain. --------------
=20 CPAN Dependencies, static and dynamic https://blogs.perl.org/users/grinnz/2026/04/cpan-dependencies-static-and-= dynamic.html =20 Dependencies or prerequisites are an integral feature of the CPAN softwar= e repository. They define what other CPAN modules are required for a particular CPAN distribution to be built, tested, or ultimately to function, as well as optionally to improve or add functionality. --------------
=20 Quick and dirty string dumping https://blogs.perl.org/users/mauke/2026/04/quick-and-dirty-string-dumping= .html =20 Sometimes, when you're trying to debug encoding issues in Perl code, it i= s useful to quickly get an idea of what code points Perl thinks are in your string. Explore the different ways to look at the encoding issues. --------------
=20 Evolution strategy for SQL::Abstract::More : call for feedback https://blogs.perl.org/users/dami/2026/04/evolution-strategy-for-sqlabstr= actmore-call-for-feedback.html =20 I am going to watch this closely. Unfortunately no time to give constructive feedback right now. If you have then please do share with him. --------------
=20 575 Pull Requests in Three Weeks: What Happens When AI Meets CPAN Mainten= ance https://blogs.perl.org/users/todd_rinaldo/2026/04/575-pull-requests-in-th= ree-weeks-what-happens-when-ai-meets-cpan-maintenance.html =20 This is not for faint heart. Have a coffee before you start reading this post. I find it very engaging and informative. --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Discussion
=20 How you too can improve Perl 5 https://blogs.perl.org/users/karl_williamson1/2026/04/how-you-too-can-imp= rove-perl-5.html =20 This is interesting and handy for anyone wants to contribute the core Per= l. The post gives a detailed instructions how to. This is the best so far I have come across inviting first timer to join the team, --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
CPAN
=20 Net::Nostr https://metacpan.org/pod/Net::Nostr =20 The Net::Nostr module is a clean, idiomatic Perl module for communicating with and performing tasks that comply with the Nostr Protocol. Net::Nostr abstracts away many of the complexities associated with signing events, relaying data, and converting between different formats. This technical assessment describes how modular design can successfully use Schnorr signatures as well as other advanced signature types when creating decentralised social networks using Perl. Developing applications based on the decentralised social space will only be possible if you can successfully communicate and implement these functions within your program. --------------
=20 LRU::Cache https://dev.to/lnationorg/lrucache-a-fast-least-recently-used-cache-for-p= erl-42de =20 Robert presents LRU::Cache, a high-performance cache for Perl written in = XS that achieves O(1) performance on the caching layer for Perl. Using an OP-optimised functional API that avoids method dispatch for the standard Perl OOP model; this module is capable of achieving 5-20 x faster than pure Perl alternative caches, making it an ideal choice for your performance-critical applications. --------------
=20 Net::BART https://metacpan.org/dist/Net-BART =20 Net::BART offers both IPv4 and IPv6 routing using Balanced Routing Tables (BART). By implementing two layers of routing tables, one in pure Perl and one using C/XS, Net::BART achieves a high level of performance. Net::BART has great technical value for developers looking for fast routing lookups, offering efficient Longest Prefix Match (LPM) calculations and sparse array handling capabilities. --------------
=20 Heap::PQ https://dev.to/lnationorg/heappq-a-binary-heap-priority-queue-implementat= ion-for-perl-p7o =20 Priority Queue is a top performing C extension for binary Heaps written i= n Perl and can outperform pure Perl by an astonishing 55 times.=C2=A0The pu= rpose of this article is to document the features of Heap's Priority Queue: Versatile APIs (procedural functional as well as traditional OO) and specialised NV Heaps that minimise the overhead of SV creation/maintenance and increase the throughput of C doubles (represented as raw C doubles). --------------
=20 DateTime::Lite https://metacpan.org/pod/DateTime::Lite =20 The DateTime::Lite library offers a lightweight technical alternative to the standard DateTime library while still providing a drop-in API replacement. The use of one SQLite database file instead of hundreds of timezone files, along with a three-level memory cache, significantly improves startup performance and throughput making it a desirable solution for both high-concurrency micro-services and low-memory constrained environments. --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
The Weekly Challenge The Weekly Challenge ( https://theweeklychallenge.org ) by Mohammad Sajid Anwar ( https://manwar.org ) 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 Lance Wicks. =20 The Weekly Challenge - 369 https://theweeklychallenge.org/blog/perl-weekly-challenge-369 =20 Welcome to a new week with a couple of fun tasks "Valid Tag" and "Group Division". 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 ( https://theweeklychallenge.org/faq ). --------------
=20 RECAP - The Weekly Challenge - 368 https://theweeklychallenge.org/blog/recap-challenge-368 =20 Enjoy a quick recap of last week's contributions by Team PWC dealing with the "Make it Bigger" and "Big and Little Omega" tasks in Perl and Raku. You will find plenty of solutions to keep you busy. --------------
=20 Perl Weekly Challenge 368: Make It Bigger https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-368-1.html =20 Abigail composed extensive analysis for each of the paradigms mentioned, which include advanced Perl regex arithmetic and multiple versions of the same generalised procedure used within related formats (Bash & C). An excellent example of this was modern Perl's character class arithmetic (?[ ]) as an extremely useful method of completing this challenge for multiple types of code. --------------
=20 Perl Weekly Challenge 368: Small and Big Omega https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-368-2.html =20 This article examines how Abigail's method for finding prime factorisatio= n avoids the overhead of running a primality test, using a single loop to increment both the 'small omega' and 'big omega' counts while performing a single optimised division. The result is an efficient and mathematically elegant solution, combining mathematical reasoning and computational speed. --------------
=20 A Bigger Big https://raku-musings.com/bigger-big.html =20 The blog post shows a nice, straightforward technical solution for the "Bigger Big" challenge using Raku's strong functional programming capability such as combinations and map. The expressive syntax of the language allows for complex list manipulations to be reduced to easy-to-read one-liner logic with clear validation of logic using Raku's strong type system. --------------
=20 A Bigger Omega https://github.sommrey.de/the-bears-den/2026/04/12/ch-368.html =20 There is an algorithmically sound answer to the problem of how to maximis= e a number after removing digits, as well as a mathematically sophisticated generalisation of counting the number of prime factors using a variable, or flexible, exponent in the second problem. The Perl and J implementations of the two tasks demonstrate instructive examples of two original implementations: one with direct solvers that can use iterative loops, and one that uses functional programming concepts to achieve the same goals without the use of loops. --------------
=20 The Weekly Challenge 368 https://kolouch.net/perlweeklychallenge/blog-368.html =20 In an excellent blog post, Lubos compares the two programming languages Perl and Python. He explains how to solve complicated algorithms in both programming languages, while adhering to the idioms of each language. He provides extremely complete solutions to the algorithmic problems, using Perl's succinct use of regular expressions and arrays and Python's logical, clear, and concise syntax to provide a comprehensive and cross-platform tutorial on how to solve problems. --------------
=20 Perl Weekly Challenge 368 https://wlmb.github.io/2026/04/06/PWC368/ =20 This post stands out among other examples of technical excellence from W. Luis Moch=C3=A1n due to its very high level of Perl support and its extre= mely compact and elegant code for solving problems using minimal resources. I really enjoyed his clever use of the Math::Prime::Util module, which allows him to create an effective and concise one-liner for calculating prime factors, along with his very clever approach to optimizing string numbers by reading from left to right, which allows him to provide both concise code as well as a very efficient algorithm. --------------
=20 Big, Big and Little https://github.com/MatthiasMuth/perlweeklychallenge-club/tree/muthm-368/c= hallenge-368/matthias-muth#readme =20 This solution set demonstrates string manipulation using regular expressions (regex) and manipulate numbers efficiently (number theory). The idea of using conditional regex patterns to remove an optimal digit in Task 1 is clever, and using Math::Prime::Util and List::Util in Task 2 shows how simple it is to use Perl for a project or write production-quality scripts. Each solution is clearly explained, has a minimal amount of code, and follows a clear mathematical logic based on the problem statement. --------------
=20 And the 2013 Tony Award for Best Coding Challenge goes to=E2=80=A6 https://packy.dardan.com/b/n5 =20 The multi-language showcase provided by Packy demonstrates a great deal o= f skill when developing code solutions to week 368. The review emphasises how architecture can influence an elegant response to solve the challenge. By comparing the built-in indices and uniqueness of methods within Raku with the elaborate recursive solution used in Elixir, you will see an extensive technical competency of Packy based on various programming paradigms. --------------
=20 Bigger, big and little http://ccgi.campbellsmiths.force9.co.uk/challenge/368 =20 This note from Peter provides an outstandingly efficient method for solvi= ng Challenge 368, especially with regard to the "bits of conflict" analysis. The technical evaluation also features exceptional high-level mathematical intuition used in conjunction with using circular arithmetic to solve the problem of complex interval overlaps. Additionally, his Perl solutions are uniquely clean and optimized for speed. --------------
=20 The Weekly Challenge - 368: Make It Bigger https://reiniermaliepaard.nl/pwc/index.php?id=3Dpwc368-1 =20 This approach is very straightforward because the next step is to compare the digits/values created after removing both the first and the second occurrence of the target digit. Using the index to find each location of the digit and then using substr to create the candidate strings is efficient, and you can easily see this through its implementation. The use of input validation will give the code additional robustness because the validation checks that there was exactly two occurrences of the digit. The structure of the code will help support the intent of the algorithm, and the test cases will be able to show the expected outcome. --------------
=20 The Weekly Challenge - 368: Big and Little Omega https://reiniermaliepaard.nl/pwc/index.php?id=3Dpwc368-2 =20 This approach clearly distinguishes two omega functions by using Math::Prime::Util's factor_exp function, which returns all prime factorization as well as their respective exponents. The source code is extremely clear; it uses the number of exponent pairs (for little omega - count of distinct prime numbers) in conjunction with summing together all the exponent values (for big omega - total number of prime factors). There is also an explanation (for the math) in conjunction with the examples to make this both an educational and production-quality example. --------------
=20 The Weekly Challenge #368 https://hatley-software.blogspot.com/2026/04/robbie-hatleys-solutions-in-= perl-for_7.html =20 Robbie's work on Challenge 368 is an impressive example of a technical review that is mathematically precise; particularly in the Conflicting Events task where he treated time as a circular interval. His implementation of this task in Perl is also equally impressive because it solves the problem of certain events that cross midnight using highly accurate minute-normalization and very creative "wrap-around" logic for the solutions. This, along with an excellent defensive coding style, results in Robbie having created an excellent implementation of the task. --------------
=20 Omega is Bigger https://blog.firedrake.org/archive/2026/04/The_Weekly_Challenge_368__Omeg= a_is_Bigger.html =20 The post provides good versatility in different languages as well as impressive implementations of the string manipulation problem in both Perl and Raku utilising assignable substr for efficiency. The method for performing prime factorisation has been implemented in a very solid and organised manner, including a custom prime sieve and factoriser that successfully addresses both non-distinct and distinct numbers of prime factors; the Typst solution gives a readable and clear option for the initial problem. --------------
=20 Little, Big and Bigger https://dev.to/simongreennet/weekly-challenge-little-big-and-bigger-jpe =20 Simon provides practical method for creating easily-readable and dependab= le programs through clear examples of brute force and iterative algorithms. He has made the transition from using Python to using Perl (both programming languages) by keeping the original algorithms intact, to maximise the usability of these algorithms for the greatest number of programmers (regardless of computer programming expertise). --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Rakudo
=20 2026.14 Trim Flip-flops https://rakudoweekly.blog/2026/04/06/2026-14-trim-flip-flops/ =20 =20 --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Weekly collections
=20 NICEPERL's lists http://niceperl.blogspot.com/ =20 Great CPAN modules released last week ( https://niceperl.blogspot.com/2026/04/dxcv-13-great-cpan-modules-released .html ). --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Events
=20 Boston Perl Mongers virtual monthly https://boston.pm.org/ =20 April 14, 2026 --------------
=20 Perl Maven online: Testing in Perl - part 4 https://luma.com/perl-maven =20 April 16, 2026 --------------
=20 Perl Toolchain Summit 2026 https://www.perl.com/article/announcing-the-perl-toolchain-summit-2026/ =20 April 23-26, 2026 --------------
=20 The Perl and Raku Conference 2026 https://tprc.us/tprc-2026-gsp/ =20 June 26-29, 2026, Greenville, SC, USA --------------
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
You joined the Perl Weekly to get weekly e-mails about the Perl programming= language and related topics.
Want to see more? See the archives ( https://perlweekly.com/archive/ ) of a= ll the issues.
Reading this as a non-subscriber? Join us free of charge. https://perlweekl= y.com/
(C) Copyright Gabor Szabo https://szabgab.com/ The articles are copyright the respective authors.
You can freely redistribute this message if you keep the whole message intact, including the Copyright notice and this text.
If you don't want to receive mails any more you can unsubscribe here: https://perlweekly.com/unsubscribe.html
--744ae79fe5646e7a2076bedfd5385db97b1434728247a626d5d5166a6241 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Mime-Version: 1.0
1.0, user-scalable=3Dyes"> Perl Weekly Issue #768 - 2026-04-13 - Perl and XS
color=3D"#ffffff">
background-color: #004065; color: #FFF; text-decoration: none; font-size: 40px; font-weight: bold; font-family: Gadget; =20 border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border: 1px solid #000; padding: 10px; ">Perl Weekly =20
style=3D"border-bottom: 1px solid #ccc; padding-bottom: 8px; font-size: 18px;"> Issue #768 - 2026-04-13 - Perl and XS
latest | https://perlweekly.com/archive">archive | edited by manwar.org/">Mohammad Sajid Anwar
=20 =20
=20
|
=20 Hi there,
=20 Nearly a year ago, Robert Acock shared a complete = tutorial, an-object-24lj">Learning XS. I promised myself that one day I would go = through the tutorials start to finish in one go without interruptions, but = life had other plans. A couple of days ago, Robert, added = one more post to the series: custom-ops-4lag">Custom Ops. It made me realise how far behind I am. Ti= me management is something, I need to learn, and learn quickly, before it i= s too late. My upcoming book on DBIx::Class is also on hol= d after I finished the first draft. Well, in this case, I have a perfect ex= cuse. While I was working on the book, someone dropped the idea of making D= BIx::Class operations asynchronous. The idea blew me away for quite a while= and resulted in a CPAN module: lass::Async">DBIx::Class::Async. I am happy with the end result, but it= delayed the book and I am yet to start on it again. So what else is keepin= g me busy now? Well I just published my first mobile app for Android device= : hallenge.app">The Weekly Challenge. For those who don't know, this is m= y pet project started seven years ago where I throw out two challenges ever= y Monday and members solve them in Perl, Raku and many other programming la= nguages. So the real question is: finish the book on DBIx::Class or Learn X= S?
=20 I noticed, Robert, published a handful of Perl mod= ules to CPAN with a flavour of XS. You can find the list on s://metacpan.org/author/LNATION">MetaCPAN. Now to understand the workin= gs of these modules, I need XS knowledge. This is going on my TODO list for= the time being. If you have the time and energy, I would highly recommend = the tutorial.
=20 For the first time in a long while, I saw so many new Perl modules = published to CPAN back to back. Nearly every module deserves a closer look.= For example, Web= Service::Bugzilla, Sim= pleMock, LRU::Cache= and many more. If you don't want to miss the fun then watch this =3D"https://metacpan.org/recent">MetaCPAN page regularly.
=20 The latest monthly sing-a-month-of-git-activity-with-perl-and-a-little-help-from-ai/">newslett= er of Dave Cross was fun to read as always. I am not a= n AI fan yet but this is interesting.
=20 I am sure you have plenty to read this week in the newsletter, so e= njoy!!
=20 Your editor: Mohammad Sajid Anwar.
| mg/mohammad_anwar.png" /> |
|
Articles =20 | =20 | m/img/dave_cross.png" title=3D"Dave Cross" width=3D"80" /> | =20 | =20 =20 | =20 =20 | =20 | m/img/laurent_dami.png" title=3D"Laurent Dami" width=3D"80" /> | =20 | =20 =20 | =20 =20
Discussion =20 | =20 =20 | =20 =20
CPAN =20 | =20 =20 > font-size: 18px; font-weight: bold; ">Net::Nostr =20 by Nicholas Hubbard =
The Net::Nostr module is a clean, idiomatic Perl module fo= r communicating with and performing tasks that comply with the Nostr Protoc= ol. Net::Nostr abstracts away many of the complexities associated with sign= ing events, relaying data, and converting between different formats. This t= echnical assessment describes how modular design can successfully use Schno= rr signatures as well as other advanced signature types when creating decen= tralised social networks using Perl. Developing applications based on the d= ecentralised social space will only be possible if you can successfully com= municate and implement these functions within your program.
=20 =20 | =20 | =20 =20 | =20 =20 | =20 =20 | =20 =20 > " font-size: 18px; font-weight: bold; ">DateTime::Lite =20 by Jacques Deguest (ttps://metacpan.org/author/JDEGUEST">JDEGUEST) =
The DateTime::Lite library offers a lightweight technical = alternative to the standard DateTime library while still providing a drop-i= n API replacement. The use of one SQLite database file instead of hundreds = of timezone files, along with a three-level memory cache, significantly imp= roves startup performance and throughput making it a desirable solution for= both high-concurrency micro-services and low-memory constrained environmen= ts.
=20 | m/img/jacques-deguest.jpeg" title=3D"Jacques Deguest" width=3D"80" /> | =20 | =20 =20
The Weekly Chall= enge =20 nge.org">The Weekly Challenge by Mohamma= d 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 o= ne champion at the end of the month from among all of the contributors duri= ng the month, thanks to the sponsor Lance Wicks. =20 | =20 | m/img/mohammad_anwar.png" title=3D"Mohammad Sajid Anwar" width=3D"80" /> | =20 | =20 | m/img/mohammad_anwar.png" title=3D"Mohammad Sajid Anwar" width=3D"80" /> | =20 | =20 =20 | =20 =20 | =20 =20 > =3D" font-size: 18px; font-weight: bold; ">A Bigger Big =20 by ings.com/">Arne Sommer
=3D"font-size: 16px"> The blog post shows a nice, straightforward technical solu= tion for the "Bigger Big" challenge using Raku's strong functional programm= ing capability such as combinations and map. The expressive syntax of the l= anguage allows for complex list manipulations to be reduced to easy-to-read= one-liner logic with clear validation of logic using Raku's strong type sy= stem. =20 | m/img/arne-sommer.jpeg" title=3D"Arne Sommer" width=3D"80" /> | =20 | =20 =20 > 2/ch-368.html" style=3D" font-size: 18px; font-weight: bold; ">A Bigger Omega =20 by ommrey.de/">Jorg Sommrey
e=3D"font-size: 16px"> There is an algorithmically sound answer to the problem of= how to maximise a number after removing digits, as well as a mathematicall= y sophisticated generalisation of counting the number of prime factors usin= g a variable, or flexible, exponent in the second problem. The Perl and J i= mplementations of the two tasks demonstrate instructive examples of two ori= ginal implementations: one with direct solvers that can use iterative loops= , and one that uses functional programming concepts to achieve the same goa= ls without the use of loops. =20 =20 | =20 | =20 =20 > html" style=3D" font-size: 18px; font-weight: bold; ">The Weekly Challenge 368 =20 by Lubos Kolouch =
In an excellent blog post, Lubos compares the two programm= ing languages Perl and Python. He explains how to solve complicated algorit= hms in both programming languages, while adhering to the idioms of each lan= guage. He provides extremely complete solutions to the algorithmic problems= , using Perl's succinct use of regular expressions and arrays and Python's = logical, clear, and concise syntax to provide a comprehensive and cross-pla= tform tutorial on how to solve problems.
=20 =20 | =20 | =20 =20 > =3D" font-size: 18px; font-weight: bold; ">Perl Weekly Challenge 368 =20 by hub.io/">W Luis Mochan
=3D"font-size: 16px"> This post stands out among other examples of technical exc= ellence from W. Luis Moch=C3=A1n due to its very high level of Perl support= and its extremely compact and elegant code for solving problems using mini= mal resources. I really enjoyed his clever use of the Math::Prime::Util mod= ule, which allows him to create an effective and concise one-liner for calc= ulating prime factors, along with his very clever approach to optimizing st= ring numbers by reading from left to right, which allows him to provide bot= h concise code as well as a very efficient algorithm. =20 | m/img/luis-mochan.jpeg" title=3D"W Luis Mochan" width=3D"80" /> | =20 | =20 =20 > ge-club/tree/muthm-368/challenge-368/matthias-muth#readme" style=3D" font-size: 18px; font-weight: bold; ">Big, Big and Little =20 by Matthias Muth =
This solution set demonstrates string manipulation using r= egular expressions (regex) and manipulate numbers efficiently (number theor= y). The idea of using conditional regex patterns to remove an optimal digit= in Task 1 is clever, and using Math::Prime::Util and List::Util in Task 2 = shows how simple it is to use Perl for a project or write production-qualit= y scripts. Each solution is clearly explained, has a minimal amount of code= , and follows a clear mathematical logic based on the problem statement.
=20 =20 | =20 | =20 | m/img/packy-anderson.jpeg" title=3D"Packy Anderson" width=3D"80" /> | =20 | =20 | m/img/peter-campbell-smith.png" title=3D"Peter Campbell Smith" width=3D"80"= /> | =20 | =20 =20 > wc368-1" style=3D" font-size: 18px; font-weight: bold; ">The Weekly Challenge - 368: Make It Bigger =20 by Reinier Maliepaard =
This approach is very straightforward because the next ste= p is to compare the digits/values created after removing both the first and= the second occurrence of the target digit. Using the index to find each lo= cation of the digit and then using substr to create the candidate strings i= s efficient, and you can easily see this through its implementation. The us= e of input validation will give the code additional robustness because the = validation checks that there was exactly two occurrences of the digit. The = structure of the code will help support the intent of the algorithm, and th= e test cases will be able to show the expected outcome.
=20 =20 | =20 | =20 =20 > wc368-2" style=3D" font-size: 18px; font-weight: bold; ">The Weekly Challenge - 368: Big and Little Omega =20 by Reinier Maliepaard =
This approach clearly distinguishes two omega functions by= using Math::Prime::Util's factor_exp function, which returns all prime fac= torization as well as their respective exponents. The source code is extrem= ely clear; it uses the number of exponent pairs (for little omega - count o= f distinct prime numbers) in conjunction with summing together all the expo= nent values (for big omega - total number of prime factors). There is also = an explanation (for the math) in conjunction with the examples to make this= both an educational and production-quality example.
=20 =20 | =20 | =20 =20 | =20 =20 | =20 | m/img/simon-green.png" title=3D"Simon Green" width=3D"80" /> | =20 | =20 =20
Rakudo =20 | =20 | m/img/elizabeth_mattijsen.png" title=3D"Elizabeth Mattijsen" width=3D"80" /= > |
|
 |
|
|
 |
 |
|
|
|