Perl Weekly Challenge 280: Count Asterisks

These are some answers to the Week 280, 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 August 4, 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: Count Asterisks

You are given a string, $str, where every two consecutive vertical bars are grouped into a pair.

Write a script to return the number of asterisks, *, excluding any between each pair of vertical bars.

Example 1

Input: $str = "p|*e*rl|w**e|*ekly|"
Ouput: 2

The characters we are looking here are "p" and "w**e".

Example 2

This week in PSC (148) | 2024-05-16

In anticipation for the stable release, we:

  • revived the “HTTPS out-of-the-box” project: the CPAN Security Group committed to help us select a workable solution, with a goal of implementing it in time for Perl 5.42
  • discussed the minutiae of the next stable release
  • decided to do it on 2024-05-24 (Friday)

LPW 2024 - Call For Papers and Sponsors

The London Perl & Raku Workshop (LPW) will take place this year on Saturday 26th October and you are encouraged to submit your talk proposals now. We have already had 30 registrations for the workshop so we anticipate a good turnout this year.

We welcome proposals relating to Perl 5, Raku, other languages, and supporting technologies. We may even have space for a couple of talks entirely tangential as we are close to finalising the venue (very central London) and should have room for two tracks.

Talks may be long (40mins), short (20 mins), or very short (aka lightning, 5 mins) but we would prefer talks to be on the shorter side and will likely prioritise 20min talks. We would also be pleased to accept proposals for tutorials and discussions. The deadline for submissions is 30th September.

We would really like to have more first time speakers. If you’d like help with a talk proposal, and/or the talk itself, let us know - we’ve got people happy to be your talk buddy!

PTS 2024 - Day 4 - here comes the sun... it's all right!

Following on from The bad days

We made the decision that our problems in Kubernetes were exactly the sort of thing that should not be distractions to the project. We had been trying to save costs when we choose Hetzner for hosting... especially as we did not know where our ElasticSearch cluster (needing 3x32Gig of ram) was going to live. The great news is last week ElasticSeach agreed to host this for us, which really is a game changer.

With this in mind, we reviewed hosting again... Digital Ocean (DO) provides a fully managed Kubernetes control plane, with high availability load balancer, Postgres Database integration and storage options e.g. we can focus on deploying to it and not managing it.

Perl Weekly Challenge 280: Twice Appearance

These are some answers to the Week 280, 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 August 4, 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: Twice Appearance

You are given a string, $str, containing lowercase English letters only.

Write a script to print the first letter that appears twice.

Example 1

Input: $str = "acbddbca"
Output: "d"

Example 2

Input: $str = "abccd"
Output: "c"

Example 3

Input: $str = "abcdabbb"
Output: "a"

Twice Appearance in Raku

This week in PSC (145) | 2024-05-25

This meeting was done in person at the Perl Toolchain Summit 2024.

  • Reviewed game plan for (hopefully) last development release, to be done tomorrow, as well as the stable v5.40 release.
  • Reviewed recent issues and PRs to possibly address before next releases.
  • Reviewed remaining release blockers for v5.40, and planned how to address them.
  • Discussed communication between PSC and P5P and how to improve it.

Announcing The London Perl and Raku Workshop 2024 (LPW)

Hey All,

Yes, we're back we'd like to announce this year's LPW:

https://act.yapc.eu/lpw2024/

WHEN: TBC, most likely Saturday 26th October 2024
WHERE: TBC

Please register and submit talks early - it gives us a better idea of numbers. The date is tentative, depending on the venue, but we'd like to aim for the 26th October 2024.

This will be the 20th anniversary of LPW (in terms of years, not number of events). We might try to do something special...

The venue search is currently in progress. The 2019 venue has turned into a boarding school so we can't use that any more due to safeguarding issues. We don't want to go back to the University of Westminster so we are searching for a venue.

Phishing Attempt on PAUSE Users

I just received an E-Mail purporting to be from the PAUSE Team, claiming a compromise of a server. It was written with some thought, referencing the account name of someone well known and trusted in our community. On closer inspection however, it was merely an attempt to phish PAUSE usernames and passwords via a supposed alternative login server.

