Next Generation Sequencing
(NGS) has really taken off the last few years, as both devices and the
cost of experiments have dramatically declined. NGS decipher the
identity (base composition, the sequence of letters in the alphabet of
DNA and RNA) of nucleic acids and return the results in the fastq open data format. Fastq
files are flat text files with a standardized layout: each molecule
present in the sample that is captured by the sequencer is represented
with four fields:
a '@' character and is followed by a sequence identifier and an optional description
one (typically) or more lines of characters in the four letter alphabet of nucleic acids
a metadata field starting with the "+" optionally followed by the
same sequence identifier and description as in the first field
one, or more lines of the quality of each symbol sequence reported in field 2
An example of such a four field entry may look something like this
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on January 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: Unique Sum Zero
You are given an integer, $n.
Write a script to find an array containing $n unique integers such that they add up to zero.
Example 1
Input: $n = 5
Output: (-7, -1, 1, 3, 4)
Two other possible solutions could be as below:
(-5, -1, 1, 2, 3) and (-3, -1, 2, -2, 4).
At the recent YAPC::EU (still running) I gave a talk about my latest CPAN module: Graphics::Toolkit::Color (in short GTC - v1.53). It went a little out of hand and even worse: some of the key thoughts I did not formulate as clear as wanted. That is why I use this channel to correct that. In this first part I outline the goal of the module and the next part will be about the design principles of the public API, moving than into implementation details and the general issues when dealing with colors.
Worked out final resolving actions for security issues.
Discussed recent mailing-list posts about making method non-public
by default. This probably won’t work but we could open a PPC
discussion on my method + $obj->&method syntax.
Reviewed Projects in Flight - posted below
Merged the PR for PPC 0022 (Metaprogramming API). Discussions on
individual points can be made using GH Issues
Projects in Flight
HTTPS out of the box
— (Paul) has nudged Mark Gardner by email
PPC 0013 overload in join
— (Philippe) should open an issue with his thoughts on the topic
PPC 0014 English names
— (Paul) should check in with Joe McMahon
PPC 0019 qt Strings
— (Paul) now has TPF Core Development Grant so can start writing
this Any Day Now(TM)
PPC 0021 Optional chaining
— (Paul) should check in with Veesh Goldman
PPC 0022 Metaprogramming API
— (Paul) has a CPAN module, would be nice if anyone started using
it for any reason
(Graham) to write a PPC for ->&
Perl roadmap for 2024
— Yeah it’d be nice if we had one, but without having any weight of
promise behind it it’s just words
TODDR to write a draft pod/security_disclosure_process.pod (not in
December), and also offered to coordinate the next incident
Resource::Silo is a declarative lazy resource container library for Perl. It allows to declare resources such as configuration files, database connections, external service endpoints, and so on, in one place; acquire them on demand; cache them; and release in due order.
It may also be described as the single source of truth for the application's side effects.
For those unfamiliar with Bread::Board:
Hey, hey, hey, hey! A shiny new solution just arrived!
declare all of your application's resources / dependencies in one place using a simple DSL;
instantiate them on demand and only once, with little overhead;
override them with mocks in your tests & guard against unexpected side effects;
gain more fine-grained control via the ctl frontend.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on August 13, 2023 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: Two out of Three
You are given three array of integers.
Write a script to return all the elements that are present in at least 2 out of 3 given arrays.
Three Perl releases have been published this past week, containing patches for security issues CVE-2023-47038 and CVE-2023-47039. This kept us busy for the past few weeks (explaining the somewhat thinner recent updates).
Paul will publish a post-mortem on the recent releases, looking at what went wrong and some thoughts on how to improve it so those don’t happen again
We discussed a plan to improve documentation of the security disclosure process
We took note of what projects we have in flight (e.g. PPCs being implemented) and may find a way to keep that list published and updated
Once again I'm writing about a TPRC talk instead of a weekly challenge project, but that's because I feel it's a very important topic to be aware of both inside and outside our community as Perl programmers. Sawyer X gave a really great talk about the abuse he personally experienced as a member of the Perl community. I've never experienced abuse in this or any other technology community, but I have experienced abuse before in other contexts. Also, as a disclaimer, although I'm sure many have seen some of Sawyer's situation play out in public, I haven't, as I believe it happened during my extended break from Perl and development in general.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on July 30, 2023 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: Roman Maths
Write a script to handle a 2-term arithmetic operation expressed in Roman numeral.
I was seeing this so much talk about smartmatch or given/when, I decided to experiment with a prototype powered pseudo structure I'd been thinking about. The results were pleasing to me, and I plan on releasing this soon. I could rename it to match/case (versus fu/on), but the huffman in me likes the short (and semi-ambiguous) "keywords". Let me know what you think in the comments below.
I still need to do more unit tests, POD, dist.ini, etc. But it's the closest I could get what I was observing on P5P. And the current implementation is about as fast and tight as I think it could be. I also enjoy using Perl's datatype coercion capabilities via prototypes* quite a bit. It is a very powerful, underutilized, and misunderstood capability that can be used to bring about a lot more ideas via a "keyword" experience (which is the entire point).
I've been programming in Perl for almost two decades now. A lot has changed in Perl, and also in the way I program with it.
Several years ago my partners and I started a software company, I was in charge of everything to do with tech, so as CTO it was my responsibility to choose the tech stack our company was going to use. And it was an easy one: Perl.
Years have gone by, our company has continued to grow, our product catalogue has increased and the amount of data processing and analysis we do it's exponentially higher than when we started. And Perl has continued to show what a great option it is.
I would like to list some of the reasons why Perl has been such a great fit for our company.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on July 23, 2023 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: Zero Array
You are given an array of non-negative integers, @ints.
Write a script to return the minimum number of operations to make every element equal zero.
In each operation, you are required to pick a positive number less than or equal to the smallest element in the array, then subtract that from each positive element in the array.
I normally only write about the Perl Weekly Challenge/The Weekly Challenge, but today I have a couple things to say about recent Perl versions. I've been watching the videos from TPRC2023, and loving the talk by Paul Evans What's New in Perl v5.38. I like to have a minimum version in my code generally that I can rely on having all the features from. I think I previously ignored v5.36 because it wasn't in Debian yet (and I typically only use packaged Perl), but thanks to Paul's talk I've really enjoyed looking at the perldelta, where some really groundbreaking Modern Perl changes were made just in the use v5.36 syntax.
Well, now two things have happened. v5.36 is the oldest release still officially supported by the Perl team, and it's in Debian stable. This makes it a great candidate to be my new target version for most code!
Unfortunately, Ubuntu 22.04 (one of my servers) is still stuck on v5.34, and this makes me sad. 😥
In related news, the new object system in v5.38 and beyond looks pretty sweet! I'm excited. Can't wait to see what else gets implemented in the next couple versions.
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
A little over ten years ago, when Perl 5.18 was approaching its release date, I released match::simple. This was mostly in response to the smartmatch operator (~~) being deprecated, but also a solution to the incredibly arcane rules for how the smartmatch operator operated.
match::simple was intended to be... simpler. The operator looks a little funky because it uses some clever trickery to fake being an infix operator:
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on January 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: Special Numbers
You are given an array of integers, @ints.
Write a script to find the sum of the squares of all special elements of the given array.
An element $int[i] of @ints is called special if i divides n, i.e. n % i == 0, where n is the length of the given array. Also the array is 1-indexed for the task.
The Perl and raku Conference 2023 in Toronto was an event I was really looking forward to. A chance to rub shoulders with the giants of Perl and Raku, absorb insights and innovations of the nerdy Perly community...everything they said in the blurb. It was very well organised thanks to Alex, Sawyer, Makoto, Amber and Peter, herding an army of volunteers. Such a knowledge-intensive event should be recorded for posterity, trapping the wisdoms and inspirations from the wise and inspiring in the container that is YouTube.