Search Results: "agi"

29 May 2007

Thijs Kinkhorst

Euro Disney S.C.A. owner of Euro Disney Associ s S.N.C. operator of Parc Walt Disney Studios are opening two new attractions and myself as a shareholder of the first has been invited for a preview of those. At first my attempt to R.S.V.P. was rejected by their broken website, but as it turns out I'm still welcome to the park this Saturday. I'm not really a fan of the mouse with the big ears and his zany adventures, but these attractions are inspired by Disney/Pixar films. Crush's Coaster is a spinning indoor coaster based on Finding Nemo, and Cars Race Rally is a teacups-style ride based on, indeed, Cars. Curious as to what they've created, and as a good excuse to add a few days in the real Paris, I've booked two Thalys tickets.

28 May 2007

Lars Wirzenius: Random hacks: Static website, with translations, using IkiWiki

One of my current projects involves setting up a website that is translated to at least two languages. For various reasons I wanted to use IkiWiki as the backend, even though the site is static, and does not need the wiki functionality. IkiWiki is, in principle, a wiki engine, but with a difference: it is run off-line, and creates a set of static HTML pages, rather than running every time a page is accessed. This makes it suitable for static websites. For the translation, I wanted to have the following setup: Each page is available in each language, so the pages are named foo.xx.html, with xx being the ISO language code. This also allows HTTP content negotiation to work, if the client asks for the page without the .html suffix. IkiWiki itself does not currently have support for translations. Doing translations by manually editing each page in each language is tiresome and error prone. I wanted to use the gettext approach, where the translations are maintained using .po files. The po4a tool makes this possible: it supports many file formats. English is declared as the original language for this project: all other languages are generated via po4a from the English ones. The page content gets put into foo.xx.mdwn. po4a generates all other language files than English, and these are then fed as input to IkiWiki, which generates the HTML. In summary and horrible ad hoc pseudo-notation:
  • po4a: foo.en.mdwn -> foo.pot
  • cp: foo.pot -> foo.xx.po
  • $EDITOR: update translation in foo.xx.po
  • po4a: foo.en.mdwn + foo.xx.po -> foo.xx.mdwn
  • IkiWiki: foo.*.mdwn -> foo.*.html
This works pretty well, but only for the part of the page that gets put into the content section in the IkiWiki page template (<TMPL_VAR CONTENT>). The page design we have calls for a couple of elements with translatable content outside the content: a logo and a menu/navigation bar. To deal with these, I made a little IkiWiki plugin. The plugin sets a couple of Perl HTML::Template variables, LANG and BASENAME, based on the input file name. If the input name is foo.en.mdwn, the variable get set to en and foo, respectively. The IkiWiki page template then uses the variables to load the right logo for the language of the page being generated. The navigation bar needs further work. Unfortunately, the po4a tools have trouble with the IkiWiki page templates, and can't extract just the menu entries. I ended up doing the navigation bar translation directly in the page template, since it is only a few words anyway.
<li><a href="index.<TMPL_VAR LANG>.html">
<TMPL_IF EN>Home
<TMPL_ELSE FI>Etusivu
</TMPL_IF></a></li>
The "this page in other languages" part of the navigation part looks like this:
<li><a href="<TMPL_VAR BASENAME>.fi.html">suomeksi</a></li>
I made the plugin (my first Perl ever!) available in case anyone else finds it useful. Note that the plugin isn't of much help if you want to maintain a translated wiki, since this all need some Makefile magic to make things smooth. I'm not sure the Makefile is at all optimal, though. We haven't yet gone public with the website, so this setup of mine may well get improvements still.

27 May 2007

loldebian - Can I has a RC bug?: We are the MIA team

We are the MIA team

We are the MIA team. We came for your sunglasses

Alberto Gonz lez Inhiesta (agi), David Mart nez Moreno (ender)

Oslo, debconf3, 2003

Miriam Ruiz: Debian multiple binary packages: example 2

Some days ago I wrote a small example of creating multiple binary packages from a source where the program was built and installed with autotools. Now I’ve remade the example, starting from a system built directly using a make script, and which doesn’t provide an install target. Even more, it is supposed to get the data from a directory relative to the working directory. This is, in fact, a scheme often found when packaging games. The debian/rules script uses quilt to apply the necessary patches, so that absolute directories are used for the data file.

Andrew Pollock: [tech] Finding out just how hot the linen cupboard is...

