Too Busy For Words - The PaulWay Weblog

Wed, 02 Apr 2008

Stupid Error 32512
For a while my brother's been having a problem with his MythTV setup - the mythfilldatabase script won't run the associated tv_grab_au script when run automatically, but will work just fine when run manually. In the logs it says:

FAILED: xmltv returned error code 32512.
Now, after a bit of searching I have finally found that 32512 is a magic code from the C system(3) call, which basically does a "sh -c (system call and arguments)". If sh can't find the file you've specified in the system() call, it returns 127, which is shifted into the upper eight bits of a 16-bit smallint (as far as I can make out, the lower eight bits are reserved for informing the caller that the system call was aborted due to a signal - e.g. a segmentation fault).

After a lot more searching, and a good deal of abuse on the #mythtv-users channel on freenode.org, I finally found some information about shell exit codes, and it turns out that 127 is "command not found". In other words, mythfilldatabase at that point is trying to call the tv_grab_au grabber and not finding it. On my brother's machine, this is because sh under root does not get the path /usr/local/bin, which is where the grabber is stored.

(It works on my machine because I run it from a script which picks a random time, and includes /usr/local/bin in the path.

So there are two solutions, as I see it:

1) Put tv_grab_au in /usr/bin/.

2) Run mythfilldatabase from cron using a script which includes /usr/local/bin in the path.

Given the bollocking I got in #mythtv-users for suggesting something so crude and hackish (in the words of Marcus Brown, mzb_d800) as cron, I guess I'll have to go with option 1. But here's hoping that this blog entry helps someone else out there - almost every post on the mythtv-users email list that mentions 32512 never mentions a solution...

posted at: 11:40 | path: /tech | permanent link to this entry

Kangaroos saved, who cares about anything else?
Once again the kangaroo cull at the old Belconnen naval signalling base has stalled again, with the animal liberation protesters calling it a victory. The pity is that these people are really protesting about the wrong thing.

On the one hand, they're protesting about the culling of 400 kangaroos. I wonder if they have realised that ACT Forestry has a license to cull 4,000 kangaroos - ten times that number - per year in the national parks. If I remember rightly, ACT Parks also has a license to cull 3,000 on other public land. So killing 400 as a once-off cull is hardly the great tragedy that it's being painted as.

On the other hand, there are animals and plants on that land that are highly endangered and under threat from the kangaroos. There's not only the Perunga Grasshopper and the Mouthless Moth in that area, but a rare species of grasslands flower that is being eaten by the kangaroos. While I'm a bit disappointed that the Liberals have chosen to make this one of those "if we were governing this wouldn't happen" issues, they're totally right - everyone's getting all upset because cute furry animals are going to die. And it looks like the Liberals are only making a fuss because Defence is flip-flopping, not because anything else might face extinction as a result of overgrazing by the kangaroos.

I got this information from a friend who wrote the policy on land care and kangaroo culling in the ACT. So I can't quote chapter and verse, because the conversation was informal and I didn't take notes. But I do think that the "animal liberationists" are way out of line. Don't get me wrong - generally I would like to avoid the kangaroos being killed at all. But to blow this out of proportion shows exactly the kind of loony-fringe unreasoning stupidity that these groups accuse their enemies of and that does their own credibility the most damage. And if you've got any species that is overrunning its ability to survive on the land, it's going to die off some way or other. Killing them quickly is far more humane than letting them starve, whether on a block in the ACT or elsewhere in NSW.

If only the human race would learn this and seriously consider population control of itself.

posted at: 11:17 | path: /society | permanent link to this entry

Sun, 23 Mar 2008

Solar Power For Free
I have an idea which I think would revolutionise the power industry. Of course, it requires a lot of venture capital to set up, something which I am unable to provide nor have the knowledge to find. I offer this up on my blog in the hopes that someone might read it, form a business out of it, and change the world. If I get mentioned or gain something from it, then that'd be nice, but making solar power easy for everyone to get involved in is enough reward for me.

