08:02 Fri, 17 Feb 2012
Vim has support for a built-in thesaurus. However, it consumes a
lot of memory, which you may not want for a feature you do not use much, and its
auto-complete selection has issues. Here is how to set up an on-line thesaurus query that is light weight.
Summary
This is the first post of two about a light weight way to implement a thesaurus. It is
great for what I need, which is the occasional use of a thesaurus for writing text such
as this article. Once it is set up, you can forget about it and just use K
whenever you want to look up a word.
A nice bonus or synergy is that the website also returns a definition for the word, so
it functions as a simple dictionary as well.
The second post will deal with how to use Vim's built in syntax rule sets to provide
highlighting and nice colours.
There are two or three simple steps:
- a vim script that passes the cursor word to an external shell script.
- a shell script that looks up the word using an online thesaurus, then parses
[continued...]
10:00 Wed, 25 Jan 2012
A quick note to say I haven't been posting much because a) it is as hot as
hell, too hot to use my overheating laptop; and b) I've been involved in a
couple of projects that have been overheating my laptop, and I will post about them
soon.
11:33 Tue, 17 Jan 2012
I wanted to try out Tumblr to see how easy it was. Turns out it is pretty easy.
Actually, I'm (surprisingly, perhaps) pleased with how seamless the whole thing was.
Even from the limited number of posts so far, the tumblr blog gets more feedback, which
always gives an incentive to write more. I think that applies whether you are driven by
vanity or not.
I'm not sure whether I'll keep the tumblr blog going or not, nor how I am going to split
content between the two.
I usually blog in two distinct categories: general stuff which includes science, and
unix and programming stuff. For the time being, I guess I will just post to which blog
seems more suitable.
You can check out the tumblr blog
here.
09:18 Sat, 10 Dec 2011
How not to handle unsubscriptions from an email subscription
service. A newsletter wants to gather more personal details about me before it will let
me unsubscribe. It is a bad sales strategy.
I have been a subscriber to How Stuff
Works' email newsletter for years, almost since they started in the late '90s.
Recently they were bought out by Discovery Channel and, as a result, I have ended up on
Discovery Channel's email list.
Unsubscribe
I don't want that, so I went to the link they provide to change my subscription details.
Here is what I saw:
Login screen
[continued...]
11:22 Wed, 07 Dec 2011
I have been a Neal Stephenson fan for a while now, as you can see from my list of
books I have read. I read Anathem first in March 2011 and it completely blew me
away. Since then, I have been looking for more Stephenson in the local libraries and
bookshops.
The
Age has reprinted an interview from The New York Times with Stephenson
about his role in predicting the future of technology. Quite a good read if you don't
know much about him, and it is interesting to read that he dislikes the role of
forecaster that others have bestowed on him.
13:22 Tue, 06 Dec 2011
Last night the forecast thunderstorm arrived with rain, lightning and thunder. It is
not violent enough to call it a storm, rather it is one of those with periods of rain
and the odd lightning flash and rumbling of thunder. A typical late Spring
thunderstorm, even though technically we are in early Summer.
That rumbling kept up all night and is still going even now. It is quite reassuring in
an odd way, no sharp claps, just continuous background grumbling.
It brings to mind one of Terry Pratchett's marvellous metaphors from Equal Rites,
"The storm walked around the hills on legs of lightning, shouting and grumbling." It
was one of the first Pratchetts I had read and I remember thinking at the time what a
marvellous image it was.
11:11 Fri, 11 Nov 2011
Today, now, is a palindrome date. Just thought I'd note it for posterity.
(Go away pedants, we're having a little fun here.)
More seriously, I should note it also is Remembrance Day, a day where we remember our veterans.
15:42 Tue, 04 Oct 2011
One of the great things about the Internet is how you start off reading something and
end up jumping to another interesting article, then another, and so on.
The local newspaper is running a travel series about a guy travelling by train from London to
Sydney, which looked really interesting, so I jumped on
his blog to read it from start to finish. Well, sort of finish because he is still
going and plans to get to Perth in mid-November.
He mentions in one of his posts about Kazan and the amazing Kul
Sharif mosque. Here it is:
Simply beautiful. I know nothing more than
the wikipedia article, but the
images on google are amazing.
08:15 Sun, 25 Sep 2011
Being raised in Western Australia, I guess I was spoiled when it came to snorkelling or
diving. Perth has many reefs nearby, some of them accessible from shore and some of
them around local islands including
Garden Island and
Rottnest Island about 12 km off the coast.
I never thought too much about it, they were just there.
The local Perth reefs are limestone, not coral. It turns out that coral reefs near the
shore are very rare. Coral is sensitive to fresh water and as a result most reefs are
either some distance off shore where they are not affected by freshwater run-off that
you get from river outlets or are isolated atolls such as in the Pacific.
Fringing reefs
are much rarer because they can only exist where there is no run-off. W.A. is lucky in
having a couple of places like that, the most famous of which is Ningaloo
Reef, the world's biggest.
Another one was discovered in the Kimberley a couple of years ago.
[continued...]
18:47 Sun, 18 Sep 2011
IP v4 addresses are familiar as dotted quads. A spammer uses an
interesting feature of IP addressing to obfuscate his address. A look at the
various ways of specifying an IPv4 address.
I received a spam email yesterday that was phishing for some banking details. It
contained the usual "your account has been disabled, you need to reactivate it" spiel,
along with a link to click. When I hovered the cursor over the link, it displayed the
bank's URL. Or did it?

URL displayed when hovering over the link
A cursory glance shows the link's URL pointing to firstdirect.com. There is
some other stuff before the firstdirect.com, but I wonder if many people would
query it, especially since it appears to contain the quite-common www1 prefix.
If we look closely, however, we can see that the actual domain part of the URL is
95.11064393, which is followed by a directory of www1.firstdirect.com.
There is a "/" almost hidden between the two parts. It is quite easy to overlook, which is
[continued...]