Friday, 1. April 2005 Week 13

Typhoon Webshot II und Linux

Typhoon Webshot II (Thumbnail)

Heute habe ich beim Einkaufen diese 'Webcam' entdeckt. Für 29.90 CHF (~20€) bietet sie bis zu 30 640×480 Pixel grosse Bilder pro Sekunde. Mit dabei eine CD mit Treiber für Windows 98 bis XP.

Als ich sie an mein Linux-PowerBook anschloss sagte mir dmesg nur gerade diese zwei Zeilen:

ohci_hcd 0001:01:1b.0: remote wakeup
usb 3-1: new full speed USB device using address 2

Von usbview wurde die Webcam auch nicht erkannt. Also super Voraussetzungen für einen Betrieb mit Linux.

Nach etwas googeln fand ich spca50x.sf.net und das entsprechende 2.6er-Kernerlmodul. Erfreulicherweise ist das auch im Portage-Tree von Gentoo. Also schnell ein emerge spca5xx. Ein modprobe spca5xx lässt einige Fehlermeldungen erscheinen (Unresolved Symbols). Abhilfe schafft das Aktivieren der Video for Linux Unterstützung im Kernel. Nach make, make modules und make modules_install lädt das spca5xx Modul problemlos (eigentlich sollte man nach einem Neukompilieren des Kernels auch den neuen Kernel laden und nicht nur die neuen Module!).

Ein chmod a+rx /dev/video0 als root behebt Berechtigunsprobleme, welche beim Zugriff als normaler Benutzer auftreten können.

Fazit:

  • Die Webcam bietet IMHO mehr als man für 30 CHF erwarten kann
  • Mit Linux kann man ohne Neustart Peripheriegeräte von 'unbekannt' zu 'vollständig unterstützt' ändern

Bug in MySQL 4.1.10a?

Bisher wurden die Einträge der Indexseite mit diesem SQL-Statement abgefragt:

SELECT w.*, a.nick AS nick, cat.name AS categoryname, 
count(c.id) AS comments, 
l.name AS languagename, l.code AS lc 
FROM `x-log_weblog` AS w, `x-log_authors` AS a, 
`x-log_languages` AS l, `x-log_categories` AS cat 
LEFT JOIN `x-log_comments` AS c ON w.id = c.posting 
WHERE a.id = w.author 
AND cat.id = w.category 
AND w.date <= NOW() 
AND w.public = '1' 
AND w.language & l.id > 0 
GROUP BY w.id 
ORDER BY w.date DESC

Doch seit Hostpoint auf MySQL 4.1.10a umgestellt hat, stimmt die Anzahl der Kommentare nicht mehr.

Nach diversen erfolglosen Versuchen die LEFT JOIN Anweisung zu ändern, habe ich in einem Bugreport eine Lösung gefunden:

count(DISTINCT c.id)

Mangels spezifischer Kenntnisse kann ich nicht beurteilen ob das nun ein Bug oder ein Feature ist. Aber da mehrere Bugreports dazu existieren scheint es eher ein Bug zu sein.

Sunday, 6. March 2005 Week 9

Samael – On Earth

Samael - Reign Of Light

Before we could talk
We were singing
Before we could run
We were dancing
Life is short
But not a day is lost
The world goes round and round
And we go on and on…



Beijing to Amsterdam
Berlin to Buenos Aires
Sydney to L.A.
Rio to Abidjan
Stockholm to Athena
Dublin to Guatemala
London to Brasilia
Madrid to Philadelphia

Paris to San Francisco
Detroit to Warszawa
Moscow to Mexico
Oslo to New Dehli
Helsinki to New Orleans
Vienna to Ankara
Roma to Lisboa
On earth, we're all

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Wide World!
Our World!

New York to Tokyo
Melbourne to Budapest
Prague to Jaipur
Shangai to Montreal
Vancouver to Singapore
Sofia to Johannesburg
Hong Kong to St. Petersburg
On earth, we're all

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Wide World!
Wide World!
Our World!

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Dancing with the hidden tribe
Learning to move and fly
Touching the sky with our hands
Longing to love to understand

Tuesday, 22. February 2005 Week 8

phiki.waterwave.ch

A month ago or so, someone spammed my Wiki with asian links. This overwrote all my data because PhikiWiki doesn't have a backup-mechanism or a versioning system. Since i had a backup of the webserver, i could restore the Wiki. But i didn't want to restore manually the backup via FTP each time someone overwrites my Data.

So i built a versioning system based on rcs. I've searched the write and read functions in the code and added just an co before the read function and a ci before the write function.

