You are here

Enrico Zini's blog

Enrico Zini's blog
Checked: 3 years 2 months ago
Updated: 3 years 2 months ago
Update every: 2 hours

Enrico Zini: blog
Subscribe to Enrico Zini's blog

On praising people, and on success

Enrico Zini's blog - Fri, 25/01/2013 - 11:45am
On praising people, and on success

This morning I was pointing out to friends how excellent is mako's post on Aaron Swartz, and I thought it'd be nice if we didn't have to wait for people to die before telling the world how awesome and inspirational they are.

Then Russ posted an article about work, success and motivation and I went to tell my friends how awesome and inspirational he is.

Aubergine soup

Enrico Zini's blog - Thu, 08/11/2012 - 8:15pm
Aubergine soup

I, too, have been guilty of discovering a shrivelled aubergine in the bottom of the fridge, and I think I improved on the recipe a bit.

Evolution's old odd mail folders to mbox

Enrico Zini's blog - Mon, 23/07/2012 - 1:27am
Evolution's old odd mail folders to mbox

Something wrong happened in my dad's Evolution. It just would get stuck checking mail forever, with no useful diagnostic that I could find. Fun. Not.

Anyway, I solved by resetting everything to factory defaults, moving away all gconf entries and .evolution/ files. Then it started to work again, of course then I needed to reconfigure it from scratch.

It turned out however that some old mail was only archived locally, and in a kind of weird format that looks like this:

Giving away distromatch

Enrico Zini's blog - Sat, 21/07/2012 - 2:54pm
Giving away distromatch

at last year's Fosdem I tried to inject a lot of energy into distromatch but shortly afterwards I've had to urgently rewrite the nm.debian.org website.

More diversity in Debian skills

Enrico Zini's blog - Thu, 12/07/2012 - 12:01pm
More diversity in Debian skills

This blog post has been co-authored with Francesca Ciceri.

In his Debconf talk, zack said:

We need to understand how to invite people with different backgrounds than packaging to join the Debian project [...] I don't know what exactly, but we need to do more to attract those kinds of people.

Francesca and I know what we could do: make other kinds of contributions visible.

Spaghetti con friggitelli e mozzarella

Enrico Zini's blog - Mon, 30/04/2012 - 2:08pm
Spaghetti con friggitelli e mozzarella

Dosi per 4 persone:

  • 300 gr di spaghetti
  • 300 gr di friggitelli
  • 70 gr di mollica di pane
  • 125 gr di mozzarella
  • parmigiano grattugiato q.b.
  • 4 foglioline di menta
  • olio extra-vergine q.b.
  • sale & pepe

Laviamo i peperoncini, togliamo i semini e il picciolo, asciughiamoli e tagliamoli a striscette.

Tritiamo nel mixer la mollica di pane e doriamola in padella con 3 cucchiai di l'olio, finchè non diventerà croccanate e, mettiamolo da parte.

Resolving IP addresses in vim

Enrico Zini's blog - Wed, 07/03/2012 - 1:07pm
Resolving IP addresses in vim

A friend on IRC said: "I wish vim had a command to resolve all the IP addresses in a block of text".

But it does:

:<block>!perl -MSocket -pe 's/(\d+\.\d+\.\d+\.\d+)/gethostbyaddr(inet_aton($1), AF_INET)/ge'

If you use it often, put the perl command in a one-liner script and call it an editor macro. It works on other editors, too, and even without an editor at all. And it can be scripted!

We live with the power of Unix every day, so much that we risk forgetting how awesome it is.

SQLAlchemy, MySQL and sql_mode=traditional

Enrico Zini's blog - Mon, 27/02/2012 - 6:45pm
SQLAlchemy, MySQL and sql_mode=traditional

As everyone should know, by default MySQL is an embarassing stupid toy:

Repubblica vs i traduttori automatici

Enrico Zini's blog - Thu, 23/02/2012 - 2:07pm
Repubblica vs i traduttori automatici

Vedo questo titolo: "Cieco e senza ali: l'insetto della cava più profonda" e scatta la sensazione di unghie sulla lavagna. Non avran mica tradotto l'inglese "cave" con "cava"?

Si.

E ne sono veramente convinti, ribadendo nell'articoletto che è proprio proprio una cava artificiale, scavata proprio proprio dall'uomo:

Debtags for derivative distributions

Enrico Zini's blog - Fri, 20/01/2012 - 2:12pm
Debtags for derivative distributions

Sometimes I do cool stuff and I forget to announce it.

Ok, so I recently announced a new Debtags website.

I forgot to say in the announcement that the new website does not only know of Debian packages: see for example this page, at the very bottom it says: "Distributions: oneiric, precise, sid, testing".

Quei simpatici spammer di Aruba

Enrico Zini's blog - Fri, 14/10/2011 - 2:14pm
Quei simpatici spammer di Aruba

Aruba ha deciso, di punto in bianco, di iscrivermi a tutte le loro newsletter.

Le newsletter non hanno link di deiscrizione. O meglio, forse ce l'hanno, ma si vedono solo decodificando la mail usando programmi che io non ho intenzione di usare. A prescindere dal link di deiscrizione, perché dovrei deiscrivermi da delle newsletter alle quali non mi sono mai iscritto?