Let's call the company Solar Sails. They offer to install a set of solar panels and the necessary equipment to feed power back into the grid for free. When you sign up with them, you pay only for the difference between the power that you use and the power your solar cells generate. If that balance is zero or negative in the billing period - say a month - then you pay nothing for your power. That's the deal for the consumer. Solar Sails itself makes its money by selling the extra power you produce (over what you consume) back to the grid.

From what I recall, the pay-off time for solar panels - the time taken for your lower power bills to recoup the cost of installing the panels - is about ten to fifteen years, and that figure is probably going to get shorter as the technology ramps up. (As Dr. Karl pointed out in a recent lecture, the power pay-off time - the time taken for the solar panels to generate more power than they took in their production - is only about two years or less). There are plenty of businesses who look at investing money in processes with longer pay-off times. Admittedly, Solar Sails is only going to get a fraction of the money those solar panels earn (since the meat of it is going into paying for your power), but on the other hand they can negotiate better deals with the grid supply companies and with the solar cell and technology providers than we as individual consumers can.

And the important thing, I feel, to get solar panel technology widely adopted is to lower that 'hump' of initial outlay. The most sensible point for that is at zero, so it costs you nothing to join the scheme. Even the most power-wasteful person has no reason not to join the scheme if it'll start saving them money without any outlay at all. Once they realise that they can save themselves more money by turning off lights and being less wasteful, you've changed their bad behaviour. And even if they don't actually change their wasteful ways, the fact that their purchase will have contributed to helping lower the price for other people (through volume purchasing by Solar Sails). So it's a pretty good proposition not just for getting more power generated by solar power and making it easier for people to adopt but also to change people's habits and reduce power consumption overall.

As usual, I'd love to hear your thoughts on this idea.

posted at: 23:12 | path: /society | permanent link to this entry

Wed, 19 Mar 2008

Stupid Quote of the Day
Andrew Donnellan quotes Albert Camus rehashing Pascal's Wager as if it's some kind of useful way to affirm what one believes. The certainty that the god that they believe in is the god that will be actually judging them is ... amusing.

I would counter with the Atheist's Wager: "You should live your life and try to make the world a better place for your being in it, whether or not you believe in God. If there is no God, you have lost nothing and will be remembered fondly by those you left behind. If there is a benevolent God, he may judge you on your merits coupled with your commitments, and not just on whether or not you believed in him." Perhaps a reading of the relevant chapters of Richard Dawkins' book "The God Delusion" might also useful debunking of this warped logic.

And I would also add that any God that requires my belief as a "jealous God" is a pretty poor god by even human standards. If a human required constant devotion and commitment in spite of complete and utter disdain and ignorance of the devotees, we'd call them wishy-washy or vain at best and spiteful or megalomaniac at worst. Why do so many religions then excuse their god of these emotions, coming up with ever more convoluted ineffabilities in order to justify a tyrant? I wish I could find what I thought was a Robert A. Heinlein quote on this, but it wasn't in this otherwise excellent collection.

posted at: 14:00 | path: /personal | permanent link to this entry

Tue, 18 Mar 2008

Standard Observations
Simon Rumble mentioned Joel Spolsky's post on web standards and it really is an excellent read. The fundamental point is that as a standard grows, testing any arbitrary device's compliance with it it grows harder. Given that, for rendering HTML, not only do we have a couple of 'official' standards: HTML 4, XHTML, etc., but we also have a number of 'defacto' standards - IE 5, IE 5.5, IE 6, IE 7, Firefox, Opera, etc. etc. etc ad nauseam. For a long time, Microsoft has banked on their desktop monopoly to lever their own defacto standards onto us, but I think they never intended it to be because of bugs in their own software. And now the chickens are coming home to roost, and they're stuck with either being bug-for-bug compatible with their own software (i.e. making it more expensive to produce) or breaking all those old web pages (i.e. making it much more unpopular).

