Home
Aug. 11th, 2007 @ 10:17 pm Moved
I will likely not post entries in this LiveJournal anymore. I have created a new blog at http://blog.timwi.de/, but I don't promise I will blog there regularly either. I want to keep it separate, so I'm not moving my LiveJournal entries over.
About this Entry
default
Apr. 28th, 2007 @ 09:35 pm //
[21:23] Timwi: Can you think of more than three very common cases in which two slashes ('//') might come up in succession? :-) (random quiz)
[21:23] Timwi: (I can think of only three)
[21:25] Roman: i can't even think of three: i can only think of protocol:// and c++ line comments
[21:25] Timwi: OK, wanna know the third one I thought of? :)
[21:26] Roman: mark-up in some wiki? :)
[21:26] Timwi: Hm, that might be another one, but that's not what I'm thinking of :)
[21:26] Roman: what is it?
[21:26] Timwi: s/ <pattern> //; :-)
[21:26] Roman: hehe :)
[21:29] Roman: but you said "very common" :)
[21:30] Timwi: Well, I only said that to prevent you saying things like $empty_string = q//; which is of course possible but ideosyncratic :)
[21:31] Roman: but i wouldn't have thought of that anyway :)
[21:32] Timwi: q// or qq// = empty string, qr// = empty regexp, qw// = empty array :)
[21:33] Timwi: or indeed $var =~ // which
[[info]pne explains in the comments ;-)]
[21:33] Timwi: OK, sorry, I'm in extreme geek mode
[21:33] Roman: yeah
About this Entry
default
Mar. 23rd, 2007 @ 09:17 pm Am I on Candid Camera?
[19:57] Roman: omg i just got about 10000x wealthier because some super wealthy person promised 100 billion "food" to the first person to say "stephen sux". Guess who was the first :)
[19:58] Roman: she kept the promise :)
[20:01] Roman: i'm totally stomped and i have no idea what to do now :))))
[21:07] Timwi: So what is 100 billion "food"? :)
[21:07] Roman: a resource. Like money.
[21:08] Timwi: I'm not sure if you're trying to be funny, to be honest :)
[21:08] Roman: i'm not :)
[21:09] Timwi: So how is this person going to transfer the 100 billion "food" to you? :-p
[21:09] Roman: they've already done that. There's a system for sending stuff to people.
[21:11] Timwi: So how rich are you now? :)
[21:11] Roman: i'm not sure if I understand you completely either. Do you not believe me or something? :) why the ":-p"?
[21:11] Roman: i can't answer that question because you have nothing to compare it to :)
[21:12] Timwi: It is a bit hard to believe, yes
[21:12] Roman: i see :)
[21:12] Roman: well, it's true
[21:12] Timwi: If you can't answer that question, then where did the "10000x" figure come from?
[21:12] Roman: i was really surprised to actually receive it
[21:12] Timwi: Receive /what/ though?
[21:12] Roman: receive 100 billion units of food. Do you understand that i'm talking of that space strategy game?
[21:13] Timwi: Ooooooooooooooooooooohhhhhhh
[21:13] Timwi: OMG WTF!!!!!
[21:13] Timwi: No, I totally didn't realise that, obviously :)
[21:14] Timwi: OMG WTF ... this is ... uh... how do I say this :)
[21:14] Roman: i thought it was in context. But clearly it wasn't, now that i look back :)
[21:15] Timwi: OK, well, to give /you/ some context, I just watched a TV show in which they trick people into some sort of trap, with a hidden camera.
(Die Comedy Falle)
[21:15] Timwi: And all of a sudden I totally felt like I'm in the middle of something like that myself...
[21:16] Roman: lol :)))
[21:17] Timwi: Do you mind if I post this exchange to my LJ?
[21:17] Roman: go ahead :)
About this Entry
default
Mar. 19th, 2007 @ 03:26 pm Expert Sokoban

Roman's and my project, Expert Sokoban, has now been released as freeware.

Download Expert Sokoban

Documentation is still a bit lacking, and the description is a bit weird :), but the program works and is feature-complete :)

About this Entry
default
Mar. 16th, 2007 @ 03:54 pm Graph theory
If anyone reading this is or knows someone who is interested in graph theory, I am very keen on finding a proof or a counter-example for the following conjecture:
Take an arbitrary graph with unweighted, undirected edges. Define the "distance" between two nodes as the length of the shortest path between them.

Start at a random node S. Use breadth-first search to discover the nodes with the largest distance from S. Choose by random any node X out of those that have the largest distance from S. Now run breadth-first search again starting at X. Choose by random any node Y out of those that have the largest distance from X.

Conjecture: All pairs of nodes (A,B) in the graph have a distance less than or equal to the distance between X and Y. (In other words: (X,Y) is one of the furthest-away pairs.)
(A counter-example was found by a graph theorist at wer-weiß-was.)
About this Entry
default
Feb. 17th, 2007 @ 02:09 pm Stupid .NET WTF
TableLayoutPanel MyTable = new TableLayoutPanel();
MyTable.ColumnCount = 2;
MyTable.ColumnStyles[0].SizeType = SizeType.AutoSize;
MyTable.ColumnStyles[1].SizeType = SizeType.AutoSize;
        // last line triggers index out of bounds exception! WTF!!
About this Entry
default
Feb. 8th, 2007 @ 01:32 pm Strong verbs with the emp- prefix
I have discovered something intriguing about German verbs just now.

