Perl Weekly Challenge 173: Sylvester's Sequence in dc

This blog is an answer to the second task of the Week 173 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

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.

The Task

Dancer2 0.301004 Released

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).

Happy Dancing!
Jason/CromeDome

Let's be friend ...

Let me share my views in response to the questions raised.

https://perlweeklychallenge.org/blog/lets-be-friend

berrybrew version 1.34 released!

I've released version 1.34 of berrybrew.

Notable changes:

  • 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.

Happy Perling!

-stevieb

Perl Weekly Challenge 173: Esthetic Number and Sylvester's Sequence

These are some answers to the Week 173 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

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

Esthetic Number in Raku

Perl Lists - a Partial Taxonomy


Follow-up to Mark Gardner's article about Perl List:: modules.

The Witch and the Witch-hunt

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.

A Perl Community Dashboard

In this weeks TPF Marketing Committee meeting I made an elevator pitch for a "Perl Community Dashboard". It was well received so I have taken the action item to expound upon the idea here to gather more input. Understand this then as the minimum viable product to go from 0 to 1, something achievable that we can build upon.

The Goal:

Create a central web based "Dashboard" (think Grafana-ish) the brings together metrics from key Perl related websites (hereafter, mastheads) and potentially other channels such as social media or irc.

What is the "Business Outcome"?

The marketing committee can use those metrics to set goals and measure the effectiveness of marketing activities. By including many mastheads we can get a picture of activity levels over time, how people move between the content, and which content is the most important.

Perl Weekly Challenge 172: Prime Partition and Five-Number Summary

These are some answers to the Week 172 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

Spoiler Alert: This weekly challenge deadline is due in a few of days from now (on July 10, 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: Prime Partition

You are given two positive integers, $m and $n.

Write a script to find out the Prime Partition of the given number. No duplicates allowed.

For example,

Input: $m = 18, $n = 2
Output: 5, 13 or 7, 11

Input: $m = 19, $n = 3
Output: 3, 5, 11

Open Letter to the Perl Foundation Board

Dear TPF Board members,

We want to express our disappointment with the recent transparency reports and associated actions from the Community Affairs Team (CAT).

On Monday 19th March, a first Transparency Report was issued, which said that an individual had been investigated for (1) behaviour on IRC and Twitter, and (2) behaviour at a Perl event in 2019. The report also reported that they had "found many instances of communication which alone may not have constituted unacceptable behavior, but when taken together did constitute unacceptable behavior", but no further details were given on those. The report issued a ban from all TPF events "in perpetuity", and furthermore issued a ban on the individual’s participation on irc.perl.org and any perl.org mailing lists. A second individual was issued a warning.

Monthly Report - April

Thanks for your support and encouragement ...

I had many ups and downs in the month of April. In all these, I have recieved plenty of supporting voices.

First, we had the start of Ramadan. I feel fortunate to be able to fast in this holy month. However I had to break my fast for two days because I suffered by Vertigo. Luckily I recovered very fast, thanks to ALLAH s.w.t.

Paws anyone?

Gee almost a year since my lat post. I better start posting again or Mohammad will catch up with me ;).

Been quite a year for every one on this big blue marble. I hope you are all good.

Ok here is the very short post for today.

I just did my first build and upload of PAWS to CPAN

Expect Version 0.43 to be up there later today some time.

It was a bit of an epic on my part as this whole releasing thingy, made some real bad goofs (deleting then checking in a folder), thank goodness for 'git revert' and getting the version number wrong.

Hopefully is comes out ok.

Look for more releases in the future.

judypng.png

Perl Weekly Challenge 171: Abundant Numbers and First-Class Functions

These are some answers to the Week 171 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