I wonder if there was anyone in Microsoft Internet Explorer development team around the time they were producing 5.0 that was saying, "No, we can't ship this until it complies with the standard; that way we know we'll have less work to do in the future." If so, I feel doubly sorry for you: you've been proved right, but you're still stuck.

However, this is not a new problem to us software engineers. We've invented various test-based coding methodologies that ensure that the software probably obeys the standard, or at least can be proven to obey some standard (as opposed to being random). We've also seen the nifty XSLT macro that takes the OpenFormula specification and produces an OpenDocument Spreadsheet that tests the formula - I can't find any live links to it but I saved a copy and put it here. So it shouldn't actually be that hard to go through and implement, if not all, then a good portion of the HTML standard as rigorous tests and then use browser scripting to test its actual output. Tell me that someone isn't doing this already.

But the problem isn't really with making software obey the standard - although obviously Microsoft has had some problem with that in the past, and therefore I don't feel we can trust them in the future. The problem is that those pieces of broken software have formed a defacto standard that isn't mapped by a document. In fact, they form several inconsistent and conflicting standards. If you want another problem, it's that people writing web site code to detect browser type in the past have written something like:

if ($browser eq 'IE') {
    if ($version <= 5.0) {
        write_IE_5_0_HTML();
    } elsif ($version <= 5.5) {
        write_IE_5_5_HTML();
    } else {
        write_IE_HTML();
    }
    ...
}
When IE 7 came along and broke new stuff, they added:
    } elsif ($version <= 6.0) {
        write_IE_6_0_HTML();
It doesn't take much of a genius to work out that you can't just assume that this current version is the last version of IE, or that new versions of IE aren't necessarily going to be bug-for-bug compatible with the last version. So really the people writing the websites are to blame.

Joel doesn't identify Microsoft's correct response in this situation. The reason for this is that we're all small coders reading Joel's blog and we just don't have the power of Microsoft. It should be relatively easy for them to write a program that goes out and checks web sites to see whether they render correctly in IE 8, and then they should work together with the web site owners whose web sites don't render correctly to fix this. Microsoft does a big publicity campaign about how it's cleaning up the web to make sure it's all standard compliant for its new standards-compliant browser, they call it a big win, everyone goes back to work without an extra headache. Instead, they're carrying on like it's not their fault that the problem exists in the first place.

Microsoft's talking big about how it's this nice friendly corporate citizen that plays nice these days - let's see it start fixing up some of its past mistakes.

posted at: 22:41 | path: /tech/web | permanent link to this entry

Fri, 14 Mar 2008

Beat Counter Project
For a variety of reasons, I'm looking for a library that can not only determine the BPM of a song but count how many beats and bars are in it, excluding the introduction and finish of the song where there may be no actual music. (In other words it's not just a case of dividing the track length in real-number minutes by the BPM). Furthermore, one application has the complication of working with music that isn't four quarter-beats in a bar (i.e. 4/4 notation) - it might be 2/4, 3/4, 6/8 or 12/8. I do know this ahead of time - mostly - but automatic detection would be nice. The other application will require millisecond-precision locations of each beat, and must be able to compensate for tempo changes in the song.

So I've started a MicroPledge project for it and pledged $100US of my own money. The project must run on Linux, Mac OS-X and Windows and must also use an open source license, preferably the GPLv3. But I guess this is a bit of a bleg (thank you Mary Gardiner for introducing me to that term :-) if anyone knows of such a thing or some project that I can add code to.

Now to watch it fade into obscurity as I cast around for some way to write the thing myself...

posted at: 15:23 | path: /tech | permanent link to this entry

Sun, 02 Mar 2008

Floor Wax, Dessert Topping, Make-Up, Mould Release...
As a woodworker, I use Carnauba Wax mixed with lemon oil on my wood turning pieces to give them a nice shine that's also dust-proof and preserves the wood, preventing it from drying out and cracking. And as a student of popular culture, I've seen the reference to the Saturday Night Live sketch about Shimmer, the revolutionary product that's both a floor wax and a dessert topping.

So it amused and amazed even me to find out that Carnauba Wax is all this and more. It's the product of the Carnauba Palm, has a melting point way higher than most waxes, and is harder than concrete in pure form. It is used both in woodworking and in car polishes for its high-gloss, protective coating, but in that capacity (and because it's edible) it's also used as an ingredient in some cake icings and on the coatings of Tic-Tacs and othe candy to make them glossy. Likewise it's used in products such as lipsticks and blushes for the glossy, resilient coating. With a solvent in a can, it's sprayed into moulds for epoxy resin products such as semiconductors to make sure the product breaks free from the mould easily; because it's not soluble in water or alcohol it can be used in liquid epoxy casting too.

And to think that most people think that Shimmer doesn't exist...

posted at: 10:38 | path: /tech | permanent link to this entry

Fri, 15 Feb 2008

We're all sorry
Kate and I went to (New) Parliament House on Thursday to witness the government saying sorry to the Stolen Generation. Actually, we went to the front lawn between Old and New Parliament Houses, because there was no room in the Grand Hall. We watched on big screens as Prime Minister Kevin Rudd said sorry - personally, and as a member of parliament and as the leader of Australia. That got a big cheer from the audience; his speech was very well received and, in my perhaps biased opinion, was very well written.

Brendan Nelson started well but quickly lost his way. His job was never going to be easy, having been under the thumb of a man who ruled his party with an iron fist and refused absolutely to apologise. His basic error was to try and excuse his party's previous views, which required him to justify them; no-one had come to hear this. There was much jeering, clapping to drown him out (useless when you're several hundred metres away watching a broadcast, but impossible to deny the urge) and people turned their backs on him. I eventually felt that I too could not support him by appearing to be interested and turned my back, as futile as it was. He did, rescue himself in some minor degree by finishing by saying sorry.

I also found it amusing that that rabies-infested pit-bull of the Liberal Party, Tony Abbott, found that the only way to criticise the Rudd government was to say that they weren't going far enough in saying sorry and should be giving away money. So now he's not only completely contradicting his own party's previous policies, but doing it in a way which makes him personally look small. Great work, Tony. Keep it up.

The article on living in homeless shelters for five days that Mikal Still referred to makes a reasonable case for giving money as well as other, more policy and planning focussed ways of bring equality to the Aboriginal community. The point made is that money might not solve all the problems, and it might slip into the wrong hands, but it solves a whole lot more problems than the individual hand-outs and concessions can. But Kevin Rudd made the excellent point that giving money to individuals in this situation is going to make far less difference to the Aboriginal society as a whole than to put that same amount of money into health care, jobs, education and training. In my opinion, we also need a whole lot of work done on the media to reverse the 'Aboriginal Cringe' that we have in Australia. Once an Aboriginal, or any person who doesn't look like they grew up in Europe, can walk into any company and not be seen as an outsider, then we really will have progressed.

Saying Sorry is important, but it's still a step on a long road.

posted at: 00:17 | path: /society | permanent link to this entry

Sat, 02 Feb 2008

LCA 2008 Google Party Mix
The day finally came, and though I was a ball of sweaty clothing from giving my Lightning Talk I was ready to do some mixing for the LCA 2008 Google Party. Afterward, thanks to some pre-prepared scripts, I put the mix up on my torrent server pretty soon afterward. If you want it, you can download the mix via BitTorrent or read the track listing. All the music is Creative Commons licensed and therefore my mix is also similarly licensed; I'll work out the exact license code when I've looked at the licenses on all the music, but for now I will release the mix under a Creative Commons 3.0 By-NC-SA license.

Thank you to Peter Lieverdink and the LCA 2008 team for allowing me to mix at LCA - I had a great time doing it. And my collection hat (thank you Stewart Smith) raised $24.30 to donate to the artists. I reckon that's pretty good for something completely voluntary where most people hadn't been really getting into the music much (that I could see). Now to work out how to donate it...

posted at: 20:48 | path: /tech/lca | permanent link to this entry

