re: The Desktop Out

Συνεπής ως προς τις απαιτήσεις της πάσας του Απόστολου, το desktop μου αυτή τη στιγμή είναι:

desktop.jpg

(Εάν δούλευα σε κάποιο από τα άλλα μηχανήματα, τότε η εικόνα θα ήταν το default desktop του Ubuntu 6.06 με 4 workspaces ή του fvwm σε OpenBSD 4.2 με xsetroot -solid black .)

Το ενδιαφέρον με αυτή την πάσα είναι πως την πήρα είδηση λίγες ώρες αφότου είχα διαβάσει αυτό: Creating a minimalist workspace. OK, δεν είναι το ίδιο μια και επεκτείνεται και “έξω” από το desktop στο …desktop, αλλά το tip #5 γράφει:

“Clear your computer desktop. Many people also have tons of icons on their computer desktop. It’s the same principle as a real desktop — clear it of everything unnecessary, so you can have a nice simple workspace. Keeping icons on your desktop is usually inefficient. It’s hard to find them among a jumble of files. If they’re necessary to open many times a day, file them away and use a hotkey to call them up. Quicksilver for Mac or Autohotkey for Windows are my favorite programs for this.”

Α ναι, να δώσω πάσες. Για να δούμε, ο mpampakis μας έχει δείξει, οπότε ας μας δείξουν από μια εικόνα οι SotirakiS και Vaggelis. Έχω μια περιέργεια και για το desktop του dds.

(In-Reply-To:)

re: Ax και να μπορούσα….

Η foteinoula πασάρει: “σας προσκαλώ να γράψετε τα διάφορα τρελά ή χαζά που θα θέλατε να κάνετε και δεν μπορείτε ή προσπαθείτε, ή πράγματα που κάνετε λάθος και γκάφες και άλλα τέτοια”.

Πράγματα που κάνω λάθος λοιπόν:

  • Θα ήθελα να πάψω να κάνω συνεχόμενα format στα μηχανήματά μου, για …ψύλλου πήδημα. Πολύς χαμένος χρόνος.
  • Θα ήθελα να κάνω λιγότερο δομημένο κωλοβάρεμα.

Πάσα τώρα στους past, chstath και Unique Fish που έχουν να γράψουν για πολύ καιρό.

(In-Reply-To:)

Μανιφέστα, Internet control κ.λπ.

Διαβάζοντας το “Algorithms, Games and the Internet“0, εύκολα στέκεται κανείς σε δύο σημεία:

“The Internet is unique among all computer systems in that it is built, operated, and used by a multitude of diverse economic interests, in varying relationships of collaboration and competition with each other.”

και το footnote #4:

We reject: kings, presidents and voting.
We believe in rough consensus and running code.
1

Δε χρειάζονται περισσότερα λόγια.
[0] – Thank you YC!

[1] – Η φράση αυτή ανήκει στον David Clark.

$#discard and ruleset 0

Note to self: The Sendmail Installation and Operation Guide (at least version 1.25 of doc/op.ps) clearly states:

“The mailer with the special name “discard” causes any mail sent to it to be discarded but otherwise treated as though it were successfully delivered. This mailer cannot be used in ruleset 0, only in the various address checking rulesets.”

So, instead of writing something like this:

LOCAL_RULE_0
R$={NIL}  < @ $=w . > $*        $#discard $: $1

you need to write something like this:

LOCAL_RULE_0
R$={NIL}  < @ $=w . > $*        $#local $: bit-bucket

otherwise you get beaten by “buildaddr: unknown mailer discard” errors, even though $#discard is very well known (to you; not to ruleset 0).

The above example assumes that $={NIL} is a class that contains usernames for which we do not want to accept any email and bit-bucket is an entry in /etc/mail/aliases:

bit-bucket: /dev/null