I decided to move the old 1-RU Pentium III server (the thing providing all the storage for my MythTV box via ATAoE) from under the bed in the spare room to the linen cupboard. It had a brief stop in the wardrobe in the spare room, but it didn't really help with the noise. Sarah was a concerned about the heat in the linen cupboard, as this is where the patch panel is, so caesar is already in here, along with an Ethernet switch, an ADSL modem, a wireless access point, and the Vonage ATA. There's a lot of DC plug packs generating heat, so it was a reasonable concern. I figured in this day and age, someone must make some sort of USB temperature sensor, and after some searching around, I discovered the DLP-TEMP-G, which seemed to be about the right price, doing what I wanted. I'm going to say the web page was a bit ambiguous, but it was probably just late at night, because I read the bottom as having the option to buy it from Mouser, or via PayPal directly with DLP Design. So I went down the latter path, because I generally prefer to deal directly with the manufacturer. Turns out what I was actually ordering was just a "Test Application", so that email I'd received the day after I placed my order for two units was all I was going to get. I figured this out after a week or so of wondering when it was going to arrive. They were really good about it, and refunded me my $40, even though I'd received said software, and I placed a new order with Mouser for what I really wanted. Now this time, I just didn't read things thoroughly enough, although I'll still say that things were a little ambiguously worded. The page I've linked to above does say "DLP-TEMP-G and 1 DS18B20 sensor $25.00", but when reading datasheet, it goes on about three sensors, and coming with one that isn't soldered on so that you can optionally run a cable between it and the board. I somehow interpreted this as meaning there were two sensors on the board, and one loose. Not the case. The board supports having up to three DS18B20 sensors attached to it, however you please. It comes with one unattached. In hindsight, why would you want two temperature sensors directly on the board? So the moral of this story is I just can't read. Anyway, I got home from Santa Monica last night, and the goods had finally turned up, so I had a play. The DS18B20 just looks like a transistor. I initially ignored it, and just shoved the USB board in caesar, and it happily recognised it
usb 1-1: new full speed USB device using uhci_hcd and address 8
usb 1-1: configuration #1 chosen from 1 choice
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Device
ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT232BM
usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0
usbcore: registered new driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver
I then fooled around with minicom, and discovered that the little transistor thing I'd been ignoring was indeed the temperature sensor, as I got a reading of zero back (when using this program I found on the 'net). So I went to bed, and this morning did a bit of messing around with the sensor, and with a bit of creative bending, I've got it sitting in the S1 holes without requiring any soldering. It tells me the linen cupboard is about 44 degrees Celsius. Warm, but I don't think it's in any immediate danger of bursting into flames. Wouldn't surprise me if some of the gear in there isn't too keen about the temperature though. At least we won't have to worry about mold. Next step is to convince cacti to graph it, and nagios to monitor it, and we're in business. Here's a little Python program I knocked up to grab the temperature. pyserial is nice. Read on, Macduff!

25 May 2007

Jonathan McDowell: Thoughts on calendars

