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 288: Closest Palindrome

These are some answers to the Week 288, 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 September 29, 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: Closest Palindrome

You are given a string, $str, which is an integer.

Write a script to find out the closest palindrome, not including itself. If there are more than one then return the smallest.

The closest is defined as the absolute difference minimized between two integers.

Example 1

Input: $str = "123"
Output: "121"

Example 2

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

LPW 2024 Will Have A Third Track

Hi All! Given the number of talks submitted to this year's London Perl & Raku Workshop we have decided to reserve a third room in the venue. This will give us a bit more room on the schedule for talks, which is good as the other two rooms are now 90% full.

However, we would also like to use this third room for something else. Its capacity is relatively low, 15 people including the person presenting, so we feel it might be suitable for use as a breakout room / mini hackathon(s) / birds of a feather; and we will probably reserve two large slots for this. If you have an idea of something you'd like to use the room for then please get in touch with us.

Another way we can make more space for talks is to opt for lunch at the venue, this will free up space for three more talks. To do that we need a couple more sponsors so if you would like to help with that then please have a look at the options here: https://act.yapc.eu/lpw2024/sponsoring.html

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]

Perl Weekly Challenge 284: Relative Sort

These are some answers to the Week 284, 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 September 1, 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: Relative Sort

You are given two list of integers, @list1 and @list2. The elements in the @list2 are distinct and also in the @list1.

Write a script to sort the elements in the @list1 such that the relative order of items in @list1 is same as in the @list2. Elements that is missing in @list2 should be placed at the end of @list1 in ascending order.

Example 1

Input: @list1 = (2, 3, 9, 3, 1, 4, 6, 7, 2, 8, 5)
       @list2 = (2, 1, 4, 3, 5, 6)
Ouput: (2, 2, 1, 4, 3, 3, 5, 6, 7, 8, 9)

Example 2

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.

This week in PSC (160) | 2024-09-12

Just Aristotle and Graham.

The notes from this meeting were lost, but have been reconstructed from memory.

  • We had a discussion about what future versioning (Perl 7) should look like.
  • Discussed if we will need to make changes to apostrophe as package separator, and smartmatch removal, given the fallout they have had.

[P5P posting of this summary]

Perl Weekly Challenge 287: Strong Password

These are some answers to the Week 287, 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 September 22, 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: Strong Password

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 contain 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:

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";
}

First Batch of LPW 2024 Talks Accepted

Yep, that's right - the first dozen talks have been accepted for this year's London Perl and Raku Workshop. This puts our schedule at approximately 50% full, so if you are thinking about talking at the workshop then submit your proposal now!

If you aren't thinking about talking then have a think about what you've been doing in the Perl and/or Raku space the last five years, or even just the general IT and development space. Perhaps there's something interesting you can talk about? If you don't feel it's a full fat talk then submit a lightning talk instead.

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:

If you would like to sponsor LPW then please have a look at the options here: https://act.yapc.eu/lpw2024/sponsoring.html

This week in PSC (153) | 2024-07-25

After over a month without a PSC meeting, this was the first meeting of the new, shiny PSC. Today, we:

  • welcomed Aristotle, and said goodbye to Paul
  • discussed the current projects in flight, the PPC process and the onboarding tasks (preparing for next year already!)
  • talked about POD, docstrings, and the Perl release process

Perl Weekly Challenge 286: Order Game

These are some answers to the Week 286, 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 September 15, 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: Order Game

You are given an array of integers, @ints, whose length is a power of 2.

Write a script to play the order game (min and max) and return the last element.

Example 1

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.

Updated, curated, Perl module TiddlyWiki

Download the Perl TiddlyWiki

Read about TiddlyWIkis

Cheers

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

Perl Weekly Challenge 286: Self Spammer

These are some answers to the Week 286, 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 September 15, 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: Self Spammer

Write a program which outputs one word of its own script / source code at random. A word is anything between whitespace, including symbols.

Example 1

If the source code contains a line such as: 'open my $fh, "<", "ch-1.pl" or die;'
then the program would output each of the words { open, my, $fh,, "<",, "ch-1.pl", or, die; }
(along with other words in the source) with some positive probability.

Example 2

Technically 'print(" hello ");' is *not* an example program, because it does not
assign positive probability to the other two words in the script.
It will never display print(" or ");

Example 3

This week in PSC (159) | 2024-09-05

All present, and this time the meeting actually ended on time.

  • We discussed the situation with the apostrophe package separator removal. We continue to keep an eye on things but it now feels close to inevitable that we will use a feature to disable it conditionally.
  • We briefly touched on the removal of smartmatch, where both the extent of the situation and our thoughts so far are much less clear.
  • Connected to all that, we discussed some general thoughts on how not to keep finding ourselves in the same situation with changes like this, but found we probably already have all the mechanisms we need.
  • We decided that the provisions of the PPC process are the right way for pre-PPC “Signature named parameters” to play out so it has now become PPC 0024 with status “Exploratory”.
  • We took another brief look at the closure memory leak which is now #22547 and resolved to prepare to put down a consensus next time we meet.

[P5P posting of this summary]

TWC 277: Strength Uncombined

In which thousands become millions, as we achieve a near-linear solution.

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.