I'm sure many of us are old enough and experienced enough to detect and ignore this type of attack. But in case you aren't (welcome!) or if you are feeling a bit out of practice, then please remember to only log in via the official PAUSE entry point.

Perl Weekly Challenge 279: Split String

These are some answers to the Week 279, 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 July 28, 2024 at 23:59). This blog post offers some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.

Task 2: Split String

You are given a string, $str.

Write a script to split the given string into two containing exactly same number of vowels and return true if you can otherwise false.

Example 1

Input: $str = "perl"
Ouput: false

Example 2

Input: $str = "book"
Ouput: true

Two possible strings "bo" and "ok" containing exactly one vowel each.

2024 TPRC Submission Date Extended thru April 20th

The deadline for talk and paper submissions to the 2024 TPRC has been Officially extended through April 20th for both the regular Perl and Raku tracks; and also the Science Track.

Update for the Science Track submissions, we have a small, but solid set of submissions and are expecting a few more. The Science Perl Committee is committed to helping anyone submitting a serious entry to succeed. If you're hesitating at all because you're afraid of getting rejected, please be reassured we want as many people to be part of this inaugural Science Track, as possible.

Please note, acceptable topics DO include white papers discussing implementation details of the Perl or Raku interpreters, experimental language features, implementations, benchmarks, etc.

I personally and strongly encourage you to submit an abstract to the Science Track. And if you don't want to write a paper, I strongly encourage you to submit a regular conference talk.

Brett Estrade (OODLER)

This week in PSC (144) | 2024-04-11

The three of us met, and:

  • merged the deëxperiment PR
  • agreed we should additionally discuss if the now-stable features (try, extra_paired_delimiters) should be included in the :5.40 feature bundle
  • reported feedback from PPC implementors, which can be summarized as “life happened, will get back to work soon”
  • continued to triage latest reported bugs and look for release blockers (Currently we have 8 potential blockers, though 2 are easy documentation fixes)

A FOSS Ecosystem Checklist for the Benefit of Maintainer Sustainability

  1. Maintainers and authors are found everywhere throughout our dependency trees. This includes the authors of the tooling others use for maintaining, building, testing, writing and running the infrastructure they depend on. Even maintainers depend on other maintainers.
  2. Maintainers’ mental health and well-being is also a dependency.
  3. So is their outlook on the sustainability of their projects, both in personal, technical, systemic and economic respects.

This means that personal, technical, systemic and economic well-being in the end are all actual and real dependencies* for the businesses that rely on these people and their projects.*

What can an ecosystem provide to make the lives of these maintainers easier in this regard?

continued

Perl Weekly Challenge 279: Sort Letters

These are some answers to the Week 279, 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 July 28, 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: Sort Letters

You are given two arrays, @letters and @weights.

Write a script to sort the given array @letters based on the @weights.

Example 1

Input: @letters = ('R', 'E', 'P', 'L')
       @weights = (3, 2, 1, 4)
Output: PERL

Example 2

Input: @letters = ('A', 'U', 'R', 'K')
       @weights = (2, 4, 1, 3)
Output: RAKU

Example 3

A Twist of a Date


Here’s a quickie little post, just to remind everyone of the usefulness of Date::Easy.

Recently, I downloaded some pictures from Google Photos, and unzipped them into my directory of other photos.  I ended up with something that looked like this:
'2024-03-01 09.34.44.jpg'
'2024-03-01 13.18.34.jpg'
'2024-03-31 14.25.27.jpg'
'2024-03-31 14.27.09.jpg'
'2024-03-31 14.27.40.jpg'
'2024-03-31 14.28.23.jpg'
'2024-03-31 14.30.03.jpg'
'2024-03-31 14.33.32.jpg'
'2024-03-31 14.34.10.jpg'
'2024-03-31 14.36.01.jpg'
PXL_20240331_212527635.jpg
PXL_20240331_213601848.jpg
PXL_20240331_212823287.jpg
PXL_20240331_212709501.jpg
PXL_20240331_213332846.jpg
PXL_20240331_212740070.jpg
PXL_20240331_213410146.jpg
PXL_20240331_213003515.jpg

