London Perl & Raku Workshop 2024 Diamond Sponsor: Deriv

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, starting with our diamond sponsor:

deriv.png

Deriv, a leading online broker with 25 years in the industry, is proud to sponsor the London Perl & Raku Workshop 2024.

As a company with strong ties to the Open Source community, our connection to Perl is more than just practical—it's a passion. Over the years, we have actively used Modern Perl and contributed to shaping its future, including beta testing key developments like Object::Pad, which are crucial for advancing the language's capabilities.

Perl is the backbone of our back-end operations, proving to be a robust, reliable, and versatile language that meets our needs. Its community-driven growth, notably through CPAN, continually boosts its capabilities and reflects our values of collaboration and innovation.

This week in PSC (162) | 2024-10-03

Everyone was present this week.

  • We devised a strategy to deal with smartmatch, starting with reverting its removal. A separate email with details will follow.
  • We spent too much time talking about putting the apostrophe package separator behind a feature. That too will be outlined in a separate email. A github issue will follow.
  • We want to revert the open undef patch, for a variety of reasons, such as breaking autodie. We decided the steps to handle this.

[P5P posting of this summary]

Perl Weekly Challenge 289: Jumbled Letters

These are some answers to the Week 289, 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 6, 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: Jumbled Letters

An Internet legend dating back to at least 2001 goes something like this:

Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.

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.

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.

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.

Perl Weekly Challenge 289: Third Maximum

These are some answers to the Week 289, 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 6, 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: Third Maximum

You are given an array of integers, @ints.

Write a script to find the third distinct maximum in the given array. If third maximum doesn’t exist then return the maximum number.

Example 1

Input: @ints = (5, 6, 4, 1)
Output: 4

The first distinct maximum is 6.
The second distinct maximum is 5.
The third distinct maximum is 4.

Example 2

London Perl & Raku Workshop 2024: Call For Volunteers

This year's London Perl and Raku Workshop is just 4 weeks away. We now have a pretty full schedule, so the call for presentations is now closed, however we might have room for one or two more talks depending circumstances on the day. If you really think you have talk you want to give then get in touch.

As part of the workshop we would like to ask attendees if any are willing to volunteer for helping out on the day. This will likely include:

  • Room monitoring and video equipment operation
  • Registration of attendees
  • General assistance of organisers and attendees

We are probably looking for three people to help out on the day. Please contact the organisers if you would like to help out.

The London Perl and Raku Workshop will take place on 26th Oct 2024. Thanks to this year's sponsors, without whom LPW would not happen:

This week in PSC (161) | 2024-09-27

We were all present this week:

  • We rehashed the Perl version number discussion from last meeting now that we are all present. We will put together a document with our thoughts on this.
  • We will create a GitHub issue to make apostrophe removal feature-guarded.
  • Smartmatch (not so surprisingly) turns out to be too big to fail. Given its unique history, we are considering options for how to proceed with it in a more gradual way without giving up on the deprecation.
  • Regarding open undef (GH #22490), we agreed that Perl should support undef as a value and not just as a literal for the filename (and warn for the useless modes)

[P5P posting of this summary]

Things I've Learned Serving on the Board of The Perl Foundation

This article on the Python Software Foundation inspired me to write this. Serving on the board of a foundation isn't all about glamorous meetings and fancy titles. Still, I'd like to share how I ended up here and what I've learned along the way. Opinions are my own.


What Exactly is TPF?

TPF stands for The Perl Foundation, a U.S.-based non-profit organization dedicated to advancing the Perl language through open discussion, collaboration, and, of course, code.

TPF got its start around 2001 when Perl was super popular. The organization was originally needed to run a conference; because apparently, you need an official entity to book conference venues. The foundation was also actively raising funds and spending money on Perl development grants at that time, and they've been doing it ever since.

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:

Perl wiki updated, 4 other wikis uploaded - Take 2

Hi All

Note: The first 3 links point to my personal page

The Perl wiki has been renamed from Perl.html - which was too generic - to Perl.Wiki.html:

The Mojolicious wiki is at:

The Debian wiki is at:

Note: The next 2 links point to my new website which accompanies my upcoming Youtube channel

The Symbolic Language wiki is at:

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

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.

Why does this not work

Why does this not give flinstone and rubble?

$fn{"fred"} = "flintstone";
$fn{"barney"} = "rubble";
foreach $per (qw< barney fred >) {
print " he's $per $fn($per).\n";
}

How I use PostgreSQL's timestamptz fields in my Mojo apps

I created a function in Perl called pg_dt, that will convert PostgreSQL’s datetime values into Perl’s DateTime values and vice versa. This is useful both when you want to store DateTime values into the database, or want to convert the pg datetime/timestamp value from the database into a DateTime object value that Perl can use.

I really can’t seem to include code blocks in my posts on this platform (tried Preview with Markdown and Markdown With SmartyPants without success), so you can read the rest of this article on my blog.

Dancer2 1.1.1 Released

The Dancer Core Team is happy to announce that Dancer2 1.1.1 is on its way to CPAN. This is a maintenance release that deals with the following issues:

[ BUG FIXES ]
* GH #1712: Fix use of send_as in templates (Andy Beverley)

[ DOCUMENTATION ]
* PR #1706: Document missing logging hooks and log format option;
  fix typo in logging test (Jason A. Crome)

Happy Dancing! Jason / CromeDome

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.