I can think of only three verbs that use the prefix emp-. Those are empfangen, empfehlen and empfinden. All three of them exist as separate verbs without the prefix: fangen, fehlen and finden.

fangen is a strong verb, and empfangen follows its morphology exactly:
fangenempfangen
fingempfing
gefangenempfangen

finden is no different:
findenempfinden
fandempfand
gefundenempfunden

However, and this is the interesting bit: fehlen is a weak verb even though empfehlen is not:
fehlenempfehlen
fehlteempfahl
gefehltempfohlen

I wonder whether there exists an interesting etymological explanation for this.
About this Entry
default
Jan. 8th, 2007 @ 07:58 pm Crazy sentences
Here are a few things I wrote down during or after the IS.
  • Nogle, som inting ved, men ved, at de inting ved, ved mere an nogle, som inting ved og ikke ved, at de inting ved. (Danish)
  • Als achter vliegen vliegen vliegen, vliegen vliegen vliegen vliegensvlug achterna. (Dutch)
  • Als graven graven graven voor graven, graven graven graven voor graven. (Dutch)
  • vaastststaand (strange Dutch word construction)
  • Ed had edited it. (English)
  • schrumpfst/schlumpfst/schnarchst/schleichst/schlauchst (longest single-syllable German words, 10 letters each)
  • schreeuwt/schraalst (longest single-syllable Dutch words, 9 letters each)
  • Kokoo koko kokko kokoon. Koko kokkoko? Koko kokko. (Finnish)
  • На дворе трава, на траве дрова / Не руби дрова на краю двора. (Russian)
  • Клара у Карла украла кораллы, а Карл у Клары украл кларнет. (Russian)
  • Ехал Грека через реку, видит Грека в реке рак. Сунул Грека руку в реку, рак за руку Греку цап. (Russian)
  • Ункъазаралда ункънусиялда ункъоялда ункъо къверкъ къвакъвалебуго кьода гъоркь. (Avar)
  • Öt török öt görögöt dögönyöz örökös örömök között. (Hungarian)
  • Tachtig allemachtig prachtige grachten in Drachten. (Dutch)
  • Appilan pappilan apupapin papupata pangolla porisee. (Finnish)
  • Ĉu ŝi ĉiam pri ĉio ruĝiĝas? (Esperanto)
  • Nihundredenioghalvfemstusindenihundredenioghalvfems (Danish)
  • Der Papst hat's Speckb'steck z'spät b'stellt. (Swiss German)
  • Streichholzschächtelchen (German)
  • 1655 (Triple Yahtzee score)
  •  ̌  ̆  ̨  ̷  ̃  ̛̣̂̃ 金 (don't ask)
  • Ein paar Zitate:
    • Du kennst doch einen Kai. – Ja, Kai Pflaume. – Ich kenne auch echte Kais.
    • Ich bin für Finnisch. – Finnisch auch!
    • Soll ich das Licht ausmachen? – Nein, wachmachen.
    • Obgleich man tagtäglich mit Menschen konfrontiert ist, bei denen man denkt: Ach du Scheiße!
    • Ich weiß nicht mehr, was ‘Dürre’ heißt. – Kannst ja ein Buch drüber schreiben.
    • Du hast eine Muzel an der Brille. – Ach darum!
Also, I noticed that d + vowel is a valid Esperanto word for all vowels: da, de, di', do, du. Jes, mi scias ke "di'" estas iomete fuŝita! :)
About this Entry
default
Jan. 7th, 2007 @ 12:07 am CHKDSK
Those of you who have used DOS a long long time ago, may remember the command-line utility chkdsk, which in fact still exists in Windows today.

One of its features was to discover runs of data that are allocated in the file allocation table (on FAT file systems) but not referenced in any directory entry, thereby being effectively inaccessible.

I never found this feature useful for three reasons. Firstly, the filenames end up as FOUND000.CHK, FOUND001.CHK, etc. In DOS times where most programs and games had their own special binary format, it was next to impossible to find out what a file was for. Secondly, it would "recover" all the data up to the end of the last cluster, which usually included junk at the end because the file finished in the middle of a cluster. Thirdly, on biggish hard disks files easily get fragmented, and each fragment would be "recovered" as a separate file.

Well, today was the first day that CHKDSK actually recovered data for me. I bought a new digital camera with a 1 GB memory card, and apparently it uses the FAT file system. When connected via USB, this file system is mounted onto a drive letter.

Now, Windows notoriously dislikes when a USB connection gets interrupted unexpectedly. In this case, I think it was the camera's or the cradle's fault; the camera crashed and I couldn't even turn it back on except by first taking out the battery and putting it back in. Two files on the memory card, which obviously were photographs, were now corrupted and unreadable. CHKDSK was able to recover them.

All three of the above-named problems do not apply here. Firstly, the filenames were useless anyway, as the camera just enumerates them. Secondly, extra junk at the end of the file doesn't appear to bother JPEG. Thirdly, since the photographs were all taken in sequence and I had never deleted a picture yet, they were not fragmented. (The two pictures in question were the photographs showing Nico in the previous entry.)
About this Entry
default
Jan. 6th, 2007 @ 11:34 pm 50a Internacia Seminario (kelkaj fotoj)
Jen kelkaj senkontekstaj fotoj de la 50a IS.

Fotoj )
About this Entry
default