The Science Perl Journal, Issue #1 (Vol. 1, No. 1) is finally here!

After hundreds of hours of work and support from lots of people, the long promised Journal is here. That link will take you to some more information, on there a link to purchase is available. All proceeds go to supporting future Issues and events of the SPC and Perl Community Organization. At this time, an electronic version is not available due to end-of-year time constraints.

It may seem silly, but we spent extra time making sure the book spine looks good on a bookshelf and will look even better as the Issues accrue. Get it while it's hot. ISBN-13: 9798218984748, 152 pages.

Some of us are currently preparing for a block of Science Perl Talks at the London Perl & Raku Workshop 2024. We appreciate the organizers of this event for the opportunity.

More will be posted after the LPW, but the SPC is hosting the Perl Community Conference, Winter 2024 on December 18th (Perl's 37th birthday! :-)). If you are interested in getting published in the next Issue of the SPJ (Winter 2024), we are still accepting extended abstracts, which is up to 1 full page in the Journal and a 5 minute lightning talk slot at the Winter Conference.

This week in PSC (164) | 2024-10-17

This week, we talked about some recent (and less recent) p5p threads:

  • We discussed the sort thread briefly. We are waiting to see where it goes.
  • We talked again about TLS in core, and reviewed a document from the CPAN Security Group. We want to talk about this more in depth next week.
  • Discussion of the evalordie thread led us to talk about some form of in-core autodie pragma. We didn’t reach any conclusion.
  • We noted that a maint release is overdue.

Perl Weekly Challenge 291: Poker Hand Rankings

These are some answers to the Week 291, 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 October 20, 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.

Task 2: Poker Hand Rankings

A draw poker hand consists of 5 cards, drawn from a pack of 52: no jokers, no wild cards. An ace can rank either high or low.

Write a script to determine the following three things:

1. How many different 5-card hands can be dealt?

2. How many different hands of each of the 10 ranks can be dealt? See here for descriptions of the 10 ranks of Poker hands: https://en.wikipedia.org/wiki/List_of_poker_hands#Hand-ranking_categories

3. Check then the numbers you get in step 2 by adding them together and showing that they're equal to the number you get in step 1.

Look in to Julia

To the old Perl programmers out there looking for a new language to learn, I suggest giving Julia a serious look. I haven't had a language bring me this much joy since when I first discovered Perl a long time ago. If Perl is the grandpa, Julia is the granddaughter, and she's a really smart girl. She hangs out with scientists all day helping them make sense of their data, and she does it with a unique style.

To be continued...

(There's so much I want to say, but I don't want to commit the time to write it all down right now.)

Update TiddlyWikis

The Perl wiki has been renamed from Perl.html - which was too generic - to Perl.Wiki.html:
https://savage.net.au/misc/Perl.Wiki.html

The Mojolicious wiki is at:
https://savage.net.au/misc/Mojolicious.Wiki.html

The Debian wiki is at:
https://savage.net.au/misc/Debian.Wiki.html

The Personal Security wiki is at:
https://symboliciq.au/misc/Personal.Security.Wiki.html

(Not updated actually...) The Symbolic Language wiki is at:
https://symboliciq.au/misc/Symbolic.Language.Wiki.html

Understanding the Financials of The Perl and Raku Foundation (TPRF)

In my previous articles (#1 and #2), I covered the key activities of The Perl and Raku Foundation (TPRF), such as organizing conferences, providing grants, and other smaller initiatives. In this final article, I will explore TPRF's financials using publicly available data. As a U.S. 501(c)(3) nonprofit organization, TPRF is required to disclose their financial information to the IRS. As always, my opinions are my own and do not represent the views of the TPRF Board.

Revenue and Expenses: Year-to-Year Overview

Let's start by reviewing TPRF's revenue and expenses over the years.

finance1.png
Until 2019, both revenue and expenses fluctuated. However, in 2020, the financial landscape changed significantly, with both revenue and expenses dropping sharply. This trend continued into 2021, largely because TPRF held its conferences virtually, reducing costs but also potentially limiting revenue opportunities.

In 2023, TPRF experienced another sharp decline in revenue while expenses surged, leading to a large deficit of $140,213.

Here's a comparison of key financial figures over three years:

Revenue

Perl Weekly Challenge 291: Middle Index

These are some answers to the Week 291, 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 October 20, 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.

Task 1: Middle Index

You are given an array of integers, @ints.

Write a script to find the leftmost middle index (MI) i.e. the smallest amongst all the possible ones.

A middle index is an index where ints[0] + ints[1] + … + ints[MI-1] == ints[MI+1] + ints[MI+2] + … + ints[ints.length-1].

If MI == 0, the left side sum is considered to be 0. Similarly, if MI == ints.length - 1, the right side sum is considered to be 0.

Return the leftmost MI that satisfies the condition, or -1 if there is no such index.

Example 1

London Perl & Raku Workshop 2024: 10 Days To Go

It's a little over a week until this year's London Perl and Raku Workshop. Here's a couple of things to note about the day.

The schedule is relatively fixed at this point, however if you haven't already starred the talks you plan to attend then please do so as this will inform any tweaks. The venue has a large room (150 people) and a smaller room (35 people) therefore it is helpful to know which talks might be heavily attended in advance so we can make sure those talks have enough space.

The venue, The Trampery in Old Street, is located a two minute walk from the Northern Line's Old Street tube station in central London. The Northern Line has stops at most of the major train stations in London, or trivial links to others, so we recommend taking the tube to get to the venue.

This week in PSC (163) | 2024-10-10

We had a guest this week: Olaf Alders.

  • We exchanged Perl (re)branding ideas with Olaf. We will be keeping in touch on that front.
  • We discussed the feedback on feature-guarding and unbundling apostrophe. We came up with a strategy to propose that we think should work, which will be posted on the relevant thread.
  • We discussed the fact that keeping the current smartmatch operator (as a feature) means we can’t have a meaningful air gap to prevent subtle bugs when moving to a future “good” smartmatch. This probably implies that we would be giving up on any future smart match operator, but there are usually better replacements.

[P5P posting of this summary]

Weather::OWM released on CPAN

I am in the process of adding OpenWeatherMap support to Xasteria Weather for iOS and the proxy I built is in Perl. Since there was only an old module on CPAN which did not support the current API and was not easily updatable, I released Weather::OWM. It's a very simple module, similar to two other Weather modules I've released in the past (Weather::WeatherKit and Weather::Astro7Timer).
The OpenWeather API has a Free tier with both current weather and forecast, which makes the module useful to anyone interested in fetching weather for any location. E.g.

Board Reflections: Continued Experiences with The Perl Foundation

Read volume 1 here.

In my last post, I talked about some of the big things TPF (The Perl Foundation) does. This time, I'll discuss some of the smaller stuff I've handled at TPF, often with help from others, and my misses along the way. My opinions are my own.

White Camel Awards

The White Camel Awards, started by brian d foy in 1999, were created to honor Perl community contributors, who, like ninjas, do all the hard work but never seem to get noticed. brian personally picked the winners each year until he stepped down in 2018. While many people contribute to the Perl community, their efforts often fly under the radar. I mean, organize a Perl event every year and your name still wouldn't make it outside the venue. Tough, right?

In 2022, I took over the award with TPF, with brian's blessing, to keep this tradition alive.

London Perl & Raku Workshop 2024 Gold Sponsor: CV-Library

This year's London Perl and Raku Workshop will take place on 26th Oct 2024. Without our sponsors this event would not happen and we would like to thank them.

cvl.png

Since its founding in 2000, CV-Library has relied on Perl as the backbone of its core operations. Today, as the UK’s leading independent job board, we host over 150,000 job postings and maintain a database of more than 20 million CVs.

For nearly 25 years, CV-Library has been a committed supporter of LPW and the Perl community. We're proud to reaffirm this dedication at the 2024 conference.

Our platform now integrates modern Perl with Go, leveraging Kubernetes for scalable deployments, alongside other cutting-edge technologies to ensure stability and reliability.

Our development team consistently delivers high-quality features through code reviews, automated tests, and continuous deployment. Additionally, we regularly contribute to free and open-source projects, including CPAN.

CV-Library offers remote opportunities for developers and testers at all levels. We encourage participation in community meetups and collaboration days. Feel free to introduce yourself to Mark or any member of our team at the event, or explore our current job openings here.

Strong Password

The Weekly Challenge 287, Task 1

You are given a string, $str.
Write a program to return the minimum number of steps required to make the given string very strong password. If it is already strong then return 0.
Criteria:
  • It must have at least 6 characters.
  • It must contains at least one lowercase letter, at least one upper case letter and at least one digit.
  • It shouldn’t contain 3 repeating characters in a row.
Following can be considered as one step:
  • Insert one character;
  • Delete one character;
  • Replace one character with another.

A Simplification

To make the algorithm simpler, let’s ignore deletion. Instead of deleting a character, we can always replace it with a character different to the original one and its neighbours (you can easily verify that it can’t break any of the three criteria: it doesn’t shorten the password, it doesn’t remove more characters than the deletion would have deleted, and it never creates repeating characters).

The Algorithm

Let’s keep a set of strings we need to check, we’ll call them the agenda. At the start of the program, the agenda contains the input string.

Cloud VM performance / price comparison 2024

I gave the talk Maximizing Performance and Cost Efficiency in the Cloud at the Perl and Raku conference this year. Among others, it used data from a benchmarking comparison I did among dozens of VMs on various cloud providers, and I had promised I'd post the full report.

It took me quite a bit longer than expected due to both technical complications and some new releases I wanted to include that enlarged the scope, but here it is now. Should be useful if you want to get the best bang for buck on the cloud.

Perl Community Conference / Science Perl Journal, Winter 2024 CALL FOR PAPERS NOW OPEN! (Deadline 9/30)

NAME

Perl Community Conference / Science Perl Journal, Winter 2024

SYNOPSIS

This virtual Conference on December 18th, 2024 is being called in conjunction with the creation of the Science Perl Journal, Winter 2024 Issue.

We have 6 author committments from some very exciting topics, but we want more! The Summer Issue has 8 authors and is nearly 150 pages. We are looking to double the number of authors, doubling the number of pages is going to be a stretch :-).

DESCRIPTION

Christos Argyropoulos, MD, PhD. is our moderator for this virtual event, which is December 18th, 2024 - Perl's 37th birthday! At this event we will be announcing our Summer 2025 plans, which will include a 3rd Issue of the SPJ.

The following lengths will be accepted for publication and presentation:

  • Extended Abstract (1 page, 5 minute lightning talk slot)
  • Short paper (2-9 pages, 20 minute speaker slot)
  • Full length paper (10-36 pages, 50 minute speaker slot)

Perl wiki updated, 4 other wikis uploaded - Take 4

Hi All

Why aren't my links appearing....

Note: The first 3 links point to my personal page: http://savage.net.au

The Perl wiki has been renamed from Perl.html - which was too generic - to Perl.Wiki.html:
https://savage.net.au/misc/Perl.Wiki.html

The Mojolicious wiki is at:
https://savage.net.au/misc/Mojolicious.Wiki.html

The Debian wiki is at:
https://savage.net.au/misc/Debian.Wiki.html

Note: The next 2 links point to my new website: https://symboliciq.au

This will accompany my upcoming Youtube channel

The Symbolic Language wiki is at:
https://symboliciq.au/misc/Symbolic.Language.Wiki.html

The Personal Security wiki is at:
https://symboliciq.au/misc/Personal.Security.Wiki.html

New class of memory leaks inaugurated by Perl v5.40 (and we are unprepared for that)

The following script leaks memory in perl v5.40, and it did not in v5.38:

use Scalar::Util 'weaken';
my $z;
{
    my $x;
    my $y;
    my sub my_sub {
        $x = shift;
        return sub { $y };
    };
    my $subscriber = {};
    $subscriber->{foo} = my_sub($subscriber);
    weaken($z = $subscriber);
}
say 'leak = ', int defined $z;

Goodbye old modules

Earlier today I read a post from Neil Bowers inviting CPAN authors to consider being involved in CPAN day, which is coincidentally today.

It prompted me to take a serious look at the modules I have uploaded to CPAN and acknowledge that some of them are no longer valuable. Indeed as I reviewed one of them I was none too kind in my judgements against the author.

That made it quite easy for me to see how I can easily participate in CPAN day. I'm removing a couple of modules:

  1. Business::Worldpay::Junior - I don't think this integration option even exists any more and I certainly haven't actively maintained this for years.
  2. Net::UKDomain::Nominet::Automaton - Nominet withdrew the Automaton in 2015

Those are now scheduled for deletion on Monday next week.

I'll need to review some of the others and consider whether to open them up for anyone who is interested to take over as maintainer.

For now I've done my bit.

The Day Perl Stood Still: Unveiling A Hidden Power Over C

Sometimes the unexpected happens and must be shared with the world … this one is such a case.

Recently, I’ve started experimenting with Perl for workflow management and high-level supervision of low level code for data science applications. A role I’d reserve for Perl in this context is that of lifecycle management of memory buffers, using the Perl application to “allocate” memory buffers and shuttle it between computing components written in C, Assembly, Fortran and the best hidden gem of the Perl world, the Perl Data Language. There at least 3 ways that Perl can be used to allocate memory buffers:

XE.com From The Command Line

xe.com is a well known site for calculating the exchange value between the currencies of the world. However, there are times I’d prefer to query it from the command line. They have an API, but it’s not free, so I ended up writing a quick and dirty script that scrapes the web page and uses regexps to extract the data.

I know you’re not supposed to parse HTML with regexps, but sometimes, you can get away with it for a while. Also, this script is not that serious, so it can fail without hurting anything.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.