Hi (again), I'm Zack, and this is my blog. Have a look at the most recent posts below, or browse the tag cloud here on the right.

Archives are available as well.

You can leave comments on my posts by following the relevant link associated to each post. Alternatively, you can mail me comments; note that unless otherwise requested, I will add mailed comments in the comment feeds.

The blog is mostly in English while sometimes in Italian; there is a (tiny teeny) tag cloud to choose the language.

RCBW - #20

With a couple of days of delay, here are this last week squashes, by yours truly:

  • bug #567767 - nxml-mode - request removal, integrated into emacs23
  • bug #546764 - d-feet - add missing dep on hicolor-icon-theme
  • bug #566290 - php-wikidiff2 - add missing dep/substvar on phpapi-*
  • bug #567860 - php-net-ping - sponsored fix (+ upstream release) for DM maintainer
  • bug #248275 - anteater - proposed removal
  • bug #536285 - mirage - avoid tricking users to delete the wrong file (patch by Evgeni Golov)

The delay is due to FOSDEM, it's hard to squash bugs when you are: (1) having fun (best FOSDEM ever, if you ask me), (2) connected with very poor network connectivity (let's say: FOSDEM-quality network). Also, there are just 6 squashes, but last week there were 8, so ... :-) (I know, I suck).

Among the main highlights of the week, I just want to cite Mehdi Dogguy: he was with me at JFLA 2010 last week and I've managed to grab him into the "RCBW tunnel". With a handful of well-targeted NMUs, he has fixed about 10 RC bugs in the few days of the conference. He is too shy to blog about that, but since I'm evil, I'm disclosing it here :-P Welcome on board, Mehdi! (now you're doomed: you must continue doing that!)

Posted Tue Feb 9 10:23:10 2010 Tags:

Tra gli scrittori che più mi hanno appassionato e divertito negli ultimi anni, c'è indubbiamente Gianrico Carofiglio: ha importato il filone "legal thriller" nella narrativa italiana ed il suo personaggio chiave (l'avvocato Guido Guerrieri) è oltremodo coinvolgente.

Nell'ultimo romanzo (Le perfezioni provvisorie, Sellerio, 2010), un flusso di coscienza del Guerrieri regala questa perla, chiaramente rivolta a se stesso, subito dopo avere utilizzato l'espressione «non c'è problema»:

Non c'è problema? Ma come parli, Guerrieri? Sei impazzito? Dopo non c'è problema ti rimangono tre passaggi: un attimino, quant'altro e piuttosto che nell'immonda accezione disgiuntiva. A quel punto sei maturo per andare all'inferno, nel girone degli assassini della lingua italiana.

Veramente snob, pignolo, insopportabile.
Ciò nonostante mi piace ed inevitabilmente mi strappa un sorriso.
Ecco cos'è: mi ricorda qualcuno.
Idee?

Posted Tue Feb 9 09:57:21 2010 Tags: ?book

remember Mutt's mail in Org-mode and jump back to them

As already anticipated, I've been implementing my own Getting Things Done work flow. This post documents one of its main bricks: the integration between Mutt and Org-mode.

As a geek, my main incoming stream of TODO items and information in general is email. As emails hit my INBOX, I either deal with them immediately (reply, archive, delete) or I need to store them elsewhere, possibly adding extra information such as a deadline, a personal note, the associated next action, the context in which it is actionable, etc. This need of adding extra information is what defeats the usage of my mail client (Mutt) as a list manager (in the GTD sense), and that's where I plugged Org-mode in. My main goals are:

  1. create Org-mode notes from Mutt, referencing the current email, and possibly inlining some of its metadata (e.g. subject, sender)

  2. quickly retrieve referenced emails from Org-mode notes; ideally that should happen in my usual email environment (i.e. Mutt), so that I can process the retrieved mail as usual (e.g. to inform the sender that I did something about it)

In fact, both would be straightforward to achieve if I were using some Emacs-based mail client such as Gnus, but I resist the Emacs operating system syndrome, and therefore I insist in using my beloved Mutt.

Let's see how the two parts of the interaction between Mutt and Org-mode work.

(1) Mutt → Org-mode (there ...)

The interaction from Mutt to Org-mode happens via org-protocol. Using it external applications can feed content to Org-mode note templates, which are then interactively edited (via emacsclient), and finally filed away.

The Mutt glue macro from my ~/.muttrc is as follow:

macro index \eR "|~/bin/remember-mail\n"

The remember-mail script is trivial: it parses the fed mail from STDIN (using a couple of legacy Perl modules) and then invokes org-protocol.