Thu, 31 Jan 2008

Network Interactionativity
For some reason, on certain access points at LCA - for instance the one in the St. Mary's common room - I need to set my MTU to 1000 (i.e. down from 1500) in order to get Thunderbird to do secure POP. Everything else works fine, but Thunderbird just sits there timing out. I discovered this by watching the Wireshark log and noticing packet fragments disappearing (i.e. some packets where the tcp fragment analysis couldn't find parts of the packet to reassemble). Hopefully this isn't also causing Steve Walsh to pick up his specially sharpened LAN cable and hunt me down...

posted at: 23:16 | path: /tech/lca | permanent link to this entry

On to other things
After spending four hours or so working on my hackfest entry, I was less than optimistic. My entry had yet to even be compiled on the test machines, and it still had huge areas of code that were completely unimplemented. When I went into the common room at St Mary's, Nick from OzLabs recognised me and helpfully mentioned that someone else not only had their code completely running but was in the process of optimising it. I promptly resigned.

I say "helpfully" sincerely there. It is a bit of a pity that my ideas won't see the light of day this hackfest, and that I won't be in the running to win whatever prizes they might offer. But since I don't have a snowball's chance in a furnace of winning anyway that's hardly a real disappointment. And I can go to bed with a clear head and prepare for my lightning talk and the Irish Set Dancing and mixing I plan to do at the Google party, which realistically are much higher priorities.

I do hope that we get to see the winning solutions, though...

posted at: 22:17 | path: /tech/lca | permanent link to this entry

Hackfesty?
I've decided to have a more serious look at entering the hackfest, since I'm familiar with processing fractals with parallel algorithms. Downsides are that I've only done it with PVM, I haven't done anything with the Cell architecture and there's all these other really cool talks to go to. That and I need to have my eyes stop glazing over when I start reading anything more detailed than the "Fire hydrant and hose reel" sign opposite me.

posted at: 11:03 | path: /tech/lca | permanent link to this entry

Tue, 29 Jan 2008

All Systems Go
After a night of continued problems with hardware in Canberra, I decided to test my mixing setup. Having borrowed a nice Edirol UA-1A USB audio input/output from my friend Mark, I wanted to test this in combination with the guitar amp from Andrew. I'd also changed my VMWare system over to use Host-only networking and convinced Samba and IPTables to talk to the VMWare client over this. So, was it going to actually work? Best not to find out on Friday Night...

After a bit of odd-hackery, I got it going - pleasingly well. The sound skips slightly when context-switching from the VMWare client, which is nothing unusual - the standard performance practice is to boot afresh and only starting those things which you absolutely need anyway. So it's all systems go for Friday night...

posted at: 23:47 | path: /tech | permanent link to this entry

Subverting keysigning - whoop de doo
We have Andrew Chalmers offering tequila for signing his unverified key. We have Martin Krafft offering fake ID for signing his unverified key. They talk about how clever they are and how they're making valid points in subverting the web of trust process. They justify it by talking about trusting 'reputation' over trusting an anonymous but identifiable person, or being an "experiment". And my considered response is "whoop-de-doo". It's the web-of-trust equivalent of claiming that sexist jokes are 'free speech', defending violent anarchy as 'subverting the police state', or claiming that stomping on someone else's project is an 'experiment' in destruction. It's still peurile.

The ultimate proof of this is to extrapolate what would happen if everyone did this: the web of trust would die. Is this what these people really want? If you don't want that, then don't do it. If you do want that, then please don't pretend that you're only doing it to make some highfalutin intellectual point. Shut up and try to behave. It's not a web-of-friends, it's a web-of-trust-of-identity. I may not be a friend of Arjen Lentz, but I'll sign his key to say that he's proved to me that his key identifies him. And, frankly, Chalmers and Krafft make me want to ignore them rather than befriend them.

posted at: 09:45 | path: /society | permanent link to this entry


All posts licensed under the CC-BY-NC license. Author Paul Wayper.