Search Results: "Enrico Zini"

2 March 2006

Enrico Zini: DPL Elections - My questions for the candidates

Campaigning started and everyone is trying their best to ask something that's never been asked before to a DPL candidate. It tickles me, and today I don't feel like hacking: I have to try. Here's my list of questions:
  • Please write a list of 5 Debian Developers you would like to kick out of the project.
  • Please write a list of 5 Debian Developers you would like to see as DPL instead of you.
  • Please point to 5 threads in which you were happy to take part.
  • Please point to 5 threads in which you didn't want to take part, but you ended up doing it anyway.
  • Please point to 5 websites you usually visit.
  • Vim or Emacs?
  • What do you see in the image at http://tinyurl.com/d6s59 ?
  • What is the next word in the sequence "GIANT ROBOTS, sex, JET PACKS, sex, CITIES ON THE MOON, sex, SPACE COLONIES, sex, FLYING CARS, beer..." ?
  • Please ask yourself a question, then answer it.
  • Is life a dream, or dreams help to live better?
(this blog post is dedicated to Gigi Marzullo) Update: http://www.enricozini.org/store/dplquestion.grm

Enrico Zini: My ideas for a DPL platform

My ideas for a DPL platform I regret I didn't candidate because this year I have great ideas for a DPL charter. Here's a list.
Debian press No more people in charge of press: we replace it with a polygen grammar generating press messages, and we run it once a week. This way we won't have the problem of a silent press team, and Debian will be a steady, rocking voice in the world of Linux distributions. This will solve visibility problems compared to Ubuntu, where people perceive that Ubuntu is more important than Debian because they make more frequent and flashy press releases.
Debian releases Whenever the autogenerated polygen press message will mention a new release, we immediately release. This will allow Debian to finally release early and often like a good Open Source project should do, and still won't make us give up the unpredictability of the release cycle that makes things interesting and fun.
Security support This goes in two steps:
  1. By correctly designing the frequency patterns of the Press polygen grammar, we can tweak the mean time between releases to be about a month.
  2. We increase the quality of security support we offer to our users by supporting release updates for both stable and oldstable.
This means having to do security support for a package for no more than 2 months, and would greatly ease the workload of the Security Team.
Migration of packages into testing The migration procedure of a package into testing needs to be changed. In particular, every version of a package which is a suitable candidate for testing must be manually approved by the maintainer using a non-obvious procedure. Say, send a cryptographically signed mail to a bot that will reply with an encrypted mail with a one-shot web link to a page requiring Java to log in so that you can't set your browser to remember your password. And instructions written in very long complicated phrases by a literate Italian and then translated into English by a literate German. This will ensure that only maintainers motivated enough to maintain good quality in their packages will have them transitioned to testing, and ultimately in the stable release. In case of maintainers who are MIA or don't care about their packages, then the damage they would cause to the stable release would be drastically limited.
Version numbers As a GNU/Linux distribution, we have a duty to protest against the new crazy versioning scheme adopted by the Linux Kernel. For that purpose, I propose to adopt a new versioning scheme for our releases (and possibly for our packages as well). The idea is simple: replace numbers with names of fruits and vegetables, properly alphabetically sorted. Such as:
  1. Artichoke
  2. Banana
  3. Carrot
  4. Dates
  5. Eucaliptus
  6. Fig
  7. Garlic
...and so on. Etch release would then be "Debian GNU/Linux Etch 3.Banana". This would also help when choosing an alternative logo for the release, in case the release name summons only bad ideas like it happened with Sarge. In case one has to choose among various fruits and vegetables with the same initials, please prefer the ones that are in season at the time of the release.
Flamewars Flamewars are easily solved by approval of this extra-reduced community guideline:
  1. If you think that mailing list are unpleasant, stop reading them for a while and fix some bugs.
  2. If you think mailing lists are lots of fun, chances are that you're wasting too much time on them and you should fix some bugs instead.
