chris blogs: September 2005

29sep2005 · Robosowomen und Lebertran-sport

Und wieder fließen sieben Tage sandiger Zeit durch das kleine Loch des Stundenglas’ unserer Leben; sie bröseln schön über den Staub der anderen fast tausend Wochen (beziehungsweise 945 bei mir).

Aber es gibt ja auch wieder Quotes, so schlimm ist das also nicht:

hm, cool… aber du passt dich eh immer an… wegen dir könnten wir uns auch in nen luftschutzbunker hocken… oder?wenns was zu saufen gibt? [der pragmatische Alkoholiker]

Tim Eulenspiegel

Der Mensch ist einfach so konstruiert, dass er in seiner Masse nicht auf Alkhohol verzichten kann.

Robosowomen [Hey, Gleichberechtigung!]

I doesn’t like ze es-em-vau.

Lebertran-sport

Kommt die eigentlich aus Georgien?Hä, wieso?Die hat doch in Englisch immer von “Georgia” erzählt…

Long Island Tea Party

Vokabelkässchen und trallalla…In Deutsch?

NP: Bob Dylan—Death Is Not The End

26sep2005 · Reflections on writing

Why do we write? First, and foremost, writing is used to communicate. In the old times, when written language more or less was invented, people used to write to store data, say the number of sheep they own or which fields they need to plow in which year.

Slowly over time, the focus of writing—which was nothing more than bookkeeping back then—changed significantly. The interesting works of history are not the ones that store, but the ones that tell.

Now, where is the difference between that? In the eyes of a technician, there is no difference. Words are written by changing matter. However, the intent is completely different, and, while it sounds weird, we need to compare the topics of written things first.

Storing the number of sheep you have is of no interest to somebody else than you (and probably the tax office). While it certainly is information—essential information, you’d say—, it is of very limited use to others.

The next thing that was written down, after these items of financial interest, were stories. Stories of wars, heroes, lore and legends are the main content that’s left over from ancient times. Before they were written down, people used to tell them each other vocally, which kept them changing over the course of time. Usually, you wouldn’t write them down; after all, you can either remember them, or just invent what you forgot, but people did nevertheless write them down. Here, we have a mix of storing and telling. The stories of them still can be read, but more importantly, they are of our interest, for reasons whatsoever.

There was only one problem with writing by changing matter. And that problem is the matter itself. When information is bound to matter, it cannot easily be copied. It is easy to tell your story to others, but if you have engraved it into stone, spreading it becomes hard work.

Gutenberg does not play a significant role here. While he did an important thing to history by inventing the printing press, it didn’t ultimatively solve the problem. Printing still was expensive, and bound to matter. Copying was made more easy, but the fundamental problem persisted.

Nowadays, in the time of computers, but far more importantly, the Internet, information is free. It is not limited by matter anymore. You may argue, of course, that your hard disk consists of matter. This is true, but the information does not consist of matter. There is no ink in the disk that gets empty and you need to refill. You just toggle the magnetism of particles. With this change, information is trivial to copy and distribute.

This change totally changed writing. While a lot of people still write to store—just think of to-do lists, private diaries etc.—communication over written language, telling, became the primary application of the net, let it be email, instant messaging, newsgroups or, in the end, the web.

The change also reflects in the topics that are written about. The audience of written information can change with the medium. In the old times, you either wrote a letter or a book. A letter was usually used for one-to-one communication, at least if you didn’t want to copy your letter for each recipient. A book, on the other hand, was for a rather big mass, not at least because it was expensive to print books.

With the net, this is different. There are lots of blogs—which is essentially writing for the sole purpose of telling (even if I admit to often search in my own blog entries, trying to find what I once knew)—with a very limited audience. That’s no problem at all, but something that was not impossible before. The difference is that the people that want to read you find you; and not the other way round, as in case of writing letters.

You put information online for others to find and make use of it. And your readers can comment on them, take them apart (if you use a liberal license) and assemble them again, extend them, spread them, even print them out and materialize the things you tell.

While written information still is stored, this is not its main purpose anymore. It’s communication, and therefore we write to tell.

[Ironically, I wrote this to get ready for doing some English homework, but I think it makes enough sense to be read by others.]

NP: Big Bud—Chill

22sep2005 · Schultag?

Man schreibt ja nicht jeden Tag die beste Kurzgeschichte des Kurses als Paralleltext zu Herta Müllers “Arbeitstag”…

Christian Neukirchen: Schultag?

Morgens, halb sieben. Der Wecker läutet nicht. Ich stehe nicht auf, ziehe mich nicht an. Ich wasche und kämme mich nicht, ich putze mir nicht die Zähne. Ich bleibe einfach nur liegen.

Ich gehe nicht in die Küche, trinke nichts, und esse nichts. Schmuck trage ich auf nicht. Ich ziehe meine Schuhe nicht an und verlasse auch nicht die Wohnung. Ich kaufe keine Zeitung, kein Brot, und warte nicht auf einen Bus, der nicht kommt. Ich wäre wohl auch nicht ausgestiegen.

Schon gar nicht grüße ich den Hausmeister, den es nicht gibt. Danach gehe ich weder ins Klassenzimmer, noch grüße ich meine Klassenkameraden. Auf keinem Stuhl hängt eine Jacke. Ich sitze nicht zehn Stunden in der Schule.

Sonntag morgens, halb sieben.
Liegen.

Entschuldigung, Herr De Morgan.

NP: Silver Jews—Sleeping Is The Only Love

20sep2005 · Dissident 0.1 released

(This went to ruby-talk, too.)

Although it took a bit longer than I thought at first, I’m proud to announce the first public release of Dissident, a Ruby dependency injection container written by me.

What does Dissident do?

Dissident tries to make the best of different kinds of dependency injection:

  • It is as unobtrusive as Setter Injection (aka Type II), but done magically. It should feel exactly the same as just using the class if used properly.

  • It is as easy as Constructor Injection (aka Type III) with, say, PicoContainer (or what it would look like in an dynamically typed language), but not as clumsy if used without DI.

  • It is lazy, like Getter Injection (aka Type “IV”), and exactly as nice to use. The laziness also solves the problem of circular instantiations in a clever way.

Dissident can provide real Constructor Injection too, making the classes truly independent of Dissident.

Features

Dissident provides per-container “singletons” (multitons, actually, if you make use of parameterized services), that are not globally unique and visible everywhere to the program, but only for the scope of the container used.

Dissident can do easy customization and “forking” of container implementations using standard Ruby inheritance and overriding. You can, for example, inherit from your default container to add stubs for testing.

Dissident provides multitons and multimethods for complete configurability of your applications. A prototypish instantiation style exists too.

Dissident includes an extensive test suite and is implemented using test-driven development.

The Dissident core is just a single and rather short file, ready to be included in your application. It has no external dependencies.

Example code

An example of using Dissident:

require 'dissident'

class Apple
  def peel; end
end

class Peeler
  inject :peelable
  def start
    peelable.peel
  end
  def stop; end
end

class Juicer
  inject :peeler
  inject :peelable
end

class MyContainer < Dissident::Container
  provide :peeler, Peeler
  provide :peelable, Apple
end

Dissident.with MyContainer do
  juicer = Juicer.new
end

Warning

This release is meant to be thread-safe, but testing in this area has not been very extensive. Users of threaded applications beware and please report bugs.

License

Copyright (C) 2005 Christian Neukirchen
Dissident is available under the same liberal terms as Ruby itself.

Where can I get it?

You can get Dissident 0.1 at: http://chneukirchen.org/releases/dissident-0.1.0.tar.gz

Alternatively, you can checkout from the development repository with:

darcs get http://chneukirchen.org/repos/dissident

(Patches using “darcs send” are most welcome.)

For more information on Dissident, please also see Mark IV Coffee Maker on Dissident and Design and Evolution of a Dependency Injection Framework.

Quoting from the latter:

But why write a new DI framework at all? There are some prejudices in the Ruby community with respect to that. People say “they make things complicated” and “there are more frameworks than users”. Of course, that may be true—but it shouldn’t be for all of them. Therefore, I decided to make one that’s not complicated, because you barely notice using it, one that’s easy to pickup, because you can learn it in an afternoon and only need to write a few additional lines of Ruby—no XML or YAML needed, one that actually helps coding, because else it’s a hobble and therefore no fun, one that eases testing, because you can mock the services easily (don’t use a container at all, or simply inject mocks), one that feels like Ruby, because you should never tangle in bad ports of Java libraries; in the end, I decided to make one that I personally like and want to use, because there is no point in making libraries you don’t use on your own.

ea5772084443719e310f586ff43436e2  dissident-0.1.0.tar.gz

NP: Silver Jews—The poor, the fair and the good

18sep2005 · Wie wir unsere Wochenenden verbringen...

Poco-Loco-Rechnung

Am Freitag waren wir zum Beispiel im Poco Loco. Rechts die Rechnung, man beachte dass wir den ganzen Abend “Happy Hour” hatten, es war also alles zum halben Preis. :-)

Der soll mir jetzt meine Seele bringen, oder ich geh in die Küche und mach’s mir selber.

Ein Puff ist auch ein Nagelstudio, oder?

Madam Curie hat den Nobelpreis entdeckt.

[Lehrerin:] Also üblicherweise kommt ja der Lehrer zu spät.

Alanin Morrisettin

Waschbärbierbauch

[Gegenteil von basisch:] Säurisch

Hmm, im 123 haben wir auch lange keine Bilder mehr gemacht…

NP: Dan Bern—Love Don’t Last

