Spoiler Alert: This weekly challenge deadline is due in a few days from now (on November 12, 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 1: Missing Members
You are given two arrays of integers.
Write a script to find out the missing members in each other arrays.
Example 1
Input: @arr1 = (1, 2, 3)
@arr2 = (2, 4, 6)
Output: ([1, 3], [4, 6])
(1, 2, 3) has 2 members (1, 3) missing in the array (2, 4, 6).
(2, 4, 6) has 2 members (4, 6) missing in the array (1, 2, 3).
One of the goals TPRF would like to achieve, now that conferences are becoming increasingly available in person, is to spread awareness of current Perl and Raku projects.
In support of this goal, TPRF will be issuing a limited number of mini grants of up to $300 to participants interested in holding Perl/Raku based talks in FOSDEM 2023 dev rooms. TPRF has made an intentional decision to not apply for a dev room, but to encourage talks to be given in other, non-language specific dev rooms instead. This will allow Perl and Raku to be shared with new audiences.
In addition, TPRF will have a 2 day stand at FOSDEM and are in need of volunteers to staff it. Stand volunteers are also eligible to apply for a mini grant of up to USD$300 to assist with the cost of attending.
Around the first 'public' release of Perl 6 (The x-mas release) I wrote a module that uses the libgumbo from google to parse html5 webpages.
It was faster and more robust than the existing HTML::Parser module written in pure Perl 6.
To be fair to the module, the full html5 norm is rather lenghtly to implement.
I was using this to parse my list of favorite fan fiction on fimfiction.net and try to make some stats around them.
It was still not super fast, like 0.5+ sec to parse one page (I have like 20+ pages of favorites). So each run of the script was rather slow.
At the time Perl 6 was still in stabilization phase and performance improvements were not really important. But after a while, it started
to creep its ways out into Moar and Rakudo. So I wanted to see the improvement over the Rakudo release for my Gumbo module.
Let's look at the XSPF playlist format. It's a pretty simple XML-based file format.
<?xmlversion="1.0"encoding="UTF-8"?><playlistversion="1"xmlns="http://xspf.org/ns/0/"><title>80's Music</title><trackList><track><title>Take On Me</title><creator>A-ha</creator><location>https://example.com/music/01.mp3</location></track><track><title>Tainted Love</title><creator>Soft Cell</creator><location>https://example.com/music/02.mp3</location></track><track><title>Livin' on a Prayer</title><creator>Bon Jovi</creator><location>https://example.com/music/03.mp3</location></track></track></trackList></playlist>
The full specification has a lot more details, but for now, we'll just use those elements.
If we are building a Perl application that needs to allow less experienced users to write playlists in Perl, it might be useful to define a domain-specific dialect of Perl for writing playlists.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on October 15, 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: Persistence Sort
You are given an array of positive integers.
Write a script to sort the given array in increasing order with respect to the count of steps required to obtain a single-digit number by multiplying its digits recursively for each array element. If any two numbers have the same count of steps, then print the smaller number first.
There are still a few hours left to donate to The Perl Foundation in the US 2022 tax year. Please support the great work the foundation does to support Perl and Raku
Arranged to have 2 Perl related articles published in the Linux Format magazine
Launched The Perl store offering Official Perl merchandise with profits going to the Perl Fund
Organized and held the Perl IDE Hackathon at The Perl and Raku Conference in Houston. This in response to community feedback about the importance of IDE support.
Secured the Camelia logo for The Perl and Raku Foundation
We are excited for the opportunities that the new year presents and express our continuing commitment to growing the Perl and Raku communities.
The committee exists to coordinate and facilitate volunteer efforts to promote the Perl and Raku ecosystems, create and distribute quality content, promote Perl and Raku related events, and assist with getting people involved.
All willing hands are welcome to attend our monthly meetings via Zoom. Please contact the committee via email for meeting invites.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on October 15, 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 1: Running Sum
You are given an array of integers.
Write a script to return the running sum of the given array. The running sum can be calculated as sum[i] = num[0] + num[1] + …. + num[i].
HTTPS support on blogs.perl.org, announced last month, has now undergone some additional small improvements to prevent the previously still theoretically possible exposure of session cookies in unencrypted requests.
As such, now is a good time to update your blogs.perl.org password to ensure you are not using credentials which may have previously been passively collected on an open network or the like.
Note: this recommendation is not a response to any known breach of blogs.perl.org. It is a response to the fact that security on blogs.perl.org has finally reached the level necessary to make this precautionary measure useful.
This is a variant of SemVer which mostly meets all its rules, except for releases prior to 0.2.0, where we bend them slightly.
It is my intention to use this versioning system for all open source software I develop from 1 January 2023 onwards. Existing open source projects I manage will adopt this scheme from their next release onwards. (Type::Tiny already somewhat does.)
It is my firm belief that every thought or idea that you or I have, has been had before. On the balance of statistics, the chances are that those that had these ideas handled it better, and have developed more powerful utilities to exploit these innovations. One therefore has a few possible options, when thinking of creating a solution to a problem. The first probably is to look for other published solutions and use them; these may be more mature, tried, tested and optimised. The second is to go ahead and implement another idea, foolishly perceived as an innovation, leading to a proliferation of methods duplicating, triplicating existing work, in the end producing a half-baked distraction.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on October 1, 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 1: Exact Change
You are asked to sell juice each costs $5. You are given an array of bills. You can only sell ONE juice to each customer but make sure you return exact change back. You only have $5, $10 and $20 notes. You do not have any change in hand at first.
Write a script to find out if it is possible to sell to each customer with correct change.
Is it not good enough to evoke PERL program at current Perl_5_36.0 (2022)??
If it is not good enough, let me know how should I write at the first line of CGI script???
A few reddit posts ago I saw an interesting article about maze generation and game written in Perl. Game development, I fully believe, is key to intellectual engagement, provides amusement to developers and non developers, and highlights the capabilities
of a programming language. This led to an brief exploration of other Perl arcade/action games; Such games such as construdo and deliantra show how complex games can be created. Frozen Bubble is another addictive Perl classic. As a non-developer, I find these games only demonstrate the chasm between my lack of coding agility and the cleverness of others.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on October 1, 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: Array Loops
You are given an array of unique integers.
Write a script to determine how many loops are in the given array.
To determine a loop: Start at an index and take the number at array[index] and then proceed to that index and continue this until you end up at the starting index.
Hi Everyone, especially Web-Casting Programmers !!
Naturally I encountered various problems. When I moved from an old computer platform Compaq-Evo with Fedora Core 7 (2007 Red Hat LINUX) to a newer Ubuntu and Rocky 9.1 (2022) as Web-Casting, Web codes encounters various errors and weird displays on the screen. I have to fix all the problems one by one. O.K. let me start one question. Will you help me if you have similar experience. In my case this is a big jump from 2007 -> to 2022.
Here is my first question . HELP me !
When I tested PERL script at Rocky 9.1, I needed to have the command "perl" in front of excitable script filename.
[ At Fedora-Core 7 ] $ script.pl [ENTER] -> it runs. Of course, the file script.pl has an executable file permission.
[ At Rocky 9.1 ] $ script.pl [ENTER] -> It didn't run. But,
[ At Rocky 9.1 ] $ perl script.pl [ENTER] -> It runs.
Should I have to call the interpreter "perl" explicitly like the second line always ???
This is all the way my first posting at this blog, so I hope this posting will work to communicating with someone. Thank you !!