Main contents



More Results

July 19th, 2009

Canada Day 5k results here:

http://www.events.runningroom.com/site/?raceId=4396&eventId=15086&vrindex=4

Posted in Uncategorized | No Comments »

The Season So Far.

July 9th, 2009

Well, I guess the summer running season has been here for a while, I could mention my progress.

So far the lesson seems to be that Triathlon training is better preparation for running than for Triathlon itself.  I came 95th in the Muskoka sprint triathlon, 4th overall (and 1st in the men’s category) in the Barrie Rotary Club fun run, and 5th in the Canada Day 5k.  Some of my results are here.

The girls competed in their first kids triathlon, and did great!
Should post some pictures too, I guess.

Posted in Uncategorized | No Comments »

More triathlon gear

April 22nd, 2009

Bought a pair of Zoot running flats and a pair of tri-shorts down at Running Free this afternoon.  Haven’t had a chance to try them out yet, but the rain should stop by tomorrow.  I’m quite pleased with where my run and swim have got to over the winter – still lots of work to do getting used to a time-trial bike, but that’s coming along too.Getting to the point in the season where I need to start working on speed as well as endurance, so I’ve been adding in 50m sprints at the pool, and shuttle runs down at the local park during my 5k runs.

Posted in Uncategorized | No Comments »

More thin-client goodness

April 22nd, 2009

I have an old laptop with a broken screen that’s not good for much, but with Ubuntu installed and stuffed in the back of a closet works fine as a server.  With SSH now on my netbook I can work directly on the server, shifting the CPU-intensive heavy lifting away from a machine that relies on batteries.  Once I’ve configured a tunnel through my firewall I’ll be able to work remotely on this server from anywhere.

Posted in Uncategorized | No Comments »

Installing SSH on Aspire One

April 21st, 2009

Learning more about my new toy. Here’s the command for installing ssh:

> sudo yum install openssh-clients

One step close to the ideal thin client!

Posted in Uncategorized | 1 Comment »

Entering the Cloud

April 20th, 2009

Now I’m using a netbook with only a few Gb of storage available, I expect I’ll start transitioning to using more web services where possible. What with google apps, wordpress, yahoo mail, facebook and so on, a lot of functionality has shifted from the desktop to the cloud.

Posted in Uncategorized | 1 Comment »

Aspire One

April 20th, 2009

Writing this on my new Aspire One that my beloved wife bought me today. It’s the 6-cell version, supposed to provide 7 hours of battery life. Have to see how that stacks up to reality. The Linux interface seems to work fine, especially once you learn how to get under the hood to the terminal – apparently the UI is a variant of Xfce. Had to poke around for a while to get the keyboard configured with a Dvorak layout, which in the end involved modifying xorg.conf.

Heather bought this for me partly to encourage me to write more, so watch out for an increased posting frequency.

Posted in Uncategorized | 2 Comments »

Python with COM

February 5th, 2009

The Win32 extensions for Python have been a lifesaver for me many times.  I consider them one of the best ways of scripting the windows platform.  Unfortunately there’s not as much documentation as one could hope for.

A useful trick I discovered recently is the following.  Say you’re trying to use a COM interface such as Microsoft Message Queuing.  You can create a message queue object as follows:

import win32com, win32com.client
serverInfo = win32com.client.Dispatch("MSMQ.MSMQQueueInfo")

However, the next step requires constants from the messaging API such as MQ_SEND_ACCESS.  These can be made available to win32com.client.constants in two ways.  One involves running makepy, but a more robust alternative is as follows:

import win32com, win32com.client
win32com.client.gencache.EnsureDispatch("MSMQ.MSMQQueueInfo")
win32com.client.gencache.EnsureDispatch("MSMQ.MSMQMessage")
from win32com.client import constants
serverInfo = Dispatch("MSMQ.MSMQQueueInfo")
serverInfo.FormatName = <format name>
return serverInfo.Open(constants.MQ_SEND_ACCESS, constants.MQ_DENY_NONE)

The order is important.  Once EnsureDispatch has been called, win32com.client.constants can be imported and will have the correct values available.

Posted in Programming, python | 1 Comment »

Lua

July 6th, 2008

Spent some time exploring Lua.  This language has caught my interest, not least because Lightroom is largely implemented in it.  I’ve played around with it briefly before on Linux, and I have to admit that the experience of getting it up and running is much less painful on Ubuntu than on Windows.  $ apt-get install lua is much faster than downloading tarballs, creating visual studio solutions from scratch, mucking around with paths and dependencies and resolving any number of LNK2005 errors.  But I got there in the end.  Specifically, I

  • Downloaded the Lua source from Lua.org.
  • Created a Visual Studio DLL project containing all the source files apart from lua.c and luac.c
  • Built this DLL to create lua.dll
  • Created another project with just lua.c, and linked to the above DLL
  • Built this project to create lua.exe. Now I’ve got a lua environment.
  • Downloaded the luabind source from Rasterbar Software. This seems to be based on the powerful Boost.Python library, which I’ve had a lot of success with in the past.
  • Created another Visual Studio project for luabind, add the luabind source files and link with lua.dll.  Luabind does come with a bjam make file, but I usually find bjam a complete headache to use.
  • Created yet another project with the sample code from the luabind tutorial, built and linked against the luabind library and lua.dll

After all this, (and several hours of tweaking linker settings) I’ve now got the tutorials working to the extent that I can now do two things.  I can expose C++ functions into a Lua program, which is very handy, and something I’ve found very useful in Python.  But of course, the big draw to Lua is that it can be embedded in an existing C or C++ program!  So now I’ve also got to the point where I can contain a Lua interpreter within a C++ application, pass a string of Lua code to that interpreter to be executed, and even let provide the interpeter with the ability to call out to C++ functions elsewhere in the program.

So despite the the hoops I had to jump through, I think this could be a very powerful environment.  Now I just need to learn the Lua language itself, but as they say, if you can’t learn a new language in a weekend you shouldn’t call yourself a programmer.

Posted in Programming, c++, lua | No Comments »

Everyone else is doing it…

June 23rd, 2008

wordle.jpg

http://wordle.net/

Posted in Uncategorized | No Comments »