Spoiler Alert: This weekly challenge deadline is due in a few of days from now (on July 31, 2022 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: Last Sunday
Write a script to list Last Sunday of every month in the given year.
For example, for year 2022, we should get the following:
One of the remarkable things about the
Date-Manip package is
its flexibility in the matter of input. If I mean "tomorrow noon," I do
not have to think of what today is, I simply specify "tomorrow noon," or
its equivalent in any of sixteen other languages.
One day, I thought: what about "tomorrow sunrise?" And thus was born
Date-ManipX-Almanac.
In principal, there can be support for any almanac event from any
astronomical body in the
Astro::Coord::ECI
ecosystem. In practice at least most of them are covered, though I have
not audited for 100% coverage. This includes the bodies in the
Astro-Coord-ECI-VSOP87D
distribution, should you want planets through Neptune. Pluto was not
covered by the VSOP models -- its exclusion is not a political
statement, at least not by me. Satellites are not supported, and
currently there are no plans for them.
a measurement of the risk resulting from information and capabilities not being shared among team members, derived from the phrase "in case they get hit by a bus."
For CPAN our definition is "a measurement of how risky it might be to start relying on a CPAN module, which might not be actively maintained".
Originally, the Perl Weekly Challenge called for solutions in Perl and Raku (also known as Perl 6 at the time). But, very soon, people started to provide solutions in other “guest” languages. See for example my blog post providing solutions to the task described below in about 18 different guest languages.
One of the languages I tried for the first time last week with Sylvester’s sequence is dc, and it turned out to be much more difficult and challenging than I initially thought. One of the problems is that there is only very limited documentation on this old programming language. So I thought it might be useful to describe in some details how I solved it. I provided detailed explanations in this other blog post. I’ll now do the same with the disarium number task of this week, which is a bit more complicated.
You have 46- hours to play with it if you align with official deadline. It probably spends you 2~5 hours in this weekend. Beware! Doing the bonus part may spend you a block of extra 2 hours or more.
I wish more people will participate and show different approaches to the task. (And, may the participant give me some feedback as a puzzle creator?)
One may have advantage if s/he has played chess.
As the puzzle creator, of course I had a sketch of a solution in my mind.
Yesterday I solved (== coded) the puzzle and is blogging about it this morning. [Spoiler Alert] If you are interested in my solution... source code , blogpost
Miscellaneous:
My blog is moved to GitHub, mainly because I think soon or later I will blog on other programming languages or issues. At this moment, it has a few posts. :o)
DBD::SQLite 1.67_07 (with SQLite 3.36.0) is a release candidate for the next stable DBD::SQLite. This release has a notable change to improve how to deal with Unicode/Latin-1 characters, contributed by Felipe Gasper. If you write a new application, it is recommended to use one of the newly added modes like this:
Spoiler Alert: This weekly challenge deadline is due in a few of days from now (on July 24, 2022 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: Disarium Numbers
Write a script to generate first 19 Disarium Numbers.
A disarium number is an integer where the sum of each digit raised to the power of its position in the number, is equal to the number.
For example,
518 is a disarium number as (5 ** 1) + (1 ** 2) + (8 ** 3) => 5 + 1 + 512 => 518
I thought I’d try out Tau Station for a couple of days and get a quick blog post out of it. That was three months and 11 levels ago. It took 2 months to wind down my obsessive nature and if not for Tau, I could have pushed a couple of new module versions to CPAN by now. That’s rather the reason that I don’t play games in the first place, so I can’t give great comparisons.
To sum up, Tau Station is a web-based, second-person adventure with resource management in real-time: a Choose-your-own-Adventure book crossed with Freeciv. Oh, and it’s free. Well, freemium, but the least obtrusive freemium game I’ve ever seen.
On behalf of the Dancer Core Team, I'd like to announce the availability of Dancer2 0.301004. This is a maintenance release with two bug fixes only: one corrects an omission from the tutorial, and the other adds a missing dependency to Dancer2's cpanfile.
You can read the complete [changelog](https://metacpan.org/changes/distribution/Dancer2)
here. If you need help, please reach out on IRC (irc.perl.org#dancer) or our
[mailing list](https://lists.perldancer.org).
Originally, the Perl Weekly Challenge called for solutions in Perl and Raku (also known as Perl 6 at the time). But, very soon, people started to provide solutions in other “guest” languages. See for example my blog post providing solutions to the Sylvester’s Sequence task described below in about 15 different guest languages.
One of the languages I tried is dc, and it turned out to be much more difficult and challenging than I initially thought. I actually spent far more time on it than I would wish to admit, at least 5 to 6 hours (not counting the time to write this blog post). One of the problems is that there is only very limited documentation on this old programming language. So I thought it might be useful to describe in some details how I solved it.
UI elements now update on the fly, so all changes are reflected immediately
You can 'use' any version of installed Perl from the UI, which opens up a new CLI window set to use the selected version
You can now fetch the updated list of Strawberry Perls available through the UI
Cloning installed Perls as well as a myriad of other operations can now be done through the UI
The API has been updated so that internal objects are updated live-time. This makes having long-running processes possible
Build/Test infrastructure updates
Documentation updates
Minor bug fixes
I've just got a new full time job, programming in Perl... finally, after several years of looking for that perfect work environment. Some of it will be on Windows (which I haven't used except for developing berrybrew), so I'm actually looking forward to using my own software, especially how useful its become thanks to the new UI I've developed.
Spoiler Alert: This weekly challenge deadline is due in a few of days from now (on July 17, 2022 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: Esthetic Number
You are given a positive integer, $n.
Write a script to find out if the given number is Esthetic Number.
An esthetic number is a positive integer where every adjacent digit differs from its neighbour by 1.
For example,
5456 is an esthetic number as |5 - 4| = |4 - 5| = |5 - 6| = 1
120 is not an esthetic numner as |1 - 2| != |2 - 0| != 1
On behalf of the Dancer Core Team, I'd like to announce the availability of Dancer2 0.301003. While there are a number of bug fixes and documentation improvements in this release, there are two new features that I'd like to point out:
Git support from the CLI: When scaffolding a new Dancer2 app from the command line, you can now initialize a new Git repository and set the remote all at once. Passing the --git option to dancer2 gen will initialize a new repository, and --remote will take a URL for your remote repository (git:// and https:// are both supported).
Out-of-the-box Docker support: There are a lot of ways to containerize your Dancer2 application, but sometimes we all need a little help getting started. Using the --docker argument to dancer2 gen creates a Dockerfile for your application based on the latest stable Perl image available. Once your application is generated, there are instructions for how to run your app via plackup or Docker.
As you all know, I joined Oleeo last month, it was busy getting my head around the code base and infrastructure. I had to slow down my activities with regard to the routine Perl Weekly Challenge tasks.
A lot has been said about the recent CAT report and updates. It feels to me like we're not getting anywhere because the critical matters aren't being addressed.