jump to navigation

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)

Perl@FOSDEM and some photographic impressions February 8, 2011

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

All right. FOSDEM was –as always– great. 4 to 5000 Free and Open Source people on the same event has to rock. While I attended many talks about different technologies (Devops aka “System Engineering meets development”, Monitoring, Go Programming language, …), I focussed mainly on the Perl activities (pun intended).

Following Gabor’s initiative (this guy runs on Duracell batteries), last year (2010) we set up the first FOSDEM Perl booth: one table, some volunteers, many visitors and great reactions. This year (2011) everything was even better. We had a big booth at the main hall, attributes (a giant Camel (!) and probably the biggest Perl book collection in the world (!)), books to sell, a packed developer’s room on Sunday, a Perl dinner and many volunteers. There were at any time several people at the booth and sometimes even too many :) . With so many volunteers it was possible to attend whatever session you wanted and also participate on the Perl developers’ room.

Here follow some pictures I took with some comments:

David Leadbeater’s Tracing Perl with DTrace/SystemTap

Liz and Wendy were to crazy nice enough to bring their giant camel and the biggest Perl book collection in the world. Both attributed really attracted visitors.

We had several books to sell… but not enough. We were sold out of chromatic’s Modern Perl halfway the first day (20 books!) and dams’s Perl Moderne (not the same book) was almost sold out as well!


Wendy and dams (from Dancer and “Perl Moderne” fame).


Although we didn’t have Automating System Administration with Perl at the booth, several people passed and showed us proudly their copy bought at the O’Reilly stand.

Spot the Perl hacker…



The main booth hall.

Those guys had something to celebrate: a new Debian stable was born.

Our perl-friendly neighbours…

We had several self-confessed Perl people: everyone like camels :)

No pun intended (the text reads “Whinging Bastard”,
DevOps? – More than Marketing by James Turnbull) :) .


Spike Morelli’s I’m Going M.A.D..

We had 13 people attending the Perl dinner! From left to right: Zeno, Bart, Gabor, Liz, Wendy, Dirk and Balint (the rest arrived later).

Mark Overmeers’s Perl data structures.



David Leadbeater’s Tracing Perl with DTrace/SystemTap: very interesting for a Solaris guy like me.

Introduction to writing readable and maintainable Perl by Alex Balhatchet.




Padre hackers Zeno and Gabor (Padre, the Perl IDE).

Paulo Castro (Packaging Perl and it’s deps…) took us to the Dark Side…




The image integration facilities of WordPress.com are pretty poor. If it wasn’t for some command line Perl foo, I would have given up posting this message. There is no way I would have gone through if I had to click 10 times for each picture…

2nd FOSDEM Perl Dinner January 31, 2011

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

Last year we had a very nice dinner with a few Perl people after FOSDEM. Now that we’re having a greater presence it would be nice to respect the new tradition :) . I would like to know how many people want to participate to make reservations (it’s weekend). Please add yourself to the table and use the remarks column if you have a special request. I propose to held the dinner Saturday evening after FOSDEM (about 19:30?), because many people are only arriving on Saturday and leaving right after FOSDEM’s closing on Sunday.

If you want to come, please add your name in the FOSDEM Perl5 wiki.
EDIT: Some people seem to have trouble registering at the wiki (closed). Just post your name in a comment (or mail me, address at the “nxadm?” page) and I’ll add you myself (in the mean while).

FOSDEM, the Free and Open Source Software Developers' European Meeting

What I would love to see in 2011 for Perl January 1, 2011

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

2010 has been a great year for Perl. The community is vibrant and enthusiastic. The Modern Perl wave was not a hype and it is still going strong. Everyone seems to really agree on this. Eweek does even put Perl on number 6 on the group of languages like Java, C, C++, C# and JavaScript  and before other popular dynamic languages like Python (9) and Ruby (10). (This without giving too much importance to popularity lists or feeling animosity towards other languages.)

Anyway, too much to mention in detail, but I’ll remember the first Rakudo Perl 6 implementation for end users (how much vaporware do have working implementations), the release of Perl 5.12 with real improvements and with a new regular release cycle, the 1.0 release of the Moose Object System and the widespread adoption in the Perl world, the fast pace of the development of the Padre IDE, the enthusiasm of Perl::Staff at FOSDEM and CEBITT, the 10.000.000th (!!!!!) test report on CPAN thanks to the CPAN Testers, perlbrew, cpanminus, the release of the book Effective Perl Programming (2nd ed.) and Modern Perl

Would asking more qualify as hubris? I have just a small suggestion and no idea of it would be realistic from a technical or commercial point of view:

  • The Perl OO system is a present from Python. It’s flexible, it works and it needs a lot of boilerplate.
    Without being a copy of Perl 6, though inspired by it, Moose is a well-thought, modern and rich Object system. I am realistic enough to understand that it won’t be part of Perl core, but it would be great candidate for a double life module (included in the Perl tar and available newer versions on CPAN). When needed or wished, one can always bless variables or use other CPAN modules for creating objects, but there would be a clear default way of doing it. Batteries included, one may say :) .
  • Now getting a little personal, a little request to Randal L. Schwartz, Tom Phoenix, brian d foy: Please add a simple OO chapter based on Moose to -hopefully upcoming- Learning Perl, 6th edition (this is the commercial part mentioned before).
    New Perl Hackers need to know what the preferred OO framework is on Modern Perl without resorting to Google. What better entry than that great book that helped a lot of us (including me) take our first steps in the world of Perl?

You never know… now is the time for wishes.

