Sigpue source:

Sigpue is a simple signature generator, based on an idea by Adrien Piérard who, at some point, would randomly attribute random quotes to me. Adrien also has an implementation, which does a fine job of classifying quotes, and is written in an elegant, functional language. The version below, on the other hand, is less than forty lines of excruciatingly ugly exquisite Perl code. Observe that the first non-comment line of code is use strict, which makes sure that our program is not going to be illegible crud.

Data format: sigpue needs to be fed a formatted list of entries, either on its standard input or as filenames on the command line. Here is a sample file, let's call it sigpue.words:

character	Albator \\
character	Gargamel \\
character	Goldorak \\
character	Homer Simpson \\
character	Maude Flanders \\
character	Musclor \\
character	Palmer Eldritch \\
encoding	Punycode \\
encoding	UTF-8 \\
encoding	UTF-EBCDIC \\
math	[l|d]es développements limités
math	[l|d]es suites de Cauchy
math	[l|d]es équations de Ricatti
math	l'intégration par parties
math	la conjecture de Poincaré
math	la constante de Planck
math	la géométrie riemannienne
math	le carré de l'hypoténuse
math	le théorème des accroissements finis
math	le triangle de Tartaglia
proglang	Ada 83
proglang	C99
proglang	Cobol 2002
proglang	Fortran 77 \\
proglang	Haskell \\
proglang	Java
proglang	O'Caml
proglang	PL/I
proglang	Perl 5.8.0
proglang	Scheme R6RS

As a general rule, offensive topics tend to create the funniest signatures. Be sure to check who you are writing to.


Running sigpue <sigpue.words, where sigpue.words is the sample file shown above, will generate signature lines such as the following:

Arguably, these lines are not very funny. Make your own data file, it's the only way that the generated quotes will suit your weird, sick humor.

Integration into emacs

Here is a snippet of elisp code for people who use emacs and text-mode to compose e-mail. It binds C-x C-y to a function that replaces the current signature with one generated by sigpue. Paths are hard-coded; adapt to your local setup.

(add-hook 'text-mode-hook (lambda () (global-set-key "\C-x\C-y" 'chsig)))

;; Function to replace the current signature with one from sigpue
(defun chsig ()
    (set-register 'p (point))
    (goto-char (point-max))
    (if (re-search-backward "^-- $" nil t 1)
          (forward-line 1)
          (delete-region (point) (point-max))
          (call-process "sigpue" nil t nil
                        (expand-file-name "~/.homer_rc/sigpue.words")))
      (display-message 'error "Could not find pattern `^-- $' in buffer"))
    (goto-char (get-register 'p)))

Quick links:

Camp info 2007
Camp Faécum 2007
Japanese adjectives
Couleurs LTP
French English words
Petites arnaques
DSC-W17 patch
Scarab: dictionnaire de Scrabble
Omelette soufflée au sirop d'érable
Camembert fondu au sirop d'érable
La Mona de Tata Zineb
Cake aux bananes, au beurre de cacahuètes et aux pépites de chocolat