15sep2005 · DV on OS X and a Lession in Being Dumb

This post was meant to be a big rant, then suddenly everything changed. But first things first.

I got a nice digital camcorder for a few days (Panasonic NV-GS55, if you care) and wanted to do a clever hack with it (about which I’m going to tell in a later post, I hope it works). So, I filmed the some things I needed, and started to wonder how I would get that material onto my Mac. Macs are really good at multimedia, they say, but my task is a bit unusual. Basically, I need a directory holding each frame of the movie as a file.

Looking through my installed software, iMovie seamed to be the right tool for the task, and after grabbing a Firewire cable it nicely detected the camcorder and was ready for recording. Fun, I think, my disk space is getting filled up really fast. Some hundred megabytes for a minute of video is pretty much, but the clip is short, so I didn’t care at first. Now, I thought, export that clip into some format, and you are almost done. mencoder, I knew, could expand movie clips into files.

Export. How funny. That’s probably what Apple thought when they restricted iMovie not to export at all until you register. Which I don’t see at all why I should. So, let’s hack this. After looking into my iMovie project folder, I see the whole clip is just a file in there. I wonder what it is, and let file(1) tell me:

Media/Clip 01: DIF (DV) movie file (PAL)

Hmm, I didn’t know that format, but at least it has a name, and isn’t just data. Hey, it can’t be that hard to convert that to something more useful. Unfortunately, mplayer, my swiss-army movie tool, can’t open it. I google a bit and discover the file format is actually called “raw DV”. There are not a lot of tools that can handle it, and I tried a lot of them.

This is where my trip starts. I couldn’t find reasonable tools at first, so tried grabbing the clip anew, this time from Helix Producer. Their “open-source” version can’t grab, however, you need a propietary version for that. No thanks! (And requiring bugmenot.com for downloading isn’t exactly nice either.)

I search some more, and discover for Linux there is a tool called dvgrab that can capture too. Not on OS X, however. I notice it has several output formats, among them DV2 and raw DV. Most other tools related to DV only can read DV2. I get and play with libdv, ffmpeg and mjpegtools and lots more. Nothing does what I want, and getting some of the tools (esp. smilutils) to compile takes a lot of time and hacks and just drives me crazy. I’m short before giving up, bitching at Apple for now allowing exporting (older versions of iMovie apparently did it) and having no software for an apparently simple task. Even converting raw DV to DV2 would do it as of now, but I only have tools for the reverse direction.

I google some more and find a post where they use a tool that I thought would help me a great deal, raw2yuv, was replaced with ffmpeg. Wait, ffmpeg, I installed that in the beginning of my experiments. I try to use the included player, ffplay and it tells me:

Media/Clip 01: could not find codec parameters

What the hell? The documentation says raw DV can be played with -f dv. It doesn’t. I feel dumb. In a few minutes, I’ll feel infinitely more dumb. I check the file again:

Media/Clip 01: empty

What the … hell? It takes a few more minutes to realize that I spend over four hours trying to play an empty file! Some of above tools must have clobbered it in the early stages of experimentation. The anger at the tools drifts, the anger at myself raises a big deal. I wasted half of a day doing complete utter crap. But heck, I learned a lot about how not to package your software.

I rip again, and—voilà—I have an MPEG2 of the file, thanks to ffmpeg, good enough for further progressing.

NP: Dan Bern—New American Language

11sep2005 · Besinnung zum Schulanfang

Und die Ferien waren trotz temporärem relativem Zeitstillstand viel schneller vorüber als vermutet. Morgen ist wieder Schule, und für mich konkret bedeutet das, dass das Abitur anfängt. Jede Note zählt. (Anders als bei SingStar kann man sich aber schön die Zukunft verbauen, dem Numerus Clausus sei dank.)

Und so geht man mit dem prächtigen Gefühl, dass sämtliche gute Noten der elf Jahre davor nun im wesentlichen nichtig sind, wieder zurück auf das Schulgelände, bei dem die Handwerker nun größere bauliche Veränderungen vornehmen um es zu einer Ganztagsschule umzufunktionieren. Das werden wir aber glücklicherweise nicht mehr mitbekommen.

Die Umstellung von Ferien auf Schulzeit gleicht einem Kulturschock. Saufen geht praktisch nur noch am Wochenende (Ausnahmen wie Abigag, Schütza etc. bestätigen die Regel), der Schlafrhythmus geht nun etwa acht Stunden nach. Statt langem Frühstück gibt es große Pause, statt Mittagessen Döner (zumindest für die Pendler) und statt Baggersee Mittagschule.

Doch erstmal bekommt jeder einen Zettel mit einer fragmentierten Liste von Personen, die man aus dem ein oder anderen Grund nicht mag; auch Stundenplan genannt. Danach stehen Lehren vom Rektor auf der Tagesordnung; wer mehr Anspielungen an die Stufe über uns findet, hat gewonnen.

Eifrig machen sich alle ans Werk, sagen, sich von jetzt an anzustrengen und mehr zu lernen. Wer’s glaubt. Die Motivation lässt nach spätestens sechs Wochen nach, beinahe ein Naturgesetz. Wie sonst ist zu erklären, dass wir 15 “neue” Schüler aus der bisherigen Stufe 12 in unserer Stufe haben? (Organisatorisch nicht so ein großes Problem, bei uns sind ja auch 13 durchgefallen. Danke, neue Oberstufe.)

Die Zeit der Quotes beginnt auch wieder, hier, was noch aus den Ferien über ist:

Proletarier aller Länder, (ve)reinigt euch!

Die Oblaten haben überall auf der Welt Klöster…Außer in New Orleans!

Lieber Absinth als besinnt.

NP: Dire Straits—Walk Of Life (passt gar nicht schlecht…)

07sep2005 · Switching to Lighttpd

chneukirchen.org just switched from Apache 2.0.54 to Lighttpd 1.4.3 and all I can say so far is that it’s been a pleasant experience—far less trouble than I imagined.

Moving away from Apache was a bit more complicated to me, as this site was heavily configured using .htaccess—which Lighttpd doesn’t support. However, it turned out to be easy enough to convert this configuration into a monolithic lighttpd.conf.

One thing I tripped over was enabling CGIs. In theory (and as the documentation says), this should be enough:

cgi.assign = ( ".cgi" => "" )

It didn’t work for me, though. Asking in the very helpful and active #lighttpd channel on Freenode helped me find a solution. The extension should be explictly removed from the list of files to publish:

static-file.exclude-extensions = ( ".cgi" )

That was the main problem I had while configuring (Well, except producing a segfault by triggering a rarely-displayed error message that had a wrong format string. But let’s see over that, they fixed it immediately.)

I think I’m going to use Lighttpd for other sites and local development too, it’s just easy to use, small, and very fast. (Static sites ship about 8 times faster than Apache2 when I did a quick ab over it… 1300 requests per second on a loaded machine is really neat.)

As a nice side effect of working on the site, I also replaced the front page of chneukirchen.org with a new design and dynamic content about the various things you can find here.

Enjoy.

NP: Aimee Mann—Beautiful

04sep2005 · My very first Ruby script

Recently I did some archaeological excavations in my home directory because I wanted to find out when I started writing Ruby. Interestingly, most files still have accurate timestamps, although this is the third computer with this home directory (I always copy ~/projects when I move on).

Apart of a backup file of a snippet I wrote in October 2001 that tested Ruby threading—I think Ruby 1.6.5 was the current version at that time—, the first “useful” Ruby script I found was an acronym generator, acronym.rb, dated December 23, 2001 (also inside the file). A few days after, I wrote some code to brute-force the theorem that each number can be added to it’s reversely written representation until it gets symmetric on it’s own. The problematic case is the number 89, which needs more than 10000 steps without a solution. I stopped trying after that.

Thank you, Ruby! It’s been four pleasant years to code with you, and I hope lots will follow.

And hey, isn’t it nice to state “Four years of Ruby experience” in your CV? (No, mine isn’t public.)

NP: Silver Jews—Like Like The The The Death

01sep2005 · BlogYesterDay

How embarrassing, I really forgot to post my Blogday 2005 list yesterday. Since it didn’t get worse over night, however, there you are. Five not-that-well-known blogs that cover topics untouched by this blog (at least, most do):

  • simpl(e)y done is a blog focusing on minimalistic design, websites and user interfaces. That said, it is of course an example on its own. Highly recommended for those that don’t like the creeping featuritis all around.

  • Projectionist is the tumblelog of the guys at ionist and blends—just like Anarchaia—great links, beautiful imagery and insightful quotes with funny IRC lines into a great mix.

  • Der digitale Lumpensammler collects weird stuff from all over the net and kind of proves what crazy stuff that you never thought of actually exists. Please, think before clicking on links, not everything is worksafe and some stuff is pretty disgusting.

  • Smallthought is the blog of Avi Bryant’s new venture and the place he reasons about radically tailorable software, the long tail of end-user applications, “misuse” of spreadsheets and what can be done to help it. Not recently updated, but I hope he’s just busy and the idea is not dead yet.

  • Schmu! is the mostly german LiveJournal (uh) of wiesu, and features both photography of the city in interesting perspectives (say, everything reflected in a puddle) as well as insightful and partly social-critic posts about life (those of the kind that you could attribute to Jack D. M. Bierki, but more about that later). For example: “After each yoga lession I think: wow, there are a lot more muscles I didn’t know I don’t have.”

That’s it, I hope you like my selection and happy reading (and blogging, of course)!

NP: Silver Jews—Night Society

Copyright © 2004–2016