I keep having what I've started to think of as the "calendar conversation" with various people. I start by outlining what I think are some fairly reasonable requirements. I'd like to have multiple calenders viewable by different sets of people. So Simon would be able to view my work calendar, while Katherine could see my personal calender (and possibly small bits of work calender where I was going to be away from home). I also want to be able to view my calenders from a variety of devices. My desktop, my phone and my laptop, for example. A web interface might be nice too, though less important to me. This doesn't seem like a lot to ask. My general hope is that whoever I'm boring about this will then say "Oh, you need to look at foo and maybe bar". After all, that's the case with most software related things I need - it's already been done, and there's a good solution available. What actually happens is the person I'm talking to nods in agreement and says they'd like the same sort of things but don't know of anything that manages it. I think the problem comes down to syncing. Sharing my calendars with other people is effectively allowing them to sync their calendar(s) with mine, with some sort of filtering so we each see only what the other wants to see. Likewise, multiple devices is all about syncing. Changes made via one method need to be visible on all of them (ideally as soon as possible). Decent syncing also brings another advantage; client independence. If I can reliably sync my information to a variety of devices/clients then I can try a different client with little risk. We have this already for mail - anything that can talk POP3, IMAP and/or mbox is easy to try out and if you don't like it then you can just change back to what you had before or try something else. Calendaring doesn't seem to have that. I don't think that the interface a client exposes needs to be complex. At a basic level what you need is a way to find out what the client thinks has been added, removed or changed. You also need to present this information in a standard format. Unfortunately iCal (RFC2445) appears to be what we've got here. I think it's a bit overly inclusive, which seems to lead to incomplete implementations. Is there a complete iCal parser library out there? The best hope for syncing that I'm aware of is OpenSync. And I haven't been that impressed; while I managed to get it to move the contacts from my SonyEricsson v600i to my Nokia E70 some of the details got mangled on the way. And lack of things like recurring event support in some of the plugins (eg the Google Calendar syncing adaptor) or warnings about data loss in the Sunbird plugin aren't encouraging. Speaking of Sunbird, I'm not impressed. Last time I looked (and it doesn't appear to have moved very far since then) it didn't make any attempt to support syncing. I'm sorry, WebDAV isn't a syncing system. It's a way of storing files remotely. Sure, I found the interface ok, but I need to make my calendaring data accessible for it to be useful. The Windows approach to all of this seems to be ActiveSync and the use of Outlook. I don't believe that it really handles more than the desktop client and a remote device though? And group calendar sharing requires an Exchange server? Not exactly the flexible solution I'm looking for. I think a key point is that all of this needs to be reliable. I didn't spend time debugging my OpenSync contact syncing issues partly because I didn't notice straight away that there was a problem (it was with additional details like email addresses rather than names/numbers IIRC), but also because it was a lot of work to delve into the code and find out just what on earth was going on. A while back I started looking at writing some calendar syncing code (called Pony) and hit a problem with complete inconsistency in handling time zones between clients that put me right off. If it's not reliable it's not useful. If it's not useful people won't test it and fix it. I think a starting point is a reliable iCal implementation that can handle everything in the spec. From there you can write plugins that will take whatever bastardised variant your device/client supports and translate to and from it. The syncing tool will need to keep a master copy of all the data, because there's no guarantee anything else will be able to support all the fields. A local complete copy should enable appropriate frobbing of data to/from any device/client without losing the information if a new device/client that can handle the data is added. Of course almost all the above applies to contacts as well; I have work contacts, personal contacts, boring house contacts (plumber, garage etc). vCard is the appropriate interchange format for that (why did vCalendar become iCalendar, but vCard not change?), but contacts feature similar issues to calendars I believe. Does this seem reasonable? Please tell me someone has already done it. Point me at Debian packages that will let me sync my phone, my Google Calendar and a local client and make me very happy. I have visions of a suite of tools all chatting over DBus; a little client that looks for my phone to appear over bluetooth and then syncs when it does, a little client that monitors Google Calendar for changes. Sunbird reporting when something changes (and accepting notification of changes). Some other client ([Dates http://www.pimlico-project.org/dates.html]?) doing the same. Another sending the data over WebDAV or SFTP so that my laptop can pick up the info when I'm on the move. I don't think I'm the only person looking for this sort of stuff. Where is it?

Matthew Palmer: The Real Reason Software Sucks

Although I feel that The Daily WTF has gone downhill in the last few months (since the rename and addition of different "categories" of story), today's article titled The Great Pyramid of Agile is a good, thought-provoking read. I've tried to find a good "sound bite" quote that really captures the message of the article, but the whole article meshes together a bit too tightly, so just trust me when I say "go and read the article".

24 May 2007

Nico Golde: creating (dynamic) function call graphs

I am currently writing a general purpose shared library for acpi (more on that soon).
I was interested in having a function call graph especially to see if the interface looks somehow clean and to include it in the documentation of the library. Of course I wanted to do it with open source tools. There are several tools for static call graphs but if you want dynamic call graphs you have to use additional features of your compiler to generate a graph based on code during runtime.

