DEV Community

Gabor Szabo
Gabor Szabo

Posted on • Originally published at perlweekly.com

Perl 🐪 Weekly #767 - Rust and Perl

Originally published at Perl Weekly 767

Hi there!

It was interesting to see how Rust started to eat Python from the inside out. Several Python modules and stand-alone tools were rewritten in Rust. Now as I can see there started to be a movement in Perl as well to rewrite some parts in Rust (e.g. PDL). Very interesting.

People quite often ask me how could they find a job? Given that I have been self-employed providing training and contract development work, I don't have a lot of experience in job-hunting, but it seems if you can show your programming, creative, and learning capabilities then you will have a better chance landing a new job. So I recommend that people build some interesting open source project or contribute to some projects. I am mentioning this as I just saw an article about Chandra: Cross-Platform Desktop GUIs in Perl by Robert Acock and at the end of the article he mentions that he is looking for new opportunities. IMHO building new stuff and talking (or writing) about it creates a lot more opportunities in getting a job than only complaining about the lack of jobs. Good luck!

If talking about contribution, probably one of the easiest thing to contribute is a test. It is also way more valuable than many people might think. If you'd like to contribute to an open source Perl project: 1. clone its source code; 2. Generate test coverage report; 3. Find the holes in the tests and write a test. Then repeat. If you are unsure how to do this, luckily the "Testing in Perl" course I am teaching these days will help you. Last time we saw how to generate and interpret test coverage reports. Next time we'll also see how to do mutation testing. You can watch the recordings from the previous sessions (free of charge for 10 more days) and you can join our next live session.

Enjoy Passover, Easter and the rest of your week!

--
Your editor: Gabor Szabo.

Articles

PDL in Rust -- A Native Reimplementation of the Perl Data Language

Very interesting that more of Perl gets a Rust reimplementation.

Chandra: Cross-Platform Desktop GUIs in Perl

"Chandra is a Perl module that lets you build cross-platform desktop applications using the web technologies you already know - HTML, CSS, and JavaScript - while keeping your application logic in Perl.". Sounds interesting to see where it goes.

Introducing Object::Proto — A Prototype Object System for Perl

Manage the health of your CLI tools at scale

"Your services have dashboards, tracing, and alerting. Your CLI tools print to STDOUT and exit. When something breaks, debugging starts at the API gateway -- everything upstream is a black box. This makes no sense."


Discussion

Activity streams library/module for Perl


Perl

This week in PSC (219) | 2026-03-30


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.

The Weekly Challenge - 368

Welcome to a new week with a couple of fun tasks "Make it Bigger" and "Big and Little Omega". 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.

RECAP - The Weekly Challenge - 367

Enjoy a quick recap of last week's contributions by Team PWC dealing with the "Max Odd Binary" and "Conflict Events" tasks in Perl and Raku. You will find plenty of solutions to keep you busy.

Max Conflict

Arne demonstrates how Raku can help with the "Max Conflict" problem using Raku's built-in support for intervals and sets. By using Raku's expressive syntax (like ranges and Bags), Raku has created an easy-to-read and mathematically intuitive way to solve problems that involve overlapping data.

Overlapping Oddities

The post contains an excellent technical breakdown of both terms using Perl programming language, along with the associated edge cases, such as how to handle timings that cross over midnight using modular arithmetic to resolve them. Additionally, his benchmark testing for different ways to manipulate binary strings provides measurable, statistical data on the efficiency of these algorithms.

Odd Events

The post explores time-interval logic and complexities of "wrap-around" (i.e., time zone?) events in a mathematically rigorous and fascinating way. Specifically, by introducing the idea of "complementary" events and making use of an ingenious duration-sum inequality, he presents an elegant, universal formula for simplifying conflict detection across the Perl and J programming languages.

The Weekly Challenge 367

The post provides a very pragmatic and functional dual language reference to assist in solving PWC 367. He uses string replication to solve the binary operation task and provides a simple mathematical overlap condition $max(start1, start2) < min(end1, end2)$ for the scheduling task. Therefore his post shows readers how to write readable, fast and efficient code in Perl and Python.

overlapping intervals

The article provides a flexible technical overview of PWC 367: Solutions to the two tasks implemented in both Raku and PL/Perl for PostgreSQL (PostgreSQL's Procedural Language/Perl). He presents Raku as a convenient and efficient way of working with high-level string and array operations to concisely solve the binary and interval task while at the same time illustrating how database-level functions can be written using the same logical patterns as the ones he used for both the Raku and PL/Perl implementations of the two tasks.

Perl Weekly Challenge 367

This is a perspective piece reviewing the problems faced in physics, providing elegant one-liners using Perl and/or robust scripts. In particular, solution to events happening at "Conflicting Events" is unique in that he treats time as a circular interval and takes offsets of + or -1440 minutes so that he can accurately determine whether two events overlap even if one of the events crosses the boundary of midnight by using the degree of circularity. This demonstrates an extensive application of mathematics to derive the proper ways to schedule events over time.

Odd Conflicts

The post demonstrates his focus on maintaining clean code and code maintainability. The use of meaningful variable names and decomposing the time conversion into logical sub-steps allowed him to take a potentially complicated problem of overlapping time zones and present it in a clear and concise manner via a mathematically sound Perl implementation.

Conflicting Every Odd

The post offers a great demonstration of multi-language support for PWC 367, using Raku, Perl, Python, and Elixir to provide solutions. The technical review is particularly good at comparing different programming language techniques and how each can be uniquely applied to provide elegant and precise solutions for string manipulation and scheduling conflicts using Elixir's pattern matching and Raku's dynamic coercion as examples of differences between the languages.

Bits of conflicts

The post features a very well thought out, extensive solution in Perl that uses string multiplication to create the largest odd binary number. He gives us a lin2dec utility that helps validate his solutions. He also provides an excellent explanation of the underlying mathematical principles behind the task he has undertaken.

The Weekly Challenge - 367: Max Odd Binary

The post gives a very complete and well supported solution to the "Max Odd Binary" challenge using Perl, using the principles of defensive programming, through good input validation. The way he technically describes his solution is very helpful since he is able to explain perl specific idioms such as tr///, and also provide good alternatives to count bits when using safe and/or optimised methods so that your code will not fail.

The Weekly Challenge - 367: Conflict Events

The second task solution provides a consistent, well-understood and detailed Perl implementation for identifying conflicting events by accentuating how to process time-based intervals that cross midnight boundaries. The use of a simple mathematical representation (normalisation of times to minutes), and an efficient "shift" loop to address the next day results in an exceptional algorithm that greatly simplifies complex overlapping logic.

The Weekly Challenge #367

The thoughtful way Robbie highlights some of the ambiguity surrounding date-less times in the "Conflict Events" task. By specifically stating what the assumption of "next-day" means for events that occur before a reference time, he offered a reasonable basis upon which to solve for overlaps between intervals of time that is both mathematically accurate and practically viable.

Binary Conflict

The includes solutions in both the Raku and Crystal languages. The way he solves Task#2 is particularly interesting because of how he looks at quantising time; by looking at events as ranges of minutes and splitting events that span midnight into two spans, he has developed a very mathematically sound and clean way to check for non-emptiness of intersecting intervals.

Maximum conflict

Simon Green used the Perl and Python programming language to produce solutions for Task 1 and Task 2. One of Simon's solutions was for the "Conflict Events" problem and it is very good because he used the range objects provided in Python, and generated individual minutes using sets, to determine where there are overlaps by tracking through time; his method provides a good way of handling events that cross over to another day.


Weekly collections

NICEPERL's lists

Great CPAN modules released last week;
MetaCPAN weekly report.


Event reports

Koha Hackfest 2026 in Marseille


Events

Perl Maven online: Testing in Perl - part 3

April 9, 2026

Perl Maven online: Testing in Perl - part 4

April 16, 2026

Perl Toolchain Summit 2026

April 23-26, 2026

The Perl and Raku Conference 2026

June 26-29, 2026, Greenville, SC, USA


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 of all the issues.

Not yet subscribed to the newsletter? Join us free of charge!

(C) Copyright Gabor Szabo
The articles are copyright the respective authors.

Top comments (0)