Ho mandato questa mail a abuse@staff.aruba.it, e altre 3 segnalazioni dopo di questa, che ovviamente sono state ignorate:

Python list gotcha

Enrico Zini's blog - Mon, 06/06/2011 - 12:27am
Python list gotcha

Suppose in python you're building a list of buckets:

>>> a = [[]] * 10
>>> print a
[[], [], [], [], [], [], [], [], [], []]

Looks good. However:

Deploying distromatch

Enrico Zini's blog - Fri, 18/02/2011 - 12:46pm
Deploying distromatch

I have been working on allowing anyone to set up their own distromatch instance.

For Debian and Ubuntu, I can easily generate the distromatch input using UDD and the Contents files found in any mirrors.

For the whole RPM world, thanks to Olivier Thauvin I have been able to set up regular exports from the vast Sophie database.

Released cfget 0.17

Enrico Zini's blog - Fri, 04/02/2011 - 4:58pm
Released cfget 0.17

I have released version 0.17 of cfget.

Changes:

  • Fixed a DeprecationWarning with python 2.6
  • Allow empty values in configuration files
  • The round() function now returns an int, not a float

Released cfget 0.18

Enrico Zini's blog - Fri, 04/02/2011 - 4:58pm
Released cfget 0.18

I have released version 0.18 of cfget.

Changes:

  • Allow empty comment lines
  • Added Cfget.load_from_env to allow to easily load a working Cfget object from other python code
  • Fixed some exception handling and error reporting during parsing of expressions

Gzip streaming in Python (or lack thereof)

Enrico Zini's blog - Wed, 02/02/2011 - 10:35am
Gzip streaming in Python (or lack thereof)

Consider this simple Python snippet:

#!/usr/bin/python

import gzip
from urllib import urlopen

zfd = urlopen("http://ftp.debian.org/debian/dists/sid/Contents-udeb.gz")
fd = gzip.GzipFile(fileobj=zfd, mode="r")
for line in fd:
    foobar(line)

It does not work: it turns out GzipFile wants to seek() and tell() on its file object:

update-apt-xapian-index on other distros

Enrico Zini's blog - Tue, 25/01/2011 - 10:01pm
update-apt-xapian-index on other distros

I've drafted a little HOWTO on using apt-xapian-index on non-Debian distributions.

The procedure has been tried on Mageia with some success, and there's no reason it wouldn't work everywhere else: the index itself does not depend on anything distro-specific.

Match package names across distributions

Enrico Zini's blog - Sat, 22/01/2011 - 12:40am
Match package names across distributions

What would happen if we had a quick and reliable way to match package names across distributions?

These ideas came up at the appinstaller2011 meeting:

A prototype webby markety appy thing

Enrico Zini's blog - Sat, 22/01/2011 - 12:40am
A prototype webby markety appy thing

What better way to introduce my work at an Application Installer meeting than to come with a prototype package browser modeled after shopping sites developed in just a few hours?

Cross-distro Meeting on Application Installer

Enrico Zini's blog - Sat, 22/01/2011 - 12:40am
Cross-distro Meeting on Application Installer

I have been to a Cross-distro Meeting on Application Installer which to the best of our knowledge is also the first one of its kind. Credit goes to Vincent Untz for organising it, to OpenSUSE for hosting it and to the various sponsors for getting us there.

Yet another Ubuntu anecdote

Enrico Zini's blog - Sat, 15/01/2011 - 9:35am
Yet another Ubuntu anecdote

Some posts on planet made me remember of a little Canonical-related story of mine.

Many years ago I shortly contracted for Canonical. It was interesting and fun.

At the time I didn't have any experience of being temporarily hired by a foreign company, so I rang my labour union to get an appointment, to make sure with them that everything was allright.

Streaming JSON objects with python

Enrico Zini's blog - Thu, 06/01/2011 - 3:43am
Streaming JSON objects with python

Dear Lazyweb,

Suppose I'd like to create an HTTP service that gives you a looong list of JSON objects. For example, one JSON object for every package in Debian.

One way I could do that is to just transfer a big, dozens of megabytes JSON array with one element per package. With the standard json module in python, this requires the client to buffer all the data in memory for decoding, as the JSON result would be something like this:

Using the apt-xapian-index catalogedtime plugin

Enrico Zini's blog - Tue, 02/11/2010 - 11:29am
Using the apt-xapian-index catalogedtime plugin

apt-xapian-index has recently gained a catalogedtime plugin, which stores the timestamp of when the package was first cataloged.

At first glance this does not mean much, so I'll explain with an example. aptitude can show a list of "New Packages": those packages that it sees now for the first time. It is a very useful feature, but you cannot ask it "what packages became available during last week?"

Award winning code

Enrico Zini's blog - Fri, 15/10/2010 - 11:36pm
Award winning code

Me and Yuwei had a fun day at hhhmcr (#hhhmcr) and even managed to put together a prototype that won the first prize \o/

Pages

Subscribe to Enrico Zini's blog