Looking for YAPC::NA News?

It is very frustrating when there is a conference you want to attend and you can't get any information about it. It is even more frustrating when you are a conference organizer receiving complaints about no news despite all your efforts to keep people informed. Here is a guide to finding out what's going on inside YAPC.

Starting with the official channels:

The first and foremost way to find out what's happening with YAPC is yapcna.org. The home page of the conference site contains a news banner that will take you to recent announcements. It also has a list of links to places you might want to subscribe to receive information.

But wait, there's more...

New Djet blog entry

Moved to a new blog

Using Perl Dancer and Docker to create simple monitoring system

I needed a simple system to monitor events. I wanted to have a system where I can specify that object with some name is 'ok' or 'fail'. And I wanted the system to be able to expire statuses. In case there is no data for the object for a long time then the status should be automaticly changed to 'unknown' — to handle situations when script that sends data breaks.

I looked for several systems, but none suited me well, so I've written my own very simple solution with the name 'curry' (it is named after delicious indian dish, not after Haskell Curry =)

Here is the source code — https://github.com/bessarabov/curry

The system is a web server that is powered by Dancer and the system is bundled into an image with Docker.

I really like this way of creating web apps with Dancer & Docker. Every time there is a new commit in git report Docker Hub automatically builds new image.

Today’s bit of black perl

use 5.010;
{
    package F;
    sub new { bless {}, shift }
    sub me { $_[0] = 'surprise!' }
}
my $f = F->new;
say $f;
$f->me;
say $f;

Output:

F=HASH(0x7f9daa025c80)
surprise!

Teehee…

Deployable

I just wrote about a program I crafted some time ago... in Perl. Happy reading if you're interested into producing smarter tarballs! The article is here.

Hacked Again?

I was just alerted by haveibeenpwned.com that my email address was leaked, and the link given was this:
https://www.quickleak.org/QtPly6aE. "Islamic Cyber Resistance Hacked blogs.perl.org to Show Support Syrian People And SEA". I can't say I follow their logic, but there's a database dump there.

Fun with overload

Spoiler alert: If you are participating in the DFW.pm February thought exercise, this post is about my solution :)

DFW.pm challenged its members with the following exercise:

Pivot a multi-row/multi-column table, 4X4 in size for example, containing name-value pairs. Code should account for larger table sizes with any number of name-value pairs. Numbering the pairs is optional but encouraged for readability. An example would be as follows:

THE SOURCE TABLE
1. name | tommy | 5. pet   | fish    
2. lang | Perl  | 6. kids  | four   
3. eyes | blue  | 7. food  | pizza 
4. lbs  | n/a   | 8. hello | world 

PIVOTED RESULT TABLE
1. name | tommy | 2. lang  | perl   
3. eyes | blue  | 4. lbs   | n/a    
5. pet  | fish  | 6. kids  | four   
7. food | pizza | 8. hello | world

If you happened to read my previous post, you'll know that I'm not one to seek the most terse solution to a problem. In fact, for this exercise I was most interested in specifications left unspoken:

Short survey of modules for combinations and permutations

This is a short look at some modules for generating combinations and permutations. There are likely more modules that aren't listed. RosettaCode has examples of writing the combinations and permutations functions by hand.

Combinations and Permutations
Module Impl Comb Perm Comb w/rep Perm w/rep Derange Speed Order Comments
Algorithm::Combinatorics XS yes yes yes yes yes + Lexico Fast iterator or array
ntheory XS yes yes no no no ++ Lexico Fast block call
Math::Combinatorics Perl yes yes no no yes - - Impl Iterator or array
Algorithm::FastPermute XS no yes no no no +++ Impl Fast block call
Algorithm::Permute XS no yes no no no + Impl Iterator or fast block call
Algorithm::Loops Perl no yes no no no + Impl Iterator
List::Permutor Perl no yes no no no - Lexico Iterator
Iterator::Misc Perl no yes no no no - - Lexico Iterator
Math::Permute::Array Perl no yes no no no - - Impl Iterator or index
Math::Permute::List Perl no yes no no no Impl Block call
Math::GSL::Permutation XS no yes no no no - Lexico function interface
Math::Disarrange::List Perl no no no no yes Impl Block call
Math::GSL::Combination XS yes no no no no + Lexico iterator or by index

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 run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.