More puzzling about where to plant things, and discovered that we had misjudged
our Itea ilicifolia. Based on the
photos, I had thought it would be about 1 metre high; in fact, two different pages,
from the UK and a catalogue from
Melbourne both state that it's 4 metres. They also appear to prefer part shade. A
good thing I checked that before planting it. Now we need to scratch our heads again.
Pulled out about 2 metres of irises, and Yvonne took them
over to Chris and, I suspect, planted them for her. Planted some of the new Iris graminea
(“plum tart iris”) in their place, along with
some Antirrhinum (snapdragon)
seedlings that I had planted far too thickly. Pulled them apart before planting; I'll see
how well they survive.
I've noted in the past severe performance issues running the Ashampoo photo optimizer, a Microsoft-based program,
with wine. They're clearly related to
the X interface: it's the X server that uses up all the time, sometimes as much as several
seconds just to select a box on the window. The problem just “went away” fairly
soon after I installed it—otherwise I probably would have given up—but it has
returned a few times recently. Today it took over a minute of X server CPU time for the
initial screen to complete building, and the remainder was just as slow. Just for the fun
of it, I shot down another resource hog, firefox, and the problem went away.
So what's the cause? My guess is that there's something internal to the X server which
becomes really inefficient when more than a certain number of some resource is in
use—but which resource?
Finally got round to calling up the Banksia Greenhouse Centre in Wantirna South
(03-9801-8070) about the greenhouse parts. Doreen told me that they're no longer available,
but there's a possibility that the parts for the newer greenhouses will fit. The bloke who
knows won't be there until Wednesday, so we'll have to wait until then.
Also called around about lawn mower repair, which proved to be more difficult than I
thought; only after the fourth call did I get hold of David Chestnut, 12 White Horse Road
(5330 3233), who like others wants to keep the thing until he's ready to work on it; it
seems that making appointments is too much trouble.
It seems that I misjudged the problems with the baby magpie. It was still in a tree, after
all, and it seems to have been fed by parents. So maybe it was really just near the nest,
and we never saw the nest itself. In any case, it's still alive and has been calling a
Today I saw a whole lot of magpies converging on the veggie patch. Went over, chased them
off—only one returned—and discovered that the baby magpie was in the potatoes,
Piccola was observing it, and the magpies were trying to chase her away:
While checking links, discovered a new firefox page,
advertising the new release 3.5. I hope it renders things better than 3.0.4 that I'm using
at the moment. Here's firefox rendering its own web pages:
It's quite possible that this is a firefox configuration problem, but it's certainly
not an obvious one.
Wine problems: shm related?
Discussing my problems with Ashampoo photo
optimizer and wine. Some people
suggested that it's related to one of the ugly sisters, shm. Took a look
with ipcs and found that yes, indeed, wine allocates quite a bit of memory,
about 7 MB (column SEGSZ):
Finally got round to taking the (ride-on) lawnmower in for servicing, which first involved
borrowing Chris' trailer. And that involved Chris getting the tractor out to remove the hay
which was still on it. Got back home and ran into the next problem: no proper ramps. We
had borrowed some half-high ramps, but they didn't quite do the job, and after a bit of
head-scratching managed to heave the thing onto the trailer.
Then there was the issue of the tie-down straps, which have a patent ratchet tightening
mechanism which always confuse me. Today was no exception, but we finally made it, and
brought the thing to David Chestnut in Cape Clear.
While in town, decided to so some other shopping, and off to a place in Hertford St. where
they sell statues. After some deliberation, bought a pagoda and a Buddha (I think), which
we ended up putting in the “Japanese Garden”:
Also stopped at Mountain Scenery and ordered some pine chip mulch, which they wanted to
deliver right away; had to get them to put it off an hour to make sure we would be home.
Then to Gays and bought some tomato plants. Yes, I have plenty of my own grown from seed,
but they still look so unhappy that I don't know if they'll make it. But why are the names
of the tomato breeds so strange? “Low Acid”, “Big Bang” (or some
such). That doesn't relate to any of the names I've seen, and I ended up buying the same
kinds that I have already sown: Cherry, “Rouge de Marmande” and Roma.
At Gays, also looked around the garden section, which they have renovated, but which still
lags way behind most of the competition. Did find a couple of interesting plants,
though—not to buy, but to notice. First was
the Pimelea ferruginea, of
which we have one. I had always thought it was some kind
of Hebe, but it seems it comes from
Back home, spent most of the afternoon in the garden, including taking delivery of the mulch
and planting the tomatoes, and also planting experimental plants in some small multi-opening
pots that Chris had given us. We're not quite sure what they're good for, so we planted
forget-me-nots, snapdragons (from my copious supply of seedlings), violets and a Sedum
“gold mound”. We'll see how they progress; I expect to pull some of them out
Spent most of the day in the garden today, mainly weeding. It's been relatively moist
lately, and that made it much easier to get the weeds out root and all. Yvonne is also busy rearranging her toys in the Japanese Garden. I can
see a number of changes coming.
Also tried out my new 10 dioptre close-up lens in combination with the macro lens. The
first question was the sharpness. It was not as good, I'd say. Here's
a Sedum flower taken from the same camera
position, first with the close-up lens and then without:
The difference in size puzzled me at first: the camera was mounted on a tripod, and I didn't
move it or the flowers between the two shots. But of course in close-up photography it's
not the position of the camera that's the issue: it's the position of the lens. And
without the close-up lens, the focus moved the lens forward about 16 mm, thus increasing the
magnification. The sharpness was definitely better without the close-up lens:
The question about the detail is: are those green fringes chromatic aberration or part of
the anther? It's about 0.5 mm across, so it's difficult to see without a microscope. Maybe
I should be using microscopes for this sort of thing.
Phone call from John Bram today about the greenhouse parts. He didn't have an answer, only
questions, so took some photos for him and put them together on a greenhouse page. Hopefully we can find a solution that
isn't too expensive.
The weather's better again, so spent a lot of time in the garden, mainly pulling weeds.
We've decided to restructure the surrounds of the east garden, notably in front of the
garage and behind the birches, and that involves removing a lot of existing ground
cover—the third compost heap is full already, and we've had to tread it down.
Also found a number of bulbs in the north bed. I think some of them
are Freesias, but there appear to be two
different kinds of bulb:
Another day spent mainly in the garden. Apart from weeding, did some work tying up climbing
plants: the “Phyllis Bide” rose and the ornamental grape vines that we planted
in April. The latter gave me a lot to think about. All the books on training and pruning
deal only with wine grapes (Vitis
vinifera, like these vines), and they show only one stem. But both of these came
with three. What to do? Cut off two of them? I was about to do so when it occurred to me
that the people who grow these plants probably know what they're doing, and they must have
some reason to leave three stems, so I left them. I'll train them up two or three wires and
let them grow in different directions at the top.
Also pruning the Climbing Iceberg roses. I only planted them a couple of months ago, but
they're very vigorous and blooming already, even before the established roses. Decided to
try to propagate the cuttings—it seems that Iceberg is one of the few which can handle
this treatment. We'll see.
Finally I've finished scanning in the contents of my 1964-1966 negative album, 1803 of them.
Why? Many of the photos are of abysmal quality, some I don't even recognize, and I can't
identify people, dates or events for many. Still, it could be interesting. I've decided
not to try to identify them until I find the notebook I kept at the time, which may be
never; in the meantime, I'm just putting them in arbitrary
Another power failure while I was in the
garden. It can't have been long, because cvr2 didn't fail, and the UPS it's still
connected to can't keep the machine running for more than a second or two.
But boskoop, my Apple, lost power and rebooted. As is normally the case, the monitor
was disconnected, and as a result it came back without any monitor support. Rebooting it
under those circumstances is a real pain; you can't just connect a monitor and expect it to
display anything on it. This behaviour must confuse typical Apple users if, for example,
you knock the monitor connector off and boot it. Under those circumstances, with only a
single computer, I can't even think of a clean way to recover. And in this case, it
happened during a scan operation, and I had quite some work to find out what I needed to
Also rearranged things on the verandah—it's time it stopped being a storage place for
plants I'm growing. In the process, moved our David statue back into the garden. Later in
the evening, Piccola went to investigate it,
climbed up on it and knocked it over. Of course I didn't have a camera handy, but since she
stayed in the area, I thought it was worth getting one. Unfortunately, she didn't try
The weather's getting hot again—it hit 32.5° today—and so activity in the garden
was limited, though Yvonne found the courage to dig out 10 of
our Silver birch seedlings and plant
them in pots. One of our options is to plant them where the cathedral was and make a birch forest.
As usual, the problems probably stem from incorrect assumptions of the display resolution on
the part of the web programmer. It's clear that the Microsoft image is much smaller
(compare the photos of the cameras).
The gist of the page is that the sensitivities of the sensors can be off by up to 1
EV—or at least, that seems to be the implication. The values for my Olympus E-30 showed that it
was off by -0.7 EV at most ISO settings, but by +0.3 EV at ISO 100, meaning that ISO 100 and
ISO 200 are effectively the same. That can't be right, and the fact that they came up with
the same results for other cameras pointed to errors in the DxO tests. So I did my own
tests and came out with what you would expect—almost. The following were taken with
my E-30 with manual exposure. In each case, the aperture was f/8. In my experience, the
accuracy of the aperture is lower than that of the shutter, so for the first two I set the
shutter at 1/250 s, and for the third I set it to 1/500s. The first was set at ISO 100, and
the other two it was set to ISO 200. If the DxO claims are correct, the first two should
look the same, and the third one should be noticeably darker:
Why is that? There's clearly more to this than meets the eye, and I ended up writing a
page on the subject. I'm still not
finished; I need to do a lot of thinking. One implication, though, is that “ISO
100” is not really any slower than ISO 200, and maybe I'm not doing myself any favours
by using that setting.
cvr2 has died again. Rebooted and it came up from the second disk, which made
it look very much like there was something wrong with the first one. Removed the second
disk (on second try; the first time I removed the wrong disk), and it came up fine, thank
God—I was half expecting a repeat of the XFS offset
superblock bug. This time was probably due to overheating. But why do all these
Linux distributions have splash screens that hide the boot messages? The only time you ever
look at a booting machine is if you want to know what's going on.
I'm finally running out of excuses not to brew again, and so spent some time in the
afternoon crushing malt, finishing off the batch with the moths in it. Found another one in
reasonable condition and took some more photos, mainly to compare the close-up lens for the
ED 50mm F/2 Macro. The moths are about 1 cm long, so even with the close-up lens I
had to crop the image. The results are interesting. Here's the top of the moth first with
the closeup lens, then without:
The image without the closeup lens is at native resolution in the “thumbnail”
representation (300x225); the one with the closeup lens has been cropped to (roughly) match,
and has a resolution of 527x395. Clearly the closeup lens does bring some advantages.
Also, for the fun of it, took another photo with the 50 mm f/1.4 Super Takumar and bellows.
I think it'll be the last: the results are just not sharp enough, and I can't see any way to
improve matters. At first I thought that the coloured reflections in this image were
chromatic aberration, but after comparing with the other images I've come to the conclusion
that they're real. On the other hand, the smallest detail is only marginally better than
the other two, although this image has a resolution of 2017x1512, 45 times that of the
Brew day today. The more I brew, the less I
enjoy it. Today I decided to do a single infusion mash, which certainly made things easier,
but I suspect I've had a lower yield than normal. But I think that, for the moment at any
rate, I'll buy wort for my normal brews.
Things weren't made any easier by the fact that the temperatures were really high again
today. The temperature hit 30° by 9 am, and for the first time in days we decided it was
too hot to have breakfast on the verandah. The recorded high temperature was 36.7°.
Hopefully this isn't an indication of how the summer will develop. But my concern is
interesting: in previous lives I wouldn't have even bothered mentioning the fact. Now that
we spend more time outside, it's more of an issue.
It's not just the temperature, either. By the evening the temperature had dropped enough
for us to have dinner on the verandah, but we weren't alone. The insects have come to life,
and I suspect that our time of eating on the verandah is over for this spring.
Accidentally tried to access one of my pages from the external web site today (http://www.lemis.com/ instead
of http://wwww.lemis.com/), and got no response. Suspecting satellite problems
again, took a look and discovered that www.lemis.com (really bilbo.ozlabs.org,
a Linux machine) was really down, and that nobody knew what had happened.
While looking for a spare xterm, discovered one that had been connected
to bilbo, conveniently with a lot of syslog messages showing the cause:
What that means is only marginally clear. It's nice to see that Linux has some kind of
diagnostic mechanism, but I suppose there are still no processor dumps. It's also
interesting to see how many crashes—apparently like power failures—happen in
the small hours of the morning. Still, the system was up without too much difficulty.
Periodontist's appointment today, in Geelong, and we had intended to go together and visit
the Bellarine peninsula
first. But CJ wanted to come along, so we postponed that. Given the continuing high
temperatures—today we hit 38°—that wasn't such a bad idea. CJ came along and
looked at more trees (of the cathedral)
which need removing, but he didn't have the equipment. Also looked at the hops, which are
in desperate need of tying up. We'll probably end up with the same solution we had in
Wantadilla: two high posts with a wire across.
About the only thing we did get done was to reinstate the washing line, which seems
to have been a continual problem. Hopefully that's the end of it now.
In the afternoon into Geelong alone to
the periodontist, where all looked well, then set off into the Bellarine as far as
Ocean Grove and
Barwin Heads, where they
filmed SeaChange. There's not
much to recognize, but it was amusing that the bridge, one of the central parts of the story
(it needed repair or rebuilding) is currently under repair:
Back home across country. In Victoria, with its ridiculously low speed limits, it's faster to
take the back roads: less traffic and fewer speed restrictions, and the same speed limit as
on the main roads. Google Maps doesn't understand this: it claims a time of 1 hour, 41
minutes going through Geelong, and 2 hours the way I went. In fact, it took me about 1
hour, 15 minutes. Google Maps also show a great reluctance to change the itinerary to avoid
the main highways, as evidenced by the number of points on the way on the map. The biggest
town I went through was Inverleigh,
which seems to be upriver from Barwon Heads: crossed the Barwon river again just before
entering the town.
Clearly that's related, though nobody seems quite sure what is causing it. General
consensus is that it's some file system corruption, which reminds me of the case study I put
in my kernel debugging tutorial,
starting on page 74. The funny thing is that the stack traces look contradictory: yesterday
we had shrink_icache_memory+0x1f2/0x228 calling
clear_inode+0x6c/0xc3 calling kswapd. Today we had
shrink_icache_memory+0x1f2/0x228 (the same location)
calling dispose_list+0x58/0xfd calling clear_inode, which didn't call
anything. I suspect this is some artefact of the way Linux does stack backtraces.
It also asks the question: what's causing it? Spent some time discussing it with Stephen
Rothwell, who considered it to be a hardware issue. I greatly doubt that. He's fallen
back to an older kernel, but if it's file system corruption, that may not help.
We haven't had much progress with the greenhouse, and I hadn't head from John Bram, who only
works Tuesdays and Wednesdays, so decided to go into Melbourne and combine it with a
shopping spree at the Queen Victoria Market.
Made good time to Melbourne, then got caught in a change of routing which put us on the
Kingsway exit—from which it's almost impossible to find your way to the city. After a
lot of head-scratching, found our way back to Kingsway in the correct direction—but
that would have required a right turn, and no right turn is allowed. There must be some
canonical way of getting to the city from there, but in over 5 years so far I haven't found
it. What a mess Melbourne traffic is, and
Found my way up to the corner of Flinders and Spencer St, and after only 30 minutes we were
at the Queen Victoria Market—to find it shut! I had forgotten to check the days of
opening; effectively every day except Monday and Wednesday. Did some shopping at Min Phat,
then on to La Parisienne Pâté, where we left without spending too much money.
On to the Banksia Garden Centre, to find John Bram and discover that he's really John
Bramley, and that he had sent me a reply. Presumably another damned false positive. He
said that the new-style fittings would work, but after looking at them, I'm not so sure. In
particular, the middle roof beam now looks very different:
It sounded like it might also like flies, as the second photo confirms, so brought one back
with us. Also did a bit of shopping in the (plant) nursery, but it was still so hot, and we
ended up buying only some seeds and
Decided to go back home via the South-Eastern Freeway, and down Springvale Road to get
there, passing a large shopping centre
in Glen Waverley, where we had some
lunch and found quite a reasonable delicatessen:
Then on to Caroline Springs to
look for a Metricon display home, but
didn't find it. It's normal enough that these display houses are built in newly settled
areas, and the street wasn't on my
6-year-old Melway map. But the traffic!
Traffic jams in the middle of the afternoon! And this is a new, highly cramped suburb that
can only get worse in the course of time. There's a single road leading in to it, impeded
by a series of roundabouts (today I coined the German word “Kreischverkehr”),
and they're building further and further to the north. Some of the landscaping looks quite
nice, but I'd go mad if I had to live in a place like that.
Nearly did so just looking for the place—no signs, of course, and they even have four
different kind of sign for the street names, including three white on black, one of them in
cursive script, and one kind with no sign at all.
Escaped and back home. How can people want to pay money to live in places like that? We
weren't considering it for a minute; we just wanted to see what the display home looked
like. But even that was too much.
In the evening, yet another power failure—and for once not in the small hours of the morning, but at 21:03 while we were
watching TV. This is getting beyond a joke. This time it took me 15 minutes just to report
it, by which time it was well-known, and once again it took out the entire network
from Buninyong southwards. And it took
them over 5 hours to fix.
The morning after a power failure is always a problem while I pick up the pieces, but this
time things looked pretty good. I had powered dereel on (need to do it manually)
after the power came back at 2:16, and Yvonne confirmed that
she could work normally. brewer and kimchi were up as well, and all seemed
But then brewer went away, and when I went out to look it the display was blank (yes,
the new one does have a display), and pressing the reset button just gave me repeated
beeps. Brought it inside and remounted the memory, after which it came back normally. Why
did that happen?
kimchi was another matter: I got a continual stream of
Nov 12 09:59:36 kimchi wviewd: <1257980376216> : readStationData: preposterous station pressure! 549.099976
Wunderground and my own weather records showed complete nonsense. How do you debug
that? I don't even know where this information is coming from. I can't debug
the wviewd daemon, because it's tied up in this horrible startup script with lots of
dependencies and System V semaphores. I tried stopping and restarting wview a few times, but it didn't help. Tried
renaming the archive files—they've proven to cause problems in the past—but that
didn't help either.
This is ridiculous. What this daemon should be doing is simply reading the data from the
device at specified intervals and storing the data in a database, and that can be debugged
easily. Clearly a bit of error checking is a good idea (that's what these messages are
about, after all), but the complexity of the code is mind-boggling. Decided to write my
Problem: documentation, of course. Where do I find what the device does? Read through the
code, which shows some of the worst programming style I've ever seen. Got somewhere, but I
couldn't find a man page for libusb. It turned out that it has HTML documentation,
but by the time I found that, I no longer had time. In addition, there's the very real
question of whether the power outage yesterday didn't damage the weather station; I haven't
seen problems like this before, and they cropped up immediately after the power failure. I
should probably try it with the software they supplied.
One thing, though, that seems to justify the decision to write my own transfer daemon: the
information returned by the station is in metric units, sort of. The wind speed, for
example, is in units of 0.1 m/s. wview translates everything into American units
first, and if you select metric units it translates them back again. In the process it
loses a lot of accuracy. 0.1 m/s is 0.36 km/h; wview stores in units of 1 mph (1.6
km/h), and that's what my records show.
Phone call from Eddie Barkla of Powercor regarding my complaint last night. It seems that the problem this time was that a car hit a
pole, and as a result the entire power for the region was interrupted. Didn't get much else
of use out of him: he seemed to think that 5½ hours interruption was acceptable, that the
semi-rural area in which we lived didn't justify a ring main, and that basically nothing
would change. Clearly Powercor is not interested in providing better service. I need to
find if there's another way to get our power delivery out of the 19th century.
Planted some of the plants we bought yesterday; we still need more pots for the
little Salvias, but put two of them into
hanging baskets. Yvonne also bought some ornamental
australis and Phormium—and
planted them. Things are filling up.
More investigation of the weather station issues this morning. Fired up kimchi and
started wview, and—it
worked! That proved to be without the archive data, so tried reinstating that, and, not
surprisingly, it failed again. Clear case of corrupt old data. Moved it out again and
restarted and—it still failed!
More playing around. Ran ktrace to see what data was coming across. In the middle
of that, saw the strangest thing:
=== root@kimchi (/dev/pts/0) /var/tmp 21 -> ls -l ktrace.out -rw-r--r-- 1 root wheel 111578 Nov 13 08:43 ktrace.out
=== root@kimchi (/dev/pts/0) /var/tmp 22 -> ls -l ktrace.out Shared object "libutil.so.7" not found
That didn't go away. Established that libutil.so.7 still existed (echo is
your friend), but without ls I couldn't examine it in more detail. Also couldn't
shut down, and ended up doing a hard reboot; but the system didn't come back up, showing
another of the strangest messages I've ever seen:
Fatal breakpoint trap in supervisor mode? What's that? Anyway, it was clear that I
wouldn't get this system back up, so went looking for a NetBSD CD-ROM, didn't find one and ended up firing
up swamp to burn a new one. Installed a rescue system, took a look at the recently
modified files, and found only one unusual one:
# find /mnt -mmin -180 -type f | xargs ls -lrti ...
6200918 -rw-r--r-- 1 root wheel 111578 Nov 13 08:43 /mnt/var/tmp/ktrace.out
9178666 -r--r--r-- 1 root wheel 23750767 Nov 13 08:49 /mnt/lib/libutil.so.7.15
That's pretty big for a library, and I confirmed that it was different from the copy on the
rescue disk (which was made from the same distribution). On a hunch, did:
So somehow, in mid-trace, ktrace switched files and wrote to a file which was
read-only. How could that happen? Replaced the file from the rescue system and rebooted
without any problem, but the problem with the weather station continued.
libusb: Tower of Babel
Turned my attention to my own code, which had stalled yesterday because of lack of
documentation. Looked for the HTML documentation, and it wasn't there either. Discovered
the code in /usr/ports/devel/libusb, including a complete list of HTML pages
in pkg-plist, but it didn't get installed. Looked for the documentation on the
libusb project home page, and with
great difficulty found the API documentation, which wasn't brilliant: it didn't even say which header files to
include. Found a file called libusb.h, which appears to be the only one. But it
wasn't on my system!
Looked again at the code in wview and found references to a file called usb.h,
which appears to have been written by the same person, Johannes Erdfelt. But the contents
were only marginally related. There's nothing in the comments in usb.h to tell me where it
came from, but contains things like:
So the two files are completely incompatible, but they both (I think) claim to
be libusb. Further investigation shows that the first file (usb.h) is
from libusb release 0.1.12, and the latter is the libusb 1.0 API. Gratuitous
changes, it would seem, requiring much recoding.
But then I was told that libusb (a “standard” interface) has been
included in FreeBSD 8.0-RELEASE. Went to look
at my 3 month old 8.0-CURRENT system (swamp again), involving a disk swap in my test
machine (previously kimchi). That didn't work: the system didn't come out of self
test, not even to the point of displaying anything on the screen. It wasn't the disk: the
system didn't get that far, and it didn't respond even with not disk. My best bet is a
defective power supply, which would also explain the strange issue with overwriting the
wrong file. And that's a typical consequence of one of these power failures.
Unfortunately, I didn't have another power supply—I get through quite a few of
them—so went looking for Yvonne's old machine and used
that instead. Found a man page for libusb, the first ever. But the contents!
libusb20_tr_close(struct libusb20_transfer *xfer);
A third interface! And the names include the version number! What kind of
nonsense is that? Libraries are for making things portable, not incompatible. I'm told
that the latest version of 8.0 RC has a different interface, so started installing that
on swamp. But that takes hours, so left it at that.
In the meantime, set to installing the “Easyweather” software supplied
with the weather station on pain. That turned out to be easier than I expected: I
had already done it. And it confirmed my suspicions: the station is defective. The
pressure readings are all over the place, typically in the order of 1700 hPa. It also
showed bugs in Easyweather: it was unable to ignore the incorrect readings, making it
only marginally functional.
I've drawn a number of consequences from this experience. Firstly, of course, I need a new
weather station, and I ordered one; hopefully I can get Powercor to pay for that and the repairs
But more importantly: the whole approach to USB access seems broken to me. It reminds me of
the Bad Old Days 40 years ago, where access to every kind of device was different. And
there were lots of people who explained why that had to be, and why you couldn't access a
card reader with the same subroutines as a printer or a magnetic drum. Then came UNIX with
a unified approach and showed that yes, indeed, you can. But it didn't last long: the rot
started with interprocess communication, and networking used a different interface again.
And now it seems it's a free-for-all. USB is here to stay; why aren't there better
interfaces in the kernel to make things like libusb unnecessary? I've decided to use
the kernel interfaces now, though I fear that it will mean incompatibility with Linux.
Call from Eddie Barkla, considerably friendlier than yesterday. He has arranged for the
transfer of the $100 that was due to me last year, and
also gave details of the current problem: a car had hit a pole in the north of
Sebastopol, somewhere near
the crossing of Hertford St (the Gleneg Highway) and Tait St. Apparently there's an
underground crossing there of a high voltage line (which in Victoria means 22 kV). I'll go
and take a look at it next time I'm in the area, but the location suggests that most of
Sebastopol must have been taken out as well—hardly what you would call a
“semi-rural” area. The duration of the outage was apparently due in part to a
problem with a control switch in a substation.
He also referred to the repair that was done last year. At the
time I had expressed my concern about the way the junction box was mounted (and noted
my doubts about whether it would get fixed). Eddie had contacted the repair people about
the matter, and they replied to tell him that the matter had been attended to. It's
difficult to see how. Here a photo taken last year, and one taken today:
Finally swamp finished its upgrade—and it turned out I had
installed 9.0-CURRENT! I need to start all over again, preferably with a new disk.
The libusb man page for 9.0-CURRENT appears to be the same as on the
old 8.0-CURRENT, with these silly libusb20_tr_close and friends. Got
confirmation from somebody running 8.0-BETA that the man page there reflects (at
least superficially) the libusb 1.0 API. Still, it seems to be too much work to me.
Spent a particularly long time with my house photos again today. The verandah panorama is
still not as good as I want it, but I seem to be making progress. Did a second series of
photos in the evening, with one more photo. The results are quite good; I think I'll stay
that way. Here the morning panorama, then the evening one:
What does car mean (in a computational sense, of course)? It's one of the oldest
LISP constructs, of course, but I've been continually irritated by people who state that it's an
acronym for “Contents of the Address Register” (and that cdr stands for
“Contents of the decrement register”). All this goes back to
the IBM 704, which really did have
something called a decrement register (it was a reverse index register: instead of adding
the contents to the base address, the computer subtracted them). But the 704 didn't have an
address register. So what do they stand for?
Went looking for some documentation on the 704 instruction set, which is difficult to find.
The best I could find was by
John Savard, but it didn't give enough detail. Spent some time updating the
Wikipedia IBM 704 page, in the process
coming across a document on LISP by John McCarthy, in which he states that car stands for
“Contents of the Address part of Register number”, not quite the same thing.
But what does “register number” mean? My guess is that it's a memory register,
i.e. core store. In those days, core memory was a very new concept, so that's plausible.
It's a pity that such details get lost.
More playing around with the weather station program today, and in the end decided to go
with the current libusb implementation, with guidance from the code in wview, after discovering that it's still
supported in the more recent versions of libusb, and that there's documentation of a kind:
usb_open is to be used to open up a device for use.
usb_open must be called before attempting to perform any operations to the
device. Returns a handle used in future communication with the device.
And that's the entire documentation. Apart from the interesting use of the term “open
up”, it supplies no description of any kind of what happens if things go wrong. What
return value? Where is the error information stored? I still don't know, but I found an
undocumented function usb_strerror that suggests that it uses something akin
to errno (maybe even errno itself). And the HTML is so ugly!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Worked my way through the code, which simplified considerably as I understood it. It seems
that the sequence is:
Call usb_get_busses to get list of the USB busses on the system. The list
members contain a list devices that describe the devices attached to the bus.
Search each of these lists looking for an entry with studly members idVendor
and idProduct that match the device we're looking for:
for (bus = usb_get_busses (); bus; bus = bus->next)
for (*devp = bus->devices; *devp; *devp = (*devp)->next)
if ((*devp)->descriptor.idVendor == vendor
&& (*devp)->descriptor.idProduct == product )
return 0; /* not found */
After this, the wview code goes off and issues multiple calls to usb_get_descriptor, for reasons that aren't documented and which don't make
much sense to me. One of the calls was incorrect: it read in the wrong descriptor, but
then, it ignored it anyway. I suspect a lot of this code has migrated from one package to
another, and since it doesn't do any harm, and removing it might, it stays. I'll have to
experiment, but currently I'm doing the same thing.
There is other code that is seems more obviously redundant:
Before looking for a device, the code calls usb_find_busses to find out how many USB busses are connected to the
system. The documentation claims: “find all of the busses on the system. Returns
the number of changes since previous call to this function (total of new busses and
busses removed)”. This seems self-contradictory to me, or it's using the word
“find” in a non-obvious way.
It also calls usb_find_devices to see how many devices are connected. It's not clear
what use this is, and in my case it returned 0 for no obvious reason. Possibly it's a
permission issue, but without documentation there's not much you can do.
That's as far as I got. Potentially I just need to read now, but I decided to
run ktrace against wview to see what low-level requests are sent, and by
coincidence the device “worked”: it returned correct temperature and wind
values, and the pressure was within the thresholds, though obviously wrong. So I left it
Almost as soon as we moved in to the house, we became aware of a blue-white cat that
wandered around our property. He's fairly timid, and we never made contact with him, but
from time to time we'd see him. Lilac wanted nothing to do with him
Lately he's back—maybe Piccola is more friendly to him. And in the past couple of
days he started calling from under my bedroom at 5:30 am:
He wouldn't let up, and he timed his calls to coincide with me just dropping off to sleep.
After a couple of hours, I gave up and got up. In the course of the day considered what our
options were. There are clearly at least two:
Fence off the underside of the house so that cats can't get under there. That's probably
not a bad idea anyway, but it'll take a while.
Spray him with water from the garden hose. When he came back in the evening, tried that.
No more calling, anyway. We'll see how long that lasts.
The weather's cooler now, quite pleasant temperatures in the mid-20s, and spent some more
time in the garden. We've decided to remove the
fat Carpobrotus edulis in
front of the garage and replace it with a few bushes. That proved to be more work than I
had expected—from the original small cutting we have several beds of the stuff, and
this one alone must have hundreds of kilograms. Got rid of enough to plant and mulch the
“Gruß an Aachen” rose, and then gave up. We've
sprayed Glyphosate on the stuff, but
that'll take a while.
Also put nets on the Nectarines and
cages over the strawberries. Not too early: the birds have already eaten all our cherry
tomatoes, and we need to find something to cover the plant with.
A new insect (or one I can't recall), here on the remains of a grapefruit flower:
Continued with my work on the USB interface of the Fine Offset WH-1081 weather
station, and got the code completed relatively quickly. I'm becoming more and more dubious
about some of the calls, and there are weirdnesses like having the data stored in two
different places, but at least I now understand what's going on.
So: ran it. Nothing happened, not even a SIGSEGV. Put the thing
in gdb—that's easy, in contrast to wviewd—and discovered it was hanging in the very first read. It seems
that to read from the device, you first need to send a control message. The reference code
I have is full of manifest literals which make it completely unclear what's really going on:
With gdb I was able to confirm that I had set the values correctly—but it
didn't read anything. Have I missed out something? Why does this call just hang instead of
time out? I can see what's going out to the device with ktrace, but that has very
little to do with the calls I've made. The library is the obstacle. It doesn't provide a
significantly greater level of functionality than the raw ioctl calls, but it does
obfuscate the matter. I need to work out how to continue.
This diary is primarily for my own use, but it also gets aggregated into the ACM Queue blog roll. It's not really very suited to that:
most of the content isn't relevant to ACM, which is why I subdivided the diary into topics
(categories) months ago. That's a fairly
general thing to do: many people read this diary but don't want to know about certain
The problem that remains with ACM Queue is that this document is a diary, and the headings
are the date. So while other people's posts have meaningful titles, mine only has the date:
In the end, decided on a kludge: a fourth parameter to daytitle, the header
function for the day (the other three are the date, the location information and the topics
mentioned on that date). If the topic is exactlyc (computers), and if it's
an RSS feed, I use this fourth parameter
instead of the date. A kludge, yes, but sometimes you need kludges. The real problem with
them is that they have a habit of coming back and biting you.
No cat screaming this morning! I got a good night's sleep. So the hose does seem to have
helped. But it wasn't perfect—he was back again in the evening. Yvonne has decided he's hungry, so we put some poison^Wcat food
out for him. I'm not sure that's a good idea.
Why do these people do this? We have a new postal delivery service (for some reason they
don't call them postmen, or even postpersons), and last time they did that, I called up and
asked them not to do it any more. Maybe a sign on the letter box would help.
We're planning to put a pond in the front of the garden. Currently it's a flower bed, and
we had a surprising number
of Cannas in it, which are now
growing happily—too happily, given that they had to be moved. Decided to do it
earlier rather than later, and planted them in four different places further back in the
garden, near the Hakeas. We'll give the
rest away, and I can see the rather boring Hakeas disappear in the near future too.
Back to looking at my weather station code today. I was hanging in a call
to usb_interrupt_read, and the obvious assumption was that I had not copied the
sample code correctly. But how do I compare that? Discovered that, with a couple of
tricks, I could use gdb on wviewd: I just needed to stop it becoming a
daemon, which you do with a specific parameter to the undocumented
function radProcessInit—why use the standard tools when you can write your
Then I just needed to start the wview processes, stop wviewd, remove its pid
file, and I could run a new copy. That helped, but it only confirmed that I hadn't
forgotten any calls.
So, what next? Checked with ktrace and gdb to see what calls were issued by
each library function. usb_interrupt_read surprised me: I had already established that it had
set errno to 6 (ENODEV: device does not exist), and then I saw that one of
the things it did was:
2857 1 wh1080 CALL open(0xbfbfe208,2,0xbbbf3d4e)
2857 1 wh1080 NAMI "/dev/ugen0.01"
2857 1 wh1080 RET open -1 errno 6 Device not configured
Why was it doing that? I had already opened /dev/ugen0.00 with the less surprising
usb_open. And how do I find out why? Found the sources to libusb, and found,
fd = ensure_ep_open(dev, ep, O_RDONLY);
There's an implicit call to open in there! Talk about lack of POLA! Looked
through the code of ensure_ep_open, but it delved into cookies in internal
structures and ultimately turned me off with some preprocessor macro whose definition I
couldn't find. To add to the problem, it seems that the i386 function entry sequence has
changed in gcc version 4, so reading the assembler code was particularly painful.
Looking at the kdump output again, I discovered I had only read half of it:
2857 1 wh1080 CALL open(0xbfbfe208,2,0xbbbf3d4e)
2857 1 wh1080 NAMI "/dev/ugen0.01"
2857 1 wh1080 RET open -1 errno 6 Device not configured
2857 1 wh1080 CALL open(0xbfbfe208,0,0xbfbfe228)
2857 1 wh1080 NAMI "/dev/ugen0.01"
2857 1 wh1080 RET open 4
What on earth is that? The second parameter to open is located in a different
place the second time. Different parameters? Further checking confirmed that
yes, wviewd did exactly the same thing. So I had been looking in the wrong place for
a couple of hours. The reality proved to be far less interesting: I had incorrectly counted
the length of the data returned, and a call to usb_interrupt_read will hang if
there's no data, even if I set a timeout.
Spent a lot more time trying to access the data, not helped by not knowing whether the
device is big-endian or little-endian. It turns out that it's little-endian, but the USB
bus parameters are big-endian. Got some kind of (obviously incorrect) data out of the thing
and then gave up for the day.
40 years of Internet
While following up on my changes to the RSS feed for ACM Queue, looked into
James Gosling's blog. It seems that the date
assigned to the beignning of the Internet is 29 October 1969—coincidentally the day I first got involved with computers (though I didn't write
my first program until the following day). Amusing.
Back in January I complained about
the DSE web site and its bushfire information page. It included a table artificially constrained to the width
of the map above it, and a horizontal scroll bar to access all the information. It also had
They've changed that now: there is no longer a horizontal scroll bar, and the mouseovers are
gone too. But they haven't got rid of the too-narrow table, made even narrower by shrinking
the map. Here's a comparison with the map as it was then (I only copied the upper half) and
the current map at the same magnification:
Went looking for the source of the table, but it was well hidden by some idiot. Why are
they trying to hide so much? This is supposed to be an unrestricted information page.
The bushfires last summer were a catastrophe which struck at the heart of Australia. There was a
Commission as a result. One of the outcomes should have been to improve
communication. Instead they made it worse. I consider that to be criminal
The yolk of this egg was at one end, leaving a lot of uncooked white in the middle. Why
does this happen? Is it possible to recognize such eggs from outside? Is there a way to
recover (obviously before cooking)?
The Spathiphyllum that we
mistreated has been slowly recovering,
though one of the had developed no new leaves at all. But the stems hadn't died, so we left
it there. And now it's flowering, along with one other one:
I took the photos of
the Spathiphyllum with my studio
flash stuff, which always requires a bit of tweaking. I do manual exposure with the shutter
speed set to 1/250s. The first one I took at f/8, which normally seems to work, but this
time it was a little dark, and the information histogram on the camera showed a couple of
stops underexposure. So I opened up a couple of stops and tried again. It still showed
In the end, tried all apertures from f/2 to f/22—a difference in exposure of 7 EV, or
121:1—and in each case the camera showed roughly the same histogram, and the results
(before any processing) look pretty much the same. Here are the originals at f/22, f/5.6
(the one I chose) and f/2:
Sure, the exposure is different, but not by a factor of over 7 EVs, and the last two look
pretty much the same (and slightly underexposed). I thought it might be something to do
with the display on the camera, or with the JPEG processing, but UFRaw shows the same behaviour:
And the different colour of the f/2 photo (right hand), from ambient light, shows that it
clearly did expose longer. The flash on the camera would probably have compensated for the
exposure, but the studio flash units are completely manual. I'm still scratching my head.
The swallows are trying to make a comeback to the verandah! I removed their nest at the
beginning of the year, and they made a couple of attempts
before settling in the garage, arguably an even worse place. But today I found the
beginnings of a nest on top of the light fitting:
Continued with my weather station software today, gradually cleaning up the strangenesses.
It now reads the station every 30 seconds and prints the results:
Page sv IH IT OH OT hPa abs rel Wind Gust Dir Rain
1490 11 45 22.6 24 30.2 93.6 93.6 983.4 5.6 13.3 NW 0.0
1490 11 45 22.6 24 30.2 93.6 93.6 983.4 5.6 13.3 NW 0.0
The pressures are completely wrong, of course, but the device is defective. My new one
arrived today (and I'm back on
the net), and I was able to confirm with it that the pressures are read correctly,
modulo the fact that the device wants you to set the relative pressure manually.
What next? Store the data in a database, maybe get other data—Steve Woodford sent me
a program that read all sorts of maxima and minima, though I'm not sure it wouldn't be more
robust just to calculate them. And, of course, write web pages to access the data.
Setting up a WH-1080 weather station
The new station required setup, of course, and the documentation, though
copious, is difficult to read. Here's what I do to set it up for my purposes. I find the
device itself particularly unpleasant to use—I hate touch screens, and this one
has particularly poor display contrast. In addition, many of the functions (read maxima and
minima, for example) are destructive readout: you can only do it once. So all I do is to
set it up for computer access.
Basics: to set parameters, first press the area of the screen that you want to set. The
value will blink, and roughly in the bottom middle a + and
a - sign will appear, also blinking. You can now do one of three things:
Change the value by pressing + or
-. The buttons auto-repeat if you press them for longer than 3 (!)
Move on to the next setting by pressing the selected area again.
Cancel or complete by pressing any other area of the screen. There's also a timeout after
which the device completes and saves the current settings (including any changes).
The parameters are not easy to recognize: there's no text to tell you what you're setting,
though some of them cause hints to blink. Others are completely confusing, and the
documentation doesn't help. I set the following fields:
Press the date field (roughly bottom centre). The entire date lights up. The parameters
Select whether to display day, week or alarm time. “Week” means that the
(last two digits of the) year changes to a two-letter representation of the day. I don't
Date format: Select DD-MM-YY or MM-DD-YY. The year characters change to dM
or Md to indicate the format chosen.
The remaining selections set the year, the month, the day, the alarm hour and the alarm
minute. That's relatively easy to understand, since the corresponding field blinks. You
don't need to go through them all.
Press the time field (bottom left). The entire time changes to something
like 1cd5. The parameters are:
The screen contrast (1 to 8, default 5). The display shows the contrast as the last
character. Even contrast 8 is pretty soft. I have no idea why this is put in this
Time zone (hours east of the meridian). You can't set half or quarter hour time zones.
12 or 24 hour clock representation.
Minute. You can't set seconds.
The pressure field is centre right. The parameters are:
Absolute or relative pressure display. This affects only the display, not the computer
Units: hPa (which they write hpa), mm mercury or inches of mercury.
Only if the relative pressure display is selected, set the relative pressure. I've done
this by comparing with another weather station I have.
The remainder of the settings are alarms and maxima and minima. I don't use this feature.
Seems there's more to the DSE bushfire information page than I realized. Yesterday I noted that the map had got
some reason you click on the map (it wouldn't be because of any indication on the page),
So now I have a little program that can talk to the weather station. What other secrets
does it hide? Steve Woodford sent me one program, but it seems that this machine has about
64 kB of memory accessible via the USB bus, and the manual states that it can store 4080
readings. At 16 bytes per reading, that suggests that the archive records take up all
memory except for the first 256 bytes. The previous incarnation of the program shows that
it updates a specific memory location at frequent intervals, and that there's a field
stating how old the entry is. Every 30 minutes it moves on to a new slot, so the archive
entries show 48 records per day and should last for 85 days. There's no direct date storage
in there, but you can use the “age” field in the archive records to determine
the age of the previous one.
Wrote an option to dump the entire memory, and had a surprising amount of trouble. In the
end, it turned out that the memory above 0xda00 was invalid. That might make
sense, since I haven't had the station for 85 days, but if I understand the algorithm
correctly, the current entry should have been at the top of the address space, and in fact
it's round 0x1900. More head-scratching required. It probably makes more sense to
improve the program to the point where it can replace wview and then look at the other things
On the way we stopped at David Chestnut's lawn mower shop to talk to Craig. The ride-on
mower we took for repair a couple of weeks ago turns out to be in very bad shape, and it's hardly worth repairing it; it would be more
practical to buy a new (well, different, overhauled) one, but the cheapest they had
available cost $1,650, too much to pay considering that we're gradually replacing the lawn
with ground cover. Instead we agreed to take an overhauled push mower, for only $180, and
he was prepared to give us $150 for the old mower, even without the new battery that I
bought for it a couple of months ago, so I'd end up paying only $30 and having a new battery
which I could try using in a UPS. The only thing was that the mower wasn't there, so we
would have to come back for it.
The first garden was Nancy Brewer's garden, near
the Eureka Stockade. It's a
small plot of land, but she has managed to cram an amazing amount of stuff in there:
She also had plants and books on sale, and we ended up spending $69 and leaving with some
cuttings of a Cotyledon
orbiculata, also known as Pig's ear (or so we're told: the photo in Wikipedia looks like
another Cotyledon that we have) and
also some cuttings of Lonicera,
and Fuchsia (which people here pronounce
“Fuschia”), a surprisingly cheap and pretty pot with various succulents
(Sedum, if I can believe the label),
various small succulents and an Abutilon
which I forgot to photograph before potting:
That took less time than we had expected, so decided to go on
to Buninyong to see Jill and Ian
Salathiel's “Maison Le Guier” , a very different place. Nancy's house is old, and
the garden is small and crammed. “Le Guier” is new, big and uncluttered. The
photos below are some of the most cramped areas.
Back home, and we couldn't find Tony,
our whippet. He stays outside most of
the time, but he's usually not far from the house. While Yvonne wondered what to do, we got a call from Chris: Tony had turned up over there. It's not
far, only about 1.5 km, but he almost never goes there by foot, and we're still wondering
why he went there in the first place.
In the afternoon planted our newly-found treasures—a total of 7 Loniceras, 3 Abutilons
and a whole lot of the ground cover, two of which we planted directly into the soil between
and Grevilleas at the eastern side of
the Japanese garden. There's a moderate hope that they'll strike directly, not lessened by
the first rain in nearly 3 weeks and a startling drop in temperature, though not to the same
extent as in Canberra, where I read (after fixing the upside-down representation):
Rain since 9 am
If you can believe that, that's a temperature drop of 8.3° in 6 minutes—that must be
some kind of record, even more than the drops in Melbourne last summer. But then the
temperature went back up again by 5.6° in the following 11 minutes. Is this genuine, or
Our temperature drop was less pronounced, but in the course of the afternoon it dropped from 30° to 16°, and
we got a reasonable amount of rain. Not too early, either: the weather of the last 10 days
has killed off a lot of my seedlings, and I spent a considerable amount of time throwing
away dead plants.
What I really need, of course, is the greenhouse, which has been on hold while we consider
how to replace the missing parts. A call from Doreen at the Banksia Garden Centre, left on
the answering machine, helped: they can supply the plastic plugs (which I think they
call Gussets). But I didn't get
round to calling back to confirm.
Found a bit of black dirt on Piccola's head. It
was difficult to get at, and then we realized it was moving—a flea! Our animals don't
have fleas; it must have been brought in by this stray cat we've been having trouble with.
Yvonne went off and came back with some Carbaryl which she had brought back from
France, and which had expired 11 years ago, and powdered all the animals. They needed it.
Hopefully we'll get rid of the things quickly.
The cure for this is to store your eggs, in their carton, on the side. Simply secure the
carton with a rubber band, and store the carton on its side in the refrigerator. This
will cause the yolks to move to the center of the egg.
This implies that the cause is due to differing densities of yolk and albumen—and well
it might be. But I find that it only happens to some eggs, so there's more to the
explanation than that. It's also difficult to test. But it's certainly worth a try.
Continued with the Ballarat
Gardens in Spring stuff today, not helped by the difficulty of finding the places.
Only one of the three was easy to find on Google
Maps. The first one was Jane and Russell Luckock's “Anembinya”, in 80 Granny White
Lane, Mount Buninyong. But
Google Maps doesn't want to know; it insists that the address is 80 Granny Whites Lane, Buninyong. I wish they'd correct this kind of error; if I
hadn't seen the road by visual inspection, I wouldn't have found it.
Up to the house, while the weather gradually deteriorated. The property has
“breathtaking views over the surrounding countryside”, but there was none of
that to be seen today, just rain and haze, and we very nearly turned back. Decided we might
as well take a look, though I decided to leave my camera in the car; we took Yvonne'sKodak M1093 IS instead. The property is very nicely laid out, and I got some reasonable photos:
It's the detail that counts, though; the layout of the main garden, to the north-east of the
house, is particularly pretty, and it left me wondering how we could achieve something
similar. One answer is clear: it has taken them 21 years so far to get to where they are,
and they're still working on it.
No plants for sale here, but Yvonne got Jane to give her a cutting of
a Pelargonium “Rhodo”, so
named because the white flowers look rather like
On to “Coolalie”, in Lal Lal Estate, the furthest from town, and one where
neither our paper maps nor Google Maps were able to help. When we got there, nobody was
about, just a table with the takings from previous entries. We weren't overly impressed
with the appearance of the place, which was relatively small, so we decided not to press the
point and headed on to “Avebury” in Navigators. Another nice garden, but I think we've
gradually seen enough:
Then back cross-country into town, and dropped in at David Chestnut's, where I discovered
that Craig doesn't work on Saturdays. Neville had been informed, though, but by David, not
by Craig, and the conditions were different: no mention of removing the battery, but we
could do a direct swap without the $30 difference. That's fine: I didn't have a real use
for the battery anyway. So now we have a light two-stroke push mower that looks like it has
seen better days, but which cuts well. What more does a lawn-hater need?
More thinking about the house photos today. As the result of various minor tweaks, the
panorama of the verandah is gradually getting better, though flash exposure is still
complicated. The lighting today was particularly dark, so I needed to reduce the fill-in
flash. Did some comparison photos with different levels of fill-in flash:
Unfortunately the flash levels aren't stored in
the EXIF data; this was manual flash on the
Mecablitz 58 AF-1 O digital at “18” mm focal length with, respectively,
full power, 50% and 25% power. I think that the 50% is probably the best choice here, but
I'll continue playing.
Today was quite an intensive photo day; I ended up with 1,182 MB of photo data, mainly from
the house photos and the open gardens.
David Yeardley's back in town, and he and Chris came along to help us eat all the Wiener
Schnitzel that Yvonne had bought. Yvonne eats very little,
and she tends to under-cater, but we had plenty of dessert and cheese, so nobody went
The weather has changed completely in the last couple of days. After 10 days of hot, dry
weather—we had no rain and temperatures up to 38.6°—we collected all the rain
we've been missing for the month, a total of 72.9 mm today, on top of another 15.7 mm
yesterday. The temperatures were similarly different, only 18.9°—nearly 20° lower.
Spent most of the day inside as a result, and apart from the weather station software, also
produced a Google map of the gardens we visited on Friday and Saturday. Google Maps is an
interesting idea, but it's a real pain to use, and there are many things I either still
don't understand, or which are just plain bugs.
As planned, decided to defer the archive record handling of the weather station in favour of
storing the results in a database and creating a web interface. First step was to define a
database and code to store the information. That was unexpectedly easy, and I had time to
write a second program to report the details, using mmap shared memory. That took a
little longer—I've forgotten some of mmap's weirdnesses—but was still not
difficult. In general, I think so far I have taken about as long to write this program as I
did to install and configure wview. Next is to interface with Wunderground, and to create a basic web page. Then I'll be able to turn
off kimchi, which is currently running the new weather station and supplying both
Wunderground and my own web site. That will save
both power and my nerves: since the power failure last week, I'm running an old machine with
a noisy northbridge fan that really irritates me.
We've been planning to chop down another tree for some time, and CJ came along
over a week ago, but was concerned about how
he could get it down without damage. No need any more. The part we wanted to remove came
down by itself, along with one that we had really wanted to keep, and they miraculously
missed all the things they could have damaged. The first photo, taken 5 months ago, shows
what it used to look like:
A couple of days ago I replaced my old ride-on lawn mower with a push mower. Or did I?
I've been informed that a push mower is not just a mower you push, but one that has no
engine. The kind of mower I have is, apparently, just a mower. That's unsatisfying, of
course: all lawn mowers are “mowers”. There must be some way to describe a lawn
mower of any kind that you push. I call it a push mower, but if that term has already been
used for a subset, there should be some other specific term (“push motor
Peter Jeremy has a thought about the eccentric eggs I mentioned a few days ago. He drew my attention to
the Chalaza, the membrane that holds the
yolk in place. Clearly this eccentricity must be related, but the Wikipedia page doesn't
say anything about it. More research needed.
On with the weather station today, and once again achieved my goals. Interfacing with
Wunderground was more complicated than I had expected: they have relatively detailed
instructions about the protocol (it's encoded as a web URL), but unfortunately it
appears to be incorrect. It states that you can omit just about anything, so I
omitted dew point data, since the
station doesn't provide it, and you can calculate it from temperature, pressure and
humidity. But it continually reported a dew point temperature of -73.3°, which proves to be
close enough to -100 °F that I suspect this is some default value that is inserted if you
don't supply it. That's in contrast to other fields, such as pressure, which are just left
blank if you don't supply them.
Went looking for algorithms to calculate the dew point. The Wikipedia page supplies both a simple and inaccurate formula and a more accurate one that requires wet bulb
temperatures. Finally came across one that I'm going to have to check for accuracy, but at
least returns plausible results.
Then worked out a simple web page to show immediate data; I
can work on that at my leisure, since the info is also available on Wunderground, and I want
to think about how to represent the data. Getting the info to PHP is interesting: I can't
just use mmap like I did between the programs. So what format do I use? I
can get historical data out of the database, but that seems a bit overkill for the current
readings. In the end decided to write (programmatically) a PHP header file that contains
the information. That worked, but it highlights the difficulties I have with PHP.
That meant I could swap weather stations, put the new one on dereel, and shut
down kimchi. Ah, the peace! But it became clear that the barometric pressures were
incorrect: Wunderground wants pressures relative to sea level, while I was sending absolute
pressures. More searching for conversion formulae, and I have the feeling that somewhere
the conversions to the old measures aren't correct: I'm getting about 1 hPa less reported on
the web site than I thought I sent.
Other minor things need looking at. I get this about once an hour:
Can't write to device: error setting timeout: Inappropriate ioctl for device (25)
That looks like a driver issue to me, and it currently causes the program to stop. It
should be able to recover (at least by closing and opening the station), but in the meantime
I've just put the program start in a shell loop, which works, though it's not very elegant.
CJ along in the evening with some 43 mm steel pipe, which we're going to use to suspend my
hops. They're going to be about 5 m high from ground level, in two sections, held together
by a bracket, so that I can take them down for maintenance. Put the bottom sections in the
ground, and we'll do the rest tomorrow, including working out what kind of wire to attach,
and how to attach the bines.
So my weather station is working, and all I need to do is to refine things. I now have a
date in the weather observations page, and things are
working well with Wunderground—or are they? I still have this issue with the barometric
pressure. Various sources, including Wikipedia and the wview source code, have a conversion factor of 0.0295299801 hPa to inches of mercury (well,
Wikipedia has the reciprocal, 3.386389 for kPa to in Hg), but that doesn't seem to match
Wunderground's view of the world. Empirically, discovered that it only registers to a
resolution of 0.01 inch of mercury, which corresponds to 34 Pa, and comparison of a number
of dual unit reports comes to an average conversion factor of 0.02953553, from which I could
probably drop a couple of digits:
#define hPa_TO_inHg 0.0295299801
* For some reason, Wunderground doesn't adhere to this constant. By
* observation, the constant must be something like this.
* 29.87 / 1011.4 = 0.029533320
* 29.88 / 1011.7 = 0.029534446
* 29.89 / 1012.1 = 0.029532654
* 29.90 / 1012.4 = 0.029533781
* Average 0.02953553
#define Wunder_hPa_TO_inHg 0.02953553
That now works within the constraints of resolution. And then I noted that my station had
dropped off the WunderMap, possibly because of the number of strange readings I had sent during the
day. Decided to wait until tomorrow before doing anything about that.
Tom Maynard wrote about mower terminology. His is US American, of course, but it seems that
there's the term “reel mower” to refer to the old-style engineless mowers that I
recall as a “scroll mower” (though a Google search suggests that this is not a common term), and that “rotary mower” is used to
refer to those with a power-driven horizontally rotating blade. That includes ride-ons as
well, of course.
The real issue, though, is what “push” means. Tom brought up the term
“walk behind” to describe self-propelled non-ride-on mowers, but it seems that
in the USA the alternative of push powered mowers is quite uncommon. Maybe that's why
there's no clear distinction. The Wikipedia page largely agrees with Tom, but it does include the term
rotary push mower.
And that's what I have.
All this is largely irrelevant, however: I was talking (without mentioning it) about
Australian terminology. Maybe I just had too small a sample set.
CJ along to finish off the hop support. It wasn't a success. As I had feared, not only
were the pipes too thin, but the clamps that held them together were completely inadequate.
While pulling the wire at the top gently, I bent the assembly badly. A medium wind would
have done worse:
I had really intended to do other things today, but my bare web
page got on my nerves, so set to producing some graphs. I'm using gnuplot, which has the advantage that I have used
it before and the disadvantage that it causes to curse and scream every time I use it. Much
is definitely the documentation—who ever thought that GNU info was a good
idea?—and I couldn't find what I was looking for. Asked on IRC and found I wasn't
alone. Rusty Russell uses gnumeric, and Edwin Groothuis uses jpgraph2. They might be worth examining,
though the descriptions suggest they don't quite fit into an a shell script environment.
Callum Gibson still uses gnuplot, and send me some examples which I haven't looked at
Finally got some semblance of sanity, and the graphs don't look too bad. I can tidy
them up as time goes on; it's time I did some other things instead.
The problem is the way the station records rainfall: units of 0.3 mm. One program reads the
station once a minute, store them into the database and then resets the rainfall, while
another program accesses the shared memory every 5 minutes and sends them to
Wunderground—so at best there's only a chance of reporting 20% of the rain. Reworked
that to maintain a cumulative count of the rain, while the second program maintains its own
counter and only reports the difference. That seems to work (now—it took a couple of
mistakes), but of course we didn't get any more rain.
More work with gnuplot, which still
annoys me. After trying a minor change, ran my plot script again, and instead of writing to
the specified file, it vomited
raw PNG data all over
my screen. There was nothing obviously wrong with the gnuplot script, and it took me
some time to realise that it was sensitive to the file name. The file in question existed,
and gnuplot didn't have the necessary permissions, so it printed an error message and
then wiped it away by writing a flood of binary data to stdout. What a pain!
Tidied up the graphs with help from Callum Gibson and Peter Jeremy, though finding alternate
fonts is beyond me. Still, most of the graphs now look good. The exception is, again, the
Clearly I'm going to have to write something to smooth things. I'm beginning to understand
why wview shows a bar graph; but
even that requires some form of summation. I wonder if gnuplot can do that.
Another issue is the barometric pressure. How can you decide whether it's accurate?
Looking at the weather observations in my area, I discovered that I was reporting a relative
pressure about 15 hPa lower than the official weather stations, another
station was reporting pressures another 9 hPa higher, and yet another was reporting a pressure 33 hPa lower—a total difference of 56.6
hPa! There will be differences, of course—that's why we have the stations—but
this seems impossible. It's probably due to an incorrectly calibrated pressure sensor. But
how do you calibrate them? Guessed that the offset is constant, so now my
“configuration file” (still really a C source file) has an entry:
config.pressure_error = -14.0; /* offset of pressure measurements, hPa */
Yet another gnuplot replacement
Message from Jason Morgan suggesting that I use the R Project for Statistical Computing for that purpose, though he concedes that it's
overkill. Took a look, and it certainly looks interesting. It has its own language that
looks relatively legible, though I'll wait until I've looked more carefully before
confirming that. Another interesting thing is that it's derived from software written at
the University of Adelaide. But for the
moment I've found how to bend gnuplot to do what I want, so I'll leave that for
The last few nights I've been woken up by a dull thump outside my bedroom window (which
gives onto the verandah). Suspecting kangaroos, I've taken a look, but seen nothing. This
morning at 4 am was different: I saw what looked like a
small wallaby on the verandah. Went to
chase it off, and—it climbed up one of the posts of the verandah. Clearly not a
wallaby, but a possum. It stayed there,
motionless, only about a metre from me, possibly blinded by the light I had turned on.
Possums have pretty sharp claws, so I wasn't going to try to touch it, but it waited while I
went into the bathroom, came back with a bucket of water and threw it over it. Then it
headed off along the left hand beam and ultimately jumped off and ran away. It wasn't until
later that it occurred to me that it would probably have waited for me to get a camera too.
Come daylight we found where it had landed: right in the middle of
our Anigozanthos (“Kangaroo
paw”), making quite a mess of it in the process. Propped what was left up with a
bamboo rod; hopefully it'll survive. Also found some claw marks in the verandah post (10 cm
across). I'm glad they weren't in me:
Fortunately it doesn't seem to have eaten anything, but it might explain some minor damage
we've seen over the last few weeks. I hadn't thought of possums, since this is the first
time we've seen any here.
One thing we have seen is swallows.
They're taking advantage of the wet weather to try yet again to build a nest under the
verandah, where we removed the last nest at the beginning of
the year. Removed several pieces of mud from two different places, and they kept
coming back. Hopefully they'll give up soon.
This time last year I omitted to mention that Elgas picked up three of the four gas cylinders that we
had for the gas-fired heating. They refunded the price of the gas, but not the year's
rental. Since it runs from 15 November, they're strictly within their rights. But now we
have received a new invoice for the same cylinders. Called up, spoke to Peter and got that
sorted out, including a promise of a refund for last year. Hopefully that's the end of
It's in a relatively good place, so about the only thing I can think of is that there's not
enough moss there to retain the moisture.
Of course, that wasn't the only thing we bought. Plants are flowering now, and we came away
nearly $120 poorer, amongst other things with some more pots and a 2 metre climbing frame
for creepers. The latter gave us a lot of fun getting into the car, and Yvonne ended up
travelling in the back seat with the frame on the passenger seat. Also bought an unknown
a Convolvulus cneorum and a
total of 3 creepers:
also known as Wonga Wonga vine, and another deep
violet Clematis, known only as
“vagabond”, but the colour I originally wanted when we bought the Perle d'azur,
which by comparison looks rather washed out:
The collapse of the cathedral tree has left a number of shade-loving plants in the full sun,
notably the ferns, and we've also noted that
the Salvias we recently planted in the
semi-circular pots weren't looking very happy, while the ones in the hanging baskets were
looking much better. Maybe they need more soil. In any case, went though a mass
replanting: the ferns ended up in the driveway, which is shady, and we planted the
Convolvulus, the remaining Salvias that we bought two weeks
ago where they had been. Put the Fuchsia in a hanging basket, removing a Geranium to
do so, which we put in the small semi-circular pots along with some
some Viola tricolor:
In the evening, had 14 mm of rain in less than an hour, and that was probably Powercor's excuse for Yet Another Power Failure after
we went to bed. What really annoys me is that I have to report it every time.
Last time it was widespread enough for other people to
get there first, but this time round it wasn't the case, and I had to go through the
rigmarole of being asked to go out and check the fuse box. Fortunately the power was down
for less than 90 minutes, but that's still unacceptable. Interestingly, I was told that I
could apply to have the power cables put underground—at my expense! That's a clear
indication that they understand the unreliability of overhead cabling. The fact that they
don't want to fix it is an equally clear indication of their lack of interest in maintaining
a reliable electricity supply.
The usual cleanup after a power failure today, but this time there was also a gap in my
weather station readings:
There are readings, but they're stored in the station's memory, and without a
timestamp, just a “record age”, a number between 1 and 30 representing the time
since the record was created. But we have the shared segment file, which contains the last
reading, including the age, and also the timestamp of the reading, so it should be
relatively trivial to write a function recover_powercor_breakage, in
acknowledgement of Powercor's involvement
in making it necessary, which would catch up with the current conditions and report a
reading every 30 minutes.
And it was. But for the first time I got a hard ENOTTY at a particular place,
setting a timeout no less:
17202 wh1080 CALL ioctl(0,USB_SET_TIMEOUT,0xbfbfe22c)
17202 wh1080 RET ioctl -1 errno 25 Inappropriate ioctl for device
Gave up on that—I still have current readings to record, and the information won't
wrap around for 3 months, so I have plenty of time to investigate. Instead fired
up kimchi again and tried debugging with the other station—and for the first
time that I have noticed, I got an ENOTTY on NetBSD as well. That's really strange: there's no hardware and little software in
common between the two setups. Is this some kind of bug in the weather station hardware? I
suppose I should try it on Linux and Mac OS as well.
House photos today. Now that most of the cathedral tree is gone, I can extend one of my panoramas, and it's now 360°, though
cropping removes a couple of degrees. That poses a problem: where do I start? Basically I
can centre the panorama anywhere and it'll still make sense:
Things have changed a lot since then: the left-hand Hakea (behind the statue) got blown over
and removed some months ago, the left parts of the big tree on the left are now also gone,
and many other things have taken their place. The view has changed almost beyond
But the middle two Hakeas were still there, and they're gradually getting in the way. It's
a pity, but though they're still flowering trees, the flowers are so small that you can
barely recognize them until you go up close:
More playing around with the circular panorama today, and came to the conclusion that it
would be best to centre the panorama in the same place that the previous, shorter panoramas
were centered, conveniently a window on the house. Here again this week's panorama, then
last week's panorama, then my previous candidate:
In the process, decided to follow up on one of Hugin's features: saving and loading lens information. Finding out how to use it was
the first problem: all the buttons on the screen are greyed out until you select an image.
Then you can load or save lens information. But where? That's your choice, and the default
seems to be whatever you last chose. That seems completely inappropriate for configuration
information (though they do save a separate path); why can't they have a default
configuration directory, like well-behaved programs do? I assume that it's the GUI
mentality, or maybe a documentation problem in the C programming language. How often do you
int main (int argc, char *argv , char *envp )
For reasons I've never understood, you almost never see the third parameter
to main—but it's there, as far as I can tell, in all implementations of C.
And this is what's implicitly missing in GUI software: the environment. Almost all it knows
is what you explicitly tell it, with exception of a certain amount of historical information
saved from the previous session. No PATH—firefox looks for system executables in
your home directory. Hugin doesn't provide for specifying the lens on the command
line—you can select it with the mouse, can't you? No current working
directory—instead they use whatever you used last time, if they have that much
recollection, and otherwise it's the home directory again. Hugin has a
file ~/.hugin which (currently) contains:
The really upsetting thing is that it wouldn't be difficult to fix this breakage. It's just
that the product managers who develop commercial software don't understand, and—for
once I agree with Steve Ballmer—“Open Source” developers tend to copy commercial software, warts and
all. O tempora! O mores!
Removing the Hakeas was only the first step
in widening the garden; we now have quite a large area in what is becoming the middle (or
close to it), and it's full
of Carpobrotus. What do we put
there? Where do we put the plants we've bought? There's a temptation to see the latter as
the solution, but it's not that simple. The area has a view to the lagoon, and the
Salix melanostachys is too big
for that position, and the Itea
ilicifolia, apart from also probably being too big, seems to want different
conditions—the difference also depends on whom you ask. Does it want light to heavy
shade, or full sun to light shade? It seems not to like wind, though, and that's one of our
For the first time in years, mowed the lawn with a push (power) mower. Surprisingly, it's
almost easier than the ride-on for the small areas I'm doing: it's so much easier to
manoeuvre. But then it occurred to me that we have a more environmentally friendly
Also planted the Clematis“the Vagabond”, which was
in great need thereof: one of the shoots had reached the top, turned around and grown back
nearly half its height. After untangling, it was well over a metre high. The label says
that it's pruning group 3 (Clematis viticella), like the “Perle d'azur” that we
already have. According to my pruning book, they should flower late in the season on last
year's growth, but clearly that's not accurate in this climate. But my book also divides
the Clematis viticella cultivars into three groups, and the Perle d'azur can be pruned like
a group 2 (Clematis “Nelly
Moser”), so that it will flower twice in the year. No mention of the
“Vagabond” in my book though, but the web page suggests pruning group “B
2”, whatever that means. Given the behaviour of the two plants, I'm wondering if I
This problem reading from my weather station is on the back burner, but it's burning. I've
already established that the ENOTTY is a hard error: retries don't help. So the
next thing to try was to reset the connection.
How do you do that? The obvious thing would be to simulate what happens when you restart
the program, which normally works. So: calls to usb_release_interface and usb_close,
followed by the correct initialization code.
Result: SIGSEGV out of a function called by usb_close. Briefly considered
looking through the libusb code,
but gave that up and just removed the call. That didn't work either: I continued to
get ENOTTYs. So another avenue has stalled for the moment. Somehow this stuff
should all be in the kernel on a par with other devices.
Call from Eddie Barkla of Powercor to
explain the most recent power failure: a
recloser (he used a TLA that I didn't recognize) in Mount Mercer didn't reset, possibly due
to a lightning strike, and they had to send a crew out to investigate. He seemed to think
that the 83 minute outage was due to the number of incidents at the time (though I'm sure he
wouldn't have accepted my suggestion that it was understaffing), but I suspect the problem
was that they didn't know where it had happened and had to search for it.
He also explained an incident that had just occurred: a van with some electricity-related
name came along and inspected a power pole on our property—without even trying to
contact us first. It seems that they have taken the right to do so, another indication of
how user-unfriendly the system is. I can request to be informed first—what happens if
they arrive there when we're not there, and they let the horses out?—but it's up to me
to know that and to perform the request.
The inspection—every 5 years—consists of examining the base of the pole and
putting a capsule containing some boron compound to preserve the wood.
Watching a documentary on the evolution of the Australian air industry in the afternoon. It
seems that Hudson Fysh was at
a meeting on 7 December 1941, when he heard that the Japanese had bombed Pearl Harbor.
But they hadn't. And if the meeting had been on 8 December, the report still wouldn't have
been their immediate concern; the invasion of Malaya shortly before was of much greater concern. But it was Pearl
Harbor that was remembered, even by the people making this documentary. And clearly, even
today, they have little understanding of time zones.
Only a couple of days ago we had noticed that the new
bright red Salvias weren't looking happy
in the small pots we had screwed to the wall, and had planted them out in a garden bed in
the expectation that they'd do better there. They didn't: here one in a hanging basket and
one that I saved from the garden bed:
At first I thought that the wind had done it, but looking at the damage, I'm beginning to
suspect that possum again. Looks like
we're in for fun with him. This one looked so bad that I put it in a pot, but I left the
others where they were and covered them with some of the wire cages that we made for the
Much more weeding in the garden today, and also more consideration of landscaping issues.
We still don't know where to put the Eiffel Tower, as we've termed the metal frame for the
climbers. But one thing that's becoming clear is that two of the plants,
apparently Eucalyptus, in one of the
front beds were also getting far too big. What are they? Why did we plant them
there? Did we plant them there, or did they volunteer? Looking back at my diary,
for once I drew a blank. A year ago there was nothing significant there except for another
plant that was there from the beginning, a native that Yvonne had grown from seed in Wantadilla and brought here when
we moved in, but these trees weren't there this time last year, and now they were already
1.5 metres high and looking like they wanted to go for 4 metres, so sadly there was nothing
to do except to remove them.
I planted the trees on 23 December 2007 as Acacia drummondii, but
didn't write enough in the diary to recognize it. That is now fixed. Clearly these weren't
the right kind of tree. We grew them from seed, and it appears we got some
In the process also removed 2 wheelbarrow loads
of Irises, with spectacular results:
Discovered some neglected strawberries in the undergrowth. I suppose we'll have to protect
them now that the birds can see them. Yvonne took the trees and planted them on the
roadside, but I don't see the slightest hope of survival. Few Australian natives like being
transplanted, and Eucalyptus typically has a long tap root that gets damaged when you dig
While looking at the Eucalyptus, discovered a number of patches of caterpillars: