Monthly Report - August

The main activity for me last month was "The Perl Conference in Riga". It was my second European Perl Conference and the most memorable one. You can read my full report, if you are interested. During the conference, I got to meet, Heart & Soul of any Perl event, Liz & Wendy. It is embarrassing that I still don't know who's Liz and who's Wendy. One day, I will sort that out once for all next time when I meet them. I hope they would attend the London Perl Workshop next month. I met Paul Johnson first time in person. I have interacted with him on Twitter before. I also met many CPAN contributors who received Pull Request from me in the past. Icing on the cake was a gift, a book titled "Learning to program with Perl6: First Steps" by JJ Merelo.

To compute a constant of calculus
(A treatise on multiple ways)

𝑒 is for economics

The first task of the 21st Weekly Challenge was a very old one:
to find (what would eventually become known as) Euler’s number.

The story starts back in 1683 with Jacob Bernoulli, and his investigation of the mathematics of loan sharking. For example, suppose you offered a one-year loan of $1000 at 100% interest, payable annually. Obviously, at the end of the year the markclient has to pay you back the $1000, plus ($1000 × 100%) in interest...so you now have $2000. What can I say? It’s a sweet racket!

Perl Weekly Challenge W023 - Difference, Factors and Poem

This week's challenge is composed of three tasks.The first one is to get the n-th order of forward difference of a given list.

Task #1 - N-th order difference:
Suppose we have list (X) of numbers: 5, 9, 2, 8, 1, 6 and we would like to create 1st order forward difference series (Y). So using the formula Y(i) = X(i+1) - X(i), we get the following numbers: (9-5), (2-9), (8-2), (1-8), (6-1). In short, the final series would be: 4, -7, 6, -7, 5. If you noticed, it has one less number than the original series. Similary you can carry on 2nd order forward difference series like: (-7-4), (6+7), (-7-6), (5+7) => -11, 13, -13, 12.
Solution:

Perl Weekly Challenge 023: Forward difference series & Prime decomposition

Forward difference series

Create a script that prints nth order forward difference series. You should be a able to pass the list of numbers and order number as command line parameters.
Series592816
Order
1(9-5)(2-9)(8-2)(1-8)(6-1)
4-76-75
2(-7-4)(6+7)(-7-6)(5+7)
-1113-1312
3(13+11)(-13-13)(12+13)
24-2625
4(-26-24)(25+26)
-5051
5(51+50)
101

Perl Newbies weekly update 2019/8/31 - uc, lc, ucfirst, lcfirst functions

Hear Good News!

I report Perl Newbies weekly update.

I add uc, lc, ucfirst, lcfirst functions.

Perl Newbies

I start to work writing perl document for Perl 5 Newbies.

I think Perl Community(Mainly USA and more Mainly Silicon Valley) isn't intereted in Yung Perl People who want to know Perl programing language.

There are no easy, understandable, modern entries and perl programing examples in blogs.perl.org.

I try to continue to write entries for Perl 5 Newbies.

Is Perl 6 Being Renamed?

By now, many of you have seen the Perl 6 Github issue "Perl" in the name "Perl 6" is confusing and irritating. The issue suggested renaming Perl 6. While some may think that the name of the issue is trolling, or offensive, the actual issue was created by Elizabeth (Liz) Mattijsen, one of the core Perl 6 developers, a long-time Perl 5 developer, and with her spouse, Wendy, has long been an enthusiastic support of Perl 5/6. There is no trolling here. There is a lot of deep thought, careful discussion, and a genuine desire to find a way to bypass some deeply divisive issues in the Perl community.

While the proposed name was "camelia", Damian Conway made a strong argument in favor of "raku" and it appears the community is leaning towards this name for various reasons.

This post is my attempt to summarize what's going on for those who have missed it. Any errors are, of course, Damian's. (just kidding!)

Shorewall 5.2.3.4 Released

Shorewall 5.2.3.4 is now available for download. Shorewall is a gateway/firewall configuration tool for GNU/Linux, written in Perl.

Problems Corrected:

1) If multi-queue NFQUEUE (e.g., NFQUEUE(0:1) ) WAS used as a policy, an error such as the following was previously incorrectly raised.

ERROR: Invalid policy (NFQUEUE(0) /etc/shorewall/policy (line
15)

That has been corrected such that no error is raised.

2) If multi-queue NFQUEUE( e.g., NFQUEUE(0:1,bypass) ) was passed to a
macro, an error such as the following was previously incorrectly
raised:

ERROR: Invalid ACTION (PARAM:1c,bypass)))
/usr/share/shorewall/macro.BitTorrent (line 12)
from /etc/shorewall/rules (line 40)

