jump to navigation

FOSDEM 2012 Perl dev-room: Call For Speakers December 21, 2011

Posted by claudio in Uncategorized.
Tags: , , ,
add a comment

Taking place in the beautiful city of Brussels (Belgium), FOSDEM is the biggest free and non-commercial European event organized by and for the community. Its goal is to provide Free and Open Source developers a place to meet (see http://fosdem.org/2012/).

Over the last years the Perl community had an increasing presence at FOSDEM. Last year we managed to have both a booth and a dev-room. We collected an impressive positive return and wish to renew the experience.

Our dev-room request for this upcoming edition (2012) has already been approved (the stand request is still pending but we foresee no problems there). The stand will be open throughout the weekend. The dev-room event will take place Sunday February 5th 2012 , between 9 and 17h. The room itself has 81 seats, WIFI and a VGA projector.

This environment, being a university classroom with raised seats, lends itself perfectly for talks. This is a wonderful opportunity to present your Perl project –big and small– or talk about subjects you care about. We are looking for a variety of subjects on all levels: starter and advanced, generic and specialized, core internals and CPAN. We have 8 hours time, so we have the flexibility of using different time formats: e.g. talks of 20 minutes, more classic talks of 40 minutes or longer (although we learned from experience that longer talks should be split into slices of 20 or 40 minutes).

Please don’t doubt to send a proposal (information about yourself, subject, short description and time needed). If you have several subjects you are enthusiastic to talk about please send alternative proposals. In the case more than one talk is not selected, your proposal will help us when putting the schedule together and even have “backup” talks in case someone cancels. Also mention your time constraints (if any).

Please send your talk proposal by e-mail to the address below before January 11th, 2012. After an evaluation period we will submit a definitive schedule on Saturday 2012-01-21 to the FOSDEM organizers.

Please forward distribute this call as wide as possible (certainly to your local mongers). You can link to this page, url: http://nxadm.wordpress.com/2011/12/21/perlfosdem2012-cfs/.

Claudio Ramirez (nxadm, email: padre.claudio at apt-get.be) and the Belgian Perl Mongers.

NB1: This is a community event without sponsoring. We don’t have the means to pay for your trip and time. If you want to sponsor part of the event, please feel free to contact us.

NB2: We’ll also appreciate volunteers, booth and dev-room. Please tell us your availabilities so we can also prepare a planning for this.

Re: APOD to Desktop Wallpaper September 9, 2011

Posted by claudio in Uncategorized.
4 comments

I saw markam’s post on the Planet Perl Iron Man –where we are both syndicated– where he posts a short script to use the Astronomy Picture of the Day as a wallpaper… on MS Windows.

Being a GNU/Linux + Gnome user myself, I post a quick and dirty “translation” of the script (e.g. to use with cron).

 
#!/usr/bin/env perl
use strict;
use warnings;
use LWP::Simple;
require Carp;

my $apodbase = 'http://apod.nasa.gov/';
my $dlbase = '/home/mmeyer/Downloads/';

chdir $dlbase or die "Couldnt chdir to $dlbase: $!";

my $content = get($apodbase) or die "Couldn't download image: $!";

Carp::croak 'Content doesn\'t match' unless $content =~ m/<IMG SRC="(.*)"/g;

my $urlend = $1;

Carp::croak 'No url found' unless $urlend =~ m|([^/]+)$|;
my $targ = $1;

my $status = getstore($apodbase . $urlend, $targ);
Carp::croak "Couldn't store image: $status" unless is_success($status);

my @shell_cmd = ('/usr/bin/gconftool-2', '-t', 'str', '--set', '/desktop/gnome/background/picture_filename', $dlbase . $targ);
exec(@shell_cmd);

Perl screencasts June 16, 2011

Posted by claudio in Uncategorized.
Tags: , , ,
add a comment

My friend Gabor got a rush of energy (aka tuits) and relaunched his screencast channel about Perl. So far he has talked about Padre, Perl 6 and the Perl debugger.

I found this last screencast very interesting. For a lot of people the perl debugger is something mythical, arcane or even something they even didn’t know it exists. Certainly people coming from a UNIX shell scripting background wonder how to do something similar to “set -xv” in Perl. I can tell you already: watching the screencast about the perl debugger have been the most fruitful 8 minutes I have spent on IT this week.

So, subscribe to the channel (a gmail address will do) to keep Gabor’s ego motivated to create more. :)

