In the previous entry, we presented a regex based fastq parser. As the regex engine maps to a finite state automaton, we should be able to rewrite the parser without regular expressions, using flags to keep track of the part of the record we are at. The code is straightforward, but lacks the elegance of the regex parser. It is provided as a possibly faster alternative to the regular expression implementation.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on February 11, 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: Most Frequent Word
You are given a paragraph $p and a banned word $w.
Write a script to return the most frequent word that is not banned.
Example 1
Input: $p = "Joe hit a ball, the hit ball flew far after it was hit."
$w = "hit"
Output: "ball"
The banned word "hit" occurs 3 times.
The other word "ball" occurs 2 times.
We skipped the meeting last week (2023-11-02). This week was a quiet week too, so we don’t have much to report.
We talked a bit about the PPCs currently being implemented. PPCs 14 (English names) and 21 (optional chaining) have people implementing them - we hope to have some progress to publish soon.
In the second part of this series about fast parsers for sequencing applications, I will review the code for the regex based parser. This is shown below (I use v5.38, as you should! because the year is 2023 and you should not have to type use strict; use warnings)
Hello everybody! For this week's weekly challenge I thought the challenges looked really easy, but they both had a couple slight complicating factors. Also, this was the first time I've used sub signatures.
Similar Words
For this one, we're looking for words that share all characters. We print out each pair of countries.
After written about the origin and goals of Graphics::Toolkit::Color -- let's take a look at the public methods and make it a little study of good API design. But lets work our way up from a few examples:
I don't really keep up with online resources, and I blogs.perl.org to be (like perl) a nice and stable home. I've watched resources come and go - I've lost untold content in the process (geocities, myspace, LtU, hello??).
I recently discovered dev.to because of a nice benchmarking article published by a long standing community member:
Benchmarking Perl Core Class in v5.38
By John Napiorkowski
My upgrade of my home server from Debian 11 ("bullseye") to
Debian 12 ("bookworm") went
almost without a hitch. Yesterday I realized that the Postgres data hadn't
been migrated from the old DB to the Debian package of Postgres 15. But
luckily, the good Pg people provide a Debian
package of 9.6 (the version which held my data) for Debian 12.
I could install that one, fire it up, dump all data into SQL, fire up Pg 15
from Debian and import it there. Now I run such an SQL dump daily, just to have
the data available as SQL files.
I wonder if it would be worthwhile for Perl to provide prebuilt
binaries/packages of old Perl versions for current OSes, but then, there are so
many build options that it's not worth the effort in general.
I noticed the other day we had an old utility script txt2html.pl that gave a warning
/usr/local/bin/txt2html.pl $* is no longer supported at /usr/local/bin/txt2html.pl line 1512.
Apparently $*=1 was how multi-line regex searching was done in old perls.
which gives us /usr/local/bin/txt2html, then mv'd the old txt2html.pl to txt2html.pl.orig and used ln -s to symlink txt2html.pl to point at /usr/local/bin/txt2html.
Reviewed recent mailing list threads - multiple namespaces, moose + warnings conflicts. Determined there’s not a lot the perl core can do (at the moment)
SSL out of the box still needs someone to project manage whatever various bits need to be done. A specific email on the subject will be sent to the list.
PR#18059 to fix up perl version number macros is still outstanding and needs fixing up so it can be merged
I have been leaning very heavily on Perl's prototype feature for creating new modules. The imptetus for this can traced back to the day I looked at the source code for Try::Tiny, and realized that it was implemented using prototypes. The main reason for using prototypes for many new modules I've created recently is my focus on making a thing I do repeatedly available in a more Perlish or idiomatic way.
The following article demonstrates 2 CPAN modules I have written that focus more on Perl programmer UX and why Perl prototypes can provide a way forward for a great many ideas that people have. Prototypes misunderstood, yes; but more so, they are misunderestimated. They are infact, very powerful and when used for their intended purpose; a lot of hand wringing can be avoided during feature discussions.
Please note that Komodo IDE is now open source.
Komodo IDE is a very feature-rich Integrated Development Environment (IDE). Basically a sophisticated source-code editor.
Notable features why I used Komodo IDE:
The blog post announcing Komodo IDE going Open Source is here.
The blog post also contains an explanation why it is made open source. One of the reasons is that there is already a lot of free and good editors available, e.g. Visual Studio Code. Though, as I was using Komodo IDE for at least 7 years now, I still very much like it and it’s OOTB feature set.
Hi everybody! In this week's weekly challenge, we're searching for anything but the minimum or maximum in a dataset, and searching for senior citizens on a plane.
Min And Max
This challenge is a very interesting one, because obviously the easiest solution in terms of development is to sort and filter the first and last element. However, that is O(n log n) and it's very little added complexity to do the O(n) solution with a single-pass filter.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on February 11, 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: Odd Character
You are given two strings, $s and $t. The string $t is generated using the shuffled characters of the string $s with an additional character.
Write a script to find the additional character in the string $t.
DBD::SQLite 1.73_01 (with SQLite 3.42.0) is a release candidate for the next stable DBD::SQLite. This release is mainly to upgrade the bundled SQLite library.
I'll wait for about a month and release 1.74 in the middel of September if there's no blocker nor request to wait for more. Thank you for your patience.