Blog de Pierrick Le Gall

Aller au contenu | Aller au menu | Aller à la recherche

mercredi 24 janvier 2007

Oracle to standard output in UTF-8, with Perl

Perl Camel, FidoI have an Oracle database with UTF-8 data inside. In a Perl script, I want to extract, transform and print these data in STDOUT, the standard output. The only difference between this ticket entry and Oracle to file in UTF-8, with Perl is the destination of data, so to avoid redundancy, take the time to read the previous ticket.

Lire la suite

Oracle to file in UTF-8, with Perl

Perl Camel, FidoI have an Oracle database with UTF-8 data inside. In a Perl script, I want to extract, transform and load these data in a file.

Lire la suite

samedi 23 septembre 2006

YAPC::Europe 2006, Day 3, 1st September

Tatsuhiko MiyagawaOn this last day of YAPC, sponsors had build a stand. O'Reilly was selling books. Mainly Perl books but also PHP, Ruby and SQL books. I tried to buy a copy of Perl Hacks but all were sold when I finally managed to find some money. Google, Shopzilla and Booking.com were recruiting.

First talk is about Plagger, a pluggable RSS/Atom remixing platform. Talk made by Tatsuhiko Miyagawa, main author of Plagger. Plagger is a fascinating tool. It made me think a lot of my work at Talend. Plagger plugs modules between them. Take a subscription module (eg Bloglines), a filter module (eg StripRSSAd) and a publish module (eg Gmail), you get an application reading Bloglines, stripping advertisements and publishing feed items in emails. Plagger can already use 35 subscription modules and 37 publish modules, which makes 1295 possible combos. I've found Tatsuhiko's presentation really cool, fast and fun.

Lire la suite

vendredi 22 septembre 2006

YAPC::Europe 2006, Day 2, 31st August

Tim Bunce The first talk I attended was "What's new with Perl DBI?" by the famous author of DBI module Tim Bunce (see photo). I've found that Tim bunce was a good talker. Tim summarized some differences between versions 1.14 and the very last 1.52, 6 years of improvements. Tim takes 1.14 as the reference version because the Programming the Perl DBI book. Tim now advises to wait for an update of the book before buying it!.

Lire la suite

YAPC::Europe 2006, Day 1, 30th August

Larry Wall Nitenite hotel offers a "continental breakfast", that means orange juice, coffee/tea/chocolate and "croissants à la française". Breakfast was very nice, at least as good as in France.

The conference takes place in a symphony hall. The place is very beautiful, all mad of wood for the main hall. The very first talk is made by José Castro (Portugal) where he explains how to take the most a YAPC. Then Larry Wall, the original creator of Perl, makes his keynote. Larry makes a comparison between programs and family. As his considers Perl as his fifth kid, he explains that Perl is becoming an adult, with version 6.

After the morning break, I had to choose between 3 talks. 4 rooms are dedicated to conferences. A schedule is available in our "Conference proceedings" book helping us to choose a room and so a talk. The rooms are "Morgan Stanley Hall" (the biggest room, with a sponsor as name), the "Onion room" (in reference to the Perl onion), the "Camel room" (Perl animal) and the "Shadowcat room" (another sponsor).

Lire la suite

YAPC::Europe 2006, Day 0, 29th August

This is not the first day of the conference, but the previous day! I arrived in Birmingham by plane, coming directly from Paris, France. Despite of the stronger safety measures, my plane was quite on time and arrived "only" 30 minutes late.

NiteniteThen I discover my hotel, Nitenite cityrooms. The concept of this hotel is original: very small rooms but high equipment. When I write "small", I mean a 7 square meters room (including bathroom). When I write "high equipment", I mean a huge flat screen on the wall at the bottom of the bed. My room makes me think about some kind of a luxuous cabin in a boat.

Lire la suite

YAPC::Europe 2006, introduction

My YAPC::Europe 2006 badge

YAPC stands for "Yet Another Perl Conference". Every year, this conference gathers people interested in Perl. This conference takes place in Europe, North America, Asia, at least. This year the european YAPC took place in the city of Birmingham, United Kingdom from 30th August to 1st September 2006 (see the website). This was my first YAPC. Day by day, I give you a summary of what happened to me.

lundi 3 juillet 2006

Optimize reading and writting lines with Perl

What's the most optimized Perl code to read lines in a file, extract fields from each line, modify fields and write lines in a new file? I've been working on this question, and here are the result of my test. For my bench, I've used a reference input file made of 1,700,000 lines. Each line containing 6 fields. Input line example 0000482005032030708847018-000000764930-0000079000.

Lire la suite

Perl scripts benchmarking

In Perl Best Practices, I've discovered the use of module Benchmark. This module offers a method to compare the time required to execute a list of subs. In this post gives an example of use of Benchmark and I also propose a script to benchmark scripts, not only subs.

Lire la suite

vendredi 28 octobre 2005

Renommer ses photos en masse

Les noms de fichiers attribués aux photographies numériques par les appareils n'a pas d'autre intérêt que celui de ne pas créer de doublon (img_0001.jpg, img_0002.jpg, etc.) Le nom de fichier n'apporte donc aucune information pertinente. C'est dommage.

Mon expérience en terme de classification de photographies numérique m'a amené à écrire un petit outil de renommage en masse. A partir d'un gabarit (un pattern), tous les fichiers d'une liste sont renommés. Le gabarit contient évidemment des variables paramétrable, comme la date, une numéro séquenceur ou encore une chaîne aléatoire.

Lire la suite

jeudi 5 mai 2005

Les journées Perl 2005

Les journées Perl 2004 furent pour moi l'occasion de rencontrer des développeurs Perl français et d'approfondir ma connaissance d'un langage passionnant. L'an passé donc, les conférences ont eu lieu à Paris, à la Vilette. Malheureusement, je n'avais prévu de m'y rendre qu'une journée sur deux, le dimanche. Je m'étais dis que l'année d'après, je ferai les deux jours.

Oui, mais non, quelle déception d'apprendre que cette année, les conférences se dérouleront à Marseille. Marseille, c'est à l'autre bout de la France, et ça suppose de prendre le train, davantage de jours de congé, au moins une nuit à l'hôtel, etc. J'espère que les journées Perl 2006 auront lieu à Paris :-/

Voir le site des journées Perl, pour un complément d'informations.