Now each time someone changes a document, it's stored as a new version of the document. The different versions are made accesible by the r= GET-parameter (example: version 1.38 and 1.50 of FrontPage).
If now someone fills my Wiki with spam, i can just load the last good version and store it as the new version. No need to replay a backup via FTP.

The syntax of PhikiWiki doesn't have enough features for my needs, so i decided to use Markdown instead. I just removed all the formatting stuff of phiki and added a simple Markdown($txt); call.

v2_05-rc1

Wie immer in den Ferien bastle ich ein bisschen an meinem Weblog rum.

Dem allgemeinen Trend folgend, werden hier nun auch Gravatare unterstützt (Das sind die kleinen Bildchen, welche anhand der E-Mail Adresse angezeigt werden. Beispiel). Wer noch keinen hat, einfach bei gravatar.com die E-Mail Adresse registrieren, Bild hinaufladen fertig :-)

Seit Anfang dieses Jahres gibt es hier nebst deutschen und französischen Inhalten auch noch englische Beiträge. Bei den Einstellungen, kann man sich eine beliebige Kombination zusammenmixen.

Das Admininterface habe ich mit Hilfe von xmlHTTPRequest um einen JavaScript TrackBack Client erweitert.
Leider erlaubt Mozilla keine xmlHTTPRequests auf eine andere als die eigene Domain, was die Nutzung sehr einschränkt. Aber vielleicht folgt Mozilla in Zukunft dem Beispiel von Safari und erlaubt GET-Requests auf beliebige Domains.

Friday, 18. February 2005 Week 7

Fin des Examens de printemps

Hier je me suis levé à 5.30h après 5 heures de sommeil pour prendre le train de 6.43 en direction Renens. Avec le TSOL je suis arrivé à l'EPFL pour faire cette merde d'éxamen informatique théorique III.

À midi j'ai mangé avec mes copains et puis on est allé à Sat: Pichet. Pichet. Pichet. Pichet. Pichet. Pichet. Pichet.

Ensuite j'ai dîné chez un copain avant d'aller au Planète bleue ou on a continue la fête de fin des éxamens avec pas mal de Vodka.
Après minuit on est allé au Jaggers. Vers 4 heures on est sortie du Jaggers et ceux qui habitent en ville se sont couchés.

Mais mois et un copain qui n'habite pas en ville, nous sommes marchés à Sat car il n'y a pas de TSOL à cette heure.
Vers 5 heures on y est arrivé. Heureusement Sat était ouvert toute la nuit.
Puis je suis retourné à Vufflens-la-Ville avec le TSOL et le train après 7 heures.

À 7.30h je me suis enfin couché, après 26 heures sans sommeil dont 19 de la fête.

Sunday, 9. January 2005 Week 1

Nach dem Booten

Die ersten 5 Dinge, die ich tue, wenn ich mich an den Computer setze:

  1. Einloggen
  2. startx
  3. Sylpheed-Claws, Firefox und XMMS starten
  4. Warten bis die E-Mails abgerufen sind
  5. E-Mails lesen

Die ersten 5 Websites, die ich besuche:

  1. x-log
  2. symlink.ch
  3. heise.de
  4. der Rest hängt davon ab, was ich eigentlich am Computer machen wollte

Via cyrus.ruhr.de, Pocket-Blog, LostFocus, Late Night Blog.

Saturday, 8. January 2005 Week 1

Colors

I’ve found some color resources & utilities on del.icio.us. These are always useful, especially since i’m not the person who can just throw together three colors and automatically the result looks good.

Friday, 7. January 2005 Week 1

NetBSD 2.0 vs FreeBSD 5.3

Gregory McGarry has made a benchmark comparison between NetBSD 2.0 and FreeBSD 5.3.
(via mindtrap::weblog)

The main differences are that NetBSD scales O(1) on forking new processes while FreeBSD scales O(n). For memory mapping and socket creation both scale O(1) but NetBSD is twice as fast as FreeBSD
But for binding addresses to sockets, FreeBSD scales O(1) while NetBSD scales O(n) but is twice as fast for a small number of bound sockets. Also for POSIX thread creation FreeBSD scales O(1) while NetBSD scales something like O(n) and is twice as fast for a small number of threads.

This paper has presented a suite of benchmarks and results for comparing the performance of NetBSD 2.0 and FreeBSD 5.3 in the areas of core operating system functionality, network scalability and thread performance.

The results clearly indicate that recent architectural decisions in the NetBSD operating system have closed the performance gap between NetBSD and FreeBSD. In fact, NetBSD has surpassed FreeBSD in performance in the areas investigated in this paper. Significant performance improvements are obviously visible in the thread implementation.