Perl 5.14.0 Solaris failing tests May 19, 2011

Posted by claudio in Uncategorized.
Tags: , , ,
2 comments

I’m preparing –together with the nice people from OpenCSW– a bug report for p5p with information about the failing tests for a Solaris10-Sparc-64-bit-threaded perl.

In case you wonder, most failing tests are related to threading. But even when building a non-treaded version there are some failing tests (Failed 10 tests out of 1961, 99.49% okay). The threaded 32-bit version passes all the tests. The Solaris9-Sparc-64-bit-threaded perl seems to build and test fine as well, but I need to verify it (e.g. that we are testing exactly the same thing).

Ping me here in case you have this combination working. Patches to p5p are always better than bugs rapports  :) . Mental note: “I will test the RC releases on other OSes than GNU/Linux next time”.

Define the main screen in Ubuntu Unity dual screen setup May 13, 2011

Posted by claudio in Uncategorized.
Tags: , ,
3 comments

I use a dual screen setup at home. On the left side I have a big lcd screen and on the right the fixed screen of the laptop (on a docking station). The big screen is my main screen, while the smaller screen is for things I like to keep open like mail or an irc session (ssh+screen+irssi).

In this new install, the unity global menu can be found on the smaller screen.This probably makes sense on a lot of setups, but I prefer this icon menu on my main screen as it feel more accessible (it’s physically closer) and it autohides anyway.

I did not find a graphical way to set this up, but editing the configuration file is very easy:

$ vi ~/.config/monitors.xml

or if you prefer a graphical editor:

Press Alt + F2 and type “gnome-text-editor ~/.config/monitors.xml”

Identify you main monitor (name, resolution, etc) and change “no” into:

<primary>yes</primary>

That’s it.

Book mini-review: Modern Perl May 3, 2011

Posted by claudio in Uncategorized.
Tags: , , ,
2 comments

Modern Perl cover Ok. You are really lazy, curious and want to know my opinion? Buy the book. It’s great. If you are less lazy, keep reading.

I was really exited about this book. Even before the book was published, chromatic regularly posted very interesting articles and, maybe more importantly, posed questions. It felt like chromatic was thinking out loud and he welcomed everyone who wanted to take part. The text for the book is open for collaboration and lively discussions took place in his blog. He goes a step further and offers the ebook and pdf version for free. It’s a good feeling to be sure that you are not buying a cat in a bag.

What kind of book is it?  It’s the kind of book that it’s fun to read (sadly this is not that common in the IT world). It’s not the kind of book that offends your intellect by trying too hard to be funny nor the dry stuff that put you into sleep. It’s not a reference. It’s not a tutorial. It’s not the book a would suggest for someone who wants to learn Perl, but it certainly be the one to read after that (if your friend is serious about programming he will not stop at “Learning Perl“).

Because the pdf is freely available you can have a look yourself at the contents, but just glossing over the titles of the chapters gives you a good idea:

  • The Perl Philosophy
  • Perl and Its Community
  • The Perl Language
  • Operators
  • Functions
  • Regular Expressions and Matching
  • Objects
  • Style and Efficacy
  • Managing Real Programs
  • Perl Beyond Syntax
  • What to Avoid
  • What’s Missing

Modern Perl is not the book that teaches you specific technologies du jour. chromatic aims higher and moves the bar from “how” to “why”. By doing so it’s clear that for the author the Modern Perl revival is more than the sum of new CPAN modules fixing what’s broken in Perl 5. It’s a book about understanding the basics of Perl 5. The good and the bad stuff. And how to use this knowledge, a quest for Good Programming. I specially appreciate “The Perl Philosophy” as it manages to explain clearly the basic assumptions of Perl (and at the same time give a valid answer to the “write-only” accusations). Even if you have programmed Perl for a while, you’ll be surprised on how nice it is to see things clearly explained what you probably “kind-of” knew.  chromatic’s inviting style helps a lot.

I pre-ordered the book on Amazon before it came out and I haven’t regretted it for a second. It lives next to my “Perl Best Practices” copy. I appreciate when content providers treat me with respect and not as a pirate (DRM!). That’s why I hope this publishing model is viable (open content, free pdf, free epub, companion site). I don’t mind voting with my wallet.

Buy it at amazon.co.uk, amazon.de, amazon.fr or amazon.com (depending on your country).

Ubuntu 11.04 beta 2 test drive: first thing first (updated 11.10) April 20, 2011