Now, the NFQUEUE action is correctly substituted for PARAM in
the Macro body.

3) If shorewall[6].conf didn't set AUTOMAKE, the 'update' command
previously produced a new file with 'AUTOMAKE=Yes'. This resulted
in an unexpected change of behavior. Now, the new file contains
'AUTOMAKE=No', which preserves the pre-update behavior.

4) Shorewall-rules(5) incorrectly stated that the 'bypass' option to
NFQUEUE causes the rule to be silently bypassed if there is no
application attached to the queue. The actual behavior is that the
rule acts like ACCEPT in that case. Shorewall-rules(5) has been
corrected.

Perl Weekly Challenge # 23: Difference Series and Prime Factorization

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

Spoiler Alert: This weekly challenge deadline is due in several days from now (September 1, 2019). This blog post offers some solutions to this challenge, please don't read on if you intend to complete the challenge on your own.

Challenge # 1: nth Order Difference Series

Create a script that prints nth order forward difference series. You should be a able to pass the list of numbers and order number as command line parameters. Let me show you with an example.

Splitting on a change in Perl6

I had more thoughts about splitting on character changes, partly thanks to a mailing list thread, which led to more questions.

As a prelude, here are regexps that splits when changing to the letter B

# If the cursor is before B, and is after a character, and is not after B, split
> say "ABBBCDEEF".split(/<?before (B) {} ><?after . ><!after B >/).perl
("A", "BBBCDEEF").Seq
# If the cursor is before B, and is after character-class-exlcuding B, split
> say "ABBBCDEEF".split(/<?before (B) {} ><?after <-[B]> >/).perl
("A", "BBBCDEEF").Seq
And when changing from the letter B
# If the cursor is after B, and is before a character, and is not before B, split
say "ABBBCDEEF".split(/<?after (B) {} ><?before . ><!before B >/).perl
("ABBB", "CDEEF").Seq

Perl Weekly Challenge - 6 months

Last time we presented you the success story of 3 months. It is now time to share 6 months story with you. I would like to take this opportunity to thank each and every contributors. I would also like to take a look what have we achieved in these 6 months.Here is the list of achievements

#1 Active bloggers

I would call this one of the biggest achievements that we have had 228 blogs in the last 6 months. On top this, we have had 11 blogs , as listed below, by Damian Conway . Some of the bloggers started blogging again after long break and some were first timers. You can find all the blogs in the weekly Recaps and Reviews .

Recaps

The MongoDB Perl Driver is being deprecated

From Twitter

We've made this decision using hard data; over the past few years we have surveyed our user base and talked to companies that use the Perl driver. They've told us how they aren't developing new applications using Perl and have moved these applications into maintenance mode. This has meant that they have few demands for new MongoDB feature to be supported in the Perl driver.

We also looked at support requests and questions in the community, and found no questions about the Perl driver had been asked since 2018 on the mongodb-user list.

...

I create new site "Perl Newbie"

I create new site "Perl Newbie"

Perl Newbie

Perl Newbie is the site for people to leran Perl programing. Perl is good at text processing,Linux server administration, and Web development. You can use Perl on most operation systems. Perl backword compatiblity is very high. Perl Newbie chears people who try to learn Perl and use Perl for your development. Let't talk about Perl. "He uses Perl and has much fun."

This is created by Giblog.

Perl Weekly Challenge W022 - Sexy Primes

I was googling about perl, hoping to see an active community that is dedicated to perl. I have been an active member of codesignal and I primarily use perl to solve the challenges. And then, I came across the website perlweeklychallenge.org that is being maintained by Mohammad Anwar. The website as the name implies, post challenges every week it usually consist of three tasks.

