Coding with a full toolset

A few years ago, I created a talk (and later an entire class) about "transparadigm programming" in Raku.

The basic premise was that while some languages restrict you to only a single hammer (or worse: a box full of hammers), Raku was designed to be a complete toolkit: integrating OO, functional, concurrent, declarative, and procedural tools to allow you to choose exactly the right combination for each job.

That idea came back to me in full force recently. In last week's Weekly Challenge, the second task was to take a list of file paths and find the longest common initial subpath (i.e. the deepest directory they all share).

The solutions offered by the various registered participants were all very clean, and often both efficient and elegant. Yet most of them were variations on the same procedural solution: Split each path on the directory separator, then for 1-to-N: compare all the Nth components and quit if they're not identical. Something like:

Can meta cpan display html table

Can meta cpan display html table.

metaCPAN support img tag.

https://metacpan.org/pod/Chart::Clicker

If I use HTML table in pod,

<table>
  <tr>
    <th>title1</th>
    <th>title2</th>
   </tr>
  <tr>
    <td>foo</td>
    <td>bar</td>
  </tr>
</table>
=end html

If you know, tell me the answer.

Perl Weekly Challenge # 12: Euclid's Numbers and Directories

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

Spoiler Alert: This weekly challenge deadline is due in several days from now (June 16, 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: Euclid's Numbers

The numbers formed by adding one to the products of the smallest primes are called the Euclid Numbers (see wiki). Write a script that finds the smallest Euclid Number that is not prime. This challenge was proposed by Laurent Rosenfeld.

I did not even remember I proposed this challenge to my friend Mohammad Anwar.

Simple Event Correlator v2.8.2

From the website's blurb:

Roles and Responsibilities in Scrum

You might find my Roles and Responsibilities in Scrum of interest (Scrum is not Waterfall).

RPerl at the Texas Linux Festival

RPerl is back on the road! We were in Dallas for the 2019 Texas Linux Fest, another wonderful opportunity to show the open source community that Perl is alive and well! One of the participants called our booth “the coolest-looking table of the conference”, and to that I must say: Thank you Wendy for showing me the way! You are my true mentor when it comes to spreading Perl love.

At the booth, we had the help of Tommy Butler, Perl programmer and leader of the Dallas Perl Mongers. On top of having a booth for the event, Will also gave a talk jokingly entitled “Start A Cult: Build A FOSS Community From Scratch”. The talk was well-attended and drew more interest to our overall Perl booth activities.

Dose Imager have utilities for vector graphic to write chart?

Dose Imager have utilities for vector graphic to write chart?

Imager is very portable to manipulate imanges in Perl.

I want to know that Dose Imager have utilities for vector graphic to write chart?

For example, Cairo can write the following Chart.

Perl Cairo tutorial

Cairo Installation is very hard and have many dependency.

If Imager can do the same things, it is useful.

Tech Tips: Handling Int Vectors in Perl 5

Hi all, and Happy Shavuoth.

The Tips

Apparently, perldoc -f vec writes 16-bit / 32-bit / 64-bit quantities in big endian byte order, including on little endian architectures such as x86. This may cause issues when writing XS / etc. bindings.

I ended up using the following approach on x86-64 Linux to overcome that:

Recent work on Chart::GGPlot

loess smooth

A couple of months ago I wrote this blog post Data analysis and visualization in Perl. Then last month I released a 0.0003 version. And today I made a new 0.0005 release to CPAN. Some of the notable improvements in the recent releases are,

Perl Weekly Challenge 011: Fahrenheit, Celsius, and an Identity Matrix

Compute the Equal Point in the Fahrenheit and Celsius Scales

I used a simple numerical method to find the equal point: Start randomly, move in one direction, if the difference is greater, change the direction, otherwise decrease the step, until there’s no difference.

Perl Weekly Challenge # 11: Fahrenheit Celsius and Identity Matrix

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

Spoiler Alert: This weekly challenge deadline is due in several days from now (June 9, 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: Fahrenheit and Celsius Scales Intersection

Write a script that computes the equal point in the Fahrenheit and Celsius scales, knowing that the freezing point of water is 32 °F and 0 °C, and that the boiling point of water is 212 °F and 100 °C. This challenge was proposed by Laurent Rosenfeld.

"Infinite Lookahead and Ruby Slippers"

There is a new blog post on my Ocean of Awareness blog: "Infinite Lookahead and Ruby Slippers" . It is a relatively simple example that packs in a lot about the various parsing strategies available in Marpa. The context is comment conventions in the Hoon language.

Monthly Report - May

It was the month of Ramadan (Fasting) for us. As always, I was low in energy through out the month. Having said that "Perl Weekly Challenge" kept me going. However there was one low point when my daily CPAN game got discontinued after 621 days of daily CPAN upload. This time, it wasn't my fault. PAUSE site was down for some maintenance work. By the time it came back, it was too late. I really had to motivate myself hard to start again. I must say it wasn't easy to convince myself to start the journey again. I would like to thank everyone for the moral support. As of today, I have done 27 days of daily CPAN upload. With all these happenings, my other pet project "London Hack Day" is being delayed further.

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

Perl Weekly Challenge 010: Roman Numerals

Write a script to encode/decode Roman numerals.

This has been solved many times, you can easily google a golfed solution shorter than L characters (for example at code-golf.io).

25 years of Perl 5 releases

onion.png

It has been about 25 years since the release of 5.000 (1994), we (The Perl Shop) are thinking about creating an infographic for the Perl 5.30.0 release. This infographic would be an advocacy item aimed at casual Perl users and people outside the community, rather than day-to-day users who would largely be familiar with Perl trivia.

The idea would be to highlight not just some of the stats from that specific release, but to draw attention to the history of 5.x releases by showing how many releases there have been, their frequency, the odd/even dev/prod pattern, and generally that Perl is still being regularly updated with new capabilities, despite the constant 5.x release number.

It might also be good to include a timeline showing notable 5.x releases, indicating when they happened and why they were notable.

What would you include? Post your suggestions below, and cite references, if possible.

Which 5.x releases do you consider notable, and why?


Some known reference material

perlhist
is a good source for the date of releases, and it seems to indicate the odd/even scheme was introduced in 2000 with 5.6.

Over in a LinkedIn version of this post, Dave Cross suggested some of his slide decks:
Modern Core Perl
Modern Perl Catch-Up

Perl Weekly Challenge # 10: Roman Numerals and the Jaro-Winkler Distance

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

Spoiler Alert: This weekly challenge deadline is due in several days from now (June 2, 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: Roman Numerals

Write a script to encode/decode Roman numerals. For example, given Roman numeral CCXLVI, it should return 246. Similarly, for decimal number 39, it should return XXXIX. Checkout Wikipedia page for more information.

Of course, there are some Perl modules on the CPAN to convert from and to Roman numerals, but there wouldn't be any challenge if the idea were to use an existing module.

Most people know more or less how Roman numerals work. They use Latin letters to represent numbers:

German Perl Workshop (GPW) 2019 videos online

English version below

Die Videos vom Deutschen Perl-Workshop Anfang März 2019 in München sind jetzt – weniger als zwei Monate später – online auf YouTube zu finden:

Besonderen Dank an Lee Johnson (LEEJO), der sich um die Aufzeichnung gekümmert hat!

English version:

The recordings from the German Perl Workshop in the beginning of March are now—less than two months later—online on YouTube:.

Obviously most of the talks are in German but you can find some in English, too.

Special thanks to Lee Johnson (LEEJO) who took care of the recording!

berrybrew 1.23 released!

It's been quite a while in the making, but berrybrew version 1.23 now has the ability to "clone" modules from one Perl instance into another.

It's currently a two-step process.

First, berrybrew switch into the Perl instance you want to export the module list from, then...

berrybrew modules export

This will create a text document in a newly created modules directory within your Perl installation directory (by default, C:\berrybrew), named after the version of Perl you exported the module list from (eg: 5.20.3_64). This file has a single distribution name per line.

You can go ahead and edit this file (remove or add as many distribution names as you like), then when you're ready to import into a different Perl instance, simply berrybrew switch to it (note that as always, when switching Perls, you must close the command window and open a new one), then:

berrybrew modules import

Creating a Twitter List of CPAN Authors

I've been playing around with how to create a list on Twitter made up solely of CPAN authors. Full post here.

Perl Weekly Challenge # 9: Square Numbers and Functional Programming in Perl

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

Here, I want to use the opportunity of this challenge to illustrate some possibilities of functional programming in Perl (both Perl 5 and Perl 6) using the example of the first challenge of this week..

Challenge: Square Number With At Least 5 Distinct Digits

Write a script that finds the first square number that has at least 5 distinct digits.

A Data Pipeline in Perl 5

One of the solutions I suggested in my above-mentionned blog post was this script:

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.