The first variant I tried was using egypt a small perl script to generate a dot file. Dot (today included into graphviz? is a tool originally developed at AT&T to generate hierarchical or layered drawings of directed graphs.

So what is needed?
First install software (here on a Debian systen, egypt is not included in Debian):
$ aptitude install graphviz graphicsmagick (+ download egypt from the homepage)

Compile your software using gcc with the option -dr to dump an RTL file of the source.
Most of gcc's work is done in an intermediate representation of your code, called register transfer language (RTL). This pretty much describes the instructions in plain text and is inspired by LISP lists.
Ok, here we go:
$ gcc -dr list.c libacpi.c test.c
This generates three RTL files, for every source file one. Depending on the gcc version the names may vary, here the names are libacpi.c.00.expand list.c.00.expand and test.c.00.expand.

Now use egypt to create a dot file (I don't want one for test.c now):
$ egypt libacpi.c.00.expand list.c.00.expand dot -Gsize=100,100 -Grankdir=LR -Tps -o graph.ps
Egypt will create dot-output and by piping it to dot with -Tps -o graph.ps you get the resulting graph as a ps file. -Grankdir is used to generate a graph which runs from the left to the right, default is up-down which looks a bit strange.

Now convert the ps file into a png:
$ gm convert graph.ps graph.png
The result looks like this (looks cool huh? :-)):



The second variant I tested is a bit different and in my opinion the resulting graph looks a bit better.
The gcc commandline switch -finstrument-functions allows easy creations of call-graphs for C/C++ (script languages used but I haven't tried).
You need to compile every file with the -finstrument-functions switch. Then gcc places a call to the functions __cyg_profile_func_enter upon entering a function and __cyg_profile_func_exit on leaving a function.

Compile your sources with -g and -finstrumental-functions:
$ gcc -g -finstrumental-functions list.c libacpi.c test.c -o test
Now you need to get some source code by Sebastian Krahmer (SuSE):
$ wget http://www.suse.de/~krahmer/instrumental/instrumental.tgz && tar xvfz instrumental.tgz && cd instrumental
Compile a shared object file:
$ cc -fPIC -c instrumental.c && ld -Bshareable instrumental.o -o inst.so
This generates a shared object file you can preload with LD_PRELOAD
$ LD_PRELOAD=./inst.so test
.....

Now you will find a log.inst.dot.<pid> and log.inst.ascii.<pid> in /tmp (path can be modified in instrumental.c).
The first file is a dot file you can now create a ps and a png file with but you need to attach a closing bracket at the end of the file since the package is not
able to intercept exit() or aborts. echo ' ' >> log.inst.dot.<pid>
$ dot -Gsize=15,20 -Grankdir=LR -Tps -o graph.ps log.inst.dot.<pid> && gm convert graph.ps graph.png
The result looks like:


PDF file which scales a bit better

The other file represents the call graph in ascii:
~ [1000 1000 1000] -- main (0x8049ea4)
~ [1000 1000 1000] -- check_acpi_support (0x8048984)
~ [1000 1000 1000] -- get_acpi_version (0x8048782)
~ [1000 1000 1000] -- get_acpi_content (0x80486b4)
~ [1000 1000 1000] -- scan_acpi_value (0x8048837)
~ [1000 1000 1000] -- init_acpi_batt (0x80489d6)
~ [1000 1000 1000] -- dir_list (0x804a447)
~ [1000 1000 1000] -- new_list (0x804a23c)
~ [1000 1000 1000] -- append_node (0x804a309)
~ [1000 1000 1000] -- append_node (0x804a309)
~ [1000 1000 1000] -- read_acpi_battinfo (0x80497d3)
~ [1000 1000 1000] -- get_acpi_content (0x80486b4)
....

So both methods work but the first seems to be more useful if you want a graph for a specific file, not a specific program since you get an RTL file for each source file and you don't need all to create the dot file. The second method however looks better but has the limitation that you actually need to run the program (but that's dynamic and not static) and you can't (correct me if I miss something) create graphs for single files.

Have fun creating graphs for your favorite software and have a look into Sebastian Krahmers paper http://www.suse.de/~krahmer/instrumental/instrumental.pdf and http://www.ibm.com/developerworks/library/l-graphvis/. He also created a graph for openssh http://www.suse.de/~krahmer/ossh4.6.pdf.

Julien Blache: WTF Award of the week

Quoting from the Release Notes for the firmware v1.54.2 for the Thomson ST2030 VoIP telephone, in the “Relevant known limitations” section:
3.1 The display doesn’t show the name of the incoming call when received display name starts with the letter “O” (uppercase).
This raised quite a few eyebrows here, and raised quite a few concerns too. I refuse to even imagine how this kind of bug can happen. And for those who will have a hard time believing this, we did the test, and, indeed, the CallerID name doesn’t appear on the phone when it starts with an “O”. Shrug.

Peter Makholm: inotify: procmail for IMAP folders

Moving mail to an IMAP folder is easy. Often easier than “pipe the mail through this command” or even “forward the mail with all headers to this address”. But what magic can you use to get something done with the mail after moving it to the correct IMAP folder? Using Courier IMAP and thus Mairdirs I came up with the following shell snippet:
cd $MAILDIR
inotifywait -m -q -e CREATE --format %f cur  
  while read mail ; do
        [ -f cur/$mail ] && $HOME/bin/process_mail < cur/$mail > /dev/null ;
        [ -f cur/$mail ] && rm cur/$mail ;
  done
It’s is not completely race condition free. cur/$mail can get renamed and will then be reprocessed. Interesting note: mail is moved from $MAILDIR/tmp to $MAILDIR/cur by link/unlink so the inotify-event is CREATE and not the expected MOVED_TO. Any better solution?

23 May 2007

Martin-&#201;ric Racine: Bidding farewell to 32-bit computing

A number of recent events reminded me of how much time has passed since I started using Linux. Among these, the retirement of several 32-bit CPU architectures from the list of supported platforms on Debian and Ubuntu. The first architecture to fall was m68k. Release Managers at Debian proposed to drop support for m68k after Sarge, which indeed happened: Etch was released earlier this month and, for the very first time in Debian history, without m68k support. Granted, a number of dedicated developers are working on porting the GNU toolchain to Coldfire (an embedded platform that supports about 80% of the m68k instruction set) and good chances are that they will succeed but, let's not fool ourselves: m68k is gone. Around the same time, Ubuntu dropped support for PowerPC, just before releasing Feisty. Granted, there is still some PPC64 hardware being manufactured, but this is on the server side and thus getting farther away from the desktop market that constitutes Ubuntu's core business. Of course, given the plethora of 32-bit PPC hardware in circulation, in the form of second-hand Power Macs, the platform still has some lifespan left but, again, let's not fool ourselves: PowerPC is gone too. And now, a message sent to Debian mailing lists suggested that, as of Linux kernel 2.6.21, support for 32-bit SPARC was broken and, due to an insufficient developer interest for maintaining the GNU toolchain, 32-bit SPARC was likely to be dropped for the Lenny release. Yup, we really cannot fool ourselves: support for 32-bit architectures really is gone. Not surprisingly, my own computer collection has followed a similar trend: this morning, my beloved PA-RISC host left for the home of a happy computer hobbyist who had won the online auction on it. My Atari TT030 is likely to follow a similar route fairly soon. Ditto for the exotic Atari Stacy sitting besides it ...and let's not mention the huge stack of Pentium II and K6 desktop hardware sitting in the corner. Looking back, I'm glad to have shared so many brilliant years with 32-bit hardware. The variety of CPU architectures and hardware designs was quite a learning experience. This being said, life goes on and my current needs are fully covered by my Linutop and by my aging ThinkPad. Thank you for all those years, 32-bit computers. Enjoy a well-deserved rest in bit heaven.

Joey Hess: new d-i lab machine

A while back I set up a d-i test lab, a kind of automated mechanical computer torture rack, which has been trying (and frequently failing) to automatically install Debian onto a half-dozen varied machines every day for a couple of years. Problem is that hardware sucks, even when it's tucked away in a friend's basement and so not blaring at you with its combined total of 100 fans and 50 disk drives. It has an annoying habit of dying, especially if it's oddball machines for different architectures. Cords have a habit of getting unplugged. It's hard to automate booting from installation media. And so on. A while ago I decided to go virtual. Now, thanks to Dann and Matt and HP, I've gone from this: big rack of stuff to this: top HP donated hydra, a maxed out 8-way Xeon with 4 (soon 8) disks. The idea is that it can run 7 or so virtual machines, all doing test installs, in parallel. Fast. I'm using kvm for the amd64 and i386 tests. Since Debian has mips and mipsel kernels specially built for running under qemu, I'm able to test the installer for both those arches. Hercules will cover s390, once the kernel gets fixed. This leaves some architectures still todo: I also still have to write enough installation test cases to keep this monster machine firing on all 8 cores all day long. It can probably handle around 300-400 installation tests per day. Since hydra has the disk space, and these emulators are generating lots of disk images with Debian pre-installed, I have also set it up to retain the disk images. I imagine that some of these disk images will eventually be useful for devleopment, since it's much easier to boot a disk image rather than sit through a slow qemu install on an arch like mips. I haven't worked out how to make these images publically available yet, but hydra is located on the name network as gluck.debian.org, if anyone wants to get access to them. Update: I also have qemu doing a 'savevm 1' before shutting down, so you can even restore the running system from the disk images. Especially useful if the install failed somewhere in d-i! :-) BTW, I can give out accounts on hydra to any Debian developers who need a fast machine to run kvm/qemu on, or to anyone who is interested in setting up their own installation tests.

22 May 2007

Cameron Dale: May-22-2007: The Long Weekend of Documentation

I spent most of this past weekend (a long weekend in Canada, thanks to our royal heritage) writing documentation for the DebTorrent code. The original BitTornado code was seriously lacking in this area, having only 670 lines of comments out of almost 20,000 total lines of code, which is 3.5% if you're counting. (In fairness, this may be due in part to it being based on the original bittorrent client.) Since Python is supposed to be known for it's well-documented code, I decided to tackle this shortcoming sooner rather than later. It's also a good opportunity for me to become familiar with all of the code. I'm only about halfway there, but the end result of my weekend's worth of work is this diffstat:
DebTorrent/BT1/Choker.py             99 ++++++++
DebTorrent/BT1/Connecter.py         313 +++++++++++++++++++++++++++
DebTorrent/BT1/Downloader.py        448 ++++++++++++++++++++++++++++++++++++++-
DebTorrent/BT1/Storage.py           418 ++++++++++++++++++++++++++++++++++--
DebTorrent/BT1/__init__.py            9
DebTorrent/BT1/btformats.py          47 ++++
DebTorrent/BTcrypto.py              147 ++++++++++++
DebTorrent/ConfigDir.py             248 +++++++++++++++++++++
DebTorrent/ConnChoice.py             12 -
DebTorrent/CurrentRateMeasure.py     69 +++++-
DebTorrent/__init__.py               14 +
DebTorrent/bencode.py               193 ++++++++++++++++
DebTorrent/bitfield.py               89 +++++++
DebTorrent/clock.py                  53 ++++
DebTorrent/download_bt1.py          380 ++++++++++++++++++++++++++++++++-
DebTorrent/inifile.py                70 ++++--
btcompletedir.py                     25 ++
btcopyannounce.py                    20 +
btdownloadheadless.py               111 +++++++++
btlaunchmany.py                      56 ++++
btmakemetafile.py                    19 +
btreannounce.py                       6
btrename.py                          11
btsethttpseeds.py                     6
btshowmetainfo.py                     6
bttrack.py                            6
setup.py                             20 +
27 files changed, 2809 insertions(+), 86 deletions(-)
I've also started using the epydoc program to automatically generate some documentation web pages for easy browsing of the code. So far it's worked out great! So well that I decided to use some of the new features available in a recent beta release that was not yet in the debian archive. The packaging seemed simple enough, so I created my own package containing the new upstream version, which is now available in my repository.

Jan Wagner: recent eGroupware for debian

Since one week eGroupware 1.4RC1 is available. Peter did upload it into experimental and I did repackage it for etch, for a smarty integration (dpkg -i for > 15 packages sucks).
You can download it by using the following line in sources.list:

deb ftp://ftp.cyconet.org/debian etch-backports main non-free contrib Please note that you also need installed egroupware-egw-pear.
If you experience troubles, report your bugs upstream. , , , ,

Wouter Verhelst: Battlestar Galactica on VT4!

I just saw an ad on VT4 that they're going to be broadcasting the excellent Battlestar Galactica series—that is, the reimagined version. Caught me by surprise there, because I was actually expecting Kanaal2 to broadcast this—they're usually the SciFi channel in .be. Not that this matters, of course. Luckily, they're also going to broadcast this at an excellent time slot: Sunday at 23:25 (or something), meaning, not prime time; as a result, I might actually be able to follow it this time around. Living together with people who like to watch prime time pulp would make watching this rather impossible during reasonable hours, otherwise. Not this time. As it happens, I bought the original 1978 version of Battlestar Galactica only a few weeks ago. That one's a bit dated though, and not half as much fun.

21 May 2007

Stefano Zacchiroli: i had a dream

I'm Going to Play Some Number at the Lotto The Lotto Game is a really popular gambling game in Italy, run by the state itself. As in all good gambling game: you, the player, can win a lot of money while who is running the game (the Italian state in our case) will win a lot of money for sure, no matter what. Anyhow, to the facts, it's a well-known folklore that people win playing Lotto FOR SURE by playing numbers told while dreaming by parents, friends, kitties, whatever, ... As a scientist, I've no reason not to trust this folklore, why should I? As a strange coincidence (another fact that strongly hints I HAVE TO PLAY), this night I had a dream (well, it was more this morning while reading the planet, but it doesn't really matter..., folklore is folklore!). There were a lot, really a lot of people whispering this to my ears:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