Yes, it is possible to achieve the same thing using FEATURE(`virtusertable’), but you can use this hack as a guide when you have more complex situations, where you may need to decide programmagically on whether to discard the email or not.

HOWTO: Resetting a Communicator 9500 to factory defaults

(This is the result of googling arround for sometime)

If you happen to have a Nokia Communicator 9500, you might want to reset it to factory defaults. You have two options to accomplish that and here is how:

  1. * Remove the battery.
    * Place it back.
    * For as long as the Nokia handshake is visible on the PDA screen, keep CTRL-SHIFT-F pressed. After a while a menu is displayed asking whether you want to reset to factory defaults or not.
  2. Use Rebooter, the excellent freeware utility of Roman Keller; available for download from SymbianGear.com.

More fun with message threading

When I try to write email-related code and the result fails my expectations, I use my plan B: Write it in c-client. I suppose the fact that I do not start with c-client from the beginning is a result of suffering from the “Not Invented Here Syndrome“.

The other day I was trying to decipher the semantics of Thread-Index: and Thread-Topic: since it seems that Microsoft has not placed any public information on them. Apostolos suggested that Thread-Index: takes BASE64 values, to which I replied negatively. After all, decoding

AcdyY+a08VX8xfobTsy61v9NHPZ7QA==

using perl -MMIME::Base64 -ne ‘print decode_base64($_);’ does not produce anything meaningful.

However I dug a little bit more, following this piece of advice from the imap-protocol list:

“Look at the evolution source code, it contains quite a bit of
information on this.”

camel-exchange-folder.c from the Evolution Exchange package reveals the following gem:

/* A new post to a folder gets a 27-byte-long thread index. (The value
 * is apparently unique but meaningless.) Each reply to a post gets a
 * 32-byte-long thread index whose first 27 bytes are the same as the
 * parent's thread index. Each reply to any of those gets a
 * 37-byte-long thread index, etc. The Thread-Index header contains a
 * base64 representation of this value.
 */

[ Update: Message Threading in Public Folders ]

Enough with trying to work with Thread-Index: then! JWZ has documented a very effective algorithm for message threading and c-client implements it (read docs/draft/sort.txt from the source code distribution):

SEARCHPGM *spg;
THREADNODE *thr;
:
spg = mail_newsearchpgm();
thr = mail_thread(ds, "REFERENCES", NIL, spg, 0);
walk_thread(thr, NIL);

(You are advised to read docs/internal.txt.)

The “REFERENCES” argument to mail_thread() instructs it to use jwz’s algorithm. The other option is to use “ORDEREDSUBJECT” (or as draft-ietf-imapext-sort-19.txt calls it: “poor man’s threading”). walk_thread() just prints the edges of the graph (actually it is a tree):

void
walk_thread(THREADNODE *thr, THREADNODE *prev)
{
        if (thr) {
                if (prev) {
                        printf("%d %d\n", prev->num, thr->num);
                }

                if (thr->next) {
                        walk_thread(thr->next, thr);
                } else {
                        printf("%d NIL\n", thr->num);
                }

                if (thr->branch) {
                        walk_thread(thr->branch, prev);
                }
        }

        return;
}

You may wish to use the output of the above routine (slightly modified) and feed it to dot, so that you can have an image display of the threads in the email collection that you study.

What is left to discuss a little bit more, is the THREADNODE structure: You can go from a THREADNODE to its first child via the next pointer (thr->next in the above example). If the THREADNODE has two children, then the second is a branch of the first (thr->next->branch). It if has three, the third is a branch of the second child (thr->next->branch->branch) and so on.

Trying to make use of Outlook’s Thread-Index: header

tl;dr Finally the format of the Thread-Index: header is documented!

Recently I was in a situation where I had to reconstruct a thread of email messages using the Thread-Index: header which is used by Microsoft’s products, instead of the standard way of threading using Message-Id:, References: and In-Reply-To:

The truth is that I was really frustrated, thinking that Microsoft was breaking the standards using custom headers that do not begin with X- but as Dan Bernstein points out:

“822 promised that the IETF would never define field names beginning with X-. It did not prohibit use of non-X names by other organizations.”

Which means that Microsoft is allowed to add Thread-Index: (and Thread-Topic:) without breaking any standards. On the other hand Microsoft does not document anywhere (at least anywhere I looked and I looked plenty) how Thread-Index: is calculated and how it can be decoded to be made useful by any other application, any other than Outlook that is.

After some experimenting and a little bit of reverse engineering I’ve reached to the following results:

  • Thread-Topic: preserves the original subject of the thread, that is the Subject: but stripped from any Fw: or Re: prefixes.
  • Thread-Index: is used in a way similar to In-Reply-To: and References: Assuming that the first message in a thread has a:
    Thread-Index: AcdyY+a08VX8xfobTsy61v9NHPZ7QA==

    and the next in thread:

    Thread-Index: AcdyY+a08VX8xfobTsy61v9NHPZ7QAAAiXbA

    while a third one:

    Thread-Index: AcdyY+a08VX8xfobTsy61v9NHPZ7QAAAiXbAAAXP5fw=

    and a fourth one:

    Thread-Index: AcdyY+a08VX8xfobTsy61v9NHPZ7QAAAiXbAAAXP5fwAABGXGw==

    the pattern that decides the threading seems obvious; I have not yet found out what the single or double equal sign suffix means.

If only Microsoft could make such simple information available! Think of all the lost work hours! Only after I had resolved my problem did I find out about these guys, who had arrived on similar conclusions about the usage of Thread-Index:

Update #1: You may be interested to read the next episode.

Update #2: Yes, I keep refusing the BASE64 explanation. This is because what the BASE64 value decodes to is something either meaningless, or without known semantics.

Update #3: From the GNOME documentation: The value is apparently unique but has no meaning we know of. That is why I refuse the BASE64 explanation. It looks like a BASE64 string and it can get decoded into a string of bytes that one can represent as a number. But the questions remain unanswered: How is the first 27-byte long value chosen? Why every “next” value in a thread 5 bytes longer than the previous one? How are these 5 bytes chosen? The decoded value of an undocumented BASE64 string remains undocumented, hence it may not even be a BASE64 string at all (and may only coincidentally look like one).


The example Thread-Index: headers are taken from the MediaDefender Defenders site