The simplicity of these guidelines also makes them easily enforceable with a simple algorithm:
  • You can only post in the mailing lists if you have fixed some bugs.
  • Fixing a bugs entitles you to post up to 2 messages in the Debian mailing lists.
  • All further postings will be held until bugs are fixed, and automatically discarded if not enough bugs are fixed within 1 day of the message being held.

1 March 2006

Enrico Zini: Polygen irssi IRC bot

Today I reworked my IRC setup and found out about irssi scripts. I HAD to write this one:
# Polygen
#
# Runs polygen when asked
#
# usage
#
# Anyone in the same channel as the one who runs this script may ask me:
# !polygen <grammar>
# And I'll automatically reply with the proper output.
#
# Script features include help, and avoiding flood if polygen generates too
# much output.
#
# Based on the /usr/share/irssi/scripts/8-ball.pl script written by Patrik
# Jansson.
#
use strict;
use vars qw($VERSION %IRSSI);
use Irssi qw(command_bind signal_add);
use IO::File;
$VERSION = '0.20';
%IRSSI = (
      author          => 'Enrico Zini',
      contact         => 'enrico@enricozini.org',
      name            => 'polygen',
      description     => 'Runs polygen for you',
      license         => 'GPL',
);
sub run_polygen ($)
 
      my ($arg) = @_;
      my $res =  polygen $arg 2>/dev/null   fmt ;
      chomp $res;
      return "Sorry, I could not find the grammar $arg (you can see a list in the polygen-data(6) manpage)." if $res eq '';
      my @lines = split("\n", $res);
      return join(" ", @lines[0..2])." [...]" if @lines > 3;
      return $res;
 
sub own_question  
      my ($server, $msg, $target) = @_;
      question($server, $msg, "", $target);
 
sub public_question  
      my ($server, $msg, $nick, $address, $target) = @_;
      question($server, $msg, $nick.": ", $target);
 
sub question($server, $msg, $nick, $target)  
      my ($server, $msg, $nick, $target) = @_;
      $_ = $msg;
      s/^enrico_*:\s*//;
      if (!/^!poly/i)   return 0;  
      if (/^!poly\w+\s+(\w+)\s*$/i)  
              my $answer = run_polygen($1);
              $server->command('msg '.$target.' '.$nick.$answer);
              return 0;
        elsif (/^!poly\w+\s*version$/i) 
              $server->command('msg '.$target.' My version is: '.$VERSION);
              return 0;
        else  
              my $answer = "What ".run_polygen('polygen')." grammar do you want? (you can see a list in the polygen-data(6) manpage)";
              $server->command('msg '.$target.' '.$nick.$answer);
              return 0;
       
 
signal_add("message public", "public_question");
signal_add("message own_public", "own_question");

27 February 2006

Enrico Zini: Funny

Has anyone noticed that since asuffield disappeared from list discussions, the quality of list discussions didn't change absolutely at all? http://people.debian.org/~enrico/dcg/

26 February 2006

Wouter Verhelst: FOSDEM after saturday

This year's FOSDEM is a success again. Well, at least the Debian side of things—I wouldn't call the network a 'success' this year. But, well; they do their best, I'm sure. For me, personally, the weekend has also been a bit less of a success. On the early bird's meeting at the Roi d'Espagne, on Friday Night, I overdid it on my voice a bit; the result is that my voice was declining all the time on Saturday, until all I could do was barely something more than a whisper. I'm afraid today isn't going to be any better—on the contrary. I think I'll have to find someone else to moderate the talks at FOSDEM. I myself don't have the ability anymore in my current state. Volunteers to do this, please talk to me when you see me. But, like I said, the Debian side of things is doing quite well. Frans Pop set up a babelbox installer demo, which seems to be a success. There are T-shirts and other things being sold at the booth, and they are rather popular, I understand. And the three talks we've seen yesterday—Jeroen van Wolffelaar and Enrico Zini about Project SCUD, Martin F. Krafft about his Ph.D thesis, and Lars Wirzenius about piuparts (sorry, the Finnish Inquisition) were rather successful, with lotsa people attending. Especially Lars' talk. But it's time to go now. On to another exiting day of FOSDEM! hmm, that was a lame sentence. Let's try again. But it's time to go now. Oh, and did I mention that Lars' talk was great? Funny, informative, to the point. Just the way a talk should be. See you in a few hours.

