Finally have a chance to go to a North American Perl event, so after nearly 4 years since my last Perl event, thanks Covid 19 I managed to make my way down from the Ivory Tower in Ottawa to the 'Big Smoke', 'Hogtown', Queen City, TO or as most of the rest of the world knows it Toronto.
So there are about 100 us us Perl types here today, with most participants coming from across the US and Canada but there are a few that came over 'The Big Pond'
So far The talks have been very good, I had a and interesting Talk on Test2 by Chad Granum something I will have to look into as my old test suite is becoming a little flimsy and is a patchwork of kludges,
In my recent Cloud Comparison, I mentioned that I'd look at Spot VM pricing in an update. This is the update - 6 out of the 10 providers tested offer Spot/Preemptible instance pricing.
At SpareRoom we make some good use of Spot VMs. E.g. our perl test suite gets to run on fast VM types at very low cost: currently we are using c3-highcpu-22 instances which normally come at $0.95/hour each. The spot pricing for them is more than 10x lower, at just $0.086/h. At these prices, if our test suite needed it (it's already fast), we'd be able to launch c3-highcpu-176 (176 vCPUs) at well under $1/h!
Hi everybody! Just doing the first weekly challenge task again this week. This week we're sorting a list of numbers and then checking whether the number matches the same position in the unsorted list. It's a very simple challenge and easily written in about 4 actual lines of clean code.
Here's the code:
#!/usr/bin/perl
use strict;
use v5.24;
my @sorted = sort @ARGV;
my $matches;
for (my $i = 0; $i <= $#ARGV; $i++) {$matches++ if $ARGV[$i] == $sorted[$i]}
say $matches // 0;
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on March 31, 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: Count Equal Divisible
You are given an array of integers, @ints and an integer $k.
Write a script to return the number of pairs (i, j) where
Hi everybody! Very limited time this week so just a brief blog post.
This week we're looking for any words in the list that can be created only using letters from a dictionary string. Then print the number of characters in the good words.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on March 31, 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: Max Positive Negative
You are given an array of integers, @ints.
Write a script to return the maximum number of either positive or negative integers in the given array.
Example 1
Input: @ints = (-3, 1, 2, -1, 3, -2, 4)
Output: 4
Count of positive integers: 4
Count of negative integers: 3
Maximum of count of positive and negative integers: 4
Four years have passed since the last Perl Toolchain Summit (PTS) in Marlow. I planned to continue working on PAUSE's web UI, but I didn't exactly remember what to do. So the first thing I did at home before the PTS was to read through the PAUSE issues and do some triage. I also resumed a virtual machine that held PAUSE clones I had worked on. There I found an untracked docker-compose.yml. It was incomplete. I must have given it up because I already had a working environment. However, I remembered a few people wanted an easier way to install PAUSE. It would be helpful if they could run PAUSE on docker. Thus I started filling missing parts of the YAML file. After making a few serious mistakes, I made a draft pull request on the first day of the PTS. Matthew Horsfall took it over then.
Hi everybody! Back this week with a solution to just the first challenge project. I know I won't have time for the second one, plus I'm not sure of an efficient solution. I really liked this first one, though! I got to try some new techniques in it.
Spoiler alert, since I know it's only Wednesday/Thursday depending on where you are, but if you're looking to solve this challenge yourself you might prefer not to read this yet.
So the goal of the first challenge is to find the 3 integers in a list that have the greatest product, and print the product.
Spoiler Alert: This weekly challenge deadline is due in a couple of days from now (on March 24, 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: Multiply by Two
You are given an array of integers, @ints and an integer $start.
Write a script to do the following:
a) Look for $start in the array @ints, if found multiply the number by 2
We went through the release blockers list again. One is now fixed
(21044), one more should be closable once a perldelta PR is merged
(20384), one more remains (21073)
We discussed the funding of some Perl events (like PTS) and how
their sponsorship works now, and Philippe wondered whether TPRF
could be helpful in managing some of the complexity of that. Rik
said “very likely!” and suggested Philippe talk to them.
Hello ! Everyone, I am back here again to get your help.
Sorry, sorry for getting help alone and not helping other people's post.
But I will try to help others in another way, so please generous.
O.K. let me get started. I got weird error message as shown at the title, while I am reviewing the error_log at /var/log/httpd/ error_log. I never encountered this error message, so I can't figure the point of the error message. Does anyone has any clue to fix this error?
Spoiler Alert: This weekly challenge deadline is due in a couple of days from now (on March 24, 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: Element Digit Sum
You are given an array of integers, @ints.
Write a script to evaluate the absolute difference between element and digit sum of the given array.
Last year I compared the various VM types of 7 popular cloud providers mainly for Perl performance, as I was looking at workloads that we'd be using at SpareRoom - you can see that comparison here.
This year I expanded the comparison to 10 providers, and while I posted it on dev.to, I thought I'd give a heads up to blogs.perl readers, especially to the commenters of the last years' post that had suggestions I incorporated.
The Perl and Raku Conference for 2023 will again feature a Hackathon Room. On July 10th, the Marketing Committee plans to coordinate activities for projects that have a broad impact on Perl.
We hope to involve 2-3 high impact projects and any number of smaller projects.
The committee will provide logistical and non-coding support for projects that want it. We want to help by:
matching people to projects and projects to people
keeping a record of commits and achievements for a post-event blog post
answer other questions like "where are bathrooms?" and "what is the wifi password?"
Interested projects please comment on this post or contact us using marketing(at)perlfoundation(dot)org
Please note that anyone is welcome to use the room to hack on their project and to solicit help for it subject to the Conference SoC. This room is available on both the day before and the day after the conference. The wiki page for the Hackathon room is here
Just one solution to the first task in the weekly challenge this week, and it's a different type. I didn't have time to do any more, and this solution might not be the most efficient or cleanest, but it looks reasonably good to me.
The goal is to find any words which contain all the letters of the car registration number. I assume this would be to find a nickname for your car based on its registration number. In the examples, all of the words are lower-case, so I just assume that my inputs are lower-case. This week I used a few language features that I haven't used in previous challenges, like loop labels, POSIX classes, and a variable regex. As usual, the first argument to the script (without the space in the rego in the examples) is the registration and the rest of the arguments are the words to match it to.
Spoiler Alert: This weekly challenge deadline is due in a couple of days from now (on March 3, 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: Sum of Values
You are given an array of integers, @int and an integer $k.
Write a script to find the sum of values whose index binary representation has exactly $k number of 1-bit set.