Phillip Pearson - web + electronics notes

tech notes and web hackery from a new zealander who was vaguely useful on the web back in 2002 (see: python community server, the blogging ecosystem, the new zealand coffee review, the internet topic exchange).

2003-3-18

Perl, Java, Python

Rafe Colburn writes something in Perl, then explains that you have to be a pretty good Perl coder to be able to read it. And then he rewrites it in Java, using many more lines but making it much more readable.

So of course, here's the Python version:

if depth: depth += datadir.count('/') - 1

Still one line, but it also makes sense. And if you want it to be cross-platform:

import os
if depth:
    depth += datadir.count(os.sep) - 1


How's that for readability?

This is the fun thing about Python: it already does what you want. "Batteries Included."

MOO mailing lists --> RSS --> topic exchange

I heard from Aldon Hynes today about something he's working on. An interesting idea - part of the reason for the Topic Exchange was to give blogs the sort of continuity that mailing lists already have. So it's cool to see flow coming from the other direction -- from mailing lists back to blogs. Here's part of his email:

I am looking at using the XML-RPC interface to Topic Exchange. In particular, I have been interested in bridge the gap between MOOs and the Blogging community. So, I am thinking of calling the XML-RPC interface from within a MOO.

For example, I have taken MOO mailing lists and made them available via RSS.

... more like this: []