Perl Weekly
Issue #724 - 2025-06-09 - Perl and XS
latest | archive | edited by Mohammad Sajid Anwar
|
Hi there,
What's XS?
XS (eXternal Subroutine) is a glue language that helps Perl interact with C.
Sounds simple?
In my personal experience, it's not simple at all. I've tried many times but never managed to fully grasp it. Recently, Robert Acock, shared a blog post series titled Learning XS, which I found very helpful in unraveling its complexity.
Robert Acock also wrote another blog series for newcomers: Learning Perl. I'm sure this would be handy for anyone looking to explore Perl.
Lately, I've been playing with AWS S3 and have shared my experiences in two posts so far:
There are plenty more articles in the pipeline, so watch this space!
Enjoy the rest of the newsletter.
Mohammad Sajid Anwar
|
|
|
Announcements
|
by Dean Hamstead (DJZORT)
With help from the community a development release of DBD::Oracle has been published to the CPAN.
|
|
|
Perl Magpie serves as a user frontend for the CPT database backend. It operates 100% using the CPT API to fetch test metadata and results.
|
|
Articles
|
|
|
|
by Paul Cochrane (PTC)
FIT files record the activities of people using devices such as sports watches and bike head units.
|
|
|
Discussion
|
by Robert Rothenberg (RRWO)
It's well documented suggestion to always use 3-argument open function. This post shares the reason.
|
|
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 Lance Wicks.
|
by Mohammad Sajid Anwar (MANWAR)
Welcome to a new week with a couple of fun tasks "Consecutive One" and "Final Price". 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 "2D Array" and "Total XOR" tasks in Perl and Raku. You will find plenty of solutions to keep you busy.
|
|
|
by Adam Russell
It procides efficient solutions to both tasks, with clear explanations and examples. The implementations leverage Perl's strengths (e.g., built-in hashes for set operations, Math::BigInt for arbitrary-precision arithmetic).
|
|
|
by Ali Moradi
Great show of CPAN modules power. It allows us to create a compact and efficient solutions. Well done.
|
|
by Arne Sommer
The solution leverages Raku’s expressive syntax in a way that is both concise and readable. Slicing with [..*] captures the "L-shaped" region without verbose loops. The use of +^= for accumulation is both efficient and visually distinctive.
|
|
by Jaldhar H. Vyas
The XOR subset sum write-up doesn’t just present code—it reflects on how subsets behave and how XOR values aggregate, which is the hardest part of the task. Use of naive exponential approach before opting for clarity over cleverness.
|
|
by Jorg Sommrey
This is for all PDL fans. I enjoy thoroughly every time, I read PDL solutions. Keep sharing knowledge with us.
|
|
by W Luis Mochan
The solutions are notable for their clarity, efficiency, and effective use of Perl's capabilities. By employing modules like PDL and List::Util, he addresses complex problems with succinct and performant code.
|
|
by Matthias Muth
It uses frequency counting with a hash to avoid O(n²) complexity. Inline explanation clarify non-trivial steps.
|
|
by Packy Anderson (PACKY)
It's a well-crafted and informative piece that balances technical rigor with creative flair, making it a valuable read for both novice and experienced programmers interested in the nuances of multi-language coding challenges.
|
|
by Peter Campbell Smith
The post stands out for its clarity, depth, and instructional value. His explanations are accessible, making complex concepts understandable for a broad audience. The code is well-structured and annotated, providing readers with valuable insights into Perl programming and problem-solving techniques.
|
|
by Robbie Hatley
The post is commendable for its clarity, thoroughness, and innovative problem-solving techniques. His ability to identify ambiguities in problem statements and address them proactively enhances the reliability of his solutions. The post serves as an excellent resource for Perl enthusiasts and programmers seeking to deepen their understanding of array manipulation and bitwise operations.
|
|
by Roger Bell West (FIREDRAKE)
No overengineering solutions match the challenge’s scale. Comparing Rust/Raku implementations teaches language-agnostic problem-solving.
|
|
by Simon Green
It starts with a concise Python version, then thoughtfully converts it to Perl. Great for readers fluent in one language who wish to learn the other.
|
|
by Yitzchak Scott-Thoennes
The solutions exemplify idiomatic Perl programming, showcasing the language's strengths in concise and expressive code. The post is informative and demonstrates a deep understanding of Perl's capabilities, making it a valuable resource for programmers seeking elegant solutions to common challenges.
|
|
Rakudo
|
|
Weekly collections
|
|
Events
|
|
Greenville, South Carolina, USA
|
|
You know, you could get the Perl Weekly right in your mailbox. Every Week. Free of charge!
|