well, ok, they aren't in decimal notation, and they aren't even comprised between 1 and 90, ... but what would you expect from a bunch of geeks??? They are probably trying to exploit some overflow in the hands of the lotto extractor or something like that... But I won't desist, I'll play those number! Open questions: any proficient Lotto player to answer them around?

Bernd Zeimetz: hi, planet // iso8859-15 to utf8 with netatalk magic

<div xmlns='http://www.w3.org/1999/xhtml'> <h1><a name="hi_planet_iso8859-15_to_utf8_with_netatalk_magic" id="hi_planet_iso8859-15_to_utf8_with_netatalk_magic">hi, planet // iso8859-15 to utf8 with netatalk magic</a></h1> <p> <em><strong>Hi, Planet!</strong> <br/> Welcome to my blog, and thanks to <a href="http://blog.zobel.ftbfs.de/" title="http://blog.zobel.ftbfs.de/" rel="nofollow">Martin</a> for subscribing me. I m not going to bother you with any details about me, if you have any questions feel free to ask me on <a href="http://freenode.net/" title="http://freenode.net/" rel="nofollow">freenode</a> or <a href="http://www.oftc.net/" title="http://www.oftc.net/" rel="nofollow">oftc</a> (in case you re wondering: my nick is bzed).</em> <br/> <br/> After a longer time of planning we ve upgraded our main file server at <a href="http://www.architektur.tu-darmstadt.de" title="http://www.architektur.tu-darmstadt.de" rel="nofollow">work</a>: New machine, new storage (7TB - woohoo!), Etch instead of Sarge and <a href="http://en.wikipedia.org/wiki/UTF-8" title="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> for file names instead of <a href="http://en.wikipedia.org/wiki/ISO8859-15" title="http://en.wikipedia.org/wiki/ISO8859-15">ISO8859-15</a>. Everything not a too complicated thing, except for renaming the about 10,000,000 files from ISO8859-15 to UTF-8 in a proper way. <br/> In theory this is easy, as <a href="http://packages.debian.org/unstable/utils/convmv" title="http://packages.debian.org/unstable/utils/convmv" rel="nofollow">convmv</a> happily takes care of the problem. But this did not work for us unfortunately, as we re not only providing NFS and Samba services, but also AFP (<a href="http://en.wikipedia.org/wiki/Apple_Filing_Protocol" title="http://en.wikipedia.org/wiki/Apple_Filing_Protocol">Apple_Filing_Protocol</a>) via netatalk. Years ago you had to choose ISO8859-15 if you wanted to allow your Apple and Windows users to see the same, non-broken file names - not only because AFP didn t support UTF8 before version 3, which came out with OSX<a href="#fn__1" name="fnt__1" id="fnt__1">1)</a>. Normally you d think that a server would not allow a client to write a file with a file name which includes not supported characters - again, OSX and netatalk go their own way here:<br/> Characters which are not supported by the underlying file system are character(!)-wise encoded using the <a href="http://netatalk.sourceforge.net/2.0/htmldocs/configuration.html#id2898845" title="http://netatalk.sourceforge.net/2.0/htmldocs/configuration.html#id2898845" rel="nofollow">CAP encoding</a>. So we had to find a way to </p> <ul> <li> convert file names from ISO8859-15 to UTF-8 </li> <li> replace CAP encoded characters by the appropriate UTF-8 character </li> </ul> <p> Luckily netatalk ships the <a href="http://netatalk.sourceforge.net/2.0/htmldocs/uniconv.1.html" title="http://netatalk.sourceforge.net/2.0/htmldocs/uniconv.1.html" rel="nofollow">uniconv(1)</a> util<a href="#fn__2" name="fnt__2" id="fnt__2">2)</a> which is able to take care of this problem. It also updates the CNID<a href="#fn__3" name="fnt__3" id="fnt__3">3)</a> Database at the same time. There s two things you need to take care of in case you re using the dbd <a href="http://netatalk.sourceforge.net/2.0/htmldocs/configuration.html#CNID-backends" title="http://netatalk.sourceforge.net/2.0/htmldocs/configuration.html#CNID-backends" rel="nofollow">CNID backend</a>: </p> <ul> <li> uniconv assumes that <em>cnid_metad</em> is listening on port 4700, you need to start it first. Don t run afpd at the same time! </li> <li> If you ve specified external CNID dbpaths in your <em>AppleVolumes.default</em> (normally they re located in the root of each volume, prone to be deleted by users accidentally), you need to move the .AppleDB directory into your volume s root directory, otherwise uniconv will create a new CNID database. Just move it back as soon as uniconv is finished. </li> </ul> <p> Be careful: uniconv assumes that all colons in a file name are part of a CAP encoded character. That s not a problem as long as you have only Mac and Windows clients accessing your server, as both systems do not allow colons in file names. In our case we found a number of cache files from Nautilus (which is running on our sunray/Solaris web-surf terminals as default browser) with colons in the file name. I hope no user will miss them <img src="http://bzed.de/lib/images/smileys/icon_wink.gif" alt=";-)" /> </p> <p> Including a final synchronisation of all files to the new storage, about two hours it took uniconv to convert the file names and a aunch break, we were finished after about 14 hours of work. Until now it seems that our users didn t notice the change at all, except for those who realized that they have much more free space now. Looks like a successful weekend so far! <img src="http://bzed.de/lib/images/smileys/icon_biggrin.gif" alt=":-D" /> </p> <p> <strong>update:</strong> full html in the feed. </p> <div class="tags"><span> <a href="http://bzed.de/tags/debian" class="wikilink1" title="tags:debian" rel="tag">debian</a>, <a href="http://bzed.de/tags/linux" class="wikilink1" title="tags:linux" rel="tag">linux</a> </span></div> <a href="#fnt__1" id="fn__1" name="fn__1">1)</a> and uses a NFD variant of Unicode normalization (<a href="http://en.wikipedia.org/wiki/UTF-8%23Mac_OS_X" title="http://en.wikipedia.org/wiki/UTF-8%23Mac_OS_X">UTF-8#Mac_OS_X</a>), but netatalk takes care of this and translates it into the NFC form, which is used on most other platforms <a href="#fnt__2" id="fn__2" name="fn__2">2)</a> it s called netatalk-uniconv in Debian and shipped with <a href="http://packages.debian.org/stable/net/netatalk" title="http://packages.debian.org/stable/net/netatalk" rel="nofollow">netatalk</a> <a href="#fnt__3" id="fn__3" name="fn__3">3)</a> Catalog Node ID, another crust from old Mac <acronym title="Operating System">OS</acronym> versions </div>