Posted by claudio in Uncategorized.
Tags: , , ,
add a comment

EDIT: This howto also works on Ubuntu 11.10

A new workstation at work is a great opportunity for trying out the latest Ubuntu 11.04 beta (2). So far, so good. I had low expectations for Unity, but the shell does not feel buggy nor slow. Nice. The installation is *extremely* fast. Anyway, sadly like with every new Ubuntu release, there is still some cleaning up to do after an install…

$ sudo apt-get remove --purge $(dpkg -l | perl -lwn -e '/.+((lib)*mono-.+?)\s+.+/ and print $1') ; sudo rm -rf /usr/lib/mono

[sudo] password for claudio:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘libmono-addins-gui0.2-cil’ for regex ‘mono-addins-gui0.2-cil’
Note, selecting ‘libmono-addins0.2-cil’ for regex ‘mono-addins0.2-cil’
Note, selecting ‘libmono-cairo2.0-cil’ for regex ‘mono-cairo2.0-cil’
Note, selecting ‘libmono-corlib2.0-cil’ for regex ‘mono-corlib2.0-cil’
Note, selecting ‘libmono-i18n-west2.0-cil’ for regex ‘mono-i18n-west2.0-cil’
Note, selecting ‘libmono-management2.0-cil’ for regex ‘mono-management2.0-cil’
Note, selecting ‘libmono-posix2.0-cil’ for regex ‘mono-posix2.0-cil’
Note, selecting ‘libmono-security2.0-cil’ for regex ‘mono-security2.0-cil’
Note, selecting ‘libmono-sharpzip2.84-cil’ for regex ‘mono-sharpzip2.84-cil’
Note, selecting ‘libmono-system2.0-cil’ for regex ‘mono-system2.0-cil’
Note, selecting ‘libmono-zeroconf1.0-cil’ for regex ‘mono-zeroconf1.0-cil’
The following packages will be REMOVED:
banshee* banshee-extension-soundmenu* banshee-extension-ubuntuonemusicstore* gbrainy* libappindicator0.1-cil* libart2.0-cil* libgconf2.0-cil* libgdata1.7-cil* libgkeyfile1.0-cil* libglade2.0-cil*
libglib2.0-cil* libgmime2.4-cil* libgnome-vfs2.0-cil* libgnome2.24-cil* libgtk-sharp-beans-cil* libgtk2.0-cil* libgudev1.0-cil* liblaunchpad-integration1.0-cil* libmono-addins-gui0.2-cil*
libmono-addins0.2-cil* libmono-cairo2.0-cil* libmono-corlib2.0-cil* libmono-i18n-west2.0-cil* libmono-management2.0-cil* libmono-posix2.0-cil* libmono-security2.0-cil* libmono-sharpzip2.84-cil*
libmono-system2.0-cil* libmono-zeroconf1.0-cil* libndesk-dbus-glib1.0-cil* libndesk-dbus1.0-cil* libnotify0.4-cil* libtaglib2.0-cil* libubuntuone1.0-cil* mono-2.0-gac* mono-csharp-shell* mono-gac*
mono-gmcs* mono-runtime* tomboy*
0 upgraded, 0 newly installed, 40 to remove and 0 not upgraded.
After this operation, 34.3 MB disk space will be freed.
Do you want to continue [Y/n]? Y
[...]

This will remove applications and libraries I rather don’t have on my system. The rm removes auto-generated cached mono assemblies (not associated to packages).

I don’t longer use a note taking application, but when I did I liked zim:

$ sudo apt-get install zim

If you want a tomboy clone, install gnote instead:

$ sudo apt-get install gnote

I am pretty happy with rhythmbox as my music player:

$ sudo apt-get install rhythmbox

Springcleaning: App::Unix::RPasswd March 25, 2011

Posted by claudio in Uncategorized.
Tags: , , ,
add a comment

It’s spring again, so I decided to prepare programs and libraries that are generic enough for CPAN.

App::Unix::RPasswd is the first candidate. App::Unix::RPasswd (remote passwd) is an application for changing passwords on UNIX and UNIX-like servers on a simple, fast (in parallel) and secure (SSH-keys) way. A salt-based retrievable “random” password generator, tied to the supplied server names and date, is included. The generated passwords, unique for each server, can be generated and automatically applied remotely. Because the salt is secret and the correct date string is required, the password for a specific server can only be regenerated by authorized personnel.