Spoiler Alert: This weekly challenge deadline is due in a few of days from now (on July 3, 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: Abundant Numbers

Write a script to generate first 20 Abundant Odd Numbers.

According to wikipedia,

A number n for which the sum of divisors σ(n) > 2n, or, equivalently, the sum of proper divisors (or aliquot sum) s(n) > n.

For example, 945 is the first Abundant Odd Number.

Sum of divisors:
1 + 3 + 5 + 7 + 9 + 15 + 21 + 27 + 35 + 45 + 63 + 105 + 135 + 189 + 315 = 975

TPF made me wait 301 hours to learn my punishment

Edit2: After further talk with CAT, i will acknowledge that it was not the intent of the CAT to make me wait, and they in fact did not even realize this was the effect.

I am the "second individual", i am intimately familiar with the events of both their investigations.

Shortly before the TPF informed me that their start-of-may update was nearly ready to be posted, i informed them that these were my expectations:

2021-04-29 19:00
> all i care about are correct, accurate, truthful and useful consequences

I was wholly disappointed.

----

Context: https://news.perlfoundation.org/post/cat-transparency-report-updates0

----

Edit:

And interestingly the perl.reddit.com moderation team saw fit to censor the submission of this post. It can still be seen directly, but is not in the feed anymore. This is notable as a wide variety of posts and comments that violate the "no personal attacks" rule, but also were in nature against the accused by the TPF, were allowed to remain up and are up to this day and hour, often with completely false claims about people. chromatic and briandfoy are currently the most (and probably only) active moderators there.

CY's Take on PWC#110

If you want to challenge yourself on programming, especially on Perl and/or Raku, go to https://perlweeklychallenge.org, code the latest challenges, submit codes on-time (by GitHub or email).

Do tell me, if I am wrong or you strongly oppose my statements!

Well, I wake up early and get some time to blog about The Weekly Challenge again (in addition, correct some parts of my submitted code ‐ a brain with good rest well spots bugs!).

Both Perl and (guest language) Java codes for the two tasks have been done this week.

Task 1: Valid Phone Number

I started my Sunday afternoon with Java. "Eat the frog first."
There are several ways to read text files in Java, I chose the default class which I am most familiar with: java.util.Scanner.

Installing wxPerl for Strawberry Perl v5.32.0, or: Future of wxPerl?

I've been wanting to explore the Wx GUI toolkit bindings for Perl, but I couldn't get it to install correctly on my 64-bit Windows 7 machine.

When I ran cpan Wx, it failed to install the dependency Alien::wxWidgets. There were some cryptic errors about CreateProcess, which is (basically) Windows' equivalent of fork(2). Presumably, some process started by the build script was having some problems, but there wasn't much in the error message to go on.

From Google, I found an old reply posted on PerlMonks by Mark Dootson, the maintainer of Wx and Alien::wxWidgets, where he recommended to make sure to correctly set the PATH before building it.

Technically, my PATH seemed fine – it had all the necessary Perl directories in it. Still, suspecting that the problems may be caused by some other directory in the PATH, I reduced it to its bare elements and then ran cpan again:

Perl Weekly Challenge 170: Primorial Numbers and Kronecker Product

These are some answers to the Week 170 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

Spoiler Alert: This weekly challenge deadline is due in a few of days from now (on June 26, 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: Primorial Numbers

Write a script to generate first 10 Primorial Numbers.

Primorial numbers are those formed by multiplying successive prime numbers.

For example,

P(0) = 1    (1)
P(1) = 2    (1x2)
P(2) = 6    (1x2×3)
P(3) = 30   (1x2×3×5)
P(4) = 210  (1x2×3×5×7)

Dancer2 0.301003 Released

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.

Monthly Report - May

Time to celebrate ...

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.

EV charge pricing per State in US

Continuing from my previous post ( https://blogs.perl.org/users/itcharlie/2021/04/calculating-ev-battery-charge-with-perl.html ) I learned that residential electricity charges are calculated using an electricity supply rate per kWh and a electric delivery rate per kWh which actually increases the total EV charge prices that I have calculated in my previous post. My current bill states that my electric supply rate is at 6.9057 cents per kWh and my delivery rate is 11.1785 cents per kWh making it a total of 18.0842 cents per kWh which is 5 cents more than my original post at $ 0.13 cents per kWh.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.