Richard Jones' Log
Shtoom, by uber-hacker Anthony. A software SIP (Voice over IP) Phone, written in Python. Now that's pretty damn neat :)
The name comes from a Monty Python sketch, of course.
Rachel was blown away by the creative efforts of fungus when applied to music, images and movies on media like CDs and DVDs. My first reaction on seeing the the results of the manipulated still images was "oh, there's some sort of bug in the image". Ahem.
Ah, I remember the days of writing mpeg codecs, and the kinda cool effects that result from slightly dodgy FFT code :)
The commonalities between contemporary green politics and old-fashioned fascism and Nazism are chilling.
... from his recent speech in the Australian Senate during a debate on the protocol used during speeches from overseas dignitaries. Not that he actually put forward any statements pertinent to the debate at hand. By chance, I was actually listening to the broadcast of the Senate at the time. The Senator Faulkner followed up (and actually debated the point at hand) and had some fun things to say:
I listened enraptured to Senator Brandis's contribution. What a wonderfully pretentious speech that was...
Well, Peter Staudenmaier, co-author of one of the books George Brandis used in his rambling attack on the Greens, has responded (you can listen to him on ABC radio too - about 16 1/2 minutes in):
Historians rarely enjoy their fifteen minutes of fame, particularly when their work covers an obscure topic...my scholarship offers little support for the conclusions Senator Brandis reached.
Brandis, you're a tool. And the official response of John Howard to all of this? As with every other unsubstantiated, vicious attack that's been put forward by someone in his government, he just says that's their views, and he might not have put it quite like that. And shrugs it off. Made of teflon, that man.
Upgrading MySQL to 4.0.16 fixed the bug I reported yesterday. I am usually quite wary of upgrading something as complex as MySQL since there's generally RPM dependency hell, but in this case I was able to replace the Mandrake 9.1 RPMs with those from the MySQL site.
Oh, and I also put the final effort into fixing the Zope interface for Roundup, yay!
This actually started almost a year ago, then I started migrating Roundup away from using ":" prefixes for special form variables. Zope eats form vars with ":" in them, and thus Roundup was quite confused :) Now I use "@" instead, and everything's happy!
No, this isn't a particularly huge task, but I just never seemed to find the time or inclination to do it. I'm intending to run a couple of instances on my new Zope web hosting though...
I've just checked in a working postgresql backend for Roundup. That'll make a few people a lot happier.
Along the way, I cleaned up the general rdbms backend implementation. MySQL exhibited some fun behaviour... when running the following:
set autocommit=0; CREATE TABLE ids (id varchar(255)) TYPE=InnoDB; CREATE INDEX ids_id_idx on ids(id); insert into ids values ('1'); commit; delete from ids where id='1'; rollback; select * from ids where id='1'; select * from ids where id=1; drop table ids;
That will list an empty table on the first select, and the contents of the table on the second select. Note the id column is clearly a varchar. Now the fun part. Commenting out the "CREATE INDEX" statement makes BOTH selects work!
It's a bug in the InnoDB implementation. Switching to BDB makes it work too. BDB is a lot slower though. I've reported it as MySQL bug 1810.
Until it's addressed, I'll be defaulting the table type in the mysql backend to BDB (which is the setting in maint-0-6, thankfully)
In my old "python anti-pitfalls" entry, I neglected to mention try...finally (though I did mention the "ubiquitous, unencumbering exception system"). According to Python's Language Reference:
The try...finally form specifies a `cleanup' handler. The try clause is executed. When no exception occurs, the finally clause is executed. When an exception occurs in the try clause, the exception is temporarily saved, the finally clause is executed, and then the saved exception is re-raised.
Put simply, it means that in the following code:
db = open_database() try: # do some work with the db handle finally: db.close()
the db.close()
part always gets run, regardless of whether there was some exception while using the db handle. This is crucial for databases such as Berkeley DB (which has a habit of getting corrupted if not treated with the utmost respect), or in situations where the db may have references that need cleaning up such as mysql.
Now, I just need to figure how to install finally
handlers in my life...
Isn't open source wonderful? A while ago I received a patch that fixed my task planner code to use python2.3's csv module instead of Object-Craft's. I filed it away for attention "later", being stupidly busy at the moment. My inbox has a lot of those kinds of messages at the moment. I just got another user asking about python2.3 support. I forwarded the patched file, saying "sorry, haven't got time, haven't even looked at this patched file."
Well, I just found time to look into applying the patch. And during the process I realised that I'd already done the work. Over a month ago. I didn't release the code though, and promptly forgot about it.
Well, it's out now :)
I never anticipated http://www.python.org/pypi?:action=display&name=John%20Bloxham&version=6 :)
My immediate thought is to lock off submission of packages through the web. That leaves only submission through the setup.py register command...
Update: entry removed from database by amk after I repeatedly forgot, thanks!
Jan Decaluwe is officially cool in my books (link via PyPI). I did hardware stuff back at Uni (about a decade ago now) and thoroughly enjoyed it. I only wish I was still in the game so I could try out a tool like this :)
A project that I've always thought would be interesting is to see how useful or practical application-specific hardware would be for the Python runtime. Combine with the PyPy project, and now defining hardware in Python too... whee!
OK, this is just silly. The marketing campaign would obviously include "Don't bother moving next to a busy airport, just buy one of these systems and crank it up! (note: cost of system may exceed house purchase price)".
Then there's the monitor, which reminds me of a great modern parody:
...
Hey, hey!
Twelve yards long, two lanes wide,
Sixty five tons of American pride!
Canyonero! Canyonero!
...
Via Ned Batchelder, Brian Raiter explains Albert Einstein's Theory of Relativity entirely using words no more than four letters long.
And then all of us, we all just sat back and said: "Whoa."
Brian's also written Prime Number Hide-and-Seek: How the RSA Cipher Works.
"Obeservation for the day: i18n is a pita. Let's hear it for esperanto."
I concur. IM conversations follow during which Stuart asks "Does esperanto use accents? Or can we go back to ASCII too?" to which Rupert says "I don't think it uses any accents." Stuart, though impressed by being able to handle plain ASCII again, responds "But I can't be bothered learning a new language, so bring on western imperialism." Well, the US is working on that for ya...
Anthony, on the other hand, has had to deal with translations far, far too much. He now typically codes translation functions as "_ = str.upper" (aka. the Screaming American Tourist approach). In his words, "It's my answer to i18n... it annoys srichter something shocking ;)"
I got SSX3 on Saturday. What a great game! I reckon I played it for about 16 hours over the remaining weekend (Rachel was roleplaying, so I didn't feel so bad not socialising :)
It's got the same elements that made the original game so much fun: interesting courses, incredible tricks to perform, and relatively easy to just pick up and play - but requires dedication to really master. This release of SSX makes the second version ("SSX Tricky") seem like a minor advancement on the gameplay of the original. Having played SSX through as all characters, I borrrowed and finished SSX Tricky in a single day's play (ie. about 10 hours) so didn't bother to buy it. SSX3 on the other hand has me still going having not finished the major challenge elements (ie. winning gold medals in all competitions) and I've barely scratched the surface of the game's extra challenges and secret areas.
Then there's the challenge of keeping a combo going for an entire run. That one will take me a very long time to master :)
Biggest gripe: one challenge requires me to do an Indy 360 over a particular jump. I have no idea what an Indy 360 is -- I'd have to load up the old SSX and look through its trick help screen to find out :( This SSX Tricky trick list will probably help. I've also just noticed in another FAQ that an Indy is just a board grab, so an Indy 360 is actually quite trivial :)
I've coded up an RSS feed for this weblog now, and it's available at the top level (https://mechanicalcat.net/richard/log/rss) or on a per-category basis (see the sidebar links).
Now to fix the archive pages ... :)