Randomly Found Software: Morsegif

Sun, 31 Jan 2010 00:33:11 +0000

Just read about Morsegif on Freshmeat.net. A php-script which creates GIF-Files producing Morse-Signals, from a text. Well, the whole system is rather primitive and uses ImageMagick from the Shell as far as I see. There is also a demo page.

Well, it may be trivial to build the same thing in a slightly better way, but who cares – it is a  idea.

(Bi)weekly Game Music: Kung Fu Master – Stage 4

Sun, 31 Jan 2010 00:32:10 +0000

Firstly – well, since the music (and time) is getting rare, I cant provide a music every week anymore (without making it boring), so I will make this biweekly instead of weekly from now on.

Kung Fu Master is an old game. I never owned it myself, but played it with other people. It is one of the games I never really wanted to have. One of the games only the „bad kids“ liked to play. While I was stuck at Mario, Kirby and Zelda, they played Gargoyles, Turok and Kung Fu Master. But as for today, also in those days, software united the world, and so both kinds of kids exchanged their games from time to time.

Well, a great tune from this game is the Music played at stage 4 and 5. Unfortunately I couldnt find a YouTube-Video with only this theme. So well, here is a gameplay-video I found which contains these stages – they begin at 2:02.

And I have found a remix (which is really well done, as it just enhances the gameboy music instead of recomposing it):

As always, the Videos are not made by me, just found on youtube – be kind, comment and rate them!

Randomly Found Software: Advanced Copy

Sat, 30 Jan 2010 18:39:02 +0000

A nice little enhancemend to GNU cp is Advanced Copy (via). It adds Progress-Bars and some information of which file is currently copied where, and how long it will (presumably) take until the copying is finished.

Well, there is not much more to say about it. Its a patch to coreutils. And it compiles (and seems to work) under Mac OS X Snow Leopard. It is one of these little enhancements that a system needs to get more user-friendly. And I am glad that such enhancements are also written for cli-applications, not only for gui-stuff.

Heute mal wieder Bahn ohne Internet

Fri, 29 Jan 2010 11:50:07 +0000

Waaaah … ich muss heute eine dreistündige Bahnfahrt ohne Internet aushalten. Das hab ich schon lange nicht mehr gemusst. Ich habe schon wieder ganz vergessen was man da macht. Wie ignoriert man die Kreuzschmerzen und den moderigen Geruch und die nervigen Kinder und die noch nervigeren Alkoholoker die sich da tummeln? Und die viele Werbung? Und die ekelhaften dinge die überall rumliegen? Und die idiotischen Diskussionen irgendwelcher seltsamen konservativen oder überprogressiven Leute?

Ok, zugegeben, aus dieser Beschreibung geht jetzt nicht so ganz der Kontrast zum Internet hervor. Naja, im Internet hat man zum Einen Chats und tabbed browsing – wenn man was ekelhaftes nicht sehen will wechselt man das Tab. Aber ok, ich denke, ich werde es überleben. Ein bisschen RL spielen ist sicher mal wieder interessant.

Software that should exist #4: Portable, verified, deduplicating filesystem

Wed, 27 Jan 2010 14:51:14 +0000

ZFS is a very interesting filesystem. I never actually used it, just made a few experiments with it so far. Mainly, because there is only sort of experimental support on Linux, no support on Mac OS X at the moment (as far as I read, the project which aimed to do this was frozen, but maybe zfs-fuse can be ported to macfuse), and also absolutely no support on Windows (at least until somebody finally writes a proper winfuse-binding or ports it to Dokan).

Still, the first-choice-possibility of accessing a ZFS-Pool through any other OS than Solaris seems to be just installing OpenSolaris on a VM, and just forwarding the desired blockdevices. I think this is more secure and not really slower than using FUSE, at least it is more portable at the moment.

The reason why I am interested in ZFS is that it serves a few purposes I really like. To understand why, one has to know my general behaviour of managing my files.

Actually, mostly times of having too much free time tend to alternate with times with almost no free time. While having no free time, I am just working with my computers. I dont explicitly manage my files – I just save them somewhere I can find them again. And sometimes I need some old file from some old archive or directory, which is on an external disk, thus, I just copy these files (or extract the archive) to my current harddisk. And leave them there.

When getting more free time again (and less free space on my disk) I tend to „tidy up“ my filesystem. But then, often I changed some old files. Or lost the overview over them. Or simply want to set up my system from scratch because there is a lot of crap running around on it. Mostly then, therefore, I just copy the whole home-directory (and maybe others) onto my external disk – thinking „setting up my system is more important, I can tidy up my files later“

… Now guess what happens …

Of course, I have whole system-backups from years ago, even some from the times when I used Windows. And sometimes I have System-Backups of systems which contain copies of System-Backups. Sorting them would take a lot of time. Sometimes I grub through the old files like an old photo album. I dont want to change these files. I dont want to delete these files. And actually, I am much too lazy to sort them.

So of course, I have the need of more and more space. This is no problem. But also, since so many files have duplicates, the need for space increases exponentially. Well, there are tools like fdupes. But fdupes takes a long time to index the files, and when I change a file afterwards (accidentally, etc.), this affects all other files. And fdupes works only on systems with symlinks or hardlinks. And fdupes cannot shorten files which are only partially the same.

On the other hand, there are a lot of well-engineered backup-tools like rsync with a lot of additional features, and in every production-environment, I would recommend a strict backup-policy basing on these, anyway. But at home, I have a lot of old computers running – sometimes just for experiments. I have no production system. I just have a creative chaos – and I actually want to keep this creative chaos. At the time of desktop-virtualisation, when it is no problem to run three operating systems on one single cpu-core at once, at the time of ramdisks, at the time of WebGL, I simply dont want to manage my files manually, when the filesystem just could deduplicate equal blocks, so I could have hundreds of copies of the same system-snapshot without really having to waste a lot of space.

And of course, I want to just be able to add another external disk to my pool, so I can save files on both of the disks without having to copy them, but – if possible – have anything on both disks when attatching them (or at least being able to just remove one of the disks when all the others are attatched). As far as I know, this can be done with ZFS. And a lot of other weird stuff. The only problem is that there appears not to be any good GUI for it, and no good Desktop-Integration either. And – well – it is only really supported by Solaris. The FUSE-Modules will first have to prove that they are really stable.

So – well, ZFS seems to fit my „wishes“, just would have to port it to Mac OS X and Windows (which is sure a lot of work but shouldnt be too hard either). But well, ZFS is a complicated system. And complicated systems can have a lot of complicated bugs. And the filesystem is the thing anything is saved on. That is, the whole computer can be damaged – as long as your filesystem is ok, you wont lose your data. On the other hand, a damaged filesystem can make it slightly impossible (especially when you encrypted it, for example) to restore any of your data, even though the rest of your computer (including your harddrive which just did what the buggy kernel module told it) works totally well.

Modern filesystems duplicate the necessary parts to restore data on the disk and have policies which make it less likely that data gets damaged. This is a good thing, but obviously, this doesnt help against bugs in your filesystem driver. What helps – at least to a certain degree – would be a formal verification of the sourcecode. I can think of several approaches to gain this.

The easiest way should be to ignore the hardware-problems of data integrity, and thus assuming that the disk one writes on is always correct. Then, the main thing one would want to have is some functions read : name → blob → blob and write : name → blob → blob → blob, such that (write a b (write c d e)) = (write c d (write a b e)) ⇐ a≠b, i.e. it doesnt matter in what order different files are written, (read a (write a b c)) = c, i.e. reading a file that was written before returns the same value that was written before, and (write a b (write a d e)) = (write a b e), i.e. a file’s content is the last content written into it. Maybe there should also be some defined behaviour when a file doesnt exist – i.e. instead of a blob, use some object from boole×blob, encoding whether the reading was successfull.

Of course, maybe we also want to verify that if some hardware fails, at least the probability of the data being read correctly is maximal – or at least doesnt fall below some certain probability. This seems a lot more complicated to axiomatize I think. While having an abstract „blob“ above, I think you will need to specify what a „blob“ is more exactly, that is, define blob as ptr→byte (whatever ptr and byte are exactly). And then, maybe defining an „insecure blob“ iblob=ptr→byte×probability. You would have to specify the probability of success of reading a byte correctly for your disk – a task which must be left to the engineers building the disks and busses – and for example in a raid-system, you can prove that your way of reading and checksumming the data maximizes the probability of correct data. On the other hand, I assume its comparably complicated to calculate this probability – i.e. when you save a block of data with a checksum twice on the same disk, the probability that both of them get corrupted by a damaged sector on the disk could be smaller than the probability that one of them gets corrupted (but needs not, since they could be written at a physically near place on the disk such that the source of corruption affects both of them), but the probability that the data gets lost because of a headcrash doesnt decrease, since both of them will be affected by this – while this probability that the same data saved on different disks gets lost should be smaller.

After axiomatizing all of that stuff, one of course has to implement a filesystem that has all those features like deduplicating, snapshotting, adding additional disks, etc. – and verify it.

As far as I see, this would be a lot of work to do. But on the other hand, filesystems are not something new. There should be a lot of experience with data integrity and backups. With all this experience, shouldnt it be possible to produce such a thing? I mean, its the filesystem – sort of the most essential thing. If it fails, anything else will fail.

Randomly Found Software: xdotool / Moving X11-Windows from the shell

Sun, 24 Jan 2010 13:37:33 +0000

In my oppinnion, there is one main problem with Linux, namely X11. X11 may be very flexible, but the flexibility it provides is almost never needed. In fact, it could be more flexible in some cases where it isnt (for example suspending and reattatching sessions doesnt really work easy), and in many cases, X11-Applications do only work under X.org-Implementations – that is, there seems not to be any nonstandard-implementation of X11 that is really usable (at least I dont know of any, even solaris uses X.org meanwhile iirc).

Well, under Linux, there are some netbooks which work with the Framebuffer. In general, commercial products seem to use X11 when needed, but bypass it. And Mac OS X doesnt use X11 at all – it has an X-Server, but only for compatibility reasons. And this X-Server has a Window Manager which isnt compatible with a lot of applications for window movement. Which lead me to the question whether it was possible to programmatically move X11-Windows from the outside of an application. And well, there is one.

Namely I found the command line tool xdotool.

Since I have absolutely no time to write about every functionality of this software at the moment (still a lot of work to do, and it keeps getting more) – well, its easy to compile and install under Mac OS X – though it has a few dependencies, which can be installed through MacPorts – so I’ll leave it to the interested reader to do experiments with it.

Under Mac OS X you will notice that it complains the lack of the XTEST-Extension. Here is where I found the solution to this:

defaults write org.x.X11 enable_test_extensions -boolean true

Do this in the commandline and restart your X-Server. Then it works under Mac OS X – at least for me.


Wed, 20 Jan 2010 06:59:12 +0000

„Schwein“ … ein häufig gebrauchtes Schimpfwort, gelten doch die Paarhufer in einigen Mythologien als unrein, und generell aufgrund ihres Essverhaltens als dreckig, da sie instinktiv wühlen, was in Stall-Umgebungen dazu führt, dass sie sich oft verdrecken.

Wenn ich aber an die Zeit zurückdenke, als ich in der Schule ein Praktikum in einem Tierheim gemacht habe, denke ich persönlich allerdings eher positiv über Schweine. Im Gegensatz zu den dortigen Primaten (und sonstigen Tieren) haben die Schweine sich eigenständig eine Ecke gesucht, um ihre Notdurft zu verrichten, und so ist das Ausmisten eines Schweinestalles der einigermaßen deren Natur entspricht wohl erheblich angenehmer als das Ausmisten jedes anderen Stalltyps.

Nun haben Schweine das Problem, dass nicht nur ihr Fleisch recht gerne gefressen wird, sondern auch, dass sie dem Menschen sehr ähnlich sind, weshalb man unter Anderem auch mit ihren Innereien liebäugelt, und Versuche an ihnen durchführt.

Nun gibt es verschiedene Arten von Tierversuchen. Die wenigsten von denen ich gehört habe erscheinen mir sinnvoll. Zumindest kann ich aber noch irgendwie verstehen, dass Forscher unter dem Druck akademisch weiterzukommen um weiterhin Forschungsgelder verschwenden zu dürfen und mangels kreativer Intelligenz irgendwelche seltsamen Chemikalien in Tiere spritzen, um zu sehen, wie diese darauf reagieren. Immerhin sind biochemische Vorgänge kompliziert, und so toll sich die moderne Medizin auch vorkommt, im Endeffekt, so scheint es mir als Laien, hat man was dieses Thema angeht bisher nur an der Oberfläche gekratzt. Wie dem auch sei.

Was ich nicht verstehe ist, wie man auf die Idee kommt, im einundzwanzigsten Jahrhundert lebendige Schweine im Schnee zu vergraben. Und vor Allem mit welcher Motivation. Lawinenopfer gibt es viele, und somit auch die Erfahrung mit ihnen – ich kann mir nicht vorstellen, dass man wirklich irgendwelche relevanten Daten erhält, die irgendwelche neuen Erkenntnisse bringen, und in irgendeiner Weise Lawinenopfern zu Gute kommen können.

Ich sage gleich vorweg, ich möchte nichts relativieren, es geht mir – auch wenn ich Laie bin – um eine rein wissenschaftliche Betrachtungsweise, ich musste hierbei – ohne es ethisch irgendwie aufwiegen zu wollen – an die Unterkühlungsversuche von Sigmund Rascher denken – und diese gelten als wissenschaftlich vollkommen Sinnfrei, sie haben keine relevanten Ergebnisse geliefert. Und zumindest aus rein wissenschaftlicher Sicht sollten doch beide Experimente relativ ähnlich sein, es sollte doch zumindest nicht zu erwarten sein, dass ein Versuch an Schweinen mehr für Menschen relevante Ergebnisse liefert als ein Versuch an Menschen. Man kläre mich auf, wenn ich hier falsch liege!

Offenbar bin ich nicht der Einzige, und so hat dieses Experiment erfreulicherweise eine Welle der Empörung ausgelöst.

Das zeigt, dass viele Menschen doch im Grunde Schweinen ein Recht auf ein leidensfreies Leben zugestehen. Das freut mich. Noch mehr würde es mich allerdings freuen, wenn diese Menschen auch von den vielen anderen Tierversuchen Notiz nehmen würden, in deren Schatten dieser Versuch eher harmlos ist – vielleicht hätten wir dann längst verbindliche Ethikkommissionen dafür, und die Zeiten, wo man Tiere mit Kanülen per Katalog bestellen kann wären vorbei.

Und freilich will ich garnicht erwarten, dass die Menschen Notiz von der Massentierhaltung nehmen – erst kommt das Fressen, dann kommt die Moral.