Spoiler Alert: This weekly challenge deadline is due in a few days from now (on December 10, 2023 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: Linear Recurrence of Second Order
You are given an array @a of five integers.
Write a script to decide whether the given integers form a linear recurrence of second order with integer factors.
One of the modules bundled with Type::Tiny is Type::Params, a module that allows you to validate subroutine signatures using type constraints. It's one of the more popular parts of the suite.
This article provides a few hints for using it effectively.
I asked ChatGPT to suggest some new keywords that might make Perl more desirable. Here's the dialog:
JOHN: suggest some new keywords that Perl could add to its core syntax that would make the language more desirable to modern programmers
CHATGPT: Perl is a mature language that has undergone significant development since its inception. Despite this, there are always new features that can be added to a language to improve its appeal to modern programmers. Here are some suggestions for new keywords that Perl could add to its core syntax:
async and await: Asynchronous programming has become an increasingly important aspect of modern programming. Adding support for async and await keywords in Perl would enable developers to write non-blocking code that can take full advantage of modern hardware.
let: The let keyword is commonly used in languages like JavaScript and Rust to create variables with a limited scope. Adding let to Perl would make it easier to write clean and concise code.
Recently I received a bump on a GitHub pull request. This surprised me, because I was unaware of anything outstanding. I was even more surprised when I discovered that the distribution in question also had two open issues, one dating back about three months.
I have no idea why I was oblivious to these, but it made me want to audit myself to see if any other distributions had the same problem. GitHub has these nice links at the top of the page, Pull requests and Issues, but these show pull requests and issues that I initiated. I found no obvious way to display pull requests or issues filed against my repositories.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on December 10, 2023 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: 6 out of 49
6 out of 49 is a German lottery.
Write a script that outputs six unique random integers from the range 1 to 49.
Guys anything can happen. There is literally no way of avoiding something that you haven’t prepared for. So in the face of mounting anxiety over the huge number of unexpected scenarios that may be around the corner, what can you do? You can contemplate insulating yourself, try and minimise the hazards, control your environment to a fine level of detail so that the surprises are infrequent and hazards are mitigated. At work I am drowned in Health and Safety Guidance, IT security protocols, Fire Safety Training. This means that work is to a large extent a somewhat boringly protected environment for me, my colleagues and my patients. Yet, even this can not avoid surprises. So what about your home, sitting in front of your computer. All the protection provided by protocols here are more vague, less policed, seen more as guidelines rather than mandatory.
PayProp is an automated payment and reconciliation platform specific to the lettings industry that is both easier to use and more powerful than solutions offered by banks and traditional software vendors.
The Perl Toolchain Summit is the annual event that brings together the key developers working on the Perl toolchain. The 13th summit (after a three year hiatus in 2020-2022) is in France this year, in late April.
It is, at its heart, an in-person event: about thirty people will spend four days in confined spaces, exchanging ideas and patches. And also droplets. To keep everyone safe, we have prepared a COVID policy.
Write a script to return the largest number formed by concatenating some of the given integers in any order which is also a multiple of 3. Return -1 if none found.
inclusion of TLS libraries in the core: we think we should just try the “dual life” path, and see where that gets us.
n-at-a-time map/grep: Paul suspects it’s impossible to properly disambiguate my ($var, ...) from the EXPR case, and we wonder if the only choice is between having new keywords and dropping the EXPR case.
Just like domain name registrations, SSL certificates need to be renewed regularly, otherwise they expire. This means you now have one more thing to monitor. Let's look at ways to do this in Perl, curl and Go. We'll also get a quick introduction to a hosted Mojolicious app that I wrote to make this even easier.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on December 3, 2023 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 Language
You are given two arrays of languages and its popularity.
Write a script to sort the language based on popularity.
We are happy to announce that united-domains
supports the German Perl/Raku-Workshop!
united-domains ist ein erfahrenes Team von mehr als 80 Domain-Spezialisten, die sich zuverlässig und mit Leidenschaft um die Domains unserer Kunden kümmern. Wir inspirieren Brands und Professionals, ihre digitale Identität zu entwicklen.
I have very gradually been adopting Test2::V0 as a testing tool. I had a test file that performed a group of tests inside a for loop, and discovered there were circumstances where I wanted to skip an iteration. Well, the skip() provided by Test2::Tools::Basic operates by executing last SKIP;. In the case of a labeled for this skips not only the current iteration but all subsequent iterations.
I wondered if there was a Test2::Tools plugin that did a next SKIP;, so I generated an annotated index of Test2 tools. This index reports all of them in ASCIIbetical order, with the distribution they are found in and the abstract from the =head1 NAME section of the POD.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on November 26, 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: Group Hero
You are given an array of integers representing the strength.
Write a script to return the sum of the powers of all possible combinations; power is defined as the square of the largest number in a sequence, multiplied by the smallest.
For kicks I asked GPT to speculate about how we might improve Perl syntax with types and better object orientation. It generated the follow code and descriptions. Yes I know there's some errors in the code, I'm just presenting this as Chat GPT wrote it.
FWIW it looks a lot like what I see coming out of Corrina.
JOHN: If you wanted to improve Perl by adding types and object orientation what would you do. Give an example.
CHATGPT: Perl already has a limited form of object orientation, and there are also ways to add type checking through modules like Type::Tiny and Moose. However, if you were looking to significantly improve Perl's support for types and object orientation, there are a few different directions you could take.
Yep been a while since I posted something, been playing about with my HAM gear too much these days, but I do have a little gem of wisdom to share so here it is.
I updated my Mojolicious for the first time in quite awhile and my personal web server died.
Well this on was 100% my fault as the error was
Can't locate object method "route" via package "Mojolicious::Routes" at /johns/perl/Mojolicious-Plugin-Routes-Restful-0.03-2/blib/lib/Mojolicious/Plugin/Routes/Restful.pm line 124.
So I had a snoop around Mojolicious today and found this in the change log
8.67 2020-12-04
- Deprecated Mojolicious::Routes::Route::route in favor of Mojolicious::Routes::Route::any.
- Deprecated Mojolicious::Routes::Route::over in favor of Mojolicious::Routes::Route::requires.
- Deprecated Mojolicious::Routes::Route::via in favor of Mojolicious::Routes::Route::methods.
The most requested feature of the Cellgraph is now in operation: Colors.
I added one panel with all the options and functions to control them. It is a little complex, but well documented (see here). In short you can load and save from and to the config file single colors and color sets under special names. And then you have direct access to the gradient and the complimentary function of Graphics::Toolkit::Color. Reverting to the default grayscale is always possible with an push on a button.