I just discovered accidentally that there is a German location called "Perl", close to the Luxemburg border.
Maybe a place to consider for the next YAPC ?
http://en.wikipedia.org/wiki/Perl,_Saarland
Friday, August 5, 2011
Friday, June 10, 2011
Perl dualvar is useful, after all
For many years I had been intrigued by Scalar::Util::dualvar : why would one store both a number and a string within the same variable ?
Yesterday I finally found a situation where dualvar was just the perfect answer.I was doing some refactoring in DBIx::DataModel::Statement : each object from this class has a status, that goes through steps "new", "sqlized", "prepared", "executed". Originally his had been coded with plain strings; but the problem with strings is that they are not ordered, so I was considering a change to something like
use constant {NEW => 1, SQLIZED => 2, PREPARED => 3, EXECUTED => 4};
However such codes are not user-friendly, so when generating error messages I would need to translate them back into strings. Moreover, that change was not backwards compatible. So dualvar came to the rescue :
use constant {
NEW => dualvar(1, "new"),
SQLIZED => dualvar(2, "sqlized"),
PREPARED => dualvar(3, "prepared"),
EXECUTED => dualvar(4, "executed"),
};
Now I can write things like
$status >= PREPARED
or die "can't do that operation when in state $status";
Yesterday I finally found a situation where dualvar was just the perfect answer.I was doing some refactoring in DBIx::DataModel::Statement : each object from this class has a status, that goes through steps "new", "sqlized", "prepared", "executed". Originally his had been coded with plain strings; but the problem with strings is that they are not ordered, so I was considering a change to something like
use constant {NEW => 1, SQLIZED => 2, PREPARED => 3, EXECUTED => 4};
However such codes are not user-friendly, so when generating error messages I would need to translate them back into strings. Moreover, that change was not backwards compatible. So dualvar came to the rescue :
use constant {
NEW => dualvar(1, "new"),
SQLIZED => dualvar(2, "sqlized"),
PREPARED => dualvar(3, "prepared"),
EXECUTED => dualvar(4, "executed"),
};
Now I can write things like
$status >= PREPARED
or die "can't do that operation when in state $status";
Friday, January 14, 2011
good luck to Plat-forms 2011 Perl teams
I just learned from Gabor Szabo's blog that the 2011 Plat-forms programming contest is taking place next week, and that 3 excellent Perl teams are participating. This is great news !
In my last blog entry (August 2010 ... so long ago!), I mentioned the importance of that contest for the image of Perl outside of our community. Within a couple of months, when the reports will be published, IT specialists from all over the world will get a strong signal that Perl is alive and produces good results.
I very much enjoyed participating in the 2007 edition : this was a big stress, but also an enriching experience, not only on the technical aspects, but also on the collaboration skills under strong pressure. Unfortunately I could not register for the 2011 edition, because at work we had to prepare a major organisational change for 01.01.2011, which left us absolutely no time to think of anything else (not even to blog .. see above!).
So, all the best for the three Perl teams, thanks for having registered, and I'm sure you will show to the world that our technology is excellent for productivity, conciseness, flexibility and so much more.
In my last blog entry (August 2010 ... so long ago!), I mentioned the importance of that contest for the image of Perl outside of our community. Within a couple of months, when the reports will be published, IT specialists from all over the world will get a strong signal that Perl is alive and produces good results.
I very much enjoyed participating in the 2007 edition : this was a big stress, but also an enriching experience, not only on the technical aspects, but also on the collaboration skills under strong pressure. Unfortunately I could not register for the 2011 edition, because at work we had to prepare a major organisational change for 01.01.2011, which left us absolutely no time to think of anything else (not even to blog .. see above!).
So, all the best for the three Perl teams, thanks for having registered, and I'm sure you will show to the world that our technology is excellent for productivity, conciseness, flexibility and so much more.
Thursday, August 26, 2010
plat_forms 2010/2011 : call for Perl teams
A new edition of the Plat_Forms programming contest is going to take place in end 2010 or beginning of 2011 : see http://www.plat-forms.org/2010/plat-forms-in-2010 .
The first edition took place in 2007 and our Geneva team on Catalyst was winner of the Perl track (http://use.perl.org/~dami/journal/33559 ). Unfortunately we will not be able to participate again this time; but I wish that another Catalyst team will be present. Reports from that contest got significant coverage in specialised press , and can play an important role in propagating a positive image of Perl. See for example the August 2010 issue of the prestigious "Communications of ACM" (http://cacm.acm.org/magazines/2010/8/96637-platforms-is-there-one-best-web-development-technology/abstract , full text available at http://page.mi.fu-berlin.de/prechelt/Biblio/platforms07-cacm-2010.pdf ); the conclusion reads :
Is Perl outdated? No. In contrast, the small size of the solutions and their good modifiability suggest that Perl may be a particularly strong platform with respect to maintainability.
So, Perl programmers, please build up teams to participate in the 2010/2011 edition!
The first edition took place in 2007 and our Geneva team on Catalyst was winner of the Perl track (http://use.perl.org/~dami/journal/33559 ). Unfortunately we will not be able to participate again this time; but I wish that another Catalyst team will be present. Reports from that contest got significant coverage in specialised press , and can play an important role in propagating a positive image of Perl. See for example the August 2010 issue of the prestigious "Communications of ACM" (http://cacm.acm.org/magazines/2010/8/96637-platforms-is-there-one-best-web-development-technology/abstract , full text available at http://page.mi.fu-berlin.de/prechelt/Biblio/platforms07-cacm-2010.pdf ); the conclusion reads :
Is Perl outdated? No. In contrast, the small size of the solutions and their good modifiability suggest that Perl may be a particularly strong platform with respect to maintainability.
So, Perl programmers, please build up teams to participate in the 2010/2011 edition!
Sunday, June 13, 2010
rakudo perl6 runs on win32
The French Perl Workshop 2010 had a whole track on perl6; so before going there, I quickly downloaded the parrot and rakudo packages for win32 from sourceforge, with the intent of playing with perl6 during the (long!) trip from Geneva to Calais. I've been reading and hearing about perl6 for some years, but so far I had never taken time to give it a try.
Alas, the distribution did not work, complaining for a missing DLL that I didn't know where to find. So I had plenty of time for other, more urgent tasks during the travel, but sadly I hadn't written a single line of perl6 yet.
At the conference, I started telling my neighbour about this misadventure ... and it turned out that this neighbour was François Perrad, the author of the parrotwin32 package ! François quickly found out the problem with the distribution; we fixed it manually on my machine, and François is going to issue a new distribution within a few days.
So, because of this nice coincidence, I finally was able to write my first "hello, world" program in perl6.
The next step will be to try to do some real work ... but for this I need a database connection, and as far as I know, the DBI redesign for perl6 by Tim Bunce is not complete yet. I talked about this to Martin Berends, who had given several talks on perl6 during the day .... and nice coincidence again, it turns out that Martin has a "fakedbi" project that implements a subset of Perl DBI , ported from perl5 to perl6 !
So after these lucky coincidences, my only problem is that I no longer have any excuse for not looking seriously at perl6 !
Alas, the distribution did not work, complaining for a missing DLL that I didn't know where to find. So I had plenty of time for other, more urgent tasks during the travel, but sadly I hadn't written a single line of perl6 yet.
At the conference, I started telling my neighbour about this misadventure ... and it turned out that this neighbour was François Perrad, the author of the parrotwin32 package ! François quickly found out the problem with the distribution; we fixed it manually on my machine, and François is going to issue a new distribution within a few days.
So, because of this nice coincidence, I finally was able to write my first "hello, world" program in perl6.
The next step will be to try to do some real work ... but for this I need a database connection, and as far as I know, the DBI redesign for perl6 by Tim Bunce is not complete yet. I talked about this to Martin Berends, who had given several talks on perl6 during the day .... and nice coincidence again, it turns out that Martin has a "fakedbi" project that implements a subset of Perl DBI , ported from perl5 to perl6 !
So after these lucky coincidences, my only problem is that I no longer have any excuse for not looking seriously at perl6 !
slides for the perl french workshop 2010 : ORM and EDM
My slides for the French Perl Workshop 2010 are online :
- Gestion documentaire pour les tribunaux genevois : Geneva courts of law rely more and more on Perl for all their information systems. This talk presents three facets of electronic document management : storing justice decisions, preparing projects of documents, and a project for building a paperless justice file, combining webdav and modperl.
- DBIx-DataModel in detail : DBIx-DataModel is an object-relational mapping framework for Perl5. Schema declarations are inspired from UML modelling. The API provides efficient interaction with the DBI layer, detailed control on statement execution steps, flexible and powerful treatment of database joins. More on http://search.cpan.org/dist/DBIx-DataModel.
Saturday, June 5, 2010
A testimony of Perl efficiency
Within our team, the person who so far was our specialist in front-end javascript / ajax recently took up a new project involving quit a lot of back-end Perl programming (Catalyst controllers, data validation, database and ORM, etc.).
Now at the middle of the project, she just announced that the initial effort estimate would be cut by about 40%, because she discovered that Perl and its libraries were easier to learn than she expected, and because Perl data manipulation facilities are surprisingly powerful.
Hear that message, you all IT managers who only swear by Java !
Subscribe to:
Posts (Atom)
