Login

20km à pied ça use, ça use, ...

Written on 2008-08-19 00:31.

Hier, nous sommes allé faire un tour du côté de Lierneux. On a parcouru une partie des GR 14 et 571, une boucle de 19km avec un petit peu de dénivellée et pour nous randonneurs du dimanche un certain mal aux pattes.

Évidemment, j'ai oublié mon APN, il faudra me croire sur parole quand je vous dis que nous avons vu des carrières de coticule, traversé des pâturages remplis de vaches, partagé une menthe avec les cyclistes du coin, observé des hirondelles et mangé des mûres à foison.

U2

Written on 2008-08-18 14:29.

ahah (via la blogothèque).

Incroyable

Written on 2008-08-14 08:41.

Hier soir c'était le match, je suis allé avec Alex boire quelques mousses et croiser les doigts. 5 bières et 90 minutes plus tard, le Standard a réussi à bousculer Liverpool : un penalty râté, un goal refusé et surtout beaucoup d'engagement. Tout se jouera à Anfield dans deux semaines, ce sera probablement plus compliqué mais il y a une chance : on y croit !

La fiche de l'UEFA.

GoogleGroups ça pue quand même beaucoup

Written on 2008-08-11 22:44.

La semaine passée, alors que j'étais à la recherche d'une bibliothèque python pour réaliser simplement de beaux graphiques (non gnuplot n'est pas assez sexy), je suis tombé sur PyCha qui n'est pas trop mal foutu mais il lui manque quelques fonctionnalités interessantes. Je ne fais ni une ni deux, je m'inscris à la mailing-list pour poser mes questions et proposer mon aide.

Et c'est que le calvaire commence, la mailing-list est gérée par google groups. Pour s'inscrire il faut impérativement avoir un compte google et même si j'en ai un, je ne l'utilise qu'avec des adresses jetables là c'est pour le boulot donc pas question d'adresse jetable. Je cherche donc dans les multiples options et écrans si je ne peux pas m'inscrire autrement ... las après quinze minutes (je commençais à perdre patience et à maudire google) je rends les armes et m'inscrit avec mon adresse à spam. Tout va bien, c'est anti-ergonomique au possible mais je survivrai.

Aujourd'hui, je recommence à chipoter avec PyCha, je remarque quelques manques de fonctionnalités, je sors mon vim et je commence à coder. Arrive le moment d'envoyer le patch, je veux donc trouver l'adresse du mainteneur de PyCha, je fonce sur google groups, je zieute l'email, bon il faut passer via une page avec un captcha (je commence franchement à détester google). Premier captcha, illisible. Second captcha, waayyy je n'ai pas suivi mes cours de crypto en vain, je déchiffre l'écriture et je réussis à prouver que je suis un humain. Et bam 404 ! Là, je décompresse cinq minutes avant d'affronter ce site inutile et sur-utilisé.

Je HAIS google groups, tout le monde utilise ce service qui n'offre pas la moitié de ce qu'un mailmain configuré et patché par google aurait pu offrir. Il faudra vraiment m'expliquer ce que les gens lui trouve.

relatorio: lots of new features

Written on 2008-08-08 07:53.

Lately, I added some new features to relatorio.

  • The use of ConTeXt to generate pdf files, it thus remove the dependancy on the trml2pdf that has not seen a release in age. It also shows how you can use a shell command to generate documents.
  • Support for the opendocument spreadsheet and presentation files, the help of Udo Spallek has been precious for this. So with relatorio, you can now generate a dump of your data, and use it to construct pivot table (us geek do not now what it is but believe me it is a key knowledge for every big business consultant), and presentations.

The openoffice change involve a change in the way you add your variables to the template. In previous version we were using <text:placeholder> tags, but it was not possible to add them through OO UI (and that they get replaced if you add them by hand) in Calc. We choose to replace it by <text:a> tags, the URL must start with relatorio:// and be followed by your directive or expression. As some has noted this might create subtle bugs thus I included warnings if the href attribute differs from content of the tag. But I think that if you are using the genshi interpolation feature there should be only structural information in the A tags.

Another nice addition to the openoffice templating mechanism, is that now we support inner documents. Thus if you include an opendocument spreadsheet in a text document, the data inside the spreadsheet will be interpreted as well.


UPDATE: finally, relatorio now supports both the old <text:placeholder> syntax and the new one.

Nyon, midi

Written on 2008-08-01 12:15.

Le tirage au sort a désigné Liverpool. Ça va pas être facile hein ...

Parrain : clap 3ème

Written on 2008-08-01 09:53.

Le petit Pablo est né mardi sur le coup de midi, toute la famille est très fière et moi, je suis parrain pour la troisième fois. Le cœur n'y est pas complètement néanmoins car un étage plus bas, ma grand-mère est aux soins intensifs dans un état très critique ...

C'est un mélange de sentiments très très bizarre.

More relatorio love

Written on 2008-08-01 09:13.

Lately I got a lot of help from Cédric of b2ck (another bunch of ex-tiny employees) so that they can replace the openerp way to do things (they are using the deprecated .sxw format) by relatorio openoffice reports.

In order to meet their needs, I complety reviewed the way the openoffice template is written. We work now much more similarly to other genshi templates and it brings some nice goodies :

  • generate outputs a genshi Stream that can be rendered as an OpenOffice document,
  • testing is way more easy,
  • you can apply filters to this stream in order to translate the document,
  • styles.xml is now templateable, that way you can make use of openoffice template documents

Cédric also pointed me to bugs in my setup.py and in the way I handled the namespaces from the OO documents. Opening relatorio development really brought us a lot of good ideas and feedback. I am really glad we did this and we will keep doing it at a faster pace then previously planned.

Switched relatorio to mercurial

Written on 2008-07-29 13:52.

I took some time today and yesterday to switch the relatorio repository to mercurial. The hardest thing in the migration was the Trac plugin that had a SyntaxError and some mess with easy_install.

Next on my schedule: migrating our framework and our client to mercurial. I expect this to be somewhat more difficult since they share the same subversion repository and I'd like to split them in two different hg repository.

A quick howto on using Wiimote with pygame

Written on 2008-07-25 20:09.

In order to play with other to a blind test music game, I created a small pygame script that plays a song and wait for the player to press a button, wait for its response and display the artist/title of the song. It was my first experiment in game programming and pygame made it very easy.

To make it more fun, I decided to use my wiimotes as input devices. Gathering information from the GNU/Linux Port for the Wii and a script from Cadex found on the web I created this piece of code to send wiimote events to pygame.

class Wiimote(object):
    wii_buttons = {'A1300008': 'A', 'A1300004': 'B'}
    def __init__(self, address, event):
        self.event = event
        self.address = address
        self.status = "Disconnected"
        self.receivesocket = bluetooth.BluetoothSocket(bluetooth.L2CAP)
        self.controlsocket = bluetooth.BluetoothSocket(bluetooth.L2CAP)
        self.connect()
    def connect(self):
        self.receivesocket.connect((self.address, 0x13))
        self.controlsocket.connect((self.address, 0x11))
        if self.receivesocket and self.controlsocket:
            if self.event == WIIMOTE1:
                data = "521110"
            else:
                data = "521120"
            self.controlsocket.send(data.decode('hex'))
            self.status = "Connected"
            thread.start_new_thread(self.receive, ())
    def receive(self):
        self.receivesocket.settimeout(0.1)
        while self.status == "Connected":
            try:
                data = self.receivesocket.recv(23).encode('hex').upper()
                if data in self.wii_buttons:
                    event = pygame.event.Event(self.event,
                                               button=self.wii_buttons[data])
                    pygame.event.post(event)
            except bluetooth.BluetoothError:
                pass
        self.receivesocket.close()
        self.controlsocket.close()
        self.status = "Disconnected"

What this class does is creating two sockets to communicate with the wiimote located at address. Once the connection is established, we send a simple command to light the led on the joypad and we create a thread that will receive all the data and post the events comming from the pad to the pygame event loop.

Pages :