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)

Essence of Perl Text Processing - Perl Book

I published "Essence of Perl Text Processing" in Japan. This is 2021 new Perl Book(Both Normal Book and EBook).

Essence of Perl Text Processing

Mascot character is called Mojigaeru(This means String Frag).

"Kaeru(Gaeru/変える)" also means "replace" in Japanese. This expresses Perl is good at string searching and replacing.

Amazon Web Programming new Ranking #2 in Japan 2021-07-05

Amazon Web Programming new Ranking #2 in Japan 2021-07-05

Don't be ashamed of Perl. Be brave.

CPAN Bus Factor

Perhaps you've noticed a new metric when browsing MetaCPAN?

moose.png

What is "bus factor"?

Wikipedia defines "bus factor" as

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

Read the full post.

Promotion: Knight's Challenge

knight.png(image from wikipedia)
PROMOTION:

A coding puzzle for “The Weekly Challenge ‐ Perl & Raku” I made has been released this week!

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)


Perl Weekly Challenge 169: Brilliant Numbers and Achilles Numbers

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

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

Write a script to generate first 20 Brilliant Numbers.

Brilliant numbers are numbers with two prime factors of the same length.

The number should have exactly two prime factors, i.e. it’s the product of two primes of the same length.

For example:

24287 = 149 x 163
24289 = 107 x 227

Therefore 24287 and 24289 are 2-brilliant numbers.

What they say in Java is just as true in Perl

use Benchmark::Dumb 'cmpthese';

( $bar, $quux ) = qw( bar quux );

cmpthese( 0.0002, {
  conc => q{
    my $str = "xxx ";
    (((( $str .= "foo" ).= $::bar ).= "baz" ).= $::quux ).= "qux";
  },
  intp => q{
    my $str = "xxx ";
    $str .= "foo${::bar}baz${::quux}qux";
  },
} );

Next stable DBD::SQLite will be released around the end of July

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:

Tau Station considered Dangerous: Game Review

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.

Perl Weekly Challenge 168: Perrin Primes

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

Spoiler Alert: This weekly challenge deadline is due in a couple of days from now (on June 12, 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.

The Perrin sequence is defined to start with [3, 0, 2]; after that, term N is the sum of terms N-2 and N-3. (So it continues 3, 2, 5, 5, 7, ….)

A Perrin prime is a number in the Perrin sequence which is also a prime number.

Calculate the first 13 Perrin Primes.

f(13) = [2, 3, 5, 7, 17, 29, 277, 367, 853, 14197, 43721, 1442968193, 792606555396977]

On my first implementation, I originally obtained the following sequence:

2 3 2 5 5 7 17 29 277 367 853 14197 43721...

Live streaming the release of Perl 5.35.1

In my talk at The Perl and Raku Conference in the Cloud 2021,
I already announced it. I'm doing the release of the Perl developer version
5.35.1, and you can watch it live Sunday, 20th June on Twitch.

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

Perl Weekly Challenge 167: Circular Primes

These are some answers to the Week 167 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 5, 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: Circular Primes

Write a script to find out first 10 circular primes having at least 3 digits (base 10).

Please checkout wikipedia for more information.

A circular prime is a prime number with the property that the number generated at each intermediate step when cyclically permuting its (base 10) digits will also be prime.

Output:

113, 197, 199, 337, 1193, 3779, 11939, 19937, 193939, 199933

Given the task specification, I think that the suggested output is wrong. But I’ll come back to that later on.

Circular Primes in Raku

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

Perl Weekly Challenge 166: Hexadecimal Words and K-Directory Diff

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

Task 1: Hexadecimal Words

As an old systems programmer, whenever I needed to come up with a 32-bit number, I would reach for the tired old examples like 0xDeadBeef and 0xC0dedBad. I want more!

Write a program that will read from a dictionary and find 2- to 8-letter words that can be “spelled” in hexadecimal, with the addition of the following letter substitutions:

  • o ⟶ 0 (e.g., 0xf00d = “food”)
  • l ⟶ 1
  • i ⟶ 1
  • s ⟶ 5
  • t ⟶ 7

You can use your own dictionary or you can simply open ../../../data/dictionary.txt (relative to your script’s location in our GitHub repository) to access the dictionary of common words from Week #161.

Optional Extras (for an 0xAddedFee, of course! * Limit the number of “special” letter substitutions in any one result to keep that result at least somewhat comprehensible. (0x51105010 is an actual example from my sample solution you may wish to avoid!)*

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.

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.

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.