Romain Francoise: How to create Xinerama-friendly desktop backgrounds

I recently started using a new machine with two 20" flat panels used as one giant desktop with Xinerama. It's very nice and comfortable, but X isn't yet smart enough to manage the backgrounds of the two screens separately, and wants one image stretched across the whole desktop.

So here's how to turn two 1680x1050 images such as these into one 3360x1050 image with ImageMagick:

$ montage -size 3360x1050 -geometry +0+0 left-image.jpg right-image.jpg result.jpg

It's much easier than assembling the images manually in The Gimp.

20 May 2007

Steve Kemp: Tell you, might not believe it, but

I would like to have a simple way of mirroring a webpage, including any referenced .css, .js, and images. owever to complicated matters I wish to mandate that the file will be saved as index.html regardless of what it was originally called. This appears to rule wget out, as the -output=index.html option trumps the -page-requisites flag (which is used to download images, etc which are referenced.) Is there a simple tool which will download a single webpage, save it to a user-defined local filename and also download referenced images/css files/javascript files? (Rewriting the file to make them work too) Using Perl I could pull down the page, and I guess I could parse the HTML manually but that seems non-trivial but I d imagine there is a tool out there to do the job. So far I ve looked at curl, httrack, and wget. If I m missing the obvious solution please point me at it .. (Yes, this is so that I can take snapshots of links added to my bookmark server.)

Steve Kemp: He was in a bind 'cos he was way behind

My girlfriend who was returned from hospital on Friday learnt a couple of days later that she d managed to suffer a fractured skull. Apart from that shocking news I ve been doing little. Lots of travelling, lots of tidying up /bin, little else. One new toy is release which will allow me to easily release projects. The idea is you run /bin/release inside a project directory and it will: Very simple, almost trivially so, but it has a lot nicer than having to do all the bits manually. (sample .release file.) I had a piece of code for triggering new freshmeat announcements working a while back but it was a little too fragile when it came to reading the ChangeLog files I use so I ve killed it for the moment. (Probably $EDITOR fresmeat.tmp & would be a better idea anyway!) Connectivity is bad right now, since I m in the middle of changing home ISP, but hopefully that will be resolved in the next week or two. (Switching from Telewest/Virgin -> Sky for people in the UK who might care.)

Next.

Previous.