Mooi Loop, Sir Terry…

Sir Terry Pratchett has passed away1, and the world has thus lost one of it’s bright lights. A person who had managed to get more people to read than Enid Blyton or J.K. Rowling.

Maybe even combined…

Mooi Loop2, Sir Terry…

Terry Pratchett - Enemies

1: I kinda think Death will like to keep him around a while for conversation, though.
2: Afrikaans3 for “Go Well”.
3: My isiXhosa and isiZulu sucks, but that would have been “Hamba Kahle” in both of them…

Another Hero Goes to Rest

John Holbrook Vance (28 August 1916 – 26 May 2013) was one of the people that made my youth (not to mention the long years I spent in the military) not only bearable but, at times great fun…

Now, while I am aware that no-one lives forever, it does at times feel like the universe is conspiring to remove all of my childhood heroes from our little rock in the last couple of years. Either that, or I’m getting older than I have realised.

The late, great, Jack Vance will be greatly missed by many. So: so long Jack; and I really think that it is time for me to revisit Lyonesse.

Of fortunes and Macs and (Xscreen) savers…

Every so often I have the urge to do something quite unnatural; something like, for instance, actually updating the software on my Macbook…

Rather subversive, I know, but we all have our weaknesses.

One go the packages I make a habit of installing, and updating, is JWZ’s Mac build of Xscreensaver. The biggest down-side of doing that, though, is that, unlike in Linux, it doesn’t by default display quotes from the fortune files.

The ability do so is, of course, still very much there, but the Mac build does not have an easy way of enabling it.

Herewith, then, my workflow to get things back to “sanity” once I’ve upgraded.

Firstly, make sure that you have installed fortune from the ports (or any other way that takes your fancy):

eroux@smaug:~$ sudo port install fortune
--->  Fetching archive for fortune
--->  Fetching fortune
--->  Verifying checksum(s) for fortune
--->  Extracting fortune
--->  Applying patches to fortune
--->  Configuring fortune
--->  Building fortune
--->  Staging fortune into destroot
--->  Installing fortune @6.2.0-RELEASE_0+universal
--->  Activating fortune @6.2.0-RELEASE_0+universal
--->  Cleaning fortune

Once you can run fortune and get a result, you are ready to continue:

eroux@smaug:~$ fortune
I always had a repulsive need to be something more than human.
                                                -- David Bowie
eroux@smaug:~$ type fortune
fortune is hashed (/opt/local/bin/fortune)

Now you need the following patch, which we’ll use to convince Xscreensaver that we know what we’re doing:

--- xscreensaver-text.pre   2011-03-01 18:06:46.000000000 +0200
+++ xscreensaver-text       2011-03-01 18:07:05.000000000 +0200
@@ -247,6 +247,7 @@
   elsif ($text_mode eq '1') { $text_mode = 'literal'; }
   elsif ($text_mode eq '2') { $text_mode = 'file';    }
   elsif ($text_mode eq '3') { $text_mode = 'url';     }
+  elsif ($text_mode eq '4') { $text_mode = 'program'; }

   $v = get_cocoa_pref_1 ($id, "textLiteral");
   $text_literal = $v if defined ($v);

All we’re doing here is adding a program text mode to Xscreensaver, which we will then use via defaults to get fortune to run under its auspices.

Now we need to update all the files that actually could use some fortune:

for I in Apple2 FlipText FontGlide NoseGuy Phosphor StarWars XMatrix; do
    cd "/Library/Screen Savers/${I}.saver/Contents/Resources/" && 
        patch -p0 < ~/xscreensaver-text.patch && cd;

Now we get to test one of the screen savers. My favourite is one called Phosphor, so lets start with that:

defaults -currentHost write \
  org.jwz.xscreensaver.Phosphor \
  textProgram "/opt/local/bin/fortune";

This tells Phosphor which program to run, but not yet that it should actually use it. Let’s do that now, why don’t we?

defaults -currentHost write \
  org.jwz.xscreensaver.Phosphor \
  textMode 4;

Here you see us actually using the mode we defined in the patch, earlier. I had to change the scale of the fonts to get the display to fit on my screen, so if it’s too big or too small, you can change that from within the screensaver configuration window.

eroux@smaug:~$ defaults -currentHost read org.jwz.xscreensaver.Phosphor
    scale = 3;
    textMode = 4;
    textProgram = "/opt/local/bin/fortune";

All done… Now you just need to sit back and wait for your screen to lock… Or just press Ctrl-Shift-Eject if you’re too impatient, of course.

Some alternatives to consider: Since the fortune you run is the same program you would find on any Linux machine, you could use “/opt/local/bin/fortune -s” to get only the short quotes, if you wish, or even “/opt/local/bin/fortune -o” for some… other quotes.

Okay… Colour me impressed by Apple!

From TUAW via Cult of Mac comes the following:

Apple is offering free repairs to those with Macs and iOS devices who had their equipment damaged in the earthquake and tsunami that struck Japan back in March.

A guide[Link content now changed] on Apple’s Japanese website states the company is offering free repairs to Macs, Cinema Displays, iPhones, iPads, and iPod touches for people who live in the municipalities covered be the Disaster Relief Act of 2011.

For those affected, Apple will pick up and repair your equipment at no charge, then deliver it back to you once the repairs are complete. The company is also offering free access to the AppleCare Service & Support Line for those who can solve issues over the telephone.
Apple has been keen to help those in Japan who have been affected by the recent disasters: It has opened up its stores as ‘communication centers’ and allowed people to access the Internet to contact their loved ones through email, FaceTime and Skype. It has also offered donations from app proceeds and allowed customers to donate to the Red Cross through iTunes.

Maybe some lessons to be taken here by the rest of Tech…

When Lions Roared…

If you ever have the urge to reformat John Lions’ “A commentary on the Sixth Edition UNIX Operating System”, this patch might help you:

--- Lions.old/lionc.tex 1994-05-19 04:40:49.000000000 +0200
+++ 2011-04-07 15:38:14.000000000 +0200
@@ -1,7 +1,16 @@
 % The Lion's Commentary, file lionc.tex, version 1.3, 18 May 1994
+% Updated 07 April 2011 to generate PDF Bookmarks
+% and to fit LaTeX2e slightly better
+ pdfborder = {0 0 0},
+ pdftitle = {Commentary on 6ed UNIX OS},
+ pdfauthor = {John Lions}
 fonttwlrm = cmr10 scaled magstep1

% Set the page dimensions
@@ -38,7 +47,7 @@

% Set up the headings for the document

 rhead[{it UNIX 6th Edition Commentary}]{it leftmark}

If you have no idea what I’m talking about… Well, then, erm… Never mind… :-)

Idle Thougts

I have always wondered: should we consider caffeine to be a “performance enhancing drug” (which it most certainly is) or a “nutritional supplement” (since most of us would be “dead on our feet” without it)? These kinds of thoughts keep me up at night…

Promises Made…

Yes, yes… It’s all very cryptic and very melodramatic, indeed. I’m sure you’re all really impressed.

Though, spare a thought for those poor buggers reading this via the RSS feed to Facebook, and not on this blog. They’ll be even more in the dark…

But, to return the… <dramatic pause> promise.

Here’s the link to the Widgets I use to display my “Currently Reading” (as well as my “Previously Read” section) as well as the badges I display on the blog:

Do with them what you will…