The relevant configuration from my ~/.emacs is reported below; the comments explain the various parts:

;; standard org <-> remember stuff, RTFM
(org-remember-insinuate)
(setq org-default-notes-file "~/org/gtd.org")
(setq org-remember-templates  ;; mail-specific note template, identified by "m"
      '(("Mail" ?m "* %?\n\n  Source: %u, %c\n  %i" nil)))

;; ensure that emacsclient will show just the note to be edited when invoked
;; from Mutt, and that it will shut down emacsclient once finished;
;; fallback to legacy behavior when not invoked via org-protocol.
(add-hook 'org-remember-mode-hook 'delete-other-windows)
(setq my-org-protocol-flag nil)
(defadvice org-remember-finalize (after delete-frame-at-end activate)
  "Delete frame at remember finalization"
  (progn (if my-org-protocol-flag (delete-frame))
     (setq my-org-protocol-flag nil)))
(defadvice org-remember-kill (after delete-frame-at-end activate)
  "Delete frame at remember abort"
  (progn (if my-org-protocol-flag (delete-frame))
     (setq my-org-protocol-flag nil)))
(defadvice org-protocol-remember (before set-org-protocol-flag activate)
  (setq my-org-protocol-flag t))

The result is that when you hit ESC-R in Mutt, emacsclient will be fired up in place presenting a note template that already contains relevant mail information (date, subject, from) and lets you add extra information before going away. Additionally, the email message-id will be hidden in the note as a mutt: hyperlink with anchor text "mail".

(2) Org-mode → Mutt (... and back again)

Going back means that clicking on a "mail" hyperlink within an Org-mode note should bring up a Mutt instance showing the original message, in its context (e.g. its own mailbox). Achieving that consists of 2 separate steps:

  1. looking up a specific message by Message-ID
  2. firing up Mutt on the looked up message

For the first part I use maildir-utils (AKA mu): a Xapian-based mail indexing tool, which nicely integrates with Mutt; check out my previous blog post on the subject for a sample setup. Using mu, Message-ID lookups are as simple as:

zack@usha:~$ mu find -f p m:E1NbJad-0007x9-B7@ries.debian.org
/home/zack/Maildir/Debian.project/cur/1264883664_0.9472.usha,U=6320,FMD5=2284e927bb93d8a2ec434f5614dc04ba:2,S

Note: I'm relying upon maildir-utils version 0.6 or greater, for all presented scripts.

For the second part I use the mutt-open script which fires upon a Mutt instance on the maildir containing a specific message, and then "hits" the appropriate keys to open the message and shutdown the sidebar (if desired). It is a nicely reusable script, which I've being using elsewhere too.

The needed glue on the emacs side is just a function to invoke mutt-open in a brand new terminal, and its declaration as the handler for mutt: URLs.

(defun open-mail-in-mutt (message)
  "Open a mail message in Mutt, using an external terminal.

Message can be specified either by a path pointing inside a
Maildir, or by Message-ID."
  (interactive "MPath or Message-ID: ")
  (shell-command
   (format "gnome-terminal -e \"%s %s\""
       (substitute-in-file-name "$HOME/bin/mutt-open") message)))

;; add support for "mutt:ID" links
(org-add-link-type "mutt" 'open-mail-in-mutt)

Voilà!

Download

Summary of scripts and configuration snippets discussed above:

Posted Mon Feb 8 14:09:41 2010 Tags:

RCBW - #19

Back with the "ordinary track" of RCBW, here is this week squashes by yours truly:

  • bug #546492 - djvulibre - provided patch implementing get-orig-source to strip non-free specification docs
  • bug #550394 - courier-imap - not affected/responsible by the imap-server virtual package mess
  • bug #550397 - kolab-cyrus-imapd - not affected/responsible by the imap-server virtual package mess
  • bug #550380 - uw-imapd - provides and conflicts with imap-server, fixing file-overwrite errors
  • bug #559698 - rox - drop useless build-dep on libxtrap-dev (which will be gone soon)
  • bug #559829 - synfig - disable vulnerable embedded libltdl, fix CVE
  • bug #520557 - lemon - proper version tagging, already fixed
  • bug #547726 - myspell-el-gr - forcibly orphan the package, "fix" maintainer address

The attentive reader have noticed that there is one more than usual, the reason is the mighty BSP in Mönchengladbach, which has powered all above squashes. I've enjoyed the BSP a lot, my first in Mönchengladbach, which won't be the last. I recommend checking it out at least once in the future, even only for tasting Formorer's chili :-)

The main highlight of the week is my personal award to the best feedback ever from an NMU-ed maintainer, the award goes to Jonas, kudos for your attitude.

Posted Sun Jan 31 09:51:30 2010 Tags:

niente di nuovo sotto il sole

Chi ha parlato con me di concorsi truccati che impediscono ai "giovani ricercatori"™ di essere assunti in Italia ha difficilmente trovato terreno fertile. La mia disciplina (l'informatica scientifica) è relativamente nuova e quindi più fortunata di discipline più antiche: le cosiddette baronie si stanno si affermando, ma in buona parte d'Italia (e limitatamente ai dipartimenti che ho avuto modo di conoscere) è ancora possibile trovare concorsi da ricercatore in informatica che siano specchiatamente meritocratici. Badate: non ho detto che sia la norma, ma ... «piuttosto che niente, è meglio piuttosto».

Nel mio ambito di interesse dunque, il problema della assunzione dei giovani è dominato più dalla scarsità di posti che non dal malcostume dei concorsi truccati. A parità di competenze scientifiche ed età, la Francia è in grado di assumere ogni anno molti più ricercatori in informatica di quanto non sappia fare l'Italia. Per questo è piuttosto comune imbattersi in laboratori di ricerca francesi dove i ricercatori italiani sono statisticamente sovra-rappresentati rispetto ad altre nazionalità.

In altre discipline e/o in altri piani della gerarchia accademica, le carte in gioco sono molto diverse. Riporto a questo proposito la (yet another) horror story dell'assunzione di 2 professori ordinari per trasferimento a Roma Tre. Niente di nuovo, ma questa ha avuto immeritatamente poca risonanza e la riporto con piacere.

Breve rassegna stampa:

  1. l'articolo iniziale di Roberto Perotti sul Sole, che introduce la vicenda.
    (Per chi non lo conoscesse, Perotti è autore del bellissimo libro l'università truccata, uno dei più belli ed equilibrati testi che io abbia letto sulle "sventure" dell'università italiana.)

  2. (i tentativi di) risposta degli attori del concorso, sempre sul Sole

  3. infine, l'analisi di Michele Boldrin sui meriti scientifici dei candidati in gioco per la cattedra di Economia Politica
    (Shameless plug per i cater-fan: Boldrin è l'economista di riferimento di Caterpillar.)

I miei highlight sulla vicenda sono i seguenti:

  • In molti, ed io tra loro, ritengono non sia possibile stabilire un unico strumento di valutazione automatico per l'attività di ricerca (i.e. PoP non è la soluzione). Ciò nondimeno, le personalità scientifiche attive in specifici ambiti possono facilmente smascherare i candidati impresentabili ad un concorso, grazie semplicemente alla loro cultura su quali siano le basi dati (motori di ricerca, indici di riviste, conferenze note, ...) scientificamente affidabili da consultare. Non è altrettanto facile garantire che vinca il migliore, ma smascherare gli impresentabili costituisce un contributo fondamentale a minimizzare i danni per l'università che assume il vincitore del concorso (e quindi per la collettività).

  • Uno dei punti (ricorrenti) di Perotti resta la chiave di tutto:

    In qualsiasi paese moderno nessun esponente accademico si sarebbe esposto in una vicenda così imbarazzante: la tradutio manuale dei titoli, la clamorosa disparità di valore scientifico di vincitori e sconfitti, le parentele, il cerchiobottismo politico. Inoltre, rettore e preside, e l'intera università con loro, avrebbero perso molto di più in immagine e prestigio di quanto avrebbero guadagnato in altre dimensioni.

    Perché questa totale indifferenza? Il motivo è sempre lo stesso: nell'università italiana si procede solo per anzianità, nessuno paga per le scelte sbagliate e nessuno viene premiato per operare bene. Che io promuova un premio Nobel oppure l'amico o il parente, il mio stipendio e la mia carica continuano esattamente come prima.

In tale contesto di deresponsabilizzazione generale nessuna isola felice può durare a lungo, le avvisaglie sono tristemente note.

Posted Mon Jan 25 21:54:36 2010 Tags: ?roma

RCBW - #18

... and RCBW is back! Here is this week squashes:

  • bug #544879 - clutter - resurrect -doc package, fix gtk-doc related FTBFS
  • bug #504980, bug #560513 - cryptonit - add missing #include for gcc 4.4 (bonus point: misc QA fixes)
  • bug #504901 - dibbler - no longer valid gcc FTBFS
  • bug #504869 - scim-bridge - closed (w maintainer) as unreproducible an already fixed gcc 4.4 bug
  • bug #505390 - traverso - add missing #include for gcc 4.4
  • bug #562846 - flim - drop Recommends on metamail (now gone)
  • bug #526207 - jaula - closed as unreproducible a gcc 4.4 bug (recent flex adds cstdio by itself)

Most of the actually fixed missing include bugs above have benefited from patches by Martin Michlmayr, thanks!

Also, this week squashing has benefited from a huge list of bugs which Luk has given me, some of the not-yet-fixed bugs there are a bit trickier than usual (e.g. missing #include bugs which got intertwined over time with const char * conversions bugs, which in turn require some far reaching code changes due to the propagation of function prototypes in unexpected code parts).

Since I'll be leaving tomorrow morning for the BSP in Mönchengladbach, I'll have a bit of time there to dive a bit more into the issues.

Actually, what I fear most now is buying train tickets from Cologne to Moenchengladbach and back, since I'm totally unable to pronounce the name of the latter city (my German sucks, actually there is no such "my German" at all). Luckily, I've been told they've wonderful ticket-selling machines in Cologne :-)

See you there, and happy RC squashing!

Posted Fri Jan 22 11:34:03 2010 Tags:

Bolognesi brava gente ...

... própri.

("Proprio", ovvero "come no", in dialetto Bolognese.)

Posted Wed Jan 20 09:41:37 2010 Tags:

the ultimate text diffing helper

I use Git not only for code, but also for text, my most common use case being co-authorship of scientific papers typeset in LaTeX.

While reviewing other author changes, the usual line-by-line diff is often annoying since:

  1. Paragraph re-formatting gets in the way (hello guys accustomed to compulsory Vim's gq or Emacs' M-q): it does not effect the final rendering, but it still hinders peer-review of changes.

  2. Even in the simplest case of a single word change on a single line, it will take some time for your eyes to spot where, along the line, the actual change is.

Stuff like wdiff does help, but I've never looked at how to integrate it with Git, and I still find it a pain in the eyes due to the fancy ASCII arts used to denote additions and deletions (pain that I usually experience when looking at the output of debdiff). There are nice diffing GUIs or editor-integrated solutions out there, but what I've always dreamed of is a plain old cmdline geekism.

Enter Git's --color-words, that can be passed to both show and diff commands. My favorite related Git aliases are as follows:

    [alias]
        wdiff = diff --color-words
        wshow = show --color-words

Here is a sample fancy output, yet very intuitive and console-based, of git show --color-words (text in red denotes deletions, text in green additions):

sample output of git show --color-words (screenshot)

Maybe not new to you, but it has been life-changing for me.

Posted Mon Jan 18 12:49:03 2010 Tags:

The culture of freedom lies in the details

Here is an interesting blog post by Bradley Kuhn about Ubuntu, Debian, and (warning: my interpretation ahead) the culture of freedom.

While reading it, I had kinda moment of truth, because just yesterday I was musing with Mehdi and Lucas on the fact that Debian is basically the only remaining distribution among the mainstream ones (if that means something) that is free from the ground up, including its infrastructure. We "just" seek hardware via donations and then we run, thanks to the amazing work of DSA, our own free infrastructure on top of it.

Let's cherish this value!

Thanks to Roberto Di Cosmo for the pointer to Bradley's post.

Update: there's a thread on the ubuntu-devel mailing list about Bradley's post.

Posted Sat Jan 16 16:46:17 2010 Tags:

RC squashing news

In the last two weeks I didn't progress as usual with RC bug squashing, even if I've some squashes to share:

  • bug #545235, bug #560502 - k3d - add missing #include for gcc 4.4 (patch from Ubuntu)
  • bug #552791 - acorn-fdisk - fix debian/copyright (sponsored NMU for my NM Thorsten Glaser)
  • bug #527371 - qemu-kvm - remove extra stuff (fix FTBFS when built twice in a row)

The reason for my under-activity are that for a week I'd relatively scarce network connectivity, which is a badly needed good for RCBW. Then, this week, I got swamped by various tasks at the university (including co-authoring a paper with Lucas, more on this (hopefully) in the future).

My residual RCBW time has been devoted to write a page about RCBW where I've tried to summarize my initial motivations and the main points of the initiative, which I consider established by the first 18 weeks of activity. Starting from next week I'll be back with daily squashes. In the week-end ... drum roll ... I'll be attending the BSP in Mönchengladbach, hosted by Credativ; I'll personally be kindly hosted by bzed which I thank already for that and for the BSP organization.

See you there (!?)

Posted Sat Jan 16 13:46:02 2010 Tags: