maintainer wanted for next generation tetrinet server!

You probably all know tetrinet – if you don’t, you should really try that game. There are several servers for that game out there, and one of them is tetrinetx. It is packaged in Debian, but it has several problems:

  • It doesn’t support tetrifast mode. So you have to deal with that stupid 1-second delay before the next block appears.
  • The code is truly horrible. From main.c:
    #include "dns.c"
    #include "utils.c"
    #include "net.c"
    #include "crack.c"
    #include "game.c"

    That gives you an idea, right ?

A few years ago, I worked with a few friends on improving tetrinetx. This resulted in:

  • Massive code cleanup
  • Tetrifast support
  • Stats stored in an MySQL DB, so you can compute nice stuff (time wasted per day, etc)
  • More stats: blocks drop rate, etc.

This is hosted on sourceforge under the name tetrinetx-ng, but it hasn’t seen any activity for the last two years.

It would really be great if a tetrinet fan could take over the project and start making it alive again. Then tetrinet.debian.net could support tetrifast ;)

Also, I could try to setup a server with tetrinetx-ng. Someone wants to host tetrifast.debian.net for me ? Needed: MySQL DB + Apache (for the stats), + not being afraid of insecure code (doesn’t need to run as root)

Distributed SCM and branching a sub-directory ?

I am considering switching from SVN to a distributed SCM for my personal stuff. I had a look at git and mercurial, but neither really support branching a sub-directory:

Often, I am working on a big private project, and, while working on a sub-project (stored inside the project’s repository), I’d like to share that sub-project with others. So there are actually two problems:

  • being able to checkout/branch/clone a sub-directory
  • possibility to control access on a per-directory basis

SVN only partially meets my needs with that (it’s possible to checkout a sub-directory directly, for example with svn co svn://svn.debian.org/svn/pkg-ruby-extras/tools/ruby-pkg-tools). I think that it’s possible to do fine-grained access control
using libapache2-svn, but I haven’t tried yet.

It seems that mercurial can do that, using the forest extension. But you have to convert the specific directory into a repository, with a complex step to keep the history.

Amongst the distributed SCM, is there one that supports that ? (at least the sub-directory branching part)

Bash is weird.

Consider the following command:
echo <(cat /etc/{motd,passwd})

(you can replace "echo" with any command that takes one file as argument and cannot take it as stdin)

It's obvious that the goal is to expand this to:
echo <(cat /etc/motd /etc/passwd)

Then to:
echo /dev/fd/63

However, it doesn't work like this:
$ echo <(cat /etc/{motd,passwd}) ++ cat /etc/motd ++ cat /etc/passwd + echo /dev/fd/63 /dev/fd/62 /dev/fd/63 /dev/fd/62

But bash doesn't work like this. Brace expansion is done first, but inside parameters of the command (that is, <(cat /etc/{motd,passwd})) not words. So when <(cat /etc/{motd,passwd}) is expanded, the prefix is <(cat /etc/, the suffix is ")", so it's expanded to <(cat /etc/motd) <(cat /etc/passwd).

After reporting a bug about that, Chet Ramey gave me the correct way to reach the initial goal:
cat <(eval cat /etc/\{passwd,motd})

Condorcet method and the french presidential election

The french presidential election (in april/may 2007) will use plurality voting with two rounds (voters will choose 1 amongst 11 or 12 candidates during the first round. The two candidates with the most votes will be qualified for the second round).

The latest polls clearly show how this election method fails to satisfy the Condorcet criterion. Using the second round results from this poll (only considering the 3 main candidates, since the other don’t have any chance to win the presidential election), we get this:

2007 elect results

So Francois Bayrou is the Condorcet winner, and should win the election. However, the first round results, according to the same poll, could be:

  1. Sarkozy 31%
  2. Royal 24%
  3. Bayrou 22%
  4. Le Pen 12%

Since only the two first candidates are qualified to second round, Bayrou wouldn’t be elected. It will be interesting to see how those scores evolves until the first round (April 22nd).

Most broken spam protection ever

Just received that, in reply to a mail I sent:

This email is from X.

My email address (X@Y.com) is protected against spam and viruses by MailInBlack.

Please click on the following link in order to identify yourself to me and to allow your message to reach me.
http://192.168.0.252/v/?C8BEF10E72C&tmstp=20070316084314&tk=message_confirm&tkid=7951&lang=2

This needs to be done only once, for this email and all future email correspondence.

Thank you for your understanding.

X

MailInBlack seems to be a french company. No wonder why they guarantee that 100% of spams are stopped. (To be fair, I am not sure yet of who fucked up, it might be the admin)

Jabber clients and OS usage stats (3)

Using XMPP4R, I did some stats about Jabber clients usage on the Apinc Jabber server, which hosts im.apinc.org, jabber.fr, and many more using virtual hosting. I already did similar stats in March 2006 and September 2005.

The poll was done by sending jabber:iq:version to online users, around 1:00 PM (french local time, most of the users are french). 1343 clients were pinged, and 1315 answered, which is better than last year (1145 answers). Of the 1145 jids that answered last year, 368 were also part of the poll this year (I don’t know if this is good, or not enough).

Systems:

  • GNU/Linux: 43% (2006: 38% ; 2005: 34%)
  • Windows: 35% (2006: 37% ; 2005: 34%)
  • Mac OS: 16% (2006: 18% ; 2005: 23%)
  • Unknown: 4 (2006: 5% ; 2005: 6%)
  • Others: 0% (12 clients ; 2006: 0% ; 2005: 1%)

Clients:

  • Psi: 24% (2006: 28% ; 2005: 28%)
  • gaim: 22% (2006: 25% ; 2005: 25%)
  • Gajim: 12% (2006: 5% ; 2005: 3%)
  • Kopete: 11% (2006: 7% ; 2005: 7%)
  • iChatAgent: 9% (2006: 13% ; 2005: 18%)
  • libgaim (Adium): 5% (2006: 4% ; 2005: 3%)
  • Pandion: 4% (2006: 4% ; 2005: 2%)
  • Miranda: 2% (2006: 2% ; 2005: 1%)
  • BitlBee: 2%
  • neos: 1%
  • Unknown client: 0%
  • Exodus: 0%
  • Imendio Gossip: 0%
  • Jabbin: 0%
  • Spark IM Client: 0%
  • Trillian: 0%
  • JBother: 0%
  • jabber.el: 0%
  • JETI: 0%
  • JAJC: 0%
  • Class.Jabber.PHP: 0%
  • Jabberwocky: 0%
  • Tkabber: 0%
  • Gush: 0%

(all clients with at least one reply are listed here)

I also did some stats on the Linux distros. With 566 Linux users, one can consider that statistically signifiant.

  • Client answers with the kernel version, not including distribution information: 62%
  • Debian: 14%
  • Ubuntu: 12%
  • Gentoo: 2%
  • Unknown distros (not provided by the client): 2%
  • Fedora Core: 1%
  • Arch Linux: 1%
  • Mandriva: 1% (despite the fact that most users are french!)
  • Slackware: 0%

(Other distros are below 5 replies)

The Debian/Ubuntu situation is interesting. Debian is not dying, even on the desktop ! The server is hosting jabber.ubuntu-fr.org, so the results are biased towards Ubuntu.

Update: it seems that Psi reports “Debian GNU/Linux (testing/unstable)” even when running on Ubuntu. This is the case for ~5% of linux users.

To server admins: if you are running a large jabber server with jabberd 1.6, it’s easy to give me the right to get the list of online users, so contact me if your are interested in me doing your users stats. It would be interesting to see if users from different servers/countries have different behaviours. I’m not sure if it’s possible with ejabberd and other servers.

Récupérer les adresses des vidéos sur le site de France 5

Le site de France 5 propose des vidéos pour la plupart des émissions, mais il y a n’a aucun moyen facile d’en récupérer les adresses, pour enregistrer les émissions en local ou simplement les regarder avec mplayer. C’est un peu agaçant. Plein d’espoir, je me suis dit que peut-être, ils n’étaient pas au courant (on ne sait jamais), et je les ai contactés le 08/01. J’ai finalement eu une réponse le 27/02 (ouf):

> Je regarde assez régulièrement les émissions disponibles en vidéo sur le site
> Internet de France 5. Mais je trouve dommage qu'elles ne soient pas disponibles
> sous forme de podcasts. Cela me permettrait d'être averti facilement lorsque de
> nouvelles émissions sont rendues disponibles.
> 
> Est-ce qu'une évolution de ce type est prévue ? D'ici combien de temps ?
> 
> Merci d'avance

Bonjour,
Merci de votre intérêt pour notre émission.
Le podcast n'est pas prévu pour le moment pour ce type d'émission.
Nous notons toutefois votre intérêt pour ce service et vous remercions pour
votre message.
Bien cordialement,
L’équipe web France 5

(c’est moi qui ai remis le mail “à l’endroit” pour qu’il soit lisible)

Bref, du coup, je distribue mon script qui, même s’il n’est pas parfait, a l’avantage de marcher. Ca se passe là. C’est en Ruby, a priori il n’a pas besoin de libs particulières.
Il permet de récupérer toutes les URLs (lancer simplement ./f5rip.rb). Si ca se passe mal, rajoutez -d.

Vous pouvez aussi ne récupérer les adresses des vidéos que pour une seule émission, il suffit de passer en paramètre un morceau du nom de l’émission ou de l’url de la page de l’émision:

$ ./f5rip.rb asi
Arrêt sur images - http://www.france5.fr/asi/
- mms://a533.v55778.c5577.e.vm.akamaistream.net/7/533/5577/42c40fe4/lacinq.download.akamai.com/5577/internet/asi/arretimages_20070225.wmv

Et si comme moi, vous ne vous souvenez jamais des paramètres à passer à mplayer pour enregistrer l’émission localement, utilisez -m (ou –mplayer):

$ ./f5rip.rb --mplayer madame
Madame Monsieur Bonsoir - http://www.france5.fr/madame-monsieur-bonsoir/video.php
- Record:  mplayer -dumpfile out.avi -dumpstream mms://a533.v55778.c5577.e.vm.akamaistream.net/7/533/5577/42c40fe4/lacinq.download.akamai.com/5577/internet/madamemonsieur/madamemonsieur.wmv
  or View: mplayer mms://a533.v55778.c5577.e.vm.akamaistream.net/7/533/5577/42c40fe4/lacinq.download.akamai.com/5577/internet/madamemonsieur/madamemonsieur.wmv

Pour l’instant, il n’y a pas de licence. Si vous voulez en faire qqchose d’intéressant, on discutera! Patches welcomed.

Update (01/03) :
J’ai finalement mis le script sous CECILL V2 pour qu’il puisse être facilement intégré dans televidilo. J’en ai profité pour intégrer un patch et rajouter le support pour “Le magazine de la santé”. Le script mis à jour est là.

Slides for my FOSDEM talks about Debian QA

As promised, the slides from my FOSDEM talks about Automated Testing of Debian Packages and Use of Grid Computing for Debian Quality Assurance are available.

Don’t hesite to ask questions or post comments. The videos for both talks should be available so you can laugh at my frenglish, but I haven’t heard of an ETA yet.

Efficient key signing

I just finished signing all the keys from the FOSDEM KSP.

Importing keys I received:
Mutt is nice. You can tag all messages with ‘t’, then use ‘;’ (tag-prefix) and ^K (Ctrl + K) to import all signatures. (Thanks Myon + sam for the tip)

Signing keys:
caff (featured on debaday last week) has some useful info in /usr/share/doc/signing-party/, especially the README.many-keys and README.gpg-agent files.

State of software for Suspend to RAM/Disk ?

Dear readers,

I am the mostly happy owner of a Dell Latitude D610 (the one with the ATI video card), running Debian Etch. I installed the hibernate package to try to get Suspend to RAM and to Disk to work, and Suspend to Disk worked out of the box. But Suspend to RAM didn’t work (garbled screen at resume).

I never bothered to investigate this until today, when I discovered that acpi-support provides the same functionality, and works both for Suspend to RAM and to Disk ! I’m happier now, but I would like to understand, and the world of ACPI and Suspend to RAM/Disk is very difficult to grasp for newcomers.

What is the story behind hibernate and acpi-support ? Why was this duplication of effort needed ? Also, it seems that gnome-power-manager and kpowersave provide the same functionality. Why can’t they just call the relevant acpi-support or hibernate scripts ? How do those different implementations compare (what are their main differences ?) ? Looking at the packages content, it seems that hibernate tries to be generic, while acpi-support gave up, and handles each and every laptop model differently. Correct ? Also, hibernate seems to be handling a few things better, like getting my network interface back up after hibernation.

Finally, the last question: how do one debug Suspend issues, when it fails to work ? Is there a document somewhere explaining that ?