April 3rd, 2008 · personal
My email signature is the following:
Danie Roux *shuffle* Adore Unix
Every now and again someone figures out what I am trying to depict and they shake their heads in complete disbelieve:
- People who know me, know I am a Linux fan. In general, a Unix fan.
- Some would in fact say, I rather adore unix.
- Turns out, danie roux is an anagram for adore unix!
Here is how you too, can waste a lot of time:
On Ubuntu/Debian, install the application with:
aptitude install an
Execute it with:
an -m 5 yournamewithoutspaces
Decrease the 5 if you don’t get good results
Find more word lists here to play with.
Tags:adore·anagram·unix
July 11th, 2007 · general
Coding Horror saying what I’ve wanted to say for a while now.
To add to that:
Facebook allowed me to reconnect with some long lost friends. I’ve had some valuable conversations with these friends - on Facebook.
Those conversations are not a part of my normal email archive or flow.
I need my data to be my data.
Tags:advocacy·facebook·internet
June 26th, 2007 · general
So Google now allows us that make use of “Google Apps for your Domain” to use the Talk Gadget. Didn’t make my day, but it at least brighten up the time before coffee.
If you need the URL to get to your talk gadget for your domain, this is it:
http://hostedtalkgadget.google.com/a/yourdomain.com/talkgadget/client
Replace “yourdomain.com” with your domain. If you are one of those who thought that was obvious - yes, I would have thought so too. But trust me, you get some pretty literal people.
Now use this URL, and the trick described here to get Talk in your Firefox sidebar all day.
Big issues with the Talk Gadget:
- It does not connect all my buddies from other Jabber servers. Most notably the twitter IM bot.
- It does not connect my MSN transport. Which means I can not talk to my one MSN buddy. You can get more info about MSN transports at bigblueball.com.
So all in all, its useful in a pinch when nothing else is around. But I’ll stick to gajim and Psi for now 
Tags:apps·gadget·google·talk
April 7th, 2007 · general
Missinglink made a video of the talk I did at the 27-3 dinner.
This is the video. You can view the slides I used online.
Big thanks to Dave Duarte for making the show notes I probably should have!
Update: The video should be available again.
Tags:27dinner·presentation·video
March 14th, 2007 · general
Or so I believe, with the introduction of QWAQ forums.
I was going to do a talk about something pompous like “why is collaboration not a pervasive part of computing” at the next Jozi 27 Dinner. This would have let to an introduction to Croquet and why I believe it is the perfect platform to make this happen.
Well, it has happened. A good summary that will (hopefully) make you feel as warm and fuzzy as I feel now can be found on Dr. Bert Freudenberg’s blog.
Go sign up for the Jozi 27 Dinner and come throw stuff at me if you disagree.
On a personal note, I got married this past Saturday. We were on honeymoon, but we are taking a 3 day break to attend full day lectures. We’ll resume the honeymoon this Saturday and I’ll be offline for 10 days.
Tags:27dinner·collaboration·croquet·jozi·qwaq
February 11th, 2007 · general
For the benefit of anyone getting a “java.lang.Exception: Input not an X.509 certificate” when trying to import a signed certificate using keytool:
I was trying to import the certificate that Thawte signed for me into the Java based keystore. Currently my best guess is that keytool was written by an intern with way not enough coffee in his/her body. This is what I did first:
keytool -import -keystore keystore.production -storepass pinky -file thawte.crt
The error returned to me was:
keytool error: java.lang.Exception: Input not an X.509 certificate
Right. I know its not. So what?
This error message wasted a possible precious 20 minutes of my life. To save someone some time, it turns out I forgot to specify the key alias! Very obvious from the exception, I know. This is correct:
keytool -import -keystore keystore.production -storepass pinky -file thawte.crt -alias key-alias-in-store
Tags:certificate·java·keytool·ssl
February 10th, 2007 · general
Quick post:
Use
strace -e trace=network
to quickly figure out where a process is connecting to.
This traps only system calls that the process makes regarding networking. Very useful to make sure that your process believes the same things about servers and ports that you do.
(Turns out the process needed to be told that 443 is not 8443)
Tags:linux·networking·strace
February 4th, 2007 · general
PhotoRec can recover your deleted photos from your digital camera or memory card.
All memory cards1 use the FAT32 file system from Microsoft. This filesystem does not physically delete files, but just marks them as deleted.
I needed to a tool to quickly let me recover or undelete all those photos. An “apt-cache search dos recovery” in Ubuntu yielded this beauty:
TestDisk
It contains a utility called PhotoRec which scans any device for any filetypes that you specify.
TestDisk also performs some more serious recovery functions, so bookmark it for a rainy day.
1 As far as I know?
Tags:camera·digital·fat32·recovery·testdisk
January 16th, 2007 · general
I have been slowly adding my books to LibraryThing. I quite like it and I’m hoping that it will help me discover some new books and authors. Based on what I own, LibraryThing makes suggestions of other books I might like.
But LibraryThing has another, unusual, feature which they call UnSuggester:
“Unsuggester takes ‘people who like this also like that’ and turns it on its head. It analyzes the nine million books LibraryThing members have recorded as owned or read, and comes back with books least likely to share a library with the book you suggest.”
This does not work so well. My current “unsuggestions” includes this one:

Now, Wuthering Heights is one of my favourite novels of all times. I own it, and I own most of the Bronte sisters’ books. But I also have ANSI Common Lisp on my Amazon Wishlist.
With suggestions you can easily find the cluster of books someone is interested in and extrapolate to related ones.
But in this case, there are two clusters (books on functional programming and classic English literature) and I own books in both. You can not assume that people only belong to only one cluster at a time. The opposite of Lisp1 is not Wuthering Heights.
All said, Its an entertaining feature, Unsuggester. The unsuggestions of both ANSI Common Lisp and Wuthering Heights reminded me of a few books I still need to read.
1 It might be Java 
Tags:assumptions·clusters·librarything·opposites
January 1st, 2007 · general
Update: Incorporated changes by Adam Turoff.
I played with Haskell FFI today. It was mostly straight forward, but to save someone some time I present you with the simplest example of calling into a C library you wrote. You can download the whole working tarball from here.
Most languages provide some FFI to bridge to allow you to call at least C libraries. Some languages, like Ruby and Python1, have very elaborate hooks into C, because they themselves are written in C.
Haskell is written in Haskell (strange enough) and does not require that your C library knows anything about Haskell. You write the library and expose it as one. In Haskell you can then do a “foreign import” and have that function available for use in Haskell code. The definitive reference for all of this is: The Haskell 98 Foreign Function Interface 1.0.
We will be calling this C function:
void buzz(int array_length, int array[]);
The Haskell code that imports this function is the following:
foreign import ccall "buzzlib.h buzz" my_buzz :: Int -> Ptr (Int) -> IO ()
The only extension that needed to made to the Haskell standard was the introduction of the word “foreign” in the above statement. Broken down, this import statement does the following:
- buzzlib.h is where the function is declared and buzz is what the function is called.
- We then import it into our world as my_buzz
- “Int” is the first argument (array_length) and “Ptr (Int)” refers to a pointer to an array of integers.
let second_argument_to_buzz = [ 1, 2, 3, 4, 5 ] :: [Int]
first_argument_to_buzz = length second_argument_to_buzz
ptr <- newArray second_argument_to_buzz
The first two lines declare the values that we will be passing to the external function. Then we marshall the list “second_argument_to_buzz” into something we can pass to the C function.
newArray allocates enough memory for values, and then “pokes” the contents of the “second_argument_to_buzz” list into that area of memory and returns a pointer.
We are now ready to finally call our function:
my_buzz first_argument_to_buzz ptr
free ptr
We can pass the first value as is, because it is a primitive value. The second value we had to first marshall as we have done in the previous snippet of code and we now have to send the pointer to the external library.
We then have to free that block of memory once we are done with it.
Update:
Adam Turoff simplified this a lot, unfortunately I lost the comments to this article. The simplified version of the call is:
withArray second_argument_to_buzz_function (my_buzz first_argument_to_buzz_function)
The only remaining question is how to actually compile all of this. For that, have a look at the Makefile in the archive.
1 I prefer Ruby’s FFI over Python’s. Granted, I last did a C library for Python in the 1.6 days.
Tags:ffi·ghc·haskell·programming languages·simple