Perl Weekly Challenge 265: Completing Word

These are some answers to the Week 265, 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 April 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: Completing Word

You are given a string, $str containing alphanumeric characters and array of strings (alphabetic characters only), @str.

Write a script to find the shortest completing word. If none found return empty string.

A completing word is a word that contains all the letters in the given string, ignoring space and number. If a letter appeared more than once in the given string then it must appear the same number or more in the word.

Example 1

This Week in PSC (143)

  • We’ll chase up current implementors of outstanding PPCs to see what progress is
  • Reviewed the new bugs since last review. One new potential blocker - 22121
  • Reviewed a first draft of a “Perl Roadmap” presentation that might be given at PTS

CFP: Science Track Papers Needed at The Perl & Raku Conference

CALL FOR PAPERS NOW OPEN!

  • Science Track at The Perl & Raku Conference
  • June 25 - 27, 2024 (talk dates)
  • Las Vegas, Nevada, USA

click here to submit your abstract

You may submit your Science Track abstracts here! Don't wait, do this today! Prior registration to the Perl Conference is not a condition for acceptance, however individuals with accepted papers and posters are expected to register for and attend the Conference in person*. You may register for the Perl & Raku Conference here. (Note: in the past, the Conference registration fee has been waived for speakers; it is expected that this will be the case again this year, but at this time there are no guarantees.)

  • let us know if this is impossible, exceptions may be considered in some extenuating circumstances

Deadlines:

  • Abstract submission deadline: April 05, 2024 (23:59:59 UTC)
  • Full paper deadline: May 15th, 2024 (23:59:59 UTC)

Live streaming the release of Perl 5.39.7

I missed last year but in 2024 I'm doing a dev release of Perl again. This time it is version 5.39.7.
And again, you can watch it live on Saturday 20th of January on Twitch.

Perl Weekly Challenge 265: 33% Appearance

These are some answers to the Week 265, 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 April 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 1: 33% Appearance

You are given an array of integers, @ints.

Write a script to find an integer in the given array that appeared 33% or more. If more than one found, return the smallest. If none found then return undef.

Example 1

This Week in PSC (130) | 2024-01-04

Happy New Year!

This week, we discussed some recent mailing-list threads:

  • meta experiments continue. They should probably provoke some kind of runtime warning about being experimental, but exact details need discussion
  • Ovid requests to write another PPC about value constraint checks. We don’t object as such, but would remind that a specification alone does not guarantee an implementation and we’re still busy implementing the previous big idea (class)

Never matching: everybody is doing it wrong

Well, not actually wrong, just slow. But the exaggeration makes a punchier headline, you’ll admit.

This comes up when an interface takes a pattern to match things against. Sometimes you have some reason to want this match to always fail, so you want to pass a pattern which will never match. The customary way of doing this is to pass qr/(?!)/. There is a problem with that, though.

I’m not talking here about the fact that if possible, you really don’t want to pass an actual qr object. We’ve already covered that. It was a surprising enough discovery that I’ll take this opportunity to signal-boost that while we’re here, but this article is not about that.

Geizhals Preisvergleich unterstützt den Deutschen Perl/Raku-Workshop

We are happy to announce that Geizhals Preisvergleich supports the German Perl Workshop in 2024!

Perl Weekly Challenge 264: Target Array

These are some answers to the Week 264, 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 April 14, 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: Target Array

You are given two arrays of integers, @source and @indices. The @indices can only contains integers 0 <= i < size of @source.

Write a script to create target array by insert at index $indices[i] the value $source[i].

Example 1

Step Counter (Advent of Code 2023/21)

The Task

We’re given a grid with obstacles, we’re supposed to count all the reachable plots in the grid in a given number of steps (we can only move one plot at a time horizontally or vertically).

The sample input looks like this:

...........
.....###.#.
.###.##..#.
..#.#...#..
....#.#....
.##..S####.
.##..#...#.
.......##..
.##.#.####.
.##..##.##.
...........

where S is the starting position.

