Le planet des Mongueurs de Perl

Agregation des blogs des mongueurs

Nuage de mots : Discours de François Hollande à Marseille

Chose promise, chose due. Ce blog n’étant pas partisan, aucune raison d’épargner Hollande de notre petit jeu du “montre moi tes mots, je te dirais qui tu es”. Donc même punition que pour le candidat Sarkozy.

J’ai récupéré le texte du discours donné a Marseille le 14 mars et j’en ai créé un nuage de mots que voici :

Que peut-on en dire ?

La première chose qui me saute aux yeux c’est la force du mot Marseille. Cela illustre bien – à mon avis – une attitude un peu “caméléon” du candidat : son discours donné à Marseille prend une dimension presque plus marseillaise que française. Cela stimule certainement l’auditoire local, sur le moment, et doit être efficace pour générer une ambiance sur le moment, mais est-ce réellement souhaitable pour un candidat à la présidentielle d’apparaître si … local ?

Un petit zoom ? Allez, on enlève les mots principaux pour voir ce qui se cache un peu plus loin :

Si on met de côté le mot quartier qui renforce cette idée de discours adapté au lieu, on voit apparaître ce qui semble être la réelle motivation du candidat : l’incarnation d’un projet plein d’espoir dans lequel il nous faut avoir confiance.

Alors que Sarkozy clot son discours en clamant “Aidez-moi“, François Hollande nous dit donc en filigramme : “Faites-moi confiance!“.

A quel chant de sirène se fier ? Vaste question!

blog tools and plugins from www.zeitblog.com

Related posts:

  1. Nuage de mots: discours de Sarkozy du meeting de Villepinte Déformation professionnelle oblige, j’aime jouer avec la donnée. La donnée...

Published by sukria on 2012-03-16T11:00:11

Nuage de mots: discours de Sarkozy du meeting de Villepinte

Déformation professionnelle oblige, j’aime jouer avec la donnée. La donnée brute. Pour essayer de la faire parler. En voyant le discours du président sortant, je me suis demandé à quoi pouvait ressembler le nuage de mots de son discours…

Bon, on ne se refait pas, quand l’âme du hacker gronde, mieux vaut ne pas la réfreiner ! Je farfouille sur le net, trouve le PDF du discours et commence a jouer avec mes outils habituels…

Une fois n’est pas coutume, il y a ce qu’il faut sur CPAN (ça en devient lassant !) : Image::WordCloud est parfait pour le job.

Voici donc en quelques mots, ce que monsieur Sarkozy a essayé de nous dire :

OK, la France et l’Europe, la grande question de ce discours (les plus attentifs noteront que l’on voit même le mot schengen en petit).

Bien, et si on zoomait un peu ? J’enlève les mots les plus forts : France, Français, Europe et Monde…

Oups ! Sarkozy serait donc le président du “rien” ? Je vous laisse juges pour interpréter !

A suivre: Hollande et Bayrou (ou tout autre candidat, ne soyons pas partial!), si on a des discours similaire à se mettre sous la dent (je suis preneur de liens !).

blog tools and plugins from www.zeitblog.com

Related posts:

  1. Nuage de mots : Discours de François Hollande à Marseille Chose promise, chose due. Ce blog n’étant pas partisan, aucune...

Published by sukria on 2012-03-13T20:44:19

Perl, fun again!

Perl, fun again!

I’m happy to announce a new Perl event that will be held in Paris (France) next Monday, presented by the French Perl Mongers.

It’s called Perl, fun again!

It will be held at La cantine Monday 5 March 2012, in the evening.

La Cantine

From 19:00 to 22:00, a set of short talks (15 min) will be given. I expect a wide audience, beyond Perl users, primarily geeks, coders, web designers, administrators, basically IT-related people with some knowledge of programming ( in any language), and interested in seeing what makes Perl so appealing these days.

I organised the event ( representing the French Perl Mongers ), with the help of Laurent Boivin, and La cantine, kindly hosting the event for free. I managed to enroll 8 speakers, including some well-known Perl figures, to deliver the following set of talks. Of course, in French :) :

19:00

20:00

21:00

I’d like to thank the speakers to devote their time and passion to help promoting Perl in France.

Perl, Fun again à La Cantine

La Cantine

Un petit billet en français, et oui cela faisait longtemps ! (et puis I don’t see the point of writing this entry in english as it’s about a french-speaking event that takes place in Paris ;).

Lundi 5 mars prochain aura lieu une mini conférence sur le langage Perl. L’événement se déroulera pendant la soirée (de 18h30 a 22h) dans une ambiance détendue. Une occasion idéale pour découvrir (ou redécouvrir) ce langage puissant et évolutif qu’est le Perl.

Une belle occasion de découvrir ce que la communauté des hackers Perl entend par “Modern Perl”, on y parlera notamment des sujets suivants : l’objet post-modern avec Moose, le web svelte et élégant avec Dancer ou encore le NoSQL avec MongoDB.

Pour m’a part j’y présenterai Dancer (oui, OK, je sais, ça commence a être un peu déja vu mais on ne se refait pas !).

Pour ceux qui ne connaissent pas le lieu:


La Cantine est le premier espace de travail collaboratif en réseau (« coworking space ») à Paris et Ile de France, [...].
Ce lieu, entièrement conçu pour le travail collaboratif, facilite les coopérations fluides. De plus, la Cantine s’ouvre aux réseaux français et internationaux qu’ils soient des lieux de co-working, des plateformes artistiques, des lieux alternatifs, des pôles de compétitivité, des laboratoires de recherches spécialisés, des écoles ou des université.

Plus d’infos sur le site de La Cantine.

A lundi !

blog tools and plugins from www.zeitblog.com

Related posts:

  1. Perl Bulgaria 2011 Report This weekend I was invited to Bulgaria Perl Workshop that...

Published by sukria on 2012-02-28T16:35:05

Dancer::Plugin::Params::Normalization

Dancer::Plugin::Params::Normalization

Just released a new version of Dancer::Plugin::Params::Normalization. This plugin allows to normalize or alter parameters recieved by a Dancer route.

An example of what developers usually want is to accept mixedcased request parameters, and have them all lowercased. That is done easily :

# In your configuration file
plugins:
  Params::Normalization:
    method: lowercase

And that’s it, now you are sure that all your parameter names will be lowercases.

Now this plugin goes further by being very flexible and powerful. It supports standard methods like lowercase, uppoercase, ucfirst. But you can also give it a class name, which have to implement a normalize method, thus giving you full flexibility.

If you don’t want all parameters of all routes to be normalized, you can set general_rule to ondemand, and use the added keyword normalize to trigger the normalization. Or, you can instead specify a filter to be applied on parameters. Only those matching it will be normalized.

But that’s not the end. This plugin also allows you to specify which parameters should be normalized: query parameters, body parameters, or the parameters from the route definitions.

I tried to be pretty exhaustive with this plugin, but if anything happen to be missing for your usage, let me know :)

The state of HTTP's libraries in Python

Hey! I’m alive!

I’ve started to write some Python for work, and since I’m new at the game, I’ve decided to start using it for some personal project too.

Most of what I do is related to web stuff: writing API, API client, web framweork, etc. At SAY: I’m working on our platform. Nothing fancy, but really interesting (at least to me) and challenging work (and we’re recruting, drop me a mail if you want to know more).

Writing HTTP requests with Python

httplib

httplib is part of the standard library. The documentation says: “It is normally not used directly”. And when you look at the API you understand why: it’s very low-level. It uses the HTTPMessage library (not documented, and not easily accessible). It will return an HTTPResponse object, but again, no documentation, and poor interface.

httplib2

httplib2 is a very popular library for writing HTTP request with Python. It’s the one used by Google for it’s google-api-python-client library. There’s absolutly nothing in common between httplib’s API and this one.

I dont like it’s API: the way the library handles the Response object seems wrong to me. You should get one object for the response, not a tuple with the response and the content. The request should also be an object. Also, The status code is considered as a header, and you lose the message that comes with the status.

There is also an important issue with httplib2 that we discovered at work. In some case, if there is an error, httplib2 will retry the request. That means, in the case of a POST request, it will send twice the payload. There is a ticket that ask to fix that, marked as won’t fix. Even when there is a perfectly acceptable patch for this issue. (it’s a “WAT” moment). I’m really curious to know what was the motiviation behind this, because it doesn’nt makes sense at all. Why would you want your client to retry twice your request if it fails ?

urllib

urllib is also part of the standard library. I was suprised, because given the name, I was expecting a lib to manipulate an URL. And indeed, it also does that! This library mix too many different things.

urllib2

urllib2. And because 2 is not enough, also …

urllib3

urllib3. I thought for a moment that, maybe, the number number was related to the version of Python. I’ll spare you the suspense, it’s not the case. Now I would have expected them to be related to each other (sharing some common API, the number being just a way to provides a better API than the previous version). Sadly it’s not the case, they all implement different API.

At least, urllib3 has some interesting features:

request

A few persons pointed me to requests. And indeed, this one is the nicest of all. Still, not exactly what *I*’m looking for. This library looks like LWP::Simple, a library build on top of various HTTP components to help you for the common case. For most of the developers it will be fine and do the work as intented.

What I want

Since I’m primarly a Perl developer (here is were 99% of the readers are leaving the page), I’ve been using LWP and HTTP::Messages for more than 8 years. LWP is an awesome library. It’s 16 years old, and it’s still actively developed by it’s original author Gisle Aas. He deserves a lot of respect for his dedication.

There is a few other library in Perl to do HTTP request, like:

but most of the time, you end up using LWP with HTTP::Messages.

One of the reason this couple is so popular is because it provides the right abstraction:

The response and request objects use HTTP::Headers and HTTP::Cookies. This way, even if your building a web framework and not a HTTP client, you’ll endup using HTTP::Headers and HTTP::Cookies since they provide the right API, they’re well tested, and you only have to learn one API, wether you’re in an HTTP client or a web framework.

http

So now you start seeing where I’m going. And you’re saying “ho no, don’t tell me you’re writing another HTTP library”. Hell yeah, I am (sorry, Masa). But to be honest, I doubt you’ll ever use it. It’s doing the job I want, the way I want. And it’s probably not what you’re expecting.

http is providing an abstraction for the following things:

I could have named it httplib3, but http seems a better choice: it’s a library that deals with the HTTP protocol and provide abstraction on top of it.

You can found the documentation here and install it from PyPI.

examples

A few examples

a client

With this, you can easily build a very simple client combining thoses classes, or a more complex one. Or maybe you want to build a web framework, or a framework to test HTTP stuff, and you need a class to manipulate HTTP headers. Then you can use http.headers. The same if you need to create some HTTP responses: http.response.

I’ve started to write httpclient based on this library that will mimic LWP’s API.

I’ve started to document this library and I hope to put something on PyPI soon.

Weekly Review - 2012-06

Lot of documentation for http and httpclient this week, and the first release (with some help from James Rowe) for `http` on PyPI.

I’ve started to play with google app engine, I’ll probably push two applications with their code soon.

Conférence LemonLDAP::NG au FOSDEM 2012

Comme chaque année, le FOSDEM a lieu à Bruxelles et rassemble de nombreux développeurs de logiciels libres venant de différents pays.

Cette année, pour la première fois, j'ai eu le plaisir de pouvoir présenter LemonLDAP::NG dans la devroom Perl :

Cette présentation a été l'occasion d'annoncer quelques nouveautés qui apparaîtront dans la prochaine version (1.2.0) sur laquelle nous travaillons activement :

Cette nouvelle version apportera bien entendu son lot de correctifs et d'autres évolutions, elle devrait sortir d'ici le mois de mars. En attendant, vous pouvez retrouver les diapositives de la conférence du FOSDEM.

Published by KPTN on 2012-02-07T22:05:00

Weekly Review - 2012-05

Managed to get some work done on the Spore implementation for Python and http.

Also, some code cleanup in bot projects, added a few tests, and created a few tickets for some future tasks.

Paris.pm January Technical Meeting

Paris.pm January Technical Meeting

( french version below )

Since September 2011, I’ve taken over the management of the Paris.pm monthly technical meetings. Paris.pm is part of the French Perl Mongers.

These meetings happen every months in a very nice building in Paris (it’s an ancient rail station), and usually 15 people gather for one evening. We are relatively well equipped, with a video beamer, microphone and video camera. Thanks to other mongers that help, things go smotthly.

The next meeting will happen the 18th january 2012, with:

Location : 181 avenue Daumesnil, 75012 Paris, France

Goggle map : google map

If you are interested, and live in Paris, please join us ! it’s free of course.


Depuis septembre 2011, j’ai repris la gestion des réunions techniques de Paris.pm (groupe parisien des Mongueurs de Perl).

Ces réunions ont lieu tous les mois dans des très beaux locaux dans Paris (l’ancienne gare de Bercy), et accueille habituellement une quinzaine de personnes, intéressées par Perl . Nous sommes relativement bien équipé, avec projecteur, micro et caméra, et grâce à l’aide des autres mongueurs, tout se passe bien.

Lors de ces réunions, deux à trois présentations techniques ont lieu, suivis de questions. Le tout se fini généralement dans un restaurant dans le coin.

La prochaine réunion se tient mercredi 18 janvier 2012, et le programme est :

Adresse : 181 avenue Daumesnil, 75012 Paris

Lien goggle map : google map

Si vous êtes intéressé, n’hésitez pas à venir, entrée libre et gratuite.


les mongueurs / 2012-03-18T05:15:07