Well! said I.  This is hardly ideal.  A foolish consistency may well be the hobgoblin of little minds, as Emerson once wrote, but there is certainly something to be said for a sensible consistency.  But ... how to achieve it?

This week in PSC (142) | 2024-03-28

  • Discussed some specific ideas for future perl development - more ways to allow CPAN modules to experiment with new ideas, import some possibly-stable ideas from CPAN into core.

  • Reviewed the list of ongoing experiments in perlexperiment.pod to work out what can now be declared stable. We’re technically past “user visible changes” freeze but maybe the list will be happy with these changes anyway.

  • Observed that SSL-in-core still hasn’t made any progress, and wondered further on how we can unstall it and try to get someone working on it eventually. Maybe writing a PPC doc would help?

TPRC/Science Track Submission Dates and Deadlines Coming Fast!

Talk submissions are still open, and we are seeking proposals on a wide variety of subjects. This includes language features, personal projects, applications like Koha, and anything that may be of general interest to Perl and Raku programmers.

To submit an abstract, please see the authoritative Science Perl CFP or for a standard talk visit the familiar Papercall site.

Please note it is our (the Science Perl Editorial Subcommittee) goal to be able to accept as many perl+science papers and posters as possible, as such our editorial process is designed to be very friendly.

Science Track Deadlines (initial submission is same date/time as the standard talk tracks):

  • Abstract submission deadline: April 5th, 2024 (23:59:59 UTC)
  • Abstract acceptance emails sent: April 15th, 2024
  • Draft full paper due: May 15th, 2024
  • Draft full paper feedback emails sent: May 31, 2024
  • Final full paper due: June 7th, 2024
  • Final papers approved: June 15th, 2024

PLEASE SPREAD THE WORD!

Thank you and I am looking forward to some very good things to see in Vegas, baby!

Brett Estrade (OODLER)

Perl Weekly Challenge 278: Reverse Word

These are some answers to the Week 278, 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 July 21, 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: Reverse Word

You are given a word, $word and a character, $char.

Write a script to replace the substring up to and including $char with its characters sorted alphabetically. If the $char doesn’t exist, then DON'T do anything.

Example 1

Input: $str = "challenge", $char = "e"
Ouput: "acehllnge"

Example 2

Input: $str = "programming", $char = "a"
Ouput: "agoprrmming"

Example 3

Changes in MooX::Role::Parameterized

What is it good for?

If you’ve never worked with MooX::Role::Parameterized or MooseX::Role::Parameterized, you might wonder what is a parameterized role at all?

Roles are used when you need to share behaviour among several classes that don’t have to be related by inheritance. Normally, a role just adds a bunch of methods to the class that consumes it (there’s more, you can for example specify which other methods the role expects to already exist).

A parameterized role makes it possible to provide parameters for the consumed role. This way, you can adjust the behaviour for each consuming class.

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

Just Graham and Paul

  • Reviewed the release-blockers label. Only two left, one is a documentation fix (PR22055)
  • Reviewed another documentation PR that should go in for 5.40 (PR22200)

Aside from that, things are looking good for making a 5.40 release at the usual schedule in May.

PTS 2024 - day 2 and 3... the bad days

Following on from day 1

Joel and I spent some more time working out disk provisioning and then decided to upgrade the nodes in the cluster... this is where the problems started...

I shutdown a node to resize it... and the site went down, no healthy backends was then displayed to all users by Fastly (our CDN) for any content that wasn't in their cache. This is not meant to happen!

We also couldn't connect to Argo (web UI for Kuberneties deployment and a view on the K8's API status) or even the kubectl command line tool.

Starting the node backup (after having upgraded) and all came back. We quickly realised that everything was using Round Robin DNS to all 3 node IP's. There was ` Traefik ` setup but it was tied to those IPs and something was not happy. We then looked at alternative tooling and thought it might be worth using rke2 instead of k3s as the underlying flavour of K8s as this would give us a little more flexibility.

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.