25 February 2006

Enrico Zini: Reorganization of the DCG

I've recently received a substantial amount of feedback about the Debian Community Guidelines and went into some reorganization of it. The previous general section still stands as the Main Guidelines: those are the substantial few things to always keep in mind. What previously was the long list of checklists is now split in two: the Debian-specific Guidelines, which should be a shorter lists of non-obvious suggestions for people who already have experience with online life, and the General Guidelines, with the fuller checklists with useful suggestions for everyone. I still haven't gone through the selection and reorganization of the Debian-specific and General part, so at the moment they look fairly similar and most things overlap. But the good news is that I finally found a structure that I like, and that can allow more experienced people to make use of the guidelines without getting bored with simpler things like "google before asking a question". This division also suggests a little workflow: new suggestions can be added to the Debian-specific part, and then later moved to the general part when they become obvious for everyone. I'm happy. This layout seems to be good in getting me unstuck with how to think of the DCG. More will come of course, as I'll prepare my DCG talk for Debconf6.

21 February 2006

Enrico Zini: Debtags preformance burst

Recently I've been busy with Debtags code. Actually not really Debtags code but Tagcoll code. Tagcoll is a collection of generic templates implementing all that is needed to work with tagged stuff. Debtags is just an instantiation of Tagcoll to work with Debian packages, but Tagcoll could be used for pretty much anything, wonders of C++. So, I've been busy with Tagcoll code. More specifically, I've been working on a new high-performance disk index. I've also implemented some basic benchmarks. Follows a table with the benchmarking results:
Operation TDBReadonlyDiskIndex BasicStringDiskIndex TDBIndexer
instantiating 30ms 0ms 310ms
hasTag 200ms 0ms 0ms
getTags[item] 180ms 90ms 40ms
getTags[items] 10ms 0ms 0ms
getItems[tag] 330ms 80ms 30ms
getItems[tags] 1140ms 20ms 170ms
getTaggedItems 50ms 10ms 20ms
getAllTags 270ms 0ms 0ms
getCardinality 190ms 0ms 40ms
getCompanionTags 1410ms 60ms 280ms
output 18910ms 7740ms 50ms
outputHavingTags 1330ms 90ms 200ms
TDBReadonlyDiskIndex is the disk index that is currently used in Debtags, BasicStringDiskIndex is the new disk index and TDBIndexer is an in-memory only index implemented with two binary trees. I'd say, definitely not too bad :)

7 February 2006

Joey Hess: unix tools followup

Following up on my earlier post: This has only whetted my interest. Maybe the problem isn't that no-one is writing them, or that the unix toolspace is covered except for specialised tools, but that the most basic tools fall through the cracks and are never noticed by people who could benefit from them. So, to provide some more incentive, I'd like to start a collection of new unix tools. I've worked on this kind of thing before with my collection of biff-type filters and Debian's devscripts. Sometimes just bundling up a set of programs consistently can add to their value. I think it can here too, once a critical mass of tools is assembled. So, write more unix tools, and tell me about them so I can collect them into a package.

6 February 2006

Enrico Zini: Italian screen reading

