In the last week, as a result of YAPC::EU::2015, the main website for the `Portuguese Perl Mongers' (a free translation of the association name) has been rewritten by Nuno "smash" Carvalho, in Perl 6, to generate (static) web content. It still has its perks, but it mostly working.

In order to not be just waiting for Nuno's work, I've been writing some articles on Perl 5 and Perl 6 (in Portuguese, sorry folks). Any way, I invite you to go and peek there. Mostly if you can understand Portuguese (I think half the population would know Portuguese or Spanish, so, it might be enough) you can understand these small posts.

Fruits of YAPC::Europe - Image::JpegMinimal

In which we create "instant" image previews in HTML (with a smidgen of Javascript)

After reading a bit of how Facebook makes the transfer of profile images faster for low bandwidth connections and bringing my photo gallery generator up to speed to exhibit my pictures of YAPC::Europe 2015 and Granada (that's a transient link), I thought about reimplementing the "compression" in Perl and some Javascript on the client side to reconstruct the image. I was surprised that a JPEG header is so big (around 500 bytes) and so constant between images. For pages with many images. It seems like a nice latency win to do "compression of repeating data" and send a chunk of preview images with the HTML.

With the help of Imager, it turns this image


into a tiny, tiny preview image like this


and then blows that image up and blurs it in the browser,
so that the user sees the following image until the real
image data has been loaded:


Is Perl still a useful, viable language?

Three years ago someone asked the question "Is Perl still a useful, viable language?" on I'm not sure what would happen to a "useful, viable language" over time that would cause it to not be that any more - but I'm obviously biased.

The thing that I find intriguing is that the referrer logs for the Map of CPAN show that every day, at least one person follows the link from that question to the mapofcpan site. Every. Single. Day.

It's not even a particularly prominent link. How many people must be asking that question and finding that StackExchange page every day?


wget -O .gdb-dashboard

sed -i 's,python Dashboard.start(),#python Dashboard.start(),' .gdb-dashboard

joe .gdbinit
source .gdb-dashboard
python Dashboard.start()

Screen Shot 2015-09-12 at 11.30.44 AM.png

Geocoding with Perl and Google Maps

Geocoding with Perl and Google Maps

[From my blog.]

P6SGI: Smack the Reference Implementation

The P6SGI standard is progressing reasonably well now. There are a number of issues yet to be worked out it is a reasonably good start. However, before we can really be sure of that, we need an implementation that puts the standard to use and helps us find the warts as well as provides a way to get started working with it.

Introducing: Smack.

Perl has Plack. Perl 6 has Smack. So far, the basics of it's own standalone server are built and working and CGI is started. Some of the built-in apps and some standard middleware have been drafted, but there is a large amount of work to be done.

I have a regular job, 3 boys, and limited spare time. If you have any interest in helping work on the next generation of Perl application servers, your help would be most welcome.


Creating a registry of environment variables

I want a registry of environment variables. If I see someone using one, I want to know what it does and what code or programs uses that. Or, given a program, what are all the variables that might affect it?

Rather than do the whole thing, I let myself do part of the first bit. I crawled all of my installed modules to pull out the keys used with %ENV. My solution (here's the gist) does some dumb matching then passes the result to PPI. It's probably another easy step to make PPI find uses of %ENV too (and skip all the mentions in the docs).

Some modules define their own variables, and some of those are even documented. Many use variables that they expect you to know about already, such as $ENV{HOME}.

From just the stuff I had installed (about 20 different perls), here are the most frequent, with their count:

TERM: 511
PAGER: 631
PWD: 1919
PATH: 1997
PERL5LIB: 2187
HOME: 2325

Perl5 to Java compiler - 2nd hackathon

We've had another hackathon at work. This time Bosko, Bruno, Frederico, Yati, and I hacked on the Perlito Perl5-to-Java compiler.

We started adding unit tests - so that we can automatically extract a list of implemented features; the existing Perl tests are not properly organized "by feature".

The latest additions to the Java backend are:

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