Krusader On Mac OS X

HAVING GROWN UP using Norton Commander for DOS, Total Commander on Windows and Midnight Commander and Krusader on Linux, its hard, if not impossible, to do work without a proper Norton Commander clone. This is true, especially on Mac OS. The standard file tools in Mac OS X are useless compared to the mentioned tools. For Mac OS X a range of native alternatives exists like Disk Order, XFolders, Fork Lift and muCommander. None of them are really good though. They all have their own weirdness’ and shortcomings, and generally none comes near the functionality and speed of used offered by Krusader or Total Commander.

I’ve used Midnight commander on Mac OS X, but I prefer Krusader, and thankfully its pretty easy to get Krusader up and running on Mac OS X thanks to the Fink project. If not having installed Fink already, do so by performing the following steps after downloading the source distribution (a binary installer is provided for Mac OS X Tiger).

$ tar xvf fink-0.28.1.tar
$ cd fink-0.28.1
$ ./bootstrap
$ /sw/bin/
$ source ./
$ fink selfupdate

Fink is now installed, configured, updated and ready for use. Installing Krusader and the required dependencies takes only a single command.

$ sudo fink install krusader

Wait for compilation to complete (may take a while). If everything goes well, Krusader should be able to be started from the terminal window.

$ krusader &

Running Krusader I discovered that the Meta/Alt key was not possible to use. This is unfortunate as many keyboard shortcuts in Krusader uses that key. Fixing this requires two setup modifications. In the X11 preferences I deselected all options under the tab ‘input’. This makes sure that X11 won’t override any personal settings made on the keyboard setup. Alas this is exactly what is required for the Meta/Alt key to work. Terminate the X11 session and edit the file ~/.Xmodmap (create it if not existing). Add the following keyboard mappings.

clear Mod1
keycode 66 = Meta_L
add Mod1 = Meta_L
keycode 69 = Mode_switch
add Mod1 = Mode_switch

Now Krusader can be used with working keyboard shortcuts :-) (note that my MacBook has a Danish keyboard, so the above mappings may possible be different if using another keyboard layout).

NULL Is No Obstacle For Tiesto

IT MIGHT BE that Chuck Norris and RMS got some skills, but Tiesto – he performs even in those undefined places of NULL pointers.

Metaphysical respect.

Core Python Programming

I CONSIDER MYSELF at beginner level on Python programming. I’ve played with Python before at a very basic level, but my experience is, that to really learn a programming language, you have to get a book written by a writer that knows the language well. Looking around the world wide web, the Core Python Programming (2nd edition) by Wesley J. Chun came highly recommended from various Python and book review sites – so I bought it.

The book covers a lot of things. Starting with a chapter giving a quick Python tour with a page or so introduction to most aspects of the language. It then moves on to the type system, file handling, conditionals, error handling, functions and classes. Finally more advanced things as regular expressions, networking and web programming is covered.

From the above, and from its contents table, it looks like a neatly structured book, but in reality all chapters have a little of everything tossed in.

The book is presented as a book for the technical person already familiar with programming and/or students. This book tries to ride two horses at once. Many things are explained for the absolute beginner in painstakingly long stories, however the incoherent chronology of the book demands programming knowledge and is just flawed from a beginners point of view. Furthermore, a mistake constantly made in this book is the use of explaining things or showing examples with topics not covered yet. Two examples could be introducing list comprehensions and generator expression by using lambda’s and yield examples. Lambda’s and yield statements however aren’t treated until chapters later and no explanations or forward references are given. Trying to grasp Python from self studying a book, then explaining new stuff with other new non-explained stuff is just plain stupid.

Another frustrating thing of structure in this book, is how topics are scattered though out the book. A dedicated chapter exists for all topics, but it is often quite shallow. Tragedy is that almost exclusively the index only lists the dedicated chapter pages. After quite some reading in the book I had doubts whether Python supported function/method overloading. Given the dynamic type nature of Python, I would expect not – unless different amount of arguments could differentiate definitions. In the index “overloading” only exists in parentheses along side “overriding” and none of the pages listed there gives a direct answer. Reading the book cover to cover, the first direct answer I found was a tiny sentence at page 412 “Because overloading is not a feature …” in the chapter “Return Values and Function Types”. An obvious place to put such information – if you live in Bizarro World! The statement is repeated a couple of times, along with a note the functionality can be achieved by introspecting the types. For a book constantly comparing Python to C++ and Java, I find it quite a shortcoming that no example of this is given at any point.

The second time around its actually better, cos then your not absorbing introductions to new stuff, but rather exploring things, and in that situation it can sometimes be beneficiary, memory and/or inspiration wise, that other topics are tossed in the mix. What might tick you off though, if using the book more for referencing, are the suspicious lacks in some summary tables. Example: A table of special class attributes are given in chapter “Special Class Attributes” at page 524. At page 595 in a chapter “Advanced Features of New-Style Classes (Python 2.2+)” one discovers that several other special class attributes and methods were added when Python 2.2 was released back in December 2001. This renders the table at page 524 incomplete (and somewhat useless) just because the author hasn’t escaped from the past yet. The crappy index of course only lists page 524 for class attributes.

Finally, I use color markings a lot (but wisely) when reading technical books. Efficient color marking is not easy in this book. First of all, the prime sentences and points made are not clear cut and to the point, but often bloated with filler text (the book suffers badly from the well known “American book syndrome” of using many many words to tell almost nothing). Secondly the paper is very transparent. It’s not particular thin paper – just highly transparent? Yellow marking is fairly visible on the backside of the marked page – and forget about using other colors. I would have preferred the publisher had cut 10% of the [filler] words and printed the book on less transparent paper.

From the above (rant?) its obvious that I don’t like the way the book is structured. But its not all bad. Especially there are some excellent diagrams and charts in the book that give good overview and understanding; and in fairness, I did gain Python knowledge from it. It covers nearly all aspects of Python, and on completion you have a solid base for Python programming. A word of advice though if planning on using this book for self studying. If your a beginner to Python buy another book, read online tutorials, or even ask your grandmother – just don’t buy this book! If your intermediate or advanced do the same – your money would be wasted.

Rating: ★☆☆☆☆

Why Lambda?

I HAVE BEEN reading up on Python programming lately (more on that in a later post). I’ve now been introduced to anonymous functions. In Python, anonymous functions are available using the lambda keyword. Anonymous functions are great, but I think the Lua syntax for anonymous functions is superior to the syntax adopted in Python.

A normal function, in Python, is defined using the def keyword along with a function name.

>>> def f1(x, y):
...     return x + y
>>> f1(1, 2)

In Python anonymous functions are created by a lambda expression.

>>> f2 = lambda x, y: x + y
>>> f2(1, 2)

Similar to anonymous function, normal Python functions are first class objects and can be assigned to other variables.

>>> f = f1
>>> f(1, 2)

However direct assignment of a function deceleration is not possible.

>>> f = def f3(x, y):
  File "<stdin>", line 1
    f = def f3(x, y):
SyntaxError: invalid syntax

This last example resembles the concept of the anonymous function syntax chosen in Lua. First a look on how a normal function is defined in Lua. Its not that different from the Python version.

> function f1(x, y)
>>   return x + y
>> end
> print( f1(1, 2) )

Like in Python, functions are first class objects in Lua and thus also supports aliasing functions.

> f = f1
> print( f(1, 2) )

The syntax for anonymous function in Lua differs not much for how normal functions are defined. The function name is omitted (hence anonymous) and secondly the function definition is wrapped in parentheses.

> f2 = (function(x, y)
>>   return x + y 
>> end)
> print( f2(1, 2) )
> -- Or as one-liner if preferred
> f2 = (function(x, y) return x + y end)
> print( f2(1, 2) )

In Lua a function is a function and defined as such – being anonymous or not. I think this approach is more elegant that using a dedicated lambda keyword.

2008 Formula 1 Season Started

THE 2008 F1 season finally started with the opening race in Australia. Given the new significant ruleset restrictions like mandatory gearbox reuse and no traction control, the progress of the first race was anybody guess.

With only six cars finishing, the race might not give the best grounds for comparing the strength of the teams. An “easy” win for Hamilton and fifth place for Kovalainen indicates that McLaren-Mercedes are very fast again this year, whilst Ferrari have serious endurability problems. BMW-Sauber was a close third team last year, and they seem to have progressed further. I am confident they will take a win this season. Renault disappoints in performance which resulted in bad qualifyings, but Alonso made the most of what was available. Christian Vettel in the Toro Rosso and Nico Rosberg in William-Toyota both preformed spectacularly. The biggest surprise was perhaps the competitiveness of Barrichello in the Honda. If they hadn’t made two stupid mistakes of pitting while the pits was closed, and Barrichello leaving pit on a red light, the resulting sixth place might as well have been a podium position.

A non-sport observation was the (much needed) updates in the realtime information graphics. FIA realtime information graphics has slowly been progressing the last couple of years and finally they realized that e.g. a vertical scrolling information bar is an effective and nonintrusive way of continuously giving position and time updates. Anyone thats seen Formula 1 on Speed TV would known, that the official FIA graphics compared to the Speed TV graphics was like comparing caveman drawings to Pixar renderings.

OpenSuse Network Configuration Problems

YAST MAY BE a powerful tool, but sometimes Suse and OpenSuse still manage to screw up their configuration so not even Yast can rectified the situation. We use Suse and OpenSuse at work, and twice I’ve experienced that the network configuration cannot recover from a netcard being changed. During boot an error message “eth0 renamed to eth2” would show, followed by another error message (after a looong timeout) “no configuration found for eth2” and afterwards DHCP would fail. After booting I would have to run ifup-dhcp eth2 to get network up and running.

Okay. The situation is amendable and requires only two setup modifications (hacks). First an easy edit in the udev network rules, to fix that the one and only netcard was being named eth2 and not eth0.

The netcard MAC-addresses and names are associated in the udev network persistent name rule-file. /etc/udev/rules.d/30-net_persistent_names.rules

SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:0c:29:14:e6:1b", IMPORT="/lib/udev/rename_netiface %k eth0"
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:0c:29:e9:d1:b6", IMPORT="/lib/udev/rename_netiface %k eth1"
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:0c:29:32:11:fd", IMPORT="/lib/udev/rename_netiface %k eth2"

This file contained some mappings not belonging to any netcards in my current system. Ensuring that the MAC-address mached the eth2 entry, I renamed the entry and deleted the other two.

SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:0c:29:32:11:fd", IMPORT="/lib/udev/rename_netiface %k eth0"

If booting after this modification, the first error message would vanish and, as remapping now is no longer enforced, the second would now be “no configuration found for eth0“.

The missing configuration can be fixed in Yast by creating a new ethernet device called ifcfg-eth0, or as I did, by just soft-linking the existing network configuration to that name.

# ln -s /etc/sysconfig/network/ifcfg-eth-bus-pci-0000\\:02\\:00.0 

Yehaa. Network errors be gone, and automatic DHCP now working :-).

I’ve experienced this problem on Suse 10.0 on a fresh install where I changed a VMware virtual netcard from the computers build-in netcard to a secondary USB netcard. At that time I didn’t want to spend to much time on it and just reinstalled. We’d just upgraded to OpenSuse 10.2 and I was handed a copy of a colleagues VMware image. As his netcard did not have the same properties as mine (i.e. MAC-address) I was hurled into the same problems once again.

Warlords II, Flashback and Abuse Revisited

THE TITLE FOR this post could almost as well have been “Warlords II, Flashback, Abuse and How I Spent My Youth“. Well, perhaps not really; I did play a lot of other games too :-D. When I think of great games I played in my long “carrier” of PC days, those three games I’ve always categorized as games with exceptional gameplay and a spellbinding atmosphere. No matter how horrible the graphics may look today, these properties was what kept you playing hours upon hours.

Warlords II

When it comes to Warlords II, me and my friend Michael Rasmussen that lived a couple of houses down the street, used to battle in this game for an almost infinite amount of hours – and before that, we played Warlords I for almost as many hours. Actually when hearing the hours being clocked by people playing WoW it reminds me of myself playing Warlords. I guess its the same magic.

Warlords II is reincarnated in an free open source clone LordsAWar. This project builds on the C++ implementation of FreeLords ( FreeLords it self, seems to have spawned as a Java implementation instead). LordsAWar is a multi platform game and can also be fetched from the Debian repository.

LordAWar Ingame Shot


What Flashback have in gameplay and story it also had in graphics and jaw-dropping animation sequences.


Presented in a dystopian theme, it were almost something like a “Indiana Jones meets Blade Runner” feeling of the game.


Flashback is released for Amiga and DOS platforms, but some talented fans have written the game engine REminiscence as a multi platform replacement for the original game engine. Supplying the game data files, downloadable from Abandonia, and compiling REminiscence is that enough revisit Flashback ;-) on a Linux box. A later extended CD-ROM version of Flashback is also available on Abandonia. Old reviews can be read on the Amiga Magazine Rack.


Abuse is also abandonware and is available from Abandonia, but also exist in a free open source edition called Abuse-SDL. Like Flashback, Abuse is a dystopian game where one guy must escape from prison where all his cell mates has become monster due to experiments gone wrong.


Abuse is both a horizontal-scrolling and vertical-scrolling platform game. The controlling of the main character is somewhat unusual for a platform game, as the keyboard moves the character and the mouse controls the gun aiming. A review is available on the Amiga Magazine Rack.

Well… time for some more gaming. How needs sleep anyway?

Peter Falk – Just One More Thing

PETER FALK IS one of my favorite actors, especially in the character of genius detective, Lieutenant Columbo.

Peter Falk Book Cover

The book Just One More Thing – Stories From My Life is the self biography of Peter Falk. It is wonderfully is written in an easy readable and informal language that is sprinkled with a lot of humor. Many photos from Peters career and life accompany the his funny anecdotes and many people he have met. Peter is a proficient artist and the book also contains prints of some painting and drawings made by Peter himself.

The book journeys from his school time to failed jobs and on to his long and active acting career. Several stories involve his glass eye that affected his in issues like war time servings and problems with getting acting gigs. What the book reflect is that Peter has lived an interesting life and that he has many many stories to tell. At the first pages he reveals that he like storytelling which is also why the book is made from many stories and anecdotes. That formula gives for interesting reading and the book gives good insight in the person, personality and rich life of Peter Falk. The book is definitely highly recommendable for fans of Peter Falk and/or the Columbo character. The Columbo character is covered in a chapter and is a great reading with many funny incidents an behind the scene informations.

A book description can be read at Amazon

Rating: ★★★★☆

Copyright © All Rights Reserved · Green Hope Theme by Sivan & schiy · Proudly powered by WordPress