This Week in PSC (129) | 2023-12-21

We

  • Arranged for a representative from TPRF to join us in January to discuss roadmaps
  • Started discussing what might turn up in the PSC talk at FOSDEM

We’re skipping next week due to Christmas, so next meeting should be on 2024-01-04

Migrating from DBD::mysql to DBD::MariaDB

DBD::mysql has long provided the interface to connect to the MySQL database from Perl code. But as old as it is, it was implemented with some critical bugs that cannot simply be corrected without breaking mountains of existing code relying on those bugs. For this same reason, though DBD::MariaDB corrects these bugs, care must be taken when migrating existing code to avoid subtle breakage.

This blog post is far too short to explain Unicode and encodings like UTF-8; for anyone seeking a more solid grasp on the concepts, I recommend a read through The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) by Joel Spolsky.

Perl Weekly Challenge 264: Greatest English Letter

These are some answers to the Week 264, 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 April 14, 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: Greatest English Letter

You are given a string, $str, made up of only alphabetic characters [a..zA..Z].

Write a script to return the greatest english letter in the given string.

A letter is greatest if it occurs as lower and upper case. Also letter ‘b’ is greater than ‘a’ if ‘b’ appears after ‘a’ in the English alphabet.

Example 1

Brain Memory Management

My next dev article about the important concept of cognitive load of code and how to manage it.

This Week in PSC (128) | 2023-12-14

This week, Graham was on holidays, so Paul and Philippe:

  • reviewed new mailing list threads. Just one - a rethink of signatures.
  • submitted a talk proposal to the Perl dev room at FOSDEM
  • continued to discuss the complexities of moving past the number ‘5’ for the major part of the language version

Quote of the week: “There are features that make the language slow, but those are the features that make the language.”

It's the Twelve Days of Dancer, 2023 edition!

The 2023 Dancer Advent Calendar, the Twelve Days of Dancer is up and running! We hope you'll enjoy this year's version - there's a lot of fun and practical gifts to be found there.

Hot on the heels of our earlier gift (Dancer2 1.1.0) come two more plugin releases, Dancer2::Plugin::Cache::CHI and Dancer2::Plugin::Syntax::GetPost.

Enjoy! Let us know what you think. Happy holidays to all! (and now it is time for this Dancer to enjoy a long winter's nap)

Jason/CromeDome

Perl Weekly Challenge 263: Merge Items

These are some answers to the Week 263, 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 April 7, 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: Merge Items

You are given two 2-D array of positive integers, $items1 and $items2 where element is pair of (item_id, item_quantity).

Write a script to return the merged items.

Example 1

System Thinking

I started to also post on dev.to and will post there mostly about topics larger than Perl : psychology of programming, software engineering and alike.

This Week in PSC (142)

  • 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?

(repost) TPRC 2024 Call For Papers is now open!

If you have been following along with the efforts to add a Science Track to the TPRC, now is the time to seriously consider submitting a peer reviewed paper. The TPRC Call for Papers has opened with information on submitting to any of the 3 tracks. Note that the science papers are submitted to the Perl Community's Science Perl website, which is linked in the TPRC's announcement.

Repost from, https://news.perlfoundation.org/post/cfp2024

You can submit your talk Ideas at https://tprc.us/talks Talk submission deadline is April 5th, Midnight UTC. Talks must be given live and in-person. If you are looking for any talk ideas, try out the conference wiki.

New this year, we are accepting submissions for a peer reviewed Science track. Those talks should be submitted at https://science.perlcommunity.org/

Visit the TPRC 2024 website at https://tprc.us/ Follow us on Twitter: @PerlConferences Like us on Facebook: The Perl Foundation (@tpf.perl) Subscribe to the mailing list: https://tprc.us/subscribe

Any questions about the Science Track should be directed to "science at perlcommunity.org" or visit us at #science on irc.perl.org.

Looking forward to seeing all the submissions!

Cheers,

Brett Estrade (OODLER)

Chairman, Science Perl Committee

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.