Update: Moose core-developer Stevan Little blogs about this post and brian’s comments beneath. I don’t know if chromatic’s post about “The Minimalist Object System and Your Lousy Axioms” is directly related to this or Stevan’s aforementioned clarification on the Moose ecosystem, but it’s certainly an interesting addition to the discussion.

Sometimes devices are funny (Logitech Squeezebox Touch) December 11, 2010

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

Some time ago I bought a Logitech Squeezebox Touch for the living room. Attach a usb2 disk to it and say goodbye to your cds: it plays ogg, mp3, flac, etc.

While being a device geared toward the general public, the Logitech engineers didn’t forget that some people may want to have a look under the nice touch-screen interface:

$ ssh 10.0.0.100 -l root
root@10.0.0.100's password:


This network device is for authorized use only. Unauthorized or improper use of this system may result in you hearing very bad music. If you do not consent to these terms, LOG OFF IMMEDIATELY.
Ha, only joking. Now you have logged in feel free to change your root password using the 'passwd' command. You can safely modify any of the files on this system. A factory reset (press and hold add on power on) will remove all your modifications and revert to the installed firmware.
Enjoy!

With a little of humour in /etc/motd they welcome your changes and avoid at the same time a call to their support line :) .

In case you are curious:
# uname -a
Linux SqueezeboxTouch 2.6.26.8-rt16-332-g5849bfa #1 PREEMPT RT Mon Nov 8 12:48:28 MST 2010 armv6l GNU/Linux

# perl -v
This is perl, v5.10.0 built for arm-linux-gnueabi
Copyright 1987-2007, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl".  If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.

# ps awx |grep perl
28641 ?        SN     0:42 /usr/bin/perl /usr/squeezecenter/slimserver.pl --charset utf8 --noweb --notranscoding --nosb1slimp3sync --nostatistics --noinfolog --nodebuglog --logfile syslog
28643 ?        SN     0:01 /usr/bin/perl /usr/squeezecenter/gdresized.pl
29210 pts/0    S+     0:00 grep perl

Perl and GNU/Linux for my flac files. You won’t hear me complaining… :)

Build Padre svn easily with perlbrew and cpanm December 10, 2010

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

Update: March 12, 2011

Because of the fast pace of the development of Padre, the/a Perl IDE, it’s may be nice to run a bleeding edge version. Or even better, as Padre itself is written in Perl, you may like to have a look at the sources and maybe contribute some code or help with the translations.

Follow this howto to build the latest Padre from source with perlbrew and cpanm. This way, you’ll get started in no time and you won’t even touch your system Perl installation (cleanup is just a “rm -rf” away…).

1. Install perlbrew and cpanm. You can follow my howtos here: perlbrew (important: compile perl with thread support!), cpanm.

2. Install subversion (to check out the code), the compilations utils (gcc, g++, make) and the gtk2 header files. On Debian/Ubuntu:
$ sudo apt-get install subversion build-essential libgtk2.0-dev

An interesting -but not required- shortcut is to install the Padre release in your distribution to get binary dependencies: $ sudo apt-get install padre

3. Checkout Padre from svn (I chose to install the sources under ~/Code/Padre, adapt accordingly to your standards):
$ mkdir -p ~/Code/Padre && cd ~/Code/Padre
$ svn co http://svn.perlide.org/padre/trunk

4. Install the modules that Padre needs before building the IDE.
$ cpanm Parse::Yapp Module::Install Locale::Msgfmt Alien::wxWidgets Wx
[... lots of output ...]

5. Build Padre.
$ cd ~/Code/Padre/trunk/Padre

Install the dependencies (thx to Perigrin for the simplified method):
$ cpanm --installdeps .
[... lots of output ...]

$ perl Makefile.PL
[... some output ...]

As said, development is happening fast on Padre and new releases of (external) CPAN modules are required often (some even updated by the authors in order to provide the functionality Padre needs). If a new version of a module is needed that is not yet on your cpan mirror, run cpanm (–mirror) again with a more up-to-date mirror. Run “perl Makefile.PL” again afterwards.
$ make
[... lots of output ...]

$ make test
[... lots of output ...]

6. Install padre (in the active perlbrew dependant directory) or just run the development version without installing it (including all changes to the code even after installation):
$ make install
[... lots of output ...]

or
$ ./dev.pl -a

Here it is:

EDIT: ZenoG’s article is a good followup post giving an step-by-step description of bug fixing is Padre.

App::cpanminus: zero-conf CPAN client December 10, 2010

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

App::cpanminus (cpanm) is an other great example of programs inscribed in the Modern Perl philosophy. From the CPAN page of the program:

cpanminus is a script to get, unpack, build and install modules from CPAN.

Why? It’s dependency free, requires zero configuration, and stands alone. When running, it requires only 10MB of RAM.

Zero configuration sounds excellent considering the rather steep learning of the (great!) CPAN tools (the cpan command line utility CPAN.pm and CPANPLUS) for new Perl users.

How does it work? Let try a big module with a lot of dependencies and C++ compiling activity. Install the application through cpan if configured (or with one of the standalone installations options):

$ cpan App::cpanminus
[...]

$ cpanm Moose
--> Working on Moose
Fetching http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Moose-1.21.tar.gz ... OK
Configuring Moose-1.21 ... OK
==> Found dependencies: Try::Tiny, Package::DeprecationManager, Test::Requires, Class::MOP, Sub::Exporter, Test::Fatal, Sub::Name, Data::OptList, Params::Util, List::MoreUtils, Task::Weaken
--> Working on Try::Tiny
[...]
Building and testing Moose-1.21 ... OK
Successfully installed Moose-1.21

$ perl -MMoose -e1

No errors. The modules (and their dependencies) installed just fine. Wow.

Follow

Get every new post delivered to your Inbox.

Join 88 other followers