So far, it has been a fairly happy hacking day. I wanted to see how far I could go to make a Linux desktop accessible for the blind. Platform of choice is Breezy because:
  • it uses gnome, which is the most accessible stuff at the moment;
  • it's the distribution with the least amount of raw edges at the moment;
  • its gnome accessibility stuff is more up to date than the stuff in sid (I got in touch with Mario Lang and I'll see if I can help)
Step number 1: installing a fully working Breezy chroot inside my sid
  1. lvcreate -L2G -n breezy vg
  2. mkfs.jfs /dev/vg/breezy
  3. mount /dev/vg/breezy /chroot/breezy
  4. debootstrap --arch i386 breezy /chroot/breezy http://archive.ubuntu.com/ubuntu/
  5. chroot /chroot/breezy
  6. dpkg-reconfigure locales
  7. tzconfig
  8. base-config new
  9. fixed gdm configuration to work along with the sid X server
  10. fixed /etc/fstab, resolv.conf and /etc/hosts
  11. reduced the lart-delay of /etc/rcS.d/S04udev from 60 to 5 seconds
  12. "booted" the Breezy system running /etc/rcS and /etc/rc 2
Believe it or not, it works. I have another gdm login screen, I login and I hear the Ubuntu startup music. A couple of warnings about ACPI and HAL not working... well, I can imagine why. gnome-panel would refuse to show the menus. It turned out to be connected to Gnome bug #323064 (debian bug #338438) and I found out that Alt+F2 (run) and then killall gam_server would be enough to stay displayed.
Step number 2: getting the screen reader to work Note: the menu names might be incorrect as my system is localised in Italian and I'm now translating back to English.
  1. Install gnopernicus
  2. Go into Desktop/Preferences/Audio and disable the sound server
  3. Go into Desktop/Preferences/Assistive technology, enable assistive technology and screen reader
  4. Logout and in again
Now, coolness ubercoolness, the desktop starts to speak with the voice of a depressed 40 years old dude from the USA. Thanks to Luke Yelavich of ubuntu-accessibility for supporting me and for explaining me that if esd is running then the voice tends to disappear because esd steals the sound device to festival. He also explained me that if one tries to run festival through esd then it works, but since esd is a mixer then one starts hearing various voices for different events all mixed together. Now, the English speech engine often mentions the "barra dei sacramenti". In local Italian it means "toolbar for blaspheme curses". Time to move on to step 3.
Step number 3: getting the screen reader to work in Italian I'm very proud of the Italian speech engine that recently entered Debian thanks to Riccardo Vestrini and the Debian Italian Maintainers Task Force, I've already put it to good use in the past and have great plans about it for the future. It's now a good moment to turn the knowledge previously acquired with creative timewasting into something serious. So, on to work:
  1. get the italian festival voice packages from sid (the packages are festlex-ifd, festvox-itapc16k and festvox-italp16k)
  2. install them all in Breezy
  3. sudo patch /usr/share/festival/languages.scm /usr/share/doc/festlex-ifd/languages.scm.patch (and ping again Matthias Urlichs for a fix for bug#335845)
  4. log out
  5. kill all the festival servers, drivers and whatnot (need to do it when logged out, but one can just install the voices before starting gnopernicus for the first time)
  6. log in again
  7. go into gnopernicus configuration and select the new voices.
It SO WORKS! I configured some voices a bit at random, so now according to what I do the desktop speaks like the depressed dude, Adriano Celentano or the Italian dubbing of the Enterprise computer (without reverb effect). An extra cool unexpected side effect of this chroot setup is that now I can go back to my Sid X session and the Breezy X session will keep talking in the background, so I can even keep an ear on what happens in the other Virtual Console. Now, on to the applications. The menus, work. Abiword works, but I couldn't find out how to read the things I type on the editing area (not so useful until that one is solved). OpenOffice2 does not work. Firefox 1.5 works. gnome-terminal works. gedit works. It could be better, but I was fearing much worse. Now, gnopernicus has various powerful features accessible using the numeric keypad, but I haven't found a way to activate them in my laptop. It may be that with the keypad functions abiword becomes readable. I'm quite satisfied today.

5 February 2006

Enrico Zini: Extract tags out of digikam

I've always wanted to tag my image collection, but it's big and a pain to do by hand. Today I found out that digikam has got to a point in which it can be used as a nice interface to categorise images, so I now have something cool for the tagging work. Now, I'd like to play with the tags using my debtags toolchain. Digikam stores data in a SQLite3 database, so it's easy to convert it into the text format used by tagcoll. Here's the script to do it:
#!/usr/bin/ruby
# gettags - Extract a tagged collection out of the digikam database
#
# Copyright (C) 2006  Enrico Zini <enrico@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# Usage: gettags [path/to/digikam3.db]
# If the database file is not given, use the one in the current directory
require 'sqlite3'
db = SQLite3::Database.new( ARGV[0]   'digikam3.db' )
# Build a table of id => complete tag name
tagByID =  
db.execute( "select id, pid, name from Tags" ) do  row 
        if row[1] != 0 and tagByID[row[1]] then
                tagByID[row[0]] = tagByID[row[1]]+'::'+row[2]
        else
                tagByID[row[0]] = row[2];
        end
end
# Why does it work with instant queries but not with precompiled queries?
#db.execute("select tagid from ImageTags where imageid = ?", 36887)    r  print r[0], "\n"  
#gettags = db.prepare("select tagid from ImageTags where imageid = ?")
#gettags.execute(36887)    r  print r[0], "\n"  
lastname = nil
lastdir = nil
ids = []
db.execute( "select i.name, t.tagid, a.url from Images i, ImageTags t, Albums a where i.id = t.imageid and i.dirid = a.id" ) do  row 
        if row[0] != lastname then
                if lastname != nil then
                        print lastdir, "/", lastname, ": ",
                              ids.collect    id  tagByID[id]  .join(', '), "\n"
                end
                lastname = row[0]
                lastdir = row[2]
                ids = []
        end
        ids <<= row[1]
end
if ! ids.empty? then
        print lastdir, "/", lastname, ": ", ids.collect    id  tagByID[id]  .join(', '), "\n"
end
exit 0
I didn't understand why if I perform a precompiled query I get a row object that cannot be indexed, while if I perform an instant query then everything is fine (see the comment in the script). I'm still on the learning side of Ruby, so I welcome people tellig me of better ways to write this script, and I'll be glad to update this entries with what I receive. Done the little script, now I can plug my images collection into tagcoll and have a bit of fun:
./gettags   tagcoll related /2005/12-15-03-Taiwan-Newcamera/dsci0051.jpg
./gettags   tagcoll hierarchy
./gettags   tagcoll implications
./gettags   tagcoll findspecials
Cute! And this is another little step to somehow connect pieces of the debtags toolchain to the web, which is something I'd like to explore both for the web interface of the central database, my blog and my picture gallery.

19 January 2006

Enrico Zini: Interfacing polygen and asterisk

Luca Bigliardi suggested me the great idea of interfacing polygen and asterisk, through festival. Think of the potential: you can create dial plans totally autogenerated by polygen. Or you can ask polygen to generate messages to entertain the public while waiting. Or you can create the Infinitely Optimistic Switchboard using the Infinite Optimism Generator:
polygen -X 100 unieuro   dadadodo -   festival --tts --language italian
Unlimited great possibilities! Thanks Luca. We have to meet one night, get drunk, and turn this into a revolution.

9 January 2006

Wouter Verhelst: Prospective talks for the Debian Devroom @ FOSDEM2006

By request: Here's a list of people who've confirmed they're going to give a talk in the Debian Devroom at the next FOSDEM. This list isn't final yet (there are some more people who've asked for a time slot but did not confirm yet; and I didn't assign slots yet, either) but it might be interesting for those who are coming to have a preview of the subjects that will be available. Well then.
Lars Wirzenius: Nobody expects the Finnish Inquisition: Confessions of a package torturer
Piuparts tests that .deb packages can be installed, upgraded, and removed without problems. Lars uses it to torture all the packages he can get his hands on. This talk will explain how to use it on your packages before uploading them, and thus improving their quality and not having them suffer in Lars's hands.
Martin Zobel-Helas: Debian-Volatile - behind the scenes
This talk will give an overview of how packages are handled for Debian-volatile; what changes are allowed, how security is handled.
Martin F. Krafft: Improving workflow in Debian through process integration
This talk will be about the same subject as Martin's doctorate thesis. The abstract for that is:
This research paper/project details the technical challenges the Debian project faces as it continues its tremendous growth in size and popularity. It describes a research endeavour designed to increase the use of version control within the project for improved coordination of globally distributed teams of volunteers working on the software packages that make up the system. The research primarily focuses on the integration and consolidation of the involved processes. With tools already available for some parts of these processes as well as the coordination of teams, the goal is not to reinvent the wheel, but rather to reuse and improve these tools, to better integrate them, and to make them more accessible by providing abstraction wrappers with interfaces intuitive to Debian developers. It is further the intent for these tools to be optional and fully compatible to existing practices, thus not forcing developers to adapt. The research starts with process analysis and studies of the work habits on the side of the developers, and targets the final output of tools, which implement improved workflow in Debian package management through meaningful integration of existing (and proven) methods
Enrico Zini: Debtags, and what you can do with it today
This talk will introduce the Debtags project, what it has accomplished so far and the wonderful advanced tools that are now available, using debtags, to make sense of the huge package archive.
Bill Allombert: Inside the Debian menu system
The debian menu system transparently keeps the menus in sync with the list of installed applications; so transparently, in fact, that a lot of developers do not know how the system really works. This talk will detail the various components of the system, what the technical challenges are and how they are solved.
Frans J. Pop: Debian Installer internals
An introduction to the inner workings of Debian Installer. Starting with what happens when the installer boots, the talk will go on to discuss how the dynamic menu structure allows the installer to be adapted for different architectures and installation methods. Other subjects will include the special nature of udebs, the contents of a D-I initrd, how cdebconf knits everything together and allows the use of different frontends, preseeding and the use of hooks. If time allows, a short introduction into the build system and CD building may be provided. Some knowledge of Debian package management (like priorities and dependencies) is assumed in this talk.
Aurelien Jarno: The Debian GNU/kFreeBSD port
Debian GNU/kFreeBSD is a port of Debian using the FreeBSD kernel and a GNU libc library. It is currently the most advanced non-Linux port in terms of packages ported.
This talk gives an overview of GNU/kFreeBSD, and a quick comparison between the FreeBSD and the Linux kernel, to give users the necessary information to let them find how the FreeBSD kernel could fill their needs. It then describes the status of the port and the choices made concerning the architecture of the port (libc, threading library, etc.). It will continue by giving the various ways to try out this port and to give help, giving pointers to useful documentation and some useful hints.
Best portability practices are also covered, for both the Debian packaging and the upstream code. It will be based on real examples of non-portable code, and will show the best way to change it into portable code.
Summing the times that people gave me, I'll have anywhere between 5h25 and 6h00 of talks already, and two more people who've shown real interest in doing something in the Debian devroom (but who haven't sent me the information I ask for to be able to confirm their talk; please do so!). I'll probably get 9 hours in all (10 if I squeeze a little bit; but then I might have some issues with the key signing party, which I'm also co-organizing), so there is still some time left for interested parties. However, if you're interested in giving a talk, you shouldn't wait too long anymore!

Enrico Zini: Server crashes

I manage to tame my crashing server quite a bit. When I phoned the shopkeeper asking about the terms for getting the motherboard replaced, he asked me what SATA hard drive am I using. He told me that Maxtor harddrives have big problems with NForce chipsets (in this forum there's also something). Of course I had a damn Matrox DiamondMax Plus 9 harddrive mounted on that damn SATA port. Now I disconnected the harddrive, then run 8 kernel compiles in parallel together with this small C program:
#include <stdlib.h>
#include <stdio.h>
#define SIZE 1000000000
main()
 
   char* buf = malloc(SIZE);
   int i;
   printf("allocated\n");
   while (1)
    
      for (i = 0; i < SIZE; i++)
         buf[i]++;
      printf("filled\n");
      sleep(1);
    
   return 0;
 
the C program is to make sure that the swap is used, otherwise even 8 kernel compiles in parallel would happily fit in 1Gb RAM. I run this kind of heavy load for 3 hours and I only had some timeouts in some network services (load was like 25!) and this error twice:
Jan 9 14:58:46 eddie kernel: ----------- [cut here ] --------- [please bite here ] --------- Jan 9 14:58:46 eddie kernel: Kernel BUG at lib/radix-tree.c:372 Jan 9 14:58:46 eddie kernel: invalid operand: 0000 [1] Jan 9 14:58:46 eddie kernel: CPU 0 [...blah blah blah...]
Since the error happened twice and in the exact same position, and since I previously wanted to try the latest drivers and the kernel is a too new 2.6.15, I'd blame those errors to a normal kernel bug. That code seems to be a nasty bit which already gave problems on 64bit systems. Now it's time to get that hard drive replaced. This is so time consuming, but at least things are improving.

6 January 2006

Enrico Zini: Server crashes

My server has been crashing a lot, and now I'm home to do some more fixing on it. If you've been sending me mail and didn't get a reply, it's one more reason for pinging me again. Various things were crashing:
  • weird vm failures like Bad page state at free_hot_cold_page errors
  • pyblosxom going wild with memory allocation and getting OOMed
  • sata_nv driver starting to do nothing but dumping pointers on console, really fast
  • occasional kernel panics
This was on kernel 2.6.12. I did not find a way to upgrade to newer ones for sarge on amd64 and get the system to boot: seems to be because some partitions are in LVM. Yet another update of the mobo flash didn't help much. I left memtest86+ running for a night: memory seems to be perfect. I turned off swap and run badblocks on the swap partition, read and write tests: that's ok as well. I'm monitoring internal temperature, both motherboard and hard drives, and the system isn't overheating. So, it was time to upgrade to testing. Thanks to various cool people we have testing-security which makes the idea of running testing on my server a bit less scary. The upgrade brought udev, and (sigh) the random swap of the ethernet devices. I found something here. It works, I have even to say it's cool, although it doesn't work if I use 'eth0' and 'eth1' as device names: gotta rewrite a couple of scripts. Now I'm on testing, and some files are corrupted because of the various hard drive-related crashes. Ganneff and Yoe nicely pointed me at debsums, so let's have some fun:
debsums -a -c 2>&1  tee debsums-report.log
not so cool things come out. Among them, a list of packages that are not using dh_md5sums. Bad bad: people, please build packages with that: it's nice and comfy. Luckily debsums reports them and I can just apt-get install --reinstall them. Another cool thing of debsums, Ganneff pointed out, is that when it's installed and you install a package that doesn't have the md5sums inside, then debsums will compute and store the sums. So, if you don't have debsums installed, it seems to be a good idea to do it now. Ok, so now I'm on 2.6.15. As a side effect, the onboard gigabit ethernet card is now supported: cool! Now let's see if it holds up, and then, since now I'm on etch, I could as well enjoy it and start playing with Rails :) It could even be an opportunity to replace pyblosxom. Any good Rails blog around? I couldn't find any who is also available in Debian :(

1 January 2006

Enrico Zini: Off by one

A few days ago I was around a table having a hot pot and having a small chat with other friends around the table:
X: How old are you?  I was born in 1976
Me: I was born in 1976 as well.  Cool year!
a few minutes pass, I realise something:
Me: So, since you were born in 1976, how old are you?
X: I'm 30
Me: I thought so.  I'm 29 :)
It turns out that in some countries, at the moment you're born you're 1 year old instead of 0: it's just a matter of convention. And then today it's the first day of 2006. It's also the 95th year since the founding of Republic of China, which is another way of counting years here. The good thing is that if you see that a bottle of milk expires in '95, it means it could still be good. So, when was Republic of China founded? Of course in 1912, but since when it was founded it was 1 year old, we're now in 95 instead of 94. Things would be even more interesting if the Lunar Calendar used numbers for the years, but they instead use a "sexagesimal stem-branch cycle" so I cannot say that, according to the lunar calendar, we're still in 2005 until February 29. However, people do have two different birthdays. And why am I in Taiwan but they count since the founding of Republic of China? I'll tell you if you buy me a glass of wine :) Anyway, Today is Sweetmorn, the 1st day of Chaos in the YOLD 3172

Enrico Zini: Leap second

Found in the logs:
Jan  1 00:59:59 eddie kernel: Clock: inserting leap second 23:59:60 UTC
Oh, coolness!

27 December 2005

Enrico Zini: Looks like I have a blog, too.

I figured out sometimes I have notes to share, and that this kind of things are done with a blog. Enjoy :)

Enrico Zini: How to put your /etc under svk

This is convenient, here's how to do it:
# Install svk
apt-get install svk
# Initialize a depot in /root/.svk
svk depotmap --init
# Import /etc making it a working copy
svk import --to-checkout //etc /etc
# Make your depot not that readable
chmod -R go-rwx ~/.svk
# Remove volatile files from revision control
cd /etc
svk rm -K adjtime ld.so.cache
...and voil , you have /etc/ under revision control, without CVS or .svnor arch or .bzr files around. The syntax of svk is just like the syntax of svn, of which it's a distributed extension.

25 December 2005

Enrico Zini: drezza - Get a picture collection ready for publishing

I've been having three wishes since some time:
  1. Lean Ruby
  2. Find an easy and fast way to find digital camera shoots that need an invocation of exiftran, and invoke it
  3. Find a comfy way to code user interfaces. In particular, I've always dreamed of sticking closures into event handlers.
I've recently managed to fulfill these three wishes in a single shot by coding dr zza, a minimal picture browser with quick links to invoke exiftran. If anyone is wondering, "dr zza" means "make it straight" in Bolognese. It is simple, it is easy, it does all I need: you invoke it and it will show all the pictures in the current directory. If you invoke it with a directory as commandline argument, it will show all the pictures in that directory. It will display the pictures in a list together with their thumbnail. The thumbnail is taken from the EXIF thumbnail. If a JPEG file has no EXIF thumbnail, it invokes exiftran to generate it. Clicking on an image in the list shows it in detail. In the toolbar there are buttons to rotate the image with exiftran, which uses a lossless transform and respects exif data. The tool comes in a single file, no need to install. The source code is clean and commented, and is also a nice demo of various Ruby/GTK2 and Ruby/Gnome2 features and programming tricks, including:
  • subclassing GTK widgets
  • creating custom signals
  • reacting to widget resize
  • processing GTK events during long computations
  • updating the Gnome status bar
  • embedding pixmaps in the source code
  • using custom pixmaps for the toolbar
You can get it from here. If you play with it, let me know and I'll keep it up to date.

Enrico Zini: Including inline images in Ruby GTK2

Including inline images in Ruby GTK2 I'm making a simple application and I'd like to keep it self-contained into a single file; however, I'd like to use some custom icons in it. I tried storing a pixbuf in a string:
ICON = <<EOT
/* XPM */
[...]
 ;
EOT
icon = Gdk::Pixbuf.new ICON
but it tried to open a file called "/* XPM */\n....". I tried with an array:
icon = Gdk::Pixbuf.new ICON.split("\n")
But I kept getting GdkPixbuf-WARNING **:Inline XPM data is broken: Invalid XPM header. Note that trying to write that data to a file and loading the file, worked. This worked:
icon = Gdk::Pixbuf.new "pippo.xpm"
This didn't:
tmp = IO.readlines "pippo.xpm"
icon = Gdk::Pixbuf.new tmp
I finally managed using csource:
  1. gdk-pixbuf-csource --raw --name=antani image.png > /tmp/antani

  2. insert /tmp/antani in the Ruby source code, strip away the comments, concat the various strings:

    ICON = ""+
      "GdkP"+
      "\0\0\4\30"+
      "\1\1\0\2"+
      "\0\0\0@"+
      "\0\0\0\20"+
      "\0\0\0\20"+
      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"+
    [...]
    
  3. load the data with icon = Gdk::Pixbuf.new ICON.unpack("C*"), true

A possible improvement could be using --rle in gdk-pixbuf-csource: raw is good for avoiding to copy the image data, but I don't feel comfortable in doing it since the image data is an integer array temporarily generated by unpack. As usual, if you know of better ways please send me a mail and I'll update the blog entry.

Next.

Previous.