Perl 5.10 or higher is required. All recent GNU/Linux distribution have a recent perl (>= 5.10). In case you need it on Solaris 10, you can follow this howto to build a recent Perl (the best option in my view) or get precompiled packages from SunFreeware, Blastwave or OpenCSW.

Get it from CPAN:

cpan App::Unix::RPasswd

Make noise like a camel! March 8, 2011

Posted by claudio in Uncategorized.
Tags: , ,
1 comment so far

In December 2007 Perl hackers worldwide received a fantastic present. Five years and half after the previous major release (5.8) we got new language features and improvements to the perl interpreter itself. More importantly, it was the starting point for shorter and regular release cycles. Thank you, p5p!

Fast forward to today. The Perl community revitalised significantly and Modern Perl has a strong momentum. Books that reflect the community best practices were published and organisations created around the efforts of the Perl community to remove the baggage and create what was lacking. Already in 2005 “modern” applications and distributions started appearing in CPAN to complement core Perl: PPI (2005), Perl::Critic (2005), Catalyst (2005), DBIx::Class (2005), Moose (2006), Strawberry Perl (2006), local::lib (2007), Padre (2008), Dancer (2009), Try::Tiny (2009), perlbrew (2010), cpanminus (2010), etc. (And my excuses for the many modern projects I forgot to include.)

There is now some noise in the perl blogsphere that suggest that a very small window is open to introduce new things to Perl core, or rather move things from CPAN to core. Maybe the window is too small to get what we need (IMHO, a complete OO framework). Or it may be already closed due to the complexity and the quantity of extra work for the already heavy charged core developers.

Nevertheless, it’s a good thing (TM) that people defining the direction of Perl 5 know what Perl developers think. People that care and work with the language. Developers that –in stark contrast with fanboys– know what the strengths and the weakness are of their preferred language.

A comment on chromatic’s and brian d foy’s questions about the upcoming Perl releases is a good start to make some noise. Writing your thoughts in your blog even better…

Perl core, documentation and Moose (aka “can of worms”) March 5, 2011

Posted by claudio in Uncategorized.
Tags: , , ,
3 comments

Creator of PerlIt seems I am not alone on the subject I raised in my New Years wishes (wishes, not demands). Good.

I wished –and still do today– that Perl releases would include Moose. I also wished for a tutorial/chapter on Object Oriented programming based on Moose for Perl newcomers. For this second wish I was specifically thinking on the upcoming release of O’Reilly’s “Learning Perl“. The nice authors answered  (see comments) and stated that they foresee the inclusion of a Moose chapter, but in the more advanced title “Intermediate Perl” instead.

On perl5-porters, the mailing list where Perl 5 development occurs, there is now a related discussion triggered by David Rolsky’s work on a new Object Oriented tutorial to be included in the Perl core documentation. It is certainly a welcome update to the present tutorial, but its use of Moose as a best practice seems to be rather polemic.

Tom Christiansen made a valid argument against a new core tutorial that included Moose:

Please don’t include anything in the standard distribution that tells people they can’t use the standard distribution.
If you want to include something in the standard distribution whose entire focus is outside the standard distribution, then you should bring the thing that is outside, inside.

Of course, this is an argument to keep references to non-core CPAN libraries out of the core documentation (isn’t CPAN not our biggest selling point?). It does not take a lot of imagination to turn the argument around and use it for the promotion of a modern Object Oriented framework to core. I am aware of the serious problem caused by the dependency chain of Moose, but it’s not that bad.

By talking with a lot of people at the Perl booth at FOSDEM I was positively surprised by the level of interest in (modern) Perl. Newbies seemed really curious and old perlers that long ago moved to other languages (“Were is Perl 6?”) were enthusiastic to give Perl a second chance. The Moose examples in chromatic’s“Modern Perl” book were a very convincing illustration of what Modern Perl was.

When (re-)introducing people to 2011′s Perl I don’t want to explain boilerplate that is difficult to grasp for new programmers (or myself ). Besides, people who are new to Perl are not necessarily new to programming and they are right not to be willing to put up with the overhead of plain OO Perl. The people I have encountered in this situation (or introduced myself to Perl) welcome –without exception– Moose as innovative and stylish (yes: the holy grail of readable code). In 2011 no one, except ironically the people writing Moose itself and “legacy programmers”, should be forced to write OO boilerplate code.

The people are there, the code is there, the momentum is there. Do we dare to take the chance?

(Picture by Dunechaser)

Follow

Get every new post delivered to your Inbox.