RPerl at the Perl Conference in Pittsburgh - Day 2

Day 2 of the Perl Conference, and I am now a seasoned volunteer! I know all about HDMI recorders and cameras - well, almost…

This second day saw the very first meeting of the Perl Mongeresses, a Birds-Of-a-Feather for women in the Perl community. This year’s Perl Conference was notable for the highest known attendance of women to The Perl Conference ever! By highest, I mean… about 15 ladies total. Yes, there’s still work to do. This meeting was the opportunity to discuss issues that women are facing in the programming world.

Thank you, Ruth Holloway, for the Perl Mongeress initiative! I’m looking forward to the second edition next year. If some of my female readers plan to attend the PerlCon in Riga next month, you still have time to add one to the BoFs...

Meet The Champion - Joelle Maslak

As a part of weekly series "Meet The Champion", we are talking to the last week winner Joelle Maslak.

# Perl Weekly Challenge # 16: Pythagoras Pie

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

Spoiler Alert: This weekly challenge deadline is due in several days from now (July 14, 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: Pythagoras Pie

At a party a pie is to be shared by 100 guest. The first guest gets 1% of the pie, the second guest gets 2% of the remaining pie, the third gets 3% of the remaining pie, the fourth gets 4% and so on. * Write a script that figures out which guest gets the largest piece of pie. (Challenge proposed by Jo Christian Oterhals)*

Leaving irc.perl.org

This article just popped up on Twitter. Whilst I mostly idle on irc.perl.org (say hello in #australia) I have no idea who runs or ran it. Whilst I noticed that there seems to be several servers (at lease one of which being apparently provided by shadowcat systems). I had assumed this was largely just people keen to run their own local instance - irc serving not requiring much in terms of system resources.

I guess my reaction to the article is to feel some contribution to the "use but not contribute", although i'm not even an admin in a channel. IRC across the board is waning in the face of CPU and RAM hungry chat softwares.

It seems that if you can make chat software that requires you to upgrade your CPU and RAM you've got yourself a hot start up, even if you're largely replicating features available in irc and email lists.

With other efforts to reinvigorate this blog site, and other key perl websites, perhaps its time to include IRC (or others) in a strategic plan?

Seamless Proxy Auto-Config for CLI apps

Suppose you are in a corporate network environment and often times find yourself manually setting/unsetting the HTTP_PROXY environment variable in order to access different hosts (for instance, "yay proxy" for the external hosts and "nay proxy" for the internal ones). Sounds familiar? In this case, a pure-Perl tool I've written might help you :)

Draw sin curve using Imager

Write sin curve using Imager.

Chart::GGPlot author say to me "It is hard to use graphic basic library for me".

so I want to illustrate basic drawing.

Cairo seems to be good as features but portability is not good.

so I try to plot sin curve by Imager.

Curve is continue of very short lines.

I wrote a graph of sin.

Performance is very fast. Generation of graph is in a second.

Functional Programming in Perl: Strong and Weak Primes (Perl Weekly Challenge)

In this other blog post, I provided some answers to Week 15 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

Here, I want to use the opportunity of this challenge to illustrate once more some possibilities of functional programming in Perl (both Perl 5 and Perl 6) using the example of the first challenge of this week. I have already covered some aspects of functional programming in Perl in a post related to Weekly Challenge 9.

Perl Weekly Challenge - Meet The Champion

We have started weekly series "Meet The Champion" where we would speak to the winner of the "Perl Weekly Challenge". So far we have had two winners. Please checkout the interviews with the champions.

Please let us know if we missed anything.

Perl Weekly Challenge 015: Strong and Weak Primes, and Vigenère Cipher

Strong and Weak Primes

Write a script to generate first 10 strong and weak prime numbers.

The two sets of primes are defined with the following formulas:

  • p(n) is Strong when p(n) > [ p(n-1) + p(n+1) ] / 2
  • p(n) is Weak when p(n) < [ p(n-1) + p(n+1) ] / 2

It took me some time to realise there is a third set of primes which isn’t mentioned in the above list: there are also Balanced primes. The comparison operator for them is =.

To generate primes, I reused the (slightly modified) module I created for the Challenge 012. It caches the primes found so far and extends their list when needed.

As simple as possible...but no simpler

The first task of last week's Perl Weekly Challenge
was to generate van Eck's sequence:

0, 0, 1, 0, 2, 0, 2, 2, 1, 6, 0, 5, 0, 2, 6, 5, 4, 0,...

The first challenge is to understand just what van Eck's sequence is,
as the various online explanations are less than instantly helpful.

Van Eck's sequence is a list of integers starting at zero, where the next number
in the sequence is given by the distance between the current number
and the nearest preceding occurrence of that same number.

For example, if the current number at index N (let's call it: Aₙ) is 7,
then to compute the number at index N+1 we look back through the
sequence for the most recent preceding occurrence of 7
(at some earlier index M). Then the next number in the sequence
is simply the distance between those two occurrences of 7.
Namely: N - M

Perl Weekly Challenge # 15: Strong and Weak Primes and Vigenère Encryption

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

Spoiler Alert: This weekly challenge deadline is due in several days from now (July 7, 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: Strong and Weak Prime Numbers

Write a script to generate first 10 strong and weak prime numbers.

Monthly Report - June

Last month I was mostly involved with the "Perl Weekly Challenge". I didn't get any spare time to do anything else. Weekends were mostly busy with preparing weekly challenge. Then recap of every Perl5 solutions of previous week. It becomes even busier when I am working on Perl Weekly newsletter in that week. As the team growing, it is not going to be any easier. Luckily I have got help from Kian-Meng Ang who does the Perl5 code review every week.

We also started picking winner every week with the start of "Perl Weekly Challenge - 013" last month. We have had 2 winners so far, Laurent Rosenfeld and Jaldhar H. Vyas.

Let's take a quick look through last month main activities.

  • Pull Request
  • Git Commits
  • Perl Weekly Challenge
  • Pull Request Club
  • Perl Blog
  • PerlWeekly Newsletter
  • Adopt CPAN Module

Pull Request

53 Pull Requests submitted in the month of June. With this I have now completed 50+ Pull Request every month so far in the year 2019, one of my new year resolutions.

SUSE Hackweek Day 4 - Fighting with XS and C

On thursday evening and friday of the Hackweek I decided to work on the integration of YAML::PP and libyaml.

Previous hackweek posts:

Perl Weekly Challenge #014

Challenge 1: Van Eck's sequence

I must admit I found the definition of the van Eck sequence hard to follow. The EXAMPLE at OEIS helped:

We start with a(1) = 0. 0 has not appeared before, so the rule says a(2) = 0. Now 0 HAS occurred before, at a(1), which is 1 term before, so a(3) = 1. 1 has not occurred before, so a(4) = 0. 0 appeared most recently at term a(2), which is 2 terms earlier, so a(5) = 2. 2 has not occurred before, so a(6) = 0. And so on.

Perl Weekly Challenge # 14: Van Eck's Sequence and US States

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

Challenge # 1: Van Eck's Sequence

Write a script to generate Van Eck’s sequence starts with 0. For more information, please check out wikipedia page. This challenge was proposed by team member Andrezgz.

Jan Ritsema van Eck's sequence is an integer sequence defined recursively as follows. Let a(0) = 0. Then, for n ≥ 0, if there exists an m < n such that a(m) = a(n), take the largest such m and set a(n+1) = n − m; otherwise a(n+1) = 0. Thus, the first occurrence of an integer in the sequence is followed by a 0, and the second and subsequent occurrences are followed by the size of the gap between the two most recent occurrences.

This time, I'll start with Perl 6 (but complete the challenge in both P5 and P6).

Van Eck's Sequence in Perl 6

RPerl at the Perl Conference in Pittsburgh - Day 1

After the Texas Linux Fest, Team RPerl went all the way across the country to attend the 2019 North American Perl Conference. This time, I was not in charge of manning a booth. Instead, I was one of the official volunteers for the 3 days of the conference.

What does a volunteer do? He or she can work as a moderator, a runner, or a cameraman, depending on the needs of each talk. The moderator makes sure the speaker follows the schedule and has time for Q&A; the cameraman records the slides and films the speaker; while the runner is there in case something is needed, such as water for the speaker, more chairs, etc.

SUSE Hackweek Day 3 - (Not) Loading Objects in YAML::PP

Here's what I did on Thursday of the SUSE Hackweek.

Previous posts:

diff-so-fancy v1.2.6

diff-so-fancy strives to make your diffs human readable instead of machine readable. This helps improve code quality and helps you spot defects faster.

Version 1.2.6 of this perl utility has just been released.

Check it out here on github

Perl Weekly Challenge - Perl5 / Perl6


We are into the 14th week of Perl Weekly Challenge. If you look at participation of Perl5 and Perl6, based on data so far, we can clearly say Perl5 is the winner. However, I must clarify the race between the two is not objective of the Perl Weekly Challenge. But I see a pattern between the two. Perl6 solutions is always full of surprises where as Perl5 is just holding the ground. It could be because Perl5 is not new to me but anything and everything about Perl6 is new to me. Having said, some Perl5 solutions are full of surprises. I have become fan of some Perl5 contributors by the quality of code. I don't want to name just few. It would do injustice to others. Similarly there are some dedicated to Perl6 only and they are too good and great ambassador for Perl6. Damian Conway is one such who took the Perl Weekly challenge to another level.

Perl Weekly Challenge 014: Van Eck and the US States

This week, there was more work to be done for some of us: in addition to the standard three challenges, there was one more from Neil Bowers. His suggestion for a challenge had been simplified, so he published the original specification.

Van Eck’s Sequence

Let a0 = 0. Then, for n ≥ 0, if there exists an m < n such that am = an, take the largest such m and set an+1 = n − m; otherwise an+1 = 0.

I didn’t find a non-recursive formula for the sequence. I implemented a solution using an iterator: a subroutine that returns the next element of the sequence on each call.

Let’s start with a test.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.