Task #1 - Sexy Prime For this week, the first task is to print the first 10 sexy primes
Write a script to print first 10 Sexy Prime Pairs. Sexy primes are prime numbers that differ from each other by 6. For example, the numbers 5 and 11 are both sexy primes, because 11 - 5 = 6. The term “sexy prime” is a pun stemming from the Latin word for six: sex. For more information, please checkout wiki page.
Solution #1
Below is my perl5 solution for the task:
Note: The code was intentionally obfuscated for fun (The syntax highlighter fails in $' )

Splitting on a change, Challenge 20 Task 1

I like reading the Perl Weekly Challenge even if I rarely participate.

It struck me that task 1 of Week 20 asked "to accept a string from command line and split it on change of character" - but every solution that I read in the recap looked for runs of the same character instead of the literal interpretation of the challenge.

Then I found, it was a dead end for me...

$ perl -E 'say join " ",split /(.)(?!\1)/,scalar '
ABBCDEEF
 A B B  C  D E E  F

Ah, I want zero-width on each side, but I want to both use capture for \1 but NOT also have "split" keep the capture, can't have it both ways...

$ perl -E 'say join " ",split /(?<=(.))(?!\1)/,scalar '
ABBCDEEF
A A BB B C C D D EE E F F

Perl6's expressiveness won for me, but I think this could be cleaner, and it has a spurious empty string at the beginning. Ideas for improvement, dear reader?

say "ABBCDEEF".split(/<?before (.) {} :my $c=$0;><!after $c> /).perl
("", "A", "BB", "C", "D", "EE", "F").Seq

Perl Weekly Challenge # 22: Sexy Prime Pairs and Compression Algorithm

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

Spoiler Alert: This weekly challenge deadline is due in several days from now (August 25, 2019). This blog post offers some solutions to this challenge, please don't read on if you intend to complete the challenge on your own.

Challenge # 1: Sexy Prime Pairs

Write a script to print first 10 Sexy Prime Pairs. Sexy primes are prime numbers that differ from each other by 6. For example, the numbers 5 and 11 are both sexy primes, because 11 - 5 = 6. The term “sexy prime” is a pun stemming from the Latin word for six: sex. For more information, please checkout wiki page.

Swiss Perl Workshop - Post Event & Future

The Swiss Perl Workshop is over for another year. Thanks to all who attended, sponsored, helped out on the day and before, gave talks, and made suggestions. There are a few photos of the event available on the Perl Events Instagram feed.

The videos of the talks are available here. The recordings were largely successful, although one video still needs some putting together due to technical issues - this one will appear later.

Open Discussion

On the second day of the workshop an open discussion took place. This was a continuation of a discussion started back in May, in Bern, and covered several issues about the current state and future of the workshop.

I made a few notes to cover it for those who were not present, as we did not record this discussion due to its impromptu nature. I have split the topics into sections below. Note that the use of "Perl" below should be taken to mean both Perl 5 and Perl 6.

Future Name

With friends like these...

C-o-rr-a-ll-i-n-g d-i-tt-o-e-d l-e-tt-e-r-s

I was going to focus this week on the first task of the 20th Weekly Challenge...but what can I say? The task was a break a string specified on the command-line into runs of identical characters:

    "toolless"        →   t  oo  ll  e  ss
    "subbookkeeper"   →   s  u  bb  oo  kk  ee  p  e  r
    "committee"       →   c  o  mm  i  tt  ee

But that’s utterly trivial in Raku:

    use v6.d;

    sub MAIN (\str) {
        .say for str.comb: /(.) $0*/
    }

And almost as easy in Perl:

Day Two at the SPW, or is it SPAFW or WSRAK 2019

A rather relaxed day here at the SPW 2019. We started out with a rather animated open discussion of the future on small Perl meet-ups. Seems it is not only the SWP that can have troubble attracting speakers or attendee, people from around the EU Perl community also voiced some concern that organizing small local workshops is getting more difficult.

On suggestion was changed the name or the SPW to something less perlish (which makes sense as Perl6 will soon have its own name). Another suggestion was joining up with more regional PM groups in the Alpine area to attract a few more attendees and organizers. Personally I have seen the same problems come up in other user groups, not a sign of decline but more a sign that the days of the small workshop may be numbered.

Perl Weekly Challenge # 21: Euler's Number and URL Normalizing

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

Spoiler Alert: This weekly challenge deadline is due in several days from now (August 18, 2019). This blog post offers some solutions to this challenge, please don't read on if you intend to complete the challenge on your own.

Challenge # 1: Euler's Number

Write a script to calculate the value of e, also known as Euler’s number and Napier’s constant. Please checkout this wiki page for more information.

The number e is a mathematical constant that is the base of natural logarithms: It is the unique number whose natural logarithm is equal to 1 and its value is approximately 2.71828.

Euler's Number in Perl 6

Perl 6 has a built-in constant, e, for Euler's number, which we can just print:

$ perl6 -e 'say e'
2.718281828459045

CPAN Game: 100+ days of daily CPAN upload

Yes, I am back again with another blog. I just need a reason to write about. This time, I am going to talk about one of the most fun game I am involved with for long time. In short, this game requires you to upload one distribution to CPAN every day. It sounds simple but it is far from simple.

Current Chains

All-time Chains

Screenshots taken from Neil Bowers personal website.

If you don't know the history of the game, let me give you little introduction, I was first introduced to the game by one of the blog by Neil Bowers. I got addicted to it from day one. Few months later, Barbie blogged once he completed one year of CPAN uploads. It worked like a catalyst to my already addiction.

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.