Everything Tastes Better With Chilli

Well, it does. 

Phd Comics; in which I need to get a life

 In a previous life I did the postgrad thing (for a lot longer than I want to talk about), and fortunately during that time I did not discover PhD Comics.  They're just a little close to home!  Now of course they're hilarious, although the wounds were still a little raw even a year or two after finishing...

On a whim this weekend I decided to catch up on the entire archives, and start from the beginning (there are over 1300, at time of writing).  I deluded myself that I would do this in 10-strip segments, whenever I felt like a break or whatever.  Unfortunately I quickly got irritated with the mouse clicking and waiting for the page to load, and figured it would be easier if I made it keyboard navigable (this is the "in which I need a life" bit, not the reading of the entire archive!)
Attempt one was a simple greasemonkey script (although I'm actually using chrome, which can run greasemonkey scripts as extensions these days, with a few restrictions):
So, now you can navigate back and forwards using the arrow keys, or l or j for forwards, h or k for backwards if you prefer.  Success!
Well, not quite, because you still have to wait for the entire page to load, and I am quite impatient.  Thus, the current approach is a bookmarklet: open just the image of the current comic (right click -> open image in new tab, or whatever), then click the bookmarklet to get the the next one.  Much more efficient.
Here is the bookmarklet: Next Comic.  Drag that to your bookmarks bar and you're good to go.  Source for completeness is below; it's rather terse and ugly, and I'm feeling a bit dense --- I'm sure there's an easier way.  Anyway, it works, and we will never speak of this again.

Comments [0]

Ferntree / Zig-zag / Panorama / Shoobridge Tracks

Last Monday was a public holiday and I needed to get out of the house, but didn't have much planned. It was quite sunny and I decided to do a lengthy loop up on the mountain, which might not have been the best decision since there wasn't a lot of sun up there. There was hardly a breath of wind though so temperatures were still fine.

Very few photos posted, partly because I didn't take many, and mainly because all the ones I did take were pretty ordinary.

The loop starts in Ferntree and climbs straight up to the summit, via the Middle and Radford tracks to the Springs then up the Zig-zag track. There was remnants of snow from around the 700m mark from memory, and it became very icy and slippery for the last few hundred (vertical) metres. From the summit it descends via the Panorama track, which is really just a short-cut across a bend of the Pinnacle road, and was alternately quite pleasant, snowy, and occasionally like walking along a creek. From there you need to walk along the road for a while, before descending further down Hunters track to junction cabin, then take Shoobridge track. This passes the Octopus tree (an old eucalyptus tree with its roots growing over a large boulder), then an adjoining track which passes O'Grady's falls. Shortly after here I took a wrong turn and wound up on Huon road, rather than crossing Pinnacle road again via more tracks back to Ferntree, but rather than backtracking I just walked the last few km along the road.

Complete track.

         
Click here to download:
Ferntree_Zig-zag_Panorama_Shoo.zip (2244 KB)

Comments [0]

Smith's Monument

This is a slightly belated post; the pictures actually date back over a month ago!

Last time I mentioned walking up the ice-house track but having to turn back instead of continuing on to Smith's Monument. The other approach to Smith's Monument starts from the summit (the same place the zig-zag track exits), and that's the route these photos are from. I also mentioned last time that while the weather then was quite pleasant and still the vegetation hinted at a much more tortuous climate -- and that's what it was like this time, although (unfortunately) the photos don't really capture it. It was bitterly cold, with an alpine wind just ripping through. Most of the walk is over and to the back of the summit, and is very exposed.

I have to admit, I didn't actually know before-hand what the monument actually was! As it turns out, Smith was a respected doctor in the 1950s who died of exposure, and the monument is a plaque (covered with a canvas bag for protection against the elements) where his body was found.

Linking up with other walks, you can also see Cathedral Rock in the 5th-last photo (before the panorama).

Track, for the curious (includes a detour to the Icehouse again).

                         
Click here to download:
Smiths_Monument.zip (3954 KB)

Comments [0]

Memoisation in Emacs Lisp

Memoisation in lisp has a nice implementation; see for example section 9.1 in Norvig's Paradigms of Artificial Intelligence Programming. The idea is of course the same: maintain some data structure such as a hash-table for caching along-side your function, then for each invocation check if an entry already exists in the cache and if so return it, else calculate the result as normal then cache it using the argument(s) as a key before returning. This is particularly useful for functions with a recursive definition, and indeed the poster child is again the fibonacci function, which has a natural definition but horrid run-time:

What makes the lisp implementation particularly attractive is the ability to manipulate the symbol so that you don't need to write your function in any special way, and the memoisation can be added on transparently. For some reason however I haven't found a general implementation of this for emacs lisp (read: googling "elisp memoisation" didn't return much, even after changing it to "memoization" -- surprisingly it didn't prompt me for that spelling change either). Inspired by this comment by Randall Schwartz I decided to try using advice instead of a straight-up port of the symbol-function manipulation that Norvig uses.

The basic idea is we want add some "around" advice, like so:

(Note that you don't return a value, but manipulate "ad-return-value" if you want to set the return value yourself).


The hash table will be stored as a property on the function's symbol, and the advice name is also trivially generated:

Now the original advice can be written generically as a macro:

We can also write a couple of utilities to reset the cache or remove the memoisation entirely:

(Trap for beginners, or at least the sleepy: note that you need to call ad-update to make the changes to advice actually take effect!)

This will only work for functions of one argument.  You can use it like so:

Filed under  //   emacs  

Comments [0]

Icehouse Track

I was planning on working today, but the weather was unexpectedly nice so I had to get out! At the last minute I decided on the icehouse track on Mt Wellington, which I hadn't been on since high school.

The track is a bit damp going up, then the vegetation thins out as you pass through a few boulder fields. Near the peak is another boulder field with views over the river, next to the ruins of one of the icehouses that give the track its name (in the early days of the city, snow was packed in these pits to form ice, which was then carted back down to the city).

I kept going up to the plateau, past another boulder field overlooking the city, and unfortunately at this stage I had to turn back while it was still light, since I only started around late afternoon. It was almost magical up there though; twilight approaching and very still, but the tortured trees revealing how brutal it can be! I didn't get to Smith's Monument, but there's an alternative track to it from the pinnacle that I might try some time (it was at the junction of that track that I turned around).

The GPS track misses the start and end points, but you get the general idea. The zig-zag track that I've posted about before starts at the same point then takes the right fork (technically, the left fork is Milles Track, with the icehouse track departing off that).

                       
Click here to download:
Icehouse_Track.zip (4526 KB)

Comments [0]

Linux: still free if your time is worth nothing

At work I use a Dell laptop running Ubuntu, and which for the most part has painless and certainly better than the alternative (modulo the fun of using an alternative OS in a windows enterprise environment).  A couple of months ago however, after an update, I finally restarted -- and realised that my network was no longer working.  We eventually realised that the ethernet interface had the wrong MAC address, which was odd because dmesg confirmed the kernel picking up the correct one, but ifconfig showed that eth0 and eth1 (the wireless card) had the same hardware address.  At any rate, using ifconfig to change it back to the correct value fixed things and away I went (note: this is actually because IPs where I work are assigned to registered MAC addresses; at home the wrong address was cheerily assigned an IP and worked fine).  Unfortunately, the problem was 100% repeatable: every time on reboot the wrong MAC was assigned and the network was useless.

I suspected network-manager, but replacing it with wicd made no difference.  I suspected udev, but it was picking up the correct addresses too.

I later noticed that wireless was also no longer functioning correctly: I could see all the available networks, but not connect to any of them.  I didn't initially correlate the two problems.

Eventually I noticed that the wireless card wasn't getting the right address either, and again changing this back to the correct one fixed things.  At this point on a hunch I searched for the bogus MAC (AA:00:04:00:0A:04) I was seeing... and it turns out to be a fairly common problem, for example http://ubuntuforums.org/showthread.php?t=465872 and http://ubuntuforums.org/showthread.php?t=1268372 (although none offer a solution).  I did however find this post: http://blog.robertlee.name/2009/01/unicornscan-on-ubunto-some-updated.html

And that, believe it or not, fixed things: yes, remove libdnet (DECnet support) and suddenly I once more have two functioning network interfaces without requiring manual interference.  What?  (and why did I even have DECnet in the first place?)  I can honestly say I would not have tracked that down myself, and I still don't understand why -- but at this point I'm just happy it works and hoping it doesn't come back.

Comments [0]

Cape Raul and Shipstern's Bluff

Amazing walk with perfect weather over Easter weekend. Cape Raul is near Port Arthur if you need orienting.

The main track forms a bit of a T-junction, with the right arm going down to Shipstern's Bluff (the famous "shippies" big wave break, although there wasn't much happening on the day). You can see the bluff just right of middle in the panorama.

The left arm leads to Cape Raul, with some of the most spectacular coastline you will see anywhere in the world. There's two main vantage points at the end of the walk. The first can be seen looking down onto some columns rising up out of the water; the enormity of what you're actually looking at though is evident in the second vantage point, where you can see that it's actually just the tip of a massive jagged wall. For a sense of scale, there's 3 people at the top (occupying the first lookout I mentioned) in the penultimate picture!

There's a resident seal colony at the base too, difficult to make out with the naked eye but the camera's software zoom managed to pick them up.

The GPS track isn't really worth sharing.

                     
Click here to download:
Cape_Raul_and_Shipsterns_Bluff.zip (3360 KB)

Comments [0]

Thark Ridge: In Search of the Devil's Throne

Another walk around Mt Wellington, this time along Thark Ridge. The plan was to go to Devil's Throne, but as it was I couldn't follow the directions too well (the track was pretty sparse; apparently there was a turn-off somewhere but I think I must have missed it). Looking at how far I got I think I must have past it without realising! I did get to quite a nice lookout at the end though, with nice views to one side of Cathedral Rock and Montague Thumbs.

Track here, if you can figure out where I went better than I did.

               
Click here to download:
Thark_Ridge_In_Search_of_the_D.zip (2342 KB)

Comments [0]

Lost World

Another belated bush-walking post, sorry -- these are from a couple of weeks ago. I did a circuit up on the mountain, and it was late afternoon so the light unfortunately isn't that great. The first path is so flat and well-maintained it could almost be paved; about 15 minutes along that you get to Sphinx rock, which has a pretty nice lookout from the organ pipes and over the city (first panorama). After that you pass a couple of stone huts, before reaching a third where a number of paths meet: Junction Cabin. I took the Lenah Valley fire trail from there, before getting onto the Old Hobartians' track which climbs up through some nice forest and a few sandstone over-hangs. At the peak of that trail there's a detour up to Lost World, which was the main objective of this walk. The ascent involves mostly clambering over some pretty big boulders, before you suddenly crest and can see all of the "lost world" at once -- it's a pretty breath-taking sight. Unfortunately as I said the light wasn't great and the photos really don't do justice to the scale of the place, but it's a huge ampitheatre-type area with some imposing cliffs slightly wrapped around a field of enormous boulders. Again, it's hard to get a feel for the size of things from the pictures, except maybe to note the trees growing up between the rocks! I took a panorama of the city (which didn't come out to well because of the light), but in the right you can just make out the two TV towers on top of Mount Wellington, to help situate things. The return trip was along the base of the Organ Pipes again, from where I got a reasonable panorama of the city. Great trip, sorry about the quality of the pictures. Speaking of quality: no GPS track this time, because although I was supposedly recording one, the results can only be described as "ass-tacular". Apparently I was teleporting a lot.

(I believe there's a nice short and easy walk to Lost World that approaches from the other side instead, but where's the fun in that!)

                                   
Click here to download:
Lost_World.zip (7097 KB)

Comments [1]

Tarn Shelf (this time, all the way around)

Another shot at Tarn shelf, and this time the full loop. It really is some of the most stunning alpine country you will see; I'll the let the photos tell the story.

You can find the GPS track here.

                               
Click here to download:
Tarn_Shelf_this_time_all_the_w.zip (6266 KB)

Comments [1]