James Tauber's Blog 2006


blog >


My Rosetta Stone Experience So Far

Jamie Turner asked in a comment how I'm liking the Rosetta Stone Italian courses.

First of all, I got the Internet-based version rather than the box. It's subscription based, but unless you plan on using it for a year or two, it's much cheaper to go the Internet-based version.

As far as I can tell it's all Shockwave based anyway so there's no difference in functionality. You have to be connected to the Internet, of course, and a couple of times the client had trouble getting data from the server, but those were minor problems for the cost saving.

One nice thing about the Internet version, which might not be true of the boxed version, is I get previews of all the other languages they offer.

As I've mentioned before, I had to download the Shockwave plugin and, as it's not a Universal Binary yet, run it with Apple's Rosetta. Rosetta on Rosetta, but it works fine.

So what do I think of the course? It seems very good for learning to read as well as to understand isolated spoken sentences. I don't feel it does nearly as good a job as Pimsleur at teaching me to speak, or participate in conversations. Pimsleur has a remarkable ability to get you giving responses in Italian without having to think. I don't see Rosetta doing that, however, Rosetta is giving me a much better (and faster) knowledge of the grammar than Pimsleur.

Rosetta's approach is very simple. Four pictures—four phrases or sentences. Depending on what style of exercise you want to do, you interact with the pictures and sentences in a different way. Once exercise involves reading and hearing a sentence, being shown four pictures and having to pick which picture is being referred to. This is done in a set of four so you end up matching up four sentences with four pictures. Another style is being shown one picture and four phrases / sentences and having to pick which phrase or sentence matches the picture.

The variations are supposed to suit different learning styles, but I found the choice a little overwhelming. It's too repetitive to do all the different exercise types over exactly the same material. I ended up just sticking to one exercise type. I may repeat the course doing a different exercise type once I'm finished with this one. That may be more of what's intended anyway as once you finish one lesson in one style, it takes you on the next lesson in that same style anyway.

There are exercise styles for speaking and writing as well but I haven't gotten into those yet.

The matching approach works well not only for vocabulary but also grammar. They'll show pictures of a girl about to cut a piece of paper, a girl in the middle of cutting a piece of paper and a girl who has cut a piece of paper. And so you learn verbal inflection for tense and aspect that way. I found that quite effective, although I would like to couple that with some sort of summary at the end.

One thing I really missed, though, was that, other than each set of four questions being shuffled randomly, the progression is entirely programmatic. The questions are never based on what you've got right or wrong in the past. I think that's a huge missed opportunity—something combining the Rosetta Stone approach with the sort of thing I'm implementing in Quisition would be very powerful.

At the end of the day, though, I would recommend Rosetta Stone for reading and listening comprehension (preferring Pimsleur for learning conversational skills). Note that you can view a free demo to see for yourself if you like the Rosetta Stone style.

Hope this is of some use to people considering Rosetta Stone. And stay tuned, as I might use this blog to explore an implementation of my own that makes various improvements I'd like to see.

by : Created on Dec. 21, 2006 : Last modified Dec. 21, 2006 : (permalink)


My New Favourite Micro-ISV

My new favourite Micro-ISV is Hog Bay Software, makers of Mori (my latest outliner of choice) and WriteRoom (which is rapidly becoming my preferred text editor for brainstorming and jotting down ideas).

Polished applications, polished website and seemingly very focused on the user community. And how's this for transparency: they publish their sales figures.

UPDATE: Another neat thing they do, which I forgot to mention, is give suggestions for alternative competitive products. For example, on the page for their timer, Clockwork, they say:

The truth is that computer timers are a dime a dozen. If you just need a simple timer I would try out Pester or one of the many other free timers that are availible. If you've decided to pay for a timer then you should take a look at Alarm Clock Pro. It seems to be the feature leader for OS X timers, but as a result it's not simple and may be more then you want or need. Clockwork tries to split the difference. I think its clean interface and full screen mode are what set it appart.

Wow! How refreshing.

by : Created on Dec. 20, 2006 : Last modified Dec. 21, 2006 : (permalink)


Italian Dr Seuss

Doing Rosetta Stone Italian Level 2, I came across the following sentence which sounds like something out of Dr Seuss:

Mette la lettera nella cassetta delle lettere

It means (in the context of the exercise) something like 'she puts the letter in the letter box'.

by : Created on Dec. 19, 2006 : Last modified Dec. 19, 2006 : (permalink)


The Darfur Wall

What a wonderful idea! A clever way to attract donors and the founders pay all administrative costs.

Consider buying a number or ten. Perhaps a birthday or anniversary (you get to choose the first number - and get one random number for each additional dollar).

i lit 37 - the darfur wall

by : Created on Dec. 9, 2006 : Last modified Dec. 9, 2006 : (permalink)


Alibi On The Lot

Tom Bennett, my filmmaking partner, is entering to be a contestant on the filmmaking show On The Lot.

His entry includes a trailer for Alibi Phone Network, the short film that Tom wrote and directed and I produced (along with James Marcus), shot, edited and scored.

You can watch his entry (including the trailer) at http://films.thelot.com/films/890. You can also rate it highly if you like ;)

by : Created on Dec. 9, 2006 : Last modified Dec. 9, 2006 : (permalink)


XML Beginnings, Part 1

Seeing as it's the 10th Anniversary of XML, I thought I'd reminisce a little about my small involvement in its beginnings.

In 1994, I was interested in two seemingly distinct fields—corpus linguistics and Web publishing—that happened to both have something to do with SGML. So I decided to learn more about SGML.

I rapidly became an SGML snob of sorts, lamenting the state of HTML and arguing on various mailing lists and newsgroups how much better the Web would be with SGML.

Towards the end of 1995, I started to think seriously about some of the things that would be necessary to make SGML on the Web a reality. One component, I thought, would be a way of resolving SGML's formal public identifiers. SGML Open (which became OASIS eventually) had catalogs but they were like hosts files. What was needed was something more like DNS.

So I came up with an extension to SGML Open Catalogs to allow for hierarchical resolution. You can read a version of my proposal at: http://jtauber.com/1996/03/standards/fpi-urn/delegate.html

This got the attention of Eduardo Gutentag at Sun who thought Jon Bosak (who had recently joined Sun from Novell) might be interested. It also got the attention of Paul Grosso who invited me to present the idea to a meeting of SGML Open in early 1996. I was interning at Sun Labs in Chelmsford at the time and Sun agreed to fly me over to Long Beach for the meeting. My idea seemed to be received well—Charles Goldfarb described it as a "dandy" which was very exciting for a 22-year-old SGML aspirant.

I spent some time after the meeting talking to Jon and Eduardo about SGML on the Web.

After my internship, Sun offered me a job (actually a couple of different positions, including running a website for reusable Java classes, but that's another story). I also interviewed with EBT. For personal reasons, however, I decided to move back to Australia.

I was still interested in SGML on the Web, though, and the next component I thought would be necessary was an implementation of the DSSSL stylesheet language. My vision was to build a tool that would output the result of DSSSL to both Tk widgets for online display and something like PDF for printing.

A couple of months after my return to Australia, I was emailing with Jon Bosak about my DSSSL ideas. And that's when he told me some amazing news: he had convinced the W3C to let him set up a group to look at SGML on the Web and he asked if I'd be interested in being part of the group.

(to be continued)

by : Created on Dec. 5, 2006 : Last modified Dec. 5, 2006 : (permalink)


They Can't Hear Us

Pete Lacey has a great post They Can't Hear You on the gap between the corner of the blogosphere I tend to hang around in and what goes on inside most large enterprises:

the typical corporate technologist hasn’t considered REST and decided against it, they haven’t even heard the term. Ditto RelaxNG, Django, Atom, and everything else that makes the Web work and makes working with the Web easy.

Those technologies are each close to my heart, and get talked about by people on my blogroll all the time. Yet, I can confirm, a lot of really smart people in the industry haven't even heard of them. Any of them.

Well worth a read.

by : Created on Nov. 30, 2006 : Last modified Nov. 30, 2006 : (permalink)


PyCon Submission Rejected

Just got the rejection notice for my PyCon submission on pyjamas. The non-positives all had a single criticism: pyjamas isn't mature enough.

I don't quite agree—pyjamas is actually quite far along. Probably didn't help that I conservatively called the last release 0.1 even though it was probably more of a 0.5 :-)

They had a lot more submissions than places, though, so it looks like it will be a great programme, with or without pyjamas.

UPDATE (2006-11-30): The above makes me sound more upset than I am. I know how hard it is to draw a cut line when there are many more submissions than places so I don't envy the job the committee had. I was actually quite pleased that (lack of) maturity was the only negative reason given. That's easy to fix :-) But I'm still wondering if the 0.1 designation counted against me.

by : Created on Nov. 29, 2006 : Last modified Nov. 30, 2006 : (permalink)


Rosetta Stone

On Sunday, I thought I'd try out the online version of the Rosetta Stone language learning software. It works out much cheaper than buying the CD-ROM.

It uses Macromedia Shockwave which, it turns out, is not available as a Universal Binary yet, only PPC.

So to run the Rosetta Stone language learning software, I have to use Apple's Rosetta.

Funny, I thought. But then to top it all off, HB suggested we go to the British Museum that afternoon. And guess what we saw...

by : Created on Nov. 29, 2006 : Last modified Nov. 29, 2006 : (permalink)


Incompatible SQLite in OS X and Python

I started my porting of Quisition to django last night.

For development, I'm using SQLite as my database, but it seems I've hit a problem with conflicting versions.

Mac OS X comes with SQLite 3.1.3. That's what's used running sqlite3 at the command-line or running django's dbshell.

However, I'm guessing that when my application is running normally, django is using the SQLite that comes with Python 2.5 (which looks like it could be 3.3.5 or something).

As a result, databases created by django cannot be viewed using sqlite3 at the command-line or running dbshell. There must be a file format incompatibility between SQLite 3.1.x and 3.3.x as I get the error message:

Error: unsupported file format

UPDATE: I downloaded SQLite 3.3.8 and built it (although only after working out I needed to do a gcc_select 4.0 first). The new sqlite3 works fine on the django-generated database.

by : Created on Nov. 25, 2006 : Last modified Nov. 25, 2006 : (permalink)


Non-ACIDic Qantas Upgrades

I just had a bit of fright. I went on Qantas's website to see if I'd been upgraded on either of my flights tomorrow only to discover my reservation for the first flight had been cancelled.

I rang Qantas (whose telephone customer service is always excellent) and they not only assured me I still had a reservation but that I had indeed received an upgrade.

The only theory the representative could offer is that I'd logged into the website at the "split second" (her words) the upgrade was going through and I'd caught it after the economy class reservation had been cancelled but before the business class reservation had gone through. A refresh of the web page confirmed I had indeed between upgraded.

"This sort of thing happens all the time with computers," the helpful representative offered. I guess it does if the system doesn't follow the I in ACID :-)

by : Created on Nov. 22, 2006 : Last modified Nov. 22, 2006 : (permalink)


Pitch Perception Test

As part of his research at Harvard Medical School, Jake Mandell has a nice online pitch perception test that you can do in about 5 minutes.

Jake says that "the test is purposefully made very hard, so excellent musicians rarely score above 80% correct."

I got 80.6% on my first try, but I think Jake is being kind in his quote above because that only places me in the 66th percentile.

UPDATE: Next day I did the test again and got 88.9% (92nd percentile). That's quite a big jump :-)

by : Created on Nov. 21, 2006 : Last modified Nov. 22, 2006 : (permalink)


Coordinate Systems and Metrics

In the previous Poincaré Project post about coordinate systems, I introduced two charts that covered the circle and introduced a coordinate system ranging from 0 to 1 on each of them.

At the time I said:

I've arbitrarily ranged the two coordinate systems from 0 to 1 but any continuous parameterisation of the coordinate curve would work.

Here are three examples of different coordinate systems on the blue chart:

The point to show here is that not only is the choice of the end points arbitrary but that the coordinate can change at a different rate depending on where you are. In the second example, the distance between 0.5 and 0.6 is great than that between 0.4 and 0.5 or 0.5 and 0.6.

Notice that we haven't yet introduced any structure to the manifold itself that allows as to talk about distance without (as we've done on this web page) actually identifying the points in our manifold with points in a higher-dimensional euclidian space (in this case the R^2 of the screen).

This notion of the "rate of change" of the coordinate function lets us do so intrinsically, however. Say the distance between the point 0.5 and 0.6 is 5 in some units. Then the ratio of distance to change of coordinate is 5 / (0.6 - 0.5) = 50. Do this again from 0.5 to 0.55, or from 0.5 to 0.51 or from 0.5 to 0.5001. In other words, take the limit to a change in coordinate of 0.

This tells us how much distance is travelled as a proportion of coordinate change at the point 0.5. This "distance travelled as proportion of coordinate change" is called a metric for that coordinate system. Note that it's a function of the point you're at.

If you want to calculate the distance between arbitrary points with coordinates a and b, you take the integral of this metric function between a and b.

This new structure of a manifold with a metric defined on each chart is core not only to the proof of the Poincaré Conjecture but also to Einstein's General Theory of Relativity. In fact, by the time we've covered what we need for Poincaré, we will have covered more than enough mathematics to understand GR too.

One final thought: notice that, in our example, the metric isn't really telling you much about the manifold itself at all. The metric is merely expressing the relationship between the coordinate system and the notion of distance. We'll see shortly, however, that in dimensions higher that one, it goes beyond just telling you something about the coordinate system and allows you to describe the curvature intrinsic to the manifold.

UPDATE: next post

by : Created on Nov. 19, 2006 : Last modified Nov. 19, 2006 : (permalink)


Hans Rosling and Gapminder

I just watched one of the most informative videos I've ever seen: Hans Rosling's Talk at TED.

Not only is it a wonderful example of data visualisation, it is a fascinating, myth-busting look at what's really going on with world health and economic development.

Rosling calls his approach a "fact-based world view". He's also extremely entertaining.

The software behind his visualisations was developed by a non-profit he founded, Gapminder, and is free (as in beer).

Even if you don't check out the software - the video is well worth 20 minutes of your time.

by : Created on Nov. 18, 2006 : Last modified Nov. 18, 2006 : (permalink)


Why A-Sharp is Not B-Flat

I've talked before about note naming but because I was recently IMing with a friend about why A♯ != B♭ I've been thinking about a simpler way to explain it. It also explains why you can have double flats and double sharps (leading to 35 possible note names for 12 different pitches). Here goes...

  • the vast majority of western music involves 12 notes in an octave
  • the vast majority of western music is based around a scale consisting of 7 of those notes specific to the choice of key (the notes are called the diatonic notes for that key)
  • a particular note in a piece is functioning either as a diatonic note or as a note a semitone higher or lower than a diatonic note
  • when expressing a note that is functioning as a raised or lowered note, you use the same letter name as the diatonic note you are raising or lowering. e.g. a raised G is G♯ and a lowered G is G♭.
  • if the diatonic note is already written with a sharp, the raised note has a double sharp and the lowered note has a natural symbol
  • if the diatonic note is already written with a flat, the raised note has a natural and the lowered note has a double flat
  • but in all cases, the letter part of the note name stays the same

So, imagine you're in the key of Gm. The diatonic notes are: G A B♭ C D E♭ F. What does A♯ mean? It means you've taken the second note of the scale and raised it. What does B♭ mean? It means the third note of the scale.

In 12-tone equal temperament, they may sound the same; you may play them the same on the piano or the guitar. But if the function of the note at a particular point in the piece is as the third note in the Gm scale, you can only write it B♭ and not A♯. A♯ means something completely different.

It's the musical equivalent of "hear" versus "here". Just because they are homophonic doesn't mean they are the same word. Similarly, in western tonal music B♭ doesn't mean the same as A♯.

by : Created on Nov. 17, 2006 : Last modified Nov. 17, 2006 : (permalink)


Milton Friedman

Milton Friedman has died at age 94.

While my sympathies are more with the Austrian School than the Chicago School, I found a lot in Friedman I agreed with and certainly a lot I respected. He probably did more than anyone else to educate the more general population about the benefits of free markets over Keynesian-style intervention.

That the use of the word 'liberal' is completely misused in the US is no more clear than in the obituaries I've read that talk about Friedman's opponents being 'liberals'. I can think of few people that better exemplified true liberalism than Friedman himself.

But although I learnt a lot about economics and economic policy from his writings, I think the thing I will always remember most about him is the loving relationship he seemed to have with his wife.

by : Created on Nov. 16, 2006 : Last modified Nov. 16, 2006 : (permalink)


Amazing Filter

When I got my EF 16mm-35mm f/2.8 L lens, I also bought a UV filter for it.

The box has an amazing without filter and with filter example:

Without the filter you couldn't even tell she's wearing a hat! Besides widening the field of view, the filter really brings out her smile. And visible signs of arm folding are dramatically reduced.

All this with one filter. Amazing!

by : Created on Nov. 16, 2006 : Last modified Nov. 16, 2006 : (permalink)


Quisition Going Django

I've decided I'm going to port my nascent flashcard site Quisition over to Django. I've started playing around with said web framework and, quite frankly, it's amazing.

Equally amazing is the ongoing Django Book and its comment system.

I've pretty much decided to throw away my home-grown web framework efforts and convert to Django. Hopefully I won't regret it :-)

(Needless to say, I plan to use pyjamas for the client-side parts of Quisition)

by : Created on Nov. 15, 2006 : Last modified Nov. 15, 2006 : (permalink)


System Preferences Accounts Empty

Today I went to System Preferences on Mac OS X and clicked on Accounts.

Nothing happened.

The title bar showed "Loading Accounts..." but never came back with anything.

Clicking on Accounts a second time and the window just went blank.

After rebooting and trying various things, I tried

nidump passwd /

in Terminal, which revealed the "problem". An 'oracle' user had been created (by the Oracle installer) without a realname.

So I did

sudo nicl . -create /users/oracle realname "Oracle"

and it fixed the problem.

Surely Apple could make System Preferences...Accounts a little more robust than this!

by : Created on Nov. 15, 2006 : Last modified Nov. 15, 2006 : (permalink)


Pyjamas 0.1 Released

I'm delighted to announce the release of pyjamas 0.1.

Pyjamas is a toolkit and library designed to enable writing AJAX applications in Python. It is based on Google's GWT which does the same thing for Java.

The pyjamas home page is at http://pyjamas.pyworks.org/

The goal for 0.1 was to get the GWT examples all mostly working on Firefox.

Thanks to Willie Gollino and Vicente J. Ruiz Jurado for making that possible.

by : Created on Nov. 6, 2006 : Last modified Nov. 6, 2006 : (permalink)


Scans of Complete Nibble Magazine Available

Nibble was my favourite Apple II magazine in the 1980s.

Recently, I found the official Nibble Magazine site. You can buy a DVD-ROM (or 10 CD-ROMs) with scans of the complete 12.5 years of the magazine.

Needless to say, I've put in my order :-)

by : Created on Nov. 4, 2006 : Last modified Nov. 4, 2006 : (permalink)


PyCon Submission on Pyjamas

I submitted a proposal to PyCon 2007 for a talk on Pyjamas. Playing on the name, I called the talk "Developing Web Applications in Pyjamas". I'll find out in two weeks if it got accepted.

(PS Just occurred to me that "Pycon" is the name of one of the twelve colonies in Battlestar Galactica)

by : Created on Nov. 1, 2006 : Last modified Nov. 1, 2006 : (permalink)


Reddit Acquisition

Congratulations to the Reddit founders and employees and to Y Combinator on the acquisition!

by : Created on Oct. 31, 2006 : Last modified Oct. 31, 2006 : (permalink)


New Lens

My first Canon L-series lens arrived today. It's the EF 16-35mm f/2.8L USM.

The L-series in Canon lenses is like the M-series in BMW cars. The construction and performance are just at a totally different level than "lesser" models.

You can tell L-series lenses from a distance because they have the "red ring".

I haven't had a chance to try it out yet, but even the external look of it sets it apart: the casing is metal rather than plastic; there is no external change in lens length when focusing or zooming. And as the f/2.8 in the name suggests, there's no change to maximum aperture at different focal lengths.

I'm looking forward to having 16mm. Even though that's 25.6mm equivalent with my APS-C sensor, I can't wait for the extra field of view. And even though f/2.8 isn't quite as open as my 50mm f/1.4, it's by no means shabby and is hopefully worth spending the extra money over the 17-40mm f/4 L.

by : Created on Oct. 31, 2006 : Last modified Oct. 31, 2006 : (permalink)


TRS-80 CoCo and Bedlam

I'm reading Steve Wozniak's autobiography iWoz at the moment and so I've been reminiscing about my early Apple II days. Back in May 2001 when reminiscence last happened in a big way, I spent the weekend writing an Apple II emulator in Python (see ApplePy) :-)

This time, I also started reminiscing about the computer I had before the Apple II, the first generation TRS-80 Color Computer. My strongest memory of the CoCo was using the EDASM ROM cartridge to learn 6809 assembly language programming.

But I also remember playing text adventure games, like Bedlam.

With a bit of Googling, I found a CoCo emulator Java Applet that includes Bedlam. I don't think I ever got the game out as a kid. But last night I completed it in about an hour. Funny how back then it seemed like such a "big" game. In fact, it had only 25 rooms and 5 objects.

Still a lot of fun.

by : Created on Oct. 29, 2006 : Last modified Oct. 29, 2006 : (permalink)


Pyjamas Progress

Good progress has been made recently on pyjamas, the Python port of Google's GWT.

A 0.1 release should come shortly now that all the examples have been implemented.

The goal of 0.2 will then be to iron out bugs in those examples and ensure they work on at least Firefox, Safari and IE.

by : Created on Oct. 28, 2006 : Last modified Oct. 28, 2006 : (permalink)


Reddit Feeds

Although it came out in May, I just discovered that reddit (whose main site I've used for a while) provides a web-based feed aggregator along the lines of a Bloglines or Google Reader but with the added feature of their voting system. Plus it integrates nicely with the main reddit functionality. Pretty cool stuff.

Check it out at http://feeds.reddit.com/

They offer import of subscriptions directly from Bloglines but it wasn't working for me when I tried it.

by : Created on Oct. 27, 2006 : Last modified Oct. 27, 2006 : (permalink)


Skipping Tracks

I've noticed for a while that I'm much more likely to skip over a good song on my iPod than I would if flicking through channels on the radio.

Thinking about it, I wondered if there's a certain loss of enjoyment in a song when you can hear it on demand.

But then on a trans-Atlantic flight on Monday, I noticed a similar phenomenon with playing my entire library versus just the playlist of my most highly rated. I'm far more tolerant of, say, a three-star song when listening to my entire library than a four-star song on my highly rated playlist.

So I've come up with the following formulation: The chance of skipping over a song is strongly positively correlated with the chance that the next song is at least as good.

With a "highly rated" playlist, there's a good chance the next song will be as least as good as the one I'm listening to, so I'm more inclined to skip the current song, even if I really like it.

With my entire library, if I'm listening to an "okay" song, there's a reasonable chance the next song will be one I like less, so I'm more inclined to enjoy the current song.

That's my current hypothesis, anyway. I haven't read George Zipf's work but I wonder if it relates to this.

by : Created on Oct. 25, 2006 : Last modified Oct. 25, 2006 : (permalink)


Coordinate Systems

Long overdue post to the Poincaré Project.

When we defined manifolds back in Poincare Project: Manifolds, we pretty much defined what a coordinate system is:

Define a chart to be a continuous one-to-one mapping from an open set to R^n.

A manifold is a topological space covered by one or more charts. In other words, every point (and some open set the point is in) is part of at least one chart.

A chart provides a coordinate system and the coordinates of a point on a manifold are just the components of the point in R^n that the point on the manifold maps to in that chart.

So one way of thinking about coordinates is that they are tuples of real numbers that identify points on a manifold.

But it is important to note that coordinate systems are continuous. If you range one coordinate over a subset of its possible values, keeping any other coordinates constant, then you won't just get a random set of points, you'll get a continuous curve.

Note also that, although we often think about latitude and longitude as providing a coordinate system for the two-dimensional sphere, this single coordinate system breaks down at the poles. The north and south poles don't have a defined longitude. This doesn't pose a problem for either the latitude / longitude coordinate system or the manifold-ness of the sphere because (a) the latitude / longitude system works fine everywhere but the poles; (b) there is nothing wrong with a manifold requiring multiple overlapping coordinate systems to cover all its points.

To make this clearer, consider an even simpler example: the one-dimensional sphere, or circle. We could just map the points on the circle to [0, 1) but then we would get a discontinuity back at 0. So we have to use multiple overlapping coordinate systems:

Here we have a red coordinate system which covers part of the (black) circle and a blue coordinate system which covers a different but overlapping part. For every point, there are coordinates for that point in at least one system and the system is continuous at that point. I've arbitrarily ranged the two coordinate systems from 0 to 1 but any continuous parameterisation of the coordinate curve would work.

Next we will reintroduce the notion of a metric defined in terms of coordinate systems.

UPDATE: next post

by : Created on Oct. 22, 2006 : Last modified Aug. 9, 2007 : (permalink)


Users Can't Change OS X Password Using passwd

I've previous mentioned I've got a new machine for pyworks.org.

Besides the problem that Trac doesn't work on Python 2.5, the other problem is the users I've created accounts for can't change their passwords.

I created the accounts with niload, just like I did on the older machine. But when people try to login and change their password, 'passwd' asks them for the old and new passwords and then just exits with 'Sorry'.

I can't see anything obvious in netinfo and no amount of Googling so far has turned anything up.

Any ideas under what circumstances passwd will refuse to change a user's password?

NOTE: It's not a problem with the password itself. If I log in as myself, I can change my password but if I log in as other user and try to change their password to the same one I used for my own account, passwd exits with 'Sorry'.

by : Created on Oct. 20, 2006 : Last modified Oct. 20, 2006 : (permalink)


Out of Commission

I'm somewhat out of commission at the moment.

I'm spending some time in London in a new apartment and it's going to take over two weeks for BT to install a phone line (and only then can I get ADSL broadband).

So at the moment my principal source of Internet connectivity is the nearest Starbucks with WiFi which isn't conducive to most of my online projects.

Sorry about that.

by : Created on Oct. 14, 2006 : Last modified Oct. 14, 2006 : (permalink)


New Pyworks

As I'm adding more committers to my open source projects, I decided it might be worth getting a dedicated mac mini for pyworks.org rather than sharing it with my other sites.

So I ordered another mini through macminicolo and it's up and running. I haven't switched over to using it yet, though.

A new version of subversion is out and new versions of Python and Trac are due out soon.

I think I'll wait for Python 2.5 and Trac 0.10 and then make the move.

by : Created on Sept. 15, 2006 : Last modified Sept. 15, 2006 : (permalink)


Nelson James Performance Tonight

Just got back from a party where Nelson James performed. It was our first performance in front of an audience (as opposed to a TV studio crew) and was a lot of fun. We played three songs, Noise, When You're Holding Me and the original piano version of You Me Us We (a dance version of which Nelson and I recently finished recording at the soundbaker studio with Rob Agostini producing).

If we had a drummer and bassist to occasionally back us, I think we could do a lot more of our songs, as well as a few covers. Regarding the latter, I can now play Ben Folds Five's 'Underground' and totally annoy my family with how often I play it :-)

by : Created on Sept. 9, 2006 : Last modified Sept. 11, 2006 : (permalink)


Surge in Poincare Bookmarking

Prior to this month, about 5 people had bookmarked my Poincare Project on del.icio.us. Then in the last week, 80 people have bookmarked it!

I better get back to working on it! :-)

UPDATE (2006/09/09): The source of recent interest seems to be a post to Ars Mathematica and a post to reddit. Not sure which came first but the former lead to a couple of hundred hits and the latter a couple of thousand.

by : Created on Sept. 8, 2006 : Last modified Sept. 9, 2006 : (permalink)


French Translation of Pyjamas Website

In a first for me, I got an offer to translate one of my open source project sites into another language. So thanks to Gerard Labadie, http://pyjamas.pyworks.org is available in French as well as English.

by : Created on Sept. 5, 2006 : Last modified Sept. 5, 2006 : (permalink)


Poincare Update

I do plan to get back to writing about the mathematics behind the Poincaré Conjecture. But I thought it remiss of me not to mention here the recent developments stemming from Grigory Perelman being awarded and declining the Fields Medal for his solution.

You can read more about it here:

Meanwhile I'll get back to the mathematics of it. I think the next installments will be about coordinate systems and the notion of a metric on a manifold.

UPDATE: next post

by : Created on Sept. 5, 2006 : Last modified Sept. 5, 2006 : (permalink)


Update: Quisition

I had thought my flashcard site, Quisition would be in open beta by now. Here's what happened: I was underwhelmed by the interest in the private beta and got somewhat demoralized.

The good news, however, is I'm motivated again and want to just add a few more features before going to open beta. Stay tuned either here or on the Quisition announcement feed. If you want to join the private beta right away, you are more than welcome - just email me.

by : Created on Aug. 28, 2006 : Last modified March 10, 2007 : (permalink)


Pyjamas Now Supports Browser-Specific Code

Thanks to Willie Gollino, pyjamas now supports browser-specific code. It might almost be ready for a 0.1 release soon!

by : Created on Aug. 19, 2006 : Last modified Aug. 19, 2006 : (permalink)


Update: Music

With my frequent trips away, it's no surprise that Nelson Clemente has been focusing on his solo career.

Check him out at http://nelsonclementemusic.com/ and, if you like his stuff, help spread the word!

That's by no means the end of Nelson James, though. Our pop duo lives on and as well as eventually getting back to recording stuff together, some of my compositions will make their way on to Nelson's solo album(s).

In fact, in a few days, I'll be meeting with Rob Agostini, who produced Nelson's first two solo songs, and we'll work on a new recording of a Nelson James favourite, You Me Us We.

Nelson and I have also started working on a music video which I'll be producing, directing, photographing and editing.

by : Created on Aug. 8, 2006 : Last modified Aug. 8, 2006 : (permalink)


Back from ALI and COLING-ACL

I had expected to blog more during the last two weeks that I've been attending linguistics conferences but it didn't work out that way.

The week before last, I was in Brisbane at the Australia Linguistics Institute. My main motivation for going was that my PhD supervisor, Professor Andrew Spencer, was teaching a course there and so it was a great opportunity to finally meet face to face. I was explaining to him what I planned to do in my thesis and about a quarter of the way through, he stopped me and said: "there, that's your PhD thesis" :-)

Last week, I was in Sydney for the combined COLING-ACL conference on computational linguistics and natural language processing. Things have changed a bit in computational linguistics since I was an undergrad. In particular, it's a lot more generic machine learning and a lot less linguistics now. Researchers were boasting how good precision and recall scores they were getting "without any linguistic cleverness". I learnt a lot, though, and met some good people. I have a lot of new ideas for analyses I can perform on the Greek New Testament corpus too.

by : Created on July 24, 2006 : Last modified July 24, 2006 : (permalink)


Pronunciation Field in Application Form

Last night I joined the Linguistics Society of America.

The online form had a field I thought was cute: how, described in the International Phonetic Alphabet, I pronounce my name.

I entered ʤæɪmz tʰæʊbɘ.

It just occurs to me looking at it now that, although it's a fairly broad transcription, anyone who uses it to pronounce my name will temporarily be taking on an Australian accent :-)

by : Created on July 8, 2006 : Last modified July 8, 2006 : (permalink)


Update: pyjamas

Thanks to a contribution from Willie Gollino, pyjamas is moving forward nicely. The dynamic table example from Google still isn't fully ported, but Willie has a nice grid example which is now checked in to the trunk.

In updating the unit tests to pass after his changes, I've been writing a little reporting tool that shows source code coverage, which tests pass and diffs between output and desired output when tests fail.

I plan to generate a report regularly on the website. Eventually, it might be nice to integrate the report as a Trac plugin.

by : Created on July 5, 2006 : Last modified July 5, 2006 : (permalink)


Update: PhD

I was officially supposed to start on April 24th but I didn't receive the enrollment form until after that date (and after I'd left for the US). By the time I got the form, sent it to the UK, got details of where to wire the fee, etc, it was June. But as far as I know, I'm now officially enrolled.

The term ended June 30th so I guess I officially missed this term and am now on summer break before I've even started :-)

However, my supervisor, Professor Spencer, is running a course at the Australia Linguistics Institute in just over a week so my sister, Jenni, and I are flying to Brisbane to attend the Institute before flying down to Sydney to attend COLING.

Not only will Prof Spencer's course at ALI be a nice foundation for my PhD research, it will also be the first opportunity we've had to meet face-to-face.

by : Created on July 1, 2006 : Last modified July 1, 2006 : (permalink)


Update

June has probably been my biggest writing drought since I started blogging—mostly because of helping lead a major software release at work. The good news is that mValent Integrity 4.0 has gone gold. I'm also on my way back to Australia.

Both these things mean you can expect more posts soon. I have a lot of updates to give so I'll do a post per project over the next couple of weeks.

Incidentally, this is my first post on my new 17" MacBook Pro. I'm loving the speed and screen size increase over my 12" PowerBook.

by : Created on June 30, 2006 : Last modified June 30, 2006 : (permalink)


Apple Store Woes

I wanted to buy a new MacBook Pro while here in the US but I can't buy it from the online store. The US store won't accept an Australian billing address and the Australian store won't ship to a US address.

Today, I went into the Apple Store nearby but was told they only sell the default configuration (I want more memory and the faster drive) and for anything else I should go to the online store.

UPDATE: Just got off the phone with Apple. Telephone sales has the same problem with billing country vs shipping country but the guy told me I could pay by wire transfer so I've now been able to place my order.

UPDATE (2006-06-23): The estimated delivery in US was after my departure date, so I rang Apple a couple of days ago to switch to two-day shipping. However, instead of bringing the delivery date closer, it got pushed out even further because, after changing the shipping method, the estimated ship time got postponed six days. I rang Apple last night and they assured me it would ship sooner than that and, in fact, within the next 12 hours. Sure enough, when I woke up this morning, it had shipped from Shanghai.

by : Created on June 17, 2006 : Last modified June 23, 2006 : (permalink)


György Ligeti Dies

György Ligeti, perhaps my favourite 20th century composer, died earlier this week.

Like many people, I was introduced to the music of Ligeti in Kubrick's 2001: A Space Odyssey. I still remember pouring over scores of his Requiem, Lux Aeterna and Atmosphères as a high school student. He inspired my composition Nebula from that period, which is the only composition of mine so far to be played on the radio. The movement from his Musica Ricercata used in Kubrick's Eyes Wide Shut is one of the most chilling uses of music in film.

I find myself saddened that I will never get to meet the man.

by : Created on June 15, 2006 : Last modified June 15, 2006 : (permalink)


The apostrophe in Hawai'i

Previously, I've talked about the scifi/fantasty love of the apostrophe and how, in most cases it's meaningless but in some cases can be useful in separating vowel sounds.

It certainly looks cool which is why I use it in the word Hawai'i where I thought it made sense to separate the diphthong ai from i. In printed (Ancient) Greek you'd similarly mark the separation with a diaeresis: Hawaiï.

My girlfriend is in Hawai'i at the moment and, on the phone, I told her that I like to spell it with an apostrophe. "Oh," she said, "they always spell it that way here".

Turns out the reason is that it is pronounced as a glottal stop and the glottal stop in many Polynesian languages is distinctive: its existence or absence changes the meaning. So "Hawaii" is a different word to "Hawai'i".

Also, it's not an apostrophe, it's actually called an 'okina and is ʻ or Unicode U+02BB which is more like an opening 6 quote and may or not work in your browser.

by : Created on June 4, 2006 : Last modified June 4, 2006 : (permalink)


The L Bug in MSN Messenger

I was IMing with my sister Leonie when MSN messenger beeped and refused to display what she had just written to me. I asked her to repeat it. Beep again. Repeat. Beep again.

I got her to describe what she'd just typed and it turned out it was the word 'netball'.

Why would 'netball' cause MSN messenger to freak out?

Well, after about half-an-hour of trying various things, we narrowed down the bug to any time a lower-case L ends the line.

It works fine if I type it to her but not her to me. She's on Windows, I'm on Mac so it might be a bug in the Mac client. I've never noticed it before, though. Perhaps not many lines in an IM end with lower-case L.

by : Created on June 3, 2006 : Last modified June 3, 2006 : (permalink)


Poincare Project

Last night I went through the old Poincare Project posts from before Leonardo had categories, and put them in the right category. I then patched Leonardo to sort them by path.

The end result is the the Poincare Project page now lists all my posts to date, in order.

I'll get back to posting on the topic real soon now.

by : Created on May 29, 2006 : Last modified May 29, 2006 : (permalink)


Energy Drinks

Energy drinks reduce the ability to sleep but not the desire. So you still feel tired but there's nothing you can do about it.

by : Created on May 29, 2006 : Last modified May 29, 2006 : (permalink)


Deliciously Popular

I just noticed I have 3 of the top 10 most popular python links on del.icio.us. Woohoo! If only I'd posted my Sudoku solver as well :-)

Funny thing is, one of them calls me Joshua Tauber—I guess because of Joshua Tauberer.

UPDATE (2006-05-29): 3 in top 5 now :-)

by : Created on May 29, 2006 : Last modified May 29, 2006 : (permalink)


pyjamas Update

Making good progress with pyjamas

As of @32 it now is possible to cd into examples/helloworld where there is a lone Hello.py:

import ui class Hello: def onModuleLoad(self): b = ui.Button("Click me") ui.RootPanel().add(b)

and type:

python ../../builder/build.py Hello

and have all the Javascript and HTML be generated in the output directory.

Also, the mailing list hit the 50 mark today! And I'm on a #pyjamas channel on irc.freenode.net

by : Created on May 27, 2006 : Last modified May 27, 2006 : (permalink)


Summer of Code Projects Announced

I'm delighted to announce that Ryan Forsythe's project to port Kenny Tilton's Cells to Python was accepted for the Google Summer of Code 2006 and I'll have the pleasure of mentoring it with Kenny's help.

I think Cells will be a wonderful contribution to Python.

Picking the projects for Python was very difficult as we ended up with only 25 slots to fill from 186 valid submissions. You can see the list of PSF SoC projects on python.org. Note that some individual open source projects in Python were mentor organizations in their own right so there are more Python-related projects being done.

I think next year, I might apply for one of my projects to be a mentoring organization because there was some post-voting discussion that really PSF should focus on projects that directly relate to Python the language rather than projects that just happen to be written in Python.

by : Created on May 25, 2006 : Last modified May 25, 2006 : (permalink)


Primitive Python Version of GWT Working

I'm pleased to announce that, after a very busy weekend and one or two weeknights, I've successfully built a Python equivalent to the Google Web Toolkit (GWT) that can handle half the Hello World example.

It sounds small but the pieces are largely all there in a primitive state:

  • a Python-to-JavaScript translator
  • Python datatypes
  • UI widgets written in Python
  • boiler plate HTML

Now it's just a case of incrementally improving each of these areas.

You can see the result in revision 19 at:

http://pyworks.org/svn/py-gwt/hello-experiment/

Join the mailing list if you want to get involved in any way.

UPDATE (2006-05-26): The project now has a name and a website: pyjamas

by : Created on May 24, 2006 : Last modified May 26, 2006 : (permalink)


SubEthaEdit Release and Bug Fix Announcements

Version 2.5 of SubEthaEdit, my favourite non-Emacs text editor on OS X, has just been released.

I found out because their bug tracking system emailed me to let me know they'd fixed a bug I submitted.

Cleverly, the bug tracking system didn't email me when it was actually marked as fixed (which wouldn't help me as it's a commercial product and I don't have access to nightly builds) but rather it emailed me when the first release that fixed the problem came out—a nice email saying there's a new release and that it fixes my bug.

I think that's a cool feature for a bug tracking system.

by : Created on May 23, 2006 : Last modified May 23, 2006 : (permalink)


Python Equivalent to Google Web Toolkit

The Google Web Toolkit looks cool. Now we know how they do it.

You write your front end in the Java programming language, and the GWT compiler converts your Java classes to browser-compliant JavaScript and HTML.

A couple of weeks ago I was thinking about a similar (at a very high level) approach in Python. But now that we have something to imitate, anyone interested in trying to build a more specific Python equivalent? Portions of the GWT are open source and nothing in the license prohibits reverse engineering as far as I can tell.

I'll set up a mailing list for interested people.

UPDATE: Mailing list available at http://pyworks.org/mailman/listinfo/py-gwt

UPDATE (2006-05-23): Now see Primitive Python Version of GWT Working

by : Created on May 17, 2006 : Last modified May 24, 2006 : (permalink)


Class Definitions Inside Functions

For a while, I've been defining functions in Python that define other functions and return them, taking advantage of lexical scoping and the first-class status of functions:

def foo(x): def bar(y): return x + y return bar

(yes, I realise you can also do this with a lambda expression)

But it all of a sudden occurred to me that you can probably define parameterised classes within functions and return them. Sure, enough, you can:

def foo(x): class bar: def __init__(self, y): self.z = x + y return bar

So foo isn't a factory producing objects, it's a factory producing classes.

This probably isn't news to most of you, but I think it's pretty cool that this works! Looking back, I can think of heaps of times I've wanted to parameterise classes and this would have been perfect.

by : Created on May 14, 2006 : Last modified May 14, 2006 : (permalink)


Python Templates

Back in 2003, I was playing around with building templates in Python by taking advantage of a combination of dictionary-based string substitution and the ability to late bind dictionary values using __getitem__.

I posted some graded examples to the Python Web SIG at the time and tonight I dug them up and formatted them into HTML with colour syntax highlighting:

http://jtauber.com/2006/05/templates.html

UPDATE (2006-05-19): One of my Pythonista heros, Ian Bicking, suggests an alternative approach which I like a lot.

by : Created on May 13, 2006 : Last modified May 19, 2006 : (permalink)


Summer of Code

There were no applications for Leonardo or Demokritos projects but it looks like I'll get to mentor a new project that I'm very excited about. I don't want to say anything specific until it's officially announced but it should be a great new addition to Python.

If people are still interested in doing a Leonardo or Demokritos project, independent of SoC, just let me know - there's plenty of cool stuff to do.

by : Created on May 12, 2006 : Last modified May 12, 2006 : (permalink)


Greek Lesson

Last night's Greek Lesson went well. We went through the 24 individual letters of the Greek alphabet and the combinations ει and ου.

To prepare the lesson, I ordered the letters into 5 categories of roughly increasing difficulty for readers of the Latin alphabet. I then wrote a program that, for each category, generated up to twenty word forms in John's Gospel that (a) had a letter from the category being taught; and (b) only had letters from that category or a previous one.

I think it turned out to be a great way to learn the letters because it didn't overwhelm them too much at the beginning. It still wasn't easy, though. It's sometimes hard to remember just how "foreign" some of the letters seem when you first learn them and in some cases how misleading.

One thing I learnt last night is that Americans (or at least the ones I was teaching) don't use 'revise' and 'revision' to refer to reviewing material, for example before a test. In Britain and Australia one would say 'have you revised for the test yet' or 'I have a test tomorrow so I need to go home and do some revision'. In America, it appears those terms only mean their other sense of making a change/improvement.

Of course, one might argue that a Brit or Australia means 'change/improve my understanding of the subject' but it was still interesting that my use of the term was odd to the Americans.

Oh, and thanks to Tim Wegener, who, although not part of my course, read through the material for last night's lesson beforehand and had a wealth of wonderful questions about the history of the Greek language.

by : Created on May 10, 2006 : Last modified May 10, 2006 : (permalink)


Unit-Testing the Brain

I recently bought The Reasoned Schemer by Daniel Friedman, et al, being a big fan of The Little Schemer and The Seasoned Schemer (A Little Java, A Few Patterns didn't grab me in the same way).

The Reasoned Schemer teaches logical programming in a functional programming paradigm. Of course, it's written in the same question / answer style as the other books—the book asks you a question that you may or may not know the answer to and then gives you the answer. It then asks another question and gives the answer and so on. There's no other content than these question / answer pairs other than a handful of "laws" and "commandments".

The questions cover a range of cases to make sure you understand the subtleties and edge-cases. You have to mold your mind so that it gets the right answer to one question and then refine your thinking further if you can't then handle the question that follows. Eventually, the questions have handled enough cases that you really grok what's going on.

It occurs to me that this style is basically a set of Unit Tests for the Brain.

As a really simple example, here are the first three pairs from chapter 7 which define what a 'bit' is in the context of the rest of the chapter:

  • Is 0 a bit?
  • Yes.
  • Is 1 a bit?
  • Yes.
  • Is 2 a bit?
  • No. A bit is either a 0 or a 1.

That's just a unit test for your brain's concept of what a bit is. It's Test-Driven (Brain) Development.

by : Created on May 6, 2006 : Last modified May 6, 2006 : (permalink)


Teaching New Testament Greek

I'm teaching New Testament Greek to a small group and tonight was our first lesson. I just talked about the history of the Greek language and outlined the (I think) novel approach I'm taking to this course.

Basically, we'll be learning inductively but with a graded series of text fragments from John's Gospel generated algorithmically to prioritize learning the words and word forms that will, in turn, mostly quickly enable reading of more text fragments (similar to the problem posed in my programming competition).

We'll still be covering traditional grammar but it will come after the grammar points have been seen in real texts a few times. There'll be a focus on reading and learning inflected forms first (and always in the context of a clause) and only abstracting lemmas and paradigms after the fact. This far more closely resembles how first language acquisition works and should lead to much quicker intuitive understanding of the language.

This is essentially an alpha test but, as a couple of the guys are remote, I'm trying to do as much via email and Web as possible and so, if all goes well, I might offer this to a broader audience online at some stage.

I'll post updates as things progress.

by : Created on May 5, 2006 : Last modified May 5, 2006 : (permalink)


lighttpd and launchd

On a couple of occasions, I've noticed lighttpd silently dying on my remote Mac Mini that serves up a bunch of my sites including Quisition. I was switching hemispheres earlier in the week and so didn't notice for days. So I finally decided to get around to learning how to use launchd.

Turned out to be very simple.

I previously manually started lighttpd with:

sudo /usr/local/sbin/lighttpd -f /usr/local/www/lighttpd.conf

To start it (and keep it running) using launchd, I created a file:

sudo pico /Library/LaunchDaemons/net.lighttpd.plist

with the following content:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>net.lighttpd</string> <key>OnDemand</key> <false/> <key>Program</key> <string>/usr/local/sbin/lighttpd</string> <key>ProgramArguments</key> <array> <string>/usr/local/sbin/lighttpd</string> <string>-f/usr/local/www/lighttpd.conf</string> <string>-D</string> </array> </dict> </plist>

(note the extra -D option) and told launchd about it with:

sudo launchctl load /Library/LaunchDaemons/net.lighttpd.plist

Just for fun, I tried killing lighttpd and launchd had dutifully restarted it before I had time to type 'ps aux'

by : Created on April 29, 2006 : Last modified April 29, 2006 : (permalink)


Summer of Code 2006

I'm delighted to be a mentor again in Google's Summer of Code.

Although I can't guarantee acceptance, if people would be interested in doing something with Leonardo or Demokritos, I'm happy to help them come up with a project to do. I'm also open to mentoring other Python-related ideas.

Email me if you're interested.

by : Created on April 28, 2006 : Last modified April 28, 2006 : (permalink)


Two Browsers

Sam Ruby has a nice post on the cross-browser obstacles he's recently encountered.

The first two are exactly the problems I had with getting Quisition working on IE. The very first one had me stumped for ages even though it's dead simple (following the inverse law of bug complexity).

I'm still looking for more closed beta testers for Quisition. Just email me if you're interested in trying out online flashcards with clever spaced repetition.

by : Created on April 19, 2006 : Last modified April 19, 2006 : (permalink)


The Wealth of Networks and Non-markets

I've just started reading Yochai Benkler's book, The Wealth of Networks: How Social Production Transforms Markets and Freedom online, although I will probably pick up a printed copy at some stage.

It's fascinating so far but I was immediately confused by Benkler's frequent use of the term "non-market" which, in context, seems to suggest he has a much narrower sense of what the "market" is than I've come across before.

For example, consider the following quote (from the first chapter summary on the book's wiki):

Freedom and justice is best achieved through a combination of market action and private, voluntary (thought not necessarily charitable) nonmarket action. The state in this theory is a relatively suspect actor.

I'm not sure what he means by "market" if private, voluntary action is "nonmarket".

by : Created on April 16, 2006 : Last modified April 16, 2006 : (permalink)


Getting less to work with UTF-8

I've been working with UTF-8 files on the 'nix command-line for years, most recently on OS X.

I've been frustrated that things like cat and head work fine once Terminal is set to display UTF-8 but less doesn't seem to recognize UTF-8 even in that case.

I finally got around asking Google for a solution.

20 seconds later, I found it:

export LC_CTYPE="en_US.UTF-8"

via Notes on UTF-8 and locales

Boy do I feel stupid for not just looking it up earlier!

Anyway, maybe someone else will find that useful to know :-)

by : Created on April 16, 2006 : Last modified April 16, 2006 : (permalink)


Python Tuples are Not Just Constant Lists

Greg Wilson is suggesting things Python 3000 could leave out and suggests tuples.

In the comments, Phillip Eby holds him to task for the assumption that tuples are just constant lists:

Tuples are not constant lists -- this is a common misconception. Lists are intended to be homogeneous sequences, while tuples are hetereogeneous data structures.

I think it was years into my use of Python that I realised this and stopped thinking about them as just constant lists. It was a powerful revelation for me.

So while I agree with Greg that many (most?) programmers don't understand the distinction, I think they are missing out and that we'd be better off improving the way lists and tuples are documented than try to conflate what is, in my opinion, a very useful distinction.

One way I'd express it (in addition to Phillip's quote above) is that the index in a tuple has an implied semantic. The point of a tuple is that the i-th slot means something specific. In other words, it's a index-based (rather than name based) datastructure.

This notion of 'tuple' is very important in relational algebra (as Phillip also points out) and so I've been thinking about it in the context of relational python too.

When I started playing around with relational python (which I need to get back to blogging about), it occurred to me that it might be useful to have the notion of a tuple whose slots could additionally be named and then accessed via name. I implemented it that way in Basic Class for Relations.

UPDATE (2011-11-22): of course, the idea mentioned in that last paragraph is now a reality in the form of Python's namedtuple.

by : Created on April 15, 2006 : Last modified Nov. 22, 2011 : (permalink)


Fire Someone Today

Even if you're not interested their products, Logos Bible Software is a fascinating company on a number of levels. From the look behind the scenes you get from their blog to their innovative community pricing model where the market votes on the product priorities and pricing before production even starts, Logos is an interesting company to watch and learn from.

So I was delighted last August to discover that founder and CEO, Bob Pritchett, was writing a book on practical advice for startups called Fire Someone Today. Bob kindly sent me a PDF draft and I loved it—entertaining but also honest and very insightful.

Well, the book is now available from Amazon and, in typical Bob Pritchett style, Logos is offering $20 credit on their online store for anyone who buys the book from Amazon by midnight tomorrow. A nice deal given the book costs less than $10.

Even if you have no interest whatsoever in Bible software, it's a book worth taking a look at if you're interested in startups and entrepreneurship.

by : Created on April 15, 2006 : Last modified April 15, 2006 : (permalink)


Get Paid for Upgrading Aperture

I commented to my friend James Marcus recently that I liked Aperture but it was definitely overpriced.

Well, Apple has just released Aperture 1.1 for $299 instead of the $499 price tag on the original.

And, in a great move, they've offered anyone who bought 1.0 a $200 credit at the online Apple Store (and it's a free upgrade).

by : Created on April 14, 2006 : Last modified April 14, 2006 : (permalink)


Economics Precepts

Jason Fried says his favourite economic precept is 'sunk cost'.

I think sunk cost is mostly interesting because of the prevalence of the sunk cost fallacy where people say things like "I don't feel like going to the concert but I've already spent the money on the ticket so it would be a waste not to go".

This fallacy, like many in economics, comes down to not appreciating opportunity cost, particularly applied to that most precious of resources: time.

Another favourite economic precept of mine is comparative advantage. Comparative advantage is key to understanding why voluntary trade is win-win, even when one party can produce all the goods most efficiently. At its core, though, comparative advantage is a corollary to opportunity cost.

Yet another favourite economic precept of mine is Frédéric Bastiat's broken window fallacy where people say things like "at least this natural disaster will be good for the construction industry". But again, the broken window fallacy is about (not) understanding opportunity cost.

So I would have to say opportunity cost is my favourite economic precept because it is foundational to so many other important precepts.

Of course, I've mentioned before on this blog that I also think marginal utility and the subject theory of value are very important to understand.

If I made a list of "100 things everyone should know" I think I would put all the precepts mentioned here on it.

by : Created on April 12, 2006 : Last modified April 12, 2006 : (permalink)


Stats and Spam

When I commented on my January stats I said

Looking at my web stats, it appears that last month I had almost 100,000 visits (97,571) from almost 20,000 distinct IPs (19,484) averaging almost 10,000 hits/day (9,801).

In February I had a slight decrease in visits (93,441) from slightly more distinct IPs (19,528) and broke 10,000 hits/day (10,826).

However, I have very mixed feelings about March: 129,719 visits and 17,265 hits/day. I should be delighted (a 60% increase in hits month-over-month!) but I can't help but think most of the increase is meaningless (and possibly malicious).

Especially when I had 10,980 hits from just one IP address (80.77.80.46) in March accessing two blog entries repeatedly.

Certainly the tripling of the number of bytes served from the start of the year until I added the maths CAPTCHA is directly attributable to comment spam.

But there also seems to be a relationship between which web pages got hit with comment spam and which are now getting accessed disproportionately by the same IP addresses over and over again.

by : Created on April 3, 2006 : Last modified April 3, 2006 : (permalink)


Quisition Limited Beta

I've been saying since last year that a limited beta of my flashcard site, Quisition, would be available in Q1 2006. Well I've just made it under the wire. Email me if you are interested in trying it out. An open beta will be available some time in May.

by : Created on March 31, 2006 : Last modified March 31, 2006 : (permalink)


Subversion Keywords in LaTeX Documents

I wanted a LaTeX document I'm writing to show the Subversion keyword expansion but I couldn't work out how to do it. If I used something like $Id$, LaTeX treated it as being in math mode but if I used \$Id\$ then Subversion didn't expand it.

I finally hit the right Google search term and found $ $Id$ $ works nicely.

I'm sure there are other ways. Any ideas?

by : Created on March 28, 2006 : Last modified March 28, 2006 : (permalink)


Quadtrees in Javascript and CSS

Quadtrees are a data structure that involves recursively dividing squares into quarters. I like to think of them as binary trees for spatial data. Indeed, they get used a lot for spatial indexing. They also get used a lot in games (especially MMORPGs) as a way of varying the level of detail required in different areas of a map.

For a browser-based game idea I have, I want a way of selecting arbitrary regions and I wondered if a quadtree approach might work for the UI. So I then wondered if quadtrees could be displayed and manipulating using CSS and Javascript.

It took me a little while to settle on the best way to arrange four consecutive div elements into a 2x2 arrangement and it was quite frustrating that adding borders to the divs threw off the layout regardless of what approach I took. But I'm very happy with the end result.

It took even longer to sort out the manipulation of CSS via Javascript as I'm a novice in that area. But again, it all turned out nicely, even better than I expected.

You can see a demo of the result. Select "divide" mode and clicking on a square will divide it into four. Select "select" mode and clicking on a square will toggle whether it's part of the selection or not.

It works in Safari and Firefox. I can't be bothered testing it in IE :-)

by : Created on March 24, 2006 : Last modified March 24, 2006 : (permalink)


Switched over to lighttpd

I just switched a bunch of my sites over to running on lighttpd including http://morphgnt.org/, http://leonardo.pyworks.org/ and http://www.quisition.com/.

It took me a little while to work out how to translate my ScriptAlias directives in Apache to lighttpd (hint: configure mod_alias to map the request path to the CGI script then mod_cgi to recognize files ending in certain characters as being CGI scripts)

The only problem I now have is I've killed anonymous SVN access on pyworks.org because I was previously serving it up via Apache. I'm still investigating alternatives to running Apache just for this purpose.

by : Created on March 20, 2006 : Last modified March 20, 2006 : (permalink)


Account Management Patterns

On the weekend, I drew some diagrams describing the account management sub-system I had written for Quisition, partly to see the patterns abstracted from the particular implementation.

Here's the login pattern:

Elliotte Rusty Harold recently wrote about the problems with using GETs for confirmation.

I wanted account signup to involve being sent an email to ensure the user had given a legitimate email address, but cognisant of the issues Rusty raises, I made the email received on signup link to a further form the user then has to submit to truly activate the account:

I originally had the "forget password form" directly resetting the password, but then I realised someone could maliciously enter the email address of another user to reset their password. Not a security issue so much (the new password goes to the right person) but it's a nuisance for the person if they didn't request the reset.

So I adopted an additional pattern where an email is sent which then takes the user to a reset password form:

In both cases, the URI in the email includes a hash in the parameters so the GET that leads to the form can't be faked.

by : Created on March 20, 2006 : Last modified March 20, 2006 : (permalink)


Emacs, Unicode and Greek on Mac OS X

Ulrik Petersen pointed me to How to use EMACS with Unicode Greek (polytonic Greek (multiaccented) included) and LaTeX.

"I can go back to using Emacs!" I thought to myself (actually, I probably typed it out loud to Ulrik over IM)

All that remained was to find a more up-to-date OS X build of Emacs. OS X comes with 21.2 but the greek.el above requires 21.3.

My initial Google searching found that a lot of Emacs for OS X work ended in 2003.

Then I stumbled across this: Carbon Emacs.

Emacs 22 for Tiger (with Universal Build).

The anti-aliasing is beautiful and greek.el works a charm.

Now to dig up my old .emacs file...

by : Created on March 18, 2006 : Last modified March 18, 2006 : (permalink)


Leonardo 0.7.0 Released

It happened a few days ago, but I haven't announced it here yet...

I am pleased to announce the release of Leonardo 0.7.0.

Leonardo is the Python-based content management system that runs this site and provides blogging and wiki-style content.

New features include:

  • support for Atom 1.0
  • comments optionally can require answering a simple question to reduce spamming
  • site owner can optionally be emailed when new comments are made
  • pages now record their author which is displayed on the page, in blog lists and atom feeds
  • there is now a provider which lists blog months
  • it is now possible to update a page or its properties without the last modified changing
  • comments can be deleted if logged in

Plus some internal cleanup and bug fixes.

You can download it from the Leonardo Website.

by : Created on March 17, 2006 : Last modified March 17, 2006 : (permalink)


Amazon S3

Amazon's Digital Services division has launched a data storage web service called S3. Probably a decent way for them to make some money off excess storage they have.

They offer both a REST and SOAP interface. It took all of a minute or two for me to grok the REST interface. Just had to map a couple of things into a well-known mental model. With the SOAP interface, I felt far more like I was having to learn an entirely new way.

Of course, that comes as no surprise to me ;-)

by : Created on March 14, 2006 : Last modified March 14, 2006 : (permalink)


Accepted into PhD Programme at Essex

Today I received a packaging indicating my acceptance into the PhD programme in Linguistics at the University of Essex. I will be a part-time external student for the next six to eight years starting this April.

It's hard to describe just how much this means to me. Doing a doctorate is by far my oldest goal in life. I was about eight when I decided I wanted to do a PhD. In high school, I wanted to do it in theoretical physics (specifically general relativity) but 18 months into undergraduate studies decided I wanted to do it in linguistics.

Various reasons, both personal and commercial, delayed my commencement by a decade. But I always knew I wanted to come back to it. I'm finally on the path. Thank you to my referees and to my new supervisor, Andy Spencer.

Undoubtedly you'll hear a lot more about it on this blog over the years.

by : Created on March 14, 2006 : Last modified March 14, 2006 : (permalink)


Missing SxSW

The last two years, I've gone to SxSW. This year, the timing didn't work with the schedule at work.

Last year I expressed my disappoinment about missing ETech because of SxSW but this year (when they were scheduled at different times) I've missed them both :-(

by : Created on March 14, 2006 : Last modified March 14, 2006 : (permalink)


Exploring lighttpd

Mostly for Quisition but also as an Apache-replacement for some of my other sites, I'm exploring lighttpd.

It sure looks nice so far. If software is judged by how it is configured, lighttpd is wonderful. A breath of fresh air!

by : Created on March 12, 2006 : Last modified March 12, 2006 : (permalink)


Announcing MorphGNT.org

I've hinted before about Ulrik Petersen and I collaborating on Greek New Testament linguistic endeavours.

I'm now delighted to announce the website that will be the home of our collaborative work:

http://morphgnt.org

I've transferred my MorphGNT files over there and Ulrik has done the same with his Tischendorf 8th and Strong's Dictionary.

We've been working on a bunch of other stuff for the last few months which will eventually find its way on to that site too.

by : Created on March 12, 2006 : Last modified March 12, 2006 : (permalink)


Recreational Programming

In his post Recreational Programming, Sam Ruby says:

For recreation, some people like to do NY Times crosswords puzzles in ink. Me, I like tackling small, incremental, computer programming tasks.

I can totally relate to that, as I'm sure many readers of this blog can. But it was Sam's title that really caught my eye. Recreational Programming is the term my significant other and I use to describe my various open source tinkerings.

I think we came up with the term after a conversation something like this many years ago when we'd only just started going out and she had no idea what she was in for...

HB: What are you doing? Me: Programming. HB: Late on a Saturday night? Is work really busy? Me: No, it's not work. HB: So why are you doing it? Me: It's fun and it's relaxing. HB: You find programming fun and relaxing? Me: Yes. It's a form of recreation for me.

After that, the term recreational programming stuck. HB gets why I do it if I use that term.

So now conversations are more like:

HB: What did you do last night? Me: Recreational programming. HB: Cool!

rather than:

HB: What did you do last night? Me: Tried implementing the Unicode Collation Algorithm in Python. HB: You're strange.

by : Created on March 12, 2006 : Last modified March 12, 2006 : (permalink)


Quisition Update

If any of you are wondering how Quisition, my online flashcard site, is going, here's an update.

I'm currently implementing the account sub-system: sign-up, activation, login, etc.

Once that is done, I'll probably go live with it, even though you won't be able do anything with your account just yet.

Remember you can always subscribe to the announcements feed on the Quisition site for announcement when new things become available.

by : Created on March 10, 2006 : Last modified March 10, 2006 : (permalink)


Upgrade This Site With Anti-Spam Maths Captcha

I've upgrade this site to Leonardo 0.7.0 which I'm about to release.

It includes an enhancement to the comment module by Bryan Lawrence that provides for a maths-based captcha to help prevent comment spam. Basically you'll need to do a simple addition to post a comment.

Hopefully this will stop the literally thousands of automated spam comments I receive each month.

by : Created on March 10, 2006 : Last modified March 10, 2006 : (permalink)


Crashing Safari

If you download this:

http://jtauber.com/2006/03/crash-safari.html.txt

and open it in Safari, it will cause a crash (you have been warned!). In Firefox, it works exactly as expected.

I can't work out whether I'm doing anything wrong. The problem occurs specifically doing a lot of .tagName or .nodeName accesses on an XML element (see the comment in the javascript indicating the location the crash occurs).

The report includes the following:

... Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x000001b8

Thread 0 Crashed: 0 com.apple.WebCore 0x95994984 DOM::DocumentImpl::tagName(unsigned) const + 36 ...

Any ideas?

by : Created on March 9, 2006 : Last modified March 9, 2006 : (permalink)


Starting Leukippos

Given that Leonardo has web-based editing, I'll need some kind of web-based Atom Protocol client once Leonardo is based on Demokritos.

I've been toying for a while with writing an AJAX-based Atom client. The natural name for it would be Leukippos. (Leukippos was the teacher of Demokritos and co-originator of the Greek idea of atoms.)

Anyway, tonight I made a start. My first version of Leukippos retrieves an APP introspection document via XmlHttpRequest, parses it to retrieve the workspaces and collections and allows a user to click on a collection to retrieve it.

I'm not finished collection feed parsing yet, but once that's done and I've prettied it up a bit with CSS, I'll post it here.

My ultimate goal would for it to function something like TiddlyWiki but, of course, with Atom Protocol support (an idea I've mentioned before).

by : Created on March 8, 2006 : Last modified March 8, 2006 : (permalink)


Minti Launched

On Monday evening I had the pleasure of meeting Clay Cook and his wife Rachel. Besides being successful Web entrepreneurs, they're super-nice people.

They've just launched their latest venture, Minti, which is a parenting advice site with user contributed articles, rating, tagging and all that Web 2.0 goodness.

Check it out: http://www.minti.com

by : Created on March 8, 2006 : Last modified March 8, 2006 : (permalink)


Demokritos 0.3.7 Released

Last week, Dave Johnson mentioned that he'd successfully posted from his blogging client MatisseBlogger to Demokritos. It was a great interop session on #atom and Joe Gregorio also provided automated testing against Demokritos.

Thanks to both Dave and Joe I was able to make fixes to Demokritos. I didn't do a release immediately, but here it now is:

http://jtauber.com/2006/demokritos/demokritos-0.3.7.tgz

This version has successfully worked with two independent clients now, so it's getting into reasonable shape.

The upcoming 0.4.0 release will include authentication.

by : Created on March 8, 2006 : Last modified March 8, 2006 : (permalink)


Demokritos the Economist

I named my Atom server Demokritos after the Greek philosopher (more often spelt in the Latin form Democritus) who, along with his teacher Leucippus, developed the idea that all matter is made up of indivisible elements called atoms.

What I didn't know until today, however, is that Demokritos was also responsible for some economic thought that was well before his time.

I've just started reading Economic Thought Before Adam Smith, Volume I of An Austrian Perspective on the History of Economic Thought by Murray Rothbard. It is a tour through the economic thinking of the Greeks, the Romans and the Scholastics of the Middle Ages and Renaissance, largely arguing against any claim Adam Smith might have to being the father of economics (and, in fact, suggesting many of Smith's ideas were a step backwards).

What particularly caught my interest in the first few pages, though, was that Demokritos was the first recorded proponent of the subjective value theory. Demokritos believed that moral values and ethics were absolute but that economic values were subjective. He was also the first person we know to write about marginal utility and time preference. All these concepts are core to the Austrian School of the 19th and 20th century and are considered innovations beyond Adam Smith and yet Demokritos was discussing them in a rudimentary way at the time of Socrates!

I talked a little bit about subjective value theory and marginal utility in One Red Paperclip and the Benefits of Trade.

by : Created on March 7, 2006 : Last modified Dec. 7, 2007 : (permalink)


Sensor Sizes

I mentioned before that my new HD camera has 1/3" sensors. That means that each of the three CCDs that detect light to be encoded on tape measures 4.8mm x 3.6mm (a diagonal of 6mm).

Now I realise none of these measures are equivalent to 1/3". I've read contradictory information about why a 4:3 ratio sensor with a diagonal of 6mm is called a 1/3" (although note that 4.8mm + 3.6mm is almost 1/3") so we'll just treat 1/3" as a name for 4.8mm x 3.6mm.

This is a fair bit smaller than 35mm film as you can see from this comparison chart I've drawn up (which includes both sensors and film for both still photography and motion pictures):

Why are there two pictures for 35mm? 35mm motion picture film frames travel vertically whereas 35mm still film frames travel horizontally. So the width you see of the 35mm motion picture frame is the height of the 35mm still frame (24mm). The aspect ratios are also different. Motion picture film is 4:3 whereas still is 3:2. Note however that, in the case of motion pictures, not all of this area is used as the sound may be recorded along one side (reducing the width to around 22mm) or the top and bottom of the frame masked to change the aspect ratio to the more common 1.85:1 used in movies.

APS-C is the size used by some DSLR still cameras such as my Canon 10D. You may have heard me mention how much I'd like a 5D which has a full-size frame, by which I mean the 35mm (still) sensor at the bottom.

Professional video cameras typically use 2/3" sensors. The use of a 1/3" sensor in the "prosumer" HD cameras like my JVC are one of the key things that distinguishes them from the truly professional cameras. Note, however, that an HD camera with 1/3" sensors is capable of producing images of a higher resolution than a 2/3" standard definition camera.

Lucas used cameras with 2/3" sensors in Episode II and III. There are high-end video cameras with full-frame (i.e. 35mm) sensors in the works.

The size of the sensor impacts things like cost, light sensitivity and the field of view relative to focal length (I'll talk about that last one soon). Ironically, a smaller sensor (like a 1/3" versus 2/3" in video or an APS-C versus 35mm in DSLRs), although cheaper to manufacture and considered less professional, actually requires a sharper lens to resolve the same resolution. A small sensor is packing more lines per mm so a lens has to be capable of resolving that.

by : Created on March 3, 2006 : Last modified March 3, 2006 : (permalink)


Mounting Disk Images From OS X Terminal

Sometimes, to install software on my remote Mac Mini, I need to be able to mount disk images from a terminal session.

I just discovered how to do this. The command is hdiutil.

To mount a disk image:

hdiutil attach SomeDiskImage.dmg

Although I haven't tried it, I believe the disk image can be referenced by URI.

To unmount:

hdiutil detach /Volumes/SomeDiskImage/

I've added this to my Headless Tiger page.

by : Created on March 3, 2006 : Last modified March 3, 2006 : (permalink)


brainf

Back in April 2002, when I was "blogging" to Advogato, I wrote a little Python implementation of the esoteric language brainf***.

I just realised I've never posted it here, so here is a slightly revised version:

http://jtauber.com/2006/03/brainf.py

by : Created on March 1, 2006 : Last modified March 1, 2006 : (permalink)


Demokritos 0.3.5 Released

Once people started using Demokritos 0.3.0 with their own clients a couple of major bugs emerged.

I've fixed them and now released 0.3.5.

You can download the code at http://jtauber.com/2006/demokritos/demokritos-0.3.5.tgz

by : Created on March 1, 2006 : Last modified March 1, 2006 : (permalink)


Demokritos 0.3.0 Released

I'm pleased to announced the next release of Demokritos.

Demokritos is a Python library and content repository implementing the Atom Syndication Format (RFC4287) and Atom Publishing Protocol (currently a standards track Internet-Draft)

You can download the code at http://jtauber.com/2006/demokritos/demokritos-0.3.0.tgz

This release add persistence using a Subversion backend and has been updated for draft-ietf-atompub-protocol-08

Note that you'll need Subversion 1.3 with the SWIG Python bindings built.

At this stage, Demokritos is not really intended for anything other than interoperability testing with Atom clients. However, the library for parsing and generating Atom feeds might be useful standalone as may the web and svn modules.

Demokritos is made available under a GPL license.

UPDATE: Now see Demokritos 0.3.5 Released

by : Created on Feb. 28, 2006 : Last modified March 1, 2006 : (permalink)


Two Years Ago

I just missed my anniversary.

Two years (and two days) ago, I started this blog!

Thanks to all of you who read it regularly.

by : Created on Feb. 27, 2006 : Last modified Feb. 27, 2006 : (permalink)


Three Key Camera Subsystems

When comparing different video cameras, I like to think in terms of three subsystems that each massively impact the quality of the image that results.

  • the lens(es)
  • the sensor(s)
  • the data encoding

Note that there are lots of other features that will distinguish one camera from another, but the three above are the key ones that directly affect the image.

The JVC GY-HD101E I just bought has the following:

  • a prosumer-grade Fujinon 5.5mm-88mm zoom lens but interchangeable with other 1/3" bayonet lenses (1/2" or 2/3" with suitable adapter)
  • 3x 1280x720 1/3" CCD sensors
  • 720p (HD1) HDV (MPEG2 19.7Mbps, 4:2:0 chroma sampling)

I'll say more about what each of these means in subsequent posts. It's a pretty fascinating area of technology.

by : Created on Feb. 27, 2006 : Last modified Feb. 27, 2006 : (permalink)


HD101 Arrives

My JVC GY-HD101E arrived today.

I'll report more as I get the chance to try it out. I also want to start getting down some notes on digital cinematography.

by : Created on Feb. 27, 2006 : Last modified Feb. 27, 2006 : (permalink)


Congratulations Nelson

Nelson Clemente, my singer/songwriter/model/actor friend (who is also the better half of Nelson James) just won Most Promising New Talent 2005 at the Limelight Theatre Awards. Way to go Nelson!

by : Created on Feb. 27, 2006 : Last modified Feb. 27, 2006 : (permalink)


Starting to Blog About My First Feature Film

I've mentioned before that Tom Bennett has started blogging about Heist, the feature film we're working on together.

Well, it's about time I start too.

Tom recently finished the first draft of the script and is currently reworking the script based on my initial feedback.

In that last post, he mentions that I've just bought the camera I plan to shoot Heist on.

It's a JVC GY-HD101E and while Tom will continue to blog about the screenwriting process, I plan to start blogging about digital cinematography, getting up to speed with the camera and planning for Heist.

by : Created on Feb. 21, 2006 : Last modified Feb. 21, 2006 : (permalink)


Thank You Daily Python-URL

It warms the cockles of my heart that, despite no longer being on Planet Python (a state I still hope is temporary), Daily Python-URL still posts (and therefore has editors that read) my Python-related posts.

Thank you PythonWare!

If you read this blog and have any interest in Python, do yourself a favour (to quote Ian "Molly" Meldrum) and add Daily Python-URL to your feed reader.

Of course, that doesn't mean I don't want you sticking around here as well :-)

by : Created on Feb. 16, 2006 : Last modified Feb. 16, 2006 : (permalink)


Are Absolute Imports Available in Python 2.4 or Not?

PEP 328 looks like it will solve my recent import issues.

However, the PEP mentions that

In Python 2.4, you must enable the new absolute import behavior with from __future__ import absolute_import

which got me excited because it means I don't need to wait for Python 2.5 to take advantage of it.

However

from __future__ import absolute_import

gives

SyntaxError: future feature absolute_import is not defined

So that part of PEP 328 was just teasing me. I think it's an error in the PEP.

by : Created on Feb. 15, 2006 : Last modified Feb. 15, 2006 : (permalink)


First Pass of Demokritos Persistence Done

@84 on the Demokritos trunk now has full persistence of members and collections into a subversion repository.

At the moment there's no caching (so subversion gets hit every request) and transactions are overly granular. As a result, performance isn't great. But it seems to work!

by : Created on Feb. 15, 2006 : Last modified Feb. 15, 2006 : (permalink)


Bug Fix to Python Unicode Collation Algorithm

See Python Unicode Collation Algorithm for background. This version fixes a major bug that prevented the collation algorithm from working properly with any expansions:

http://jtauber.com/2006/02/13/pyuca.py

UPDATE (2012-06-21): Now see https://github.com/jtauber/pyuca

by : Created on Feb. 12, 2006 : Last modified June 21, 2012 : (permalink)


The Naming of Musical Notes, Part IV

In Part III, I introduced what I called absolute note names and relative note names.

I'd like to introduce a third possibility now which is the approach underlying much of Western music note naming. I'll call it fixed note naming.

The fixed note name of a note is what the relative note name would be if we were in the key of <1>-major.

So with fixed note names, we are still naming based on a diatonic scale (and so will have to use + and - to get the chromatic notes) but the diatonic scale we are using might not be the diatonic scale of the key we are in.

Let's use parentheses to indicate fixed note names. And so a <3>-major scale in each of our note naming systems would look as follows:

<3> <5> <7> <8> <10> <12> <2'> {1} {2} {3} {4} {5} {6} {7} (2) (3) (4+) (5) (6) (7) (1'+)

The third note is (4+) because <7> is not part of the <1>-major scale. Why didn't we use (5-) which also maps to <7>?

Well notice that

(2) (3) (4+) (5) (6) (7) (1'+)

has the nice property that each number appears exactly once. This property is a convention we adopt. This way, the scale can be thought of in terms of how each note in the <1>-major scale gets modified.

If all this seems too abstract, you can think about the example above in terms of the D-major scale:

D E F# G A B C#

Note that this Western choice of note naming is what I've called fixed note naming in that the notes of the scale have been named based on modifications to the C-major scale under the convention that each letter appears exactly once.

This is one way of thinking about why the third degree of the D-major scale is F# and not Gb. There are other approaches that come to the same conclusion which we'll explore later on.

I'll finish this part, though, with a final thought. It is possible to have a Gb in a piece in D-major. But it is a flattened 4th and is not the same as F# even though in 12-ET the pitch is the same. In absolute note naming, they are both <7> (if <1> = C). In relative note naming (specific to D-major), Gb would be {4-} whereas F# would be {3}.

by : Created on Feb. 12, 2006 : Last modified Feb. 12, 2006 : (permalink)


Pyworks Common Library and Import Issues

Demokritos contains some modules that might be useful in other software, so I decided to create a little package for these common modules called 'pyworks' (seeing as that's the umbrella I'm starting to use for my various Python-related projects).

So I was thinking I could rename webbase.py to pyworks.web and call my Subversion library pyworks.svn. I also have a library for helping build domain objects from xml parsing events. I was going to call it pyworks.xml

But that means a 'from svn import repos' in pyworks/svn.py won't work and nor will 'from xml.parsers import expat' in pyworks/xml.py

This problem doesn't exist outside of the pyworks package itself. 'import xml' only means the standard library package and 'from pyworks import xml' gives you the pyworks xml module. Similary with 'import svn' versus 'import pyworks.svn'.

For this reason, I don't mind a little hack internal to pyworks.

I seem to recall the py library (that py.test is in) does something similar.

Unfortunately, calling the module 'pyworks_xml.py' and putting 'import pyworks_xml as xml' in 'pyworks/__init__.py' doesn't work.

UPDATE: The following seems to work in pyworks/__init__.py:

import sys import pyworks_xml sys.modules["pyworks.xml"] = pyworks_xml

UPDATE (2006-02-15): Looks like PEP-328 might be exactly what I need. Another reason I'm looking forward to Python 2.5.

by : Created on Feb. 9, 2006 : Last modified Feb. 15, 2006 : (permalink)


January Stats

Looking at my web stats, it appears that last month I had almost 100,000 visits (97,571) from almost 20,000 distinct IPs (19,484) averaging almost 10,000 hits/day (9,801).

That's double January last year. Almost.

by : Created on Feb. 8, 2006 : Last modified Feb. 8, 2006 : (permalink)


Using the Python Subversion Binding

I've previously talked about my desire to use subversion as a persistence layer.

I've now started to work out how to use the Python bindings that Subversion comes with—mostly through studying the source code of ViewVC (formerly ViewCVS)—and it looks like it definitely meets my needs.

I've written up my notes so far as a page for others wanting to use the Python binding. Hopefully it's useful to other people:

http://jtauber.com/python_subversion_binding

It's a work in progress and I'll add more as I discover and use it.

by : Created on Feb. 8, 2006 : Last modified Feb. 8, 2006 : (permalink)


Back Home

No blog posts for a over a week because of a busy work week and travelling back to Australia.

But in that time, the number of bloglines subscribers to this blog increased 5% to 181 (after being flat for months)

Does that mean I'll get better readership if I don't post at all? :-)

But seriously, I'm not sure why the sudden increase. It could be because I'm no longer on Planet Python.

If you're a new reader via bloglines and you don't mind telling me how you came to subscribe, email me.

by : Created on Feb. 7, 2006 : Last modified Feb. 7, 2006 : (permalink)


This Entry's Title Is Exponentially Longer Than The Previous One

In a review of the new MacBook Pro, Yuval Kossovsky says (emphasis mine):

Having said that, I can tell you this laptop is fast. Really fast. I am hesitant to say it’s exponentially faster than the G4 version, but subjectively, this baby cooks.

I'm sorry but it really annoys me when people abuse the term "exponentially" this way. It's meaningless to say that one thing is exponentially faster than something else. Of course it is. Anything faster is going to be exponentially faster.

If something is 0.1% faster it's still exponentially faster. The base is just 1.001.

Talking about things as increasing exponentially only makes sense when you have at least three data points. But even so, in the case of three data points you are just saying that the ratio of the third to the second is the same as the second to the first. It could be a small ratio.

The significance of being "exponentially" faster really only starts to kick in when you have more and more data points.

It certainly makes no sense to talk about one thing as exponentially faster (or higher or whatever) than another. Given that it is trivially true, it makes it even worse that Kossovsky hesitates about it.

by : Created on Jan. 30, 2006 : Last modified Jan. 30, 2006 : (permalink)


Dynamic Interlinears with Javascript and CSS

After the continuation of a permathread on the b-greek mailing list about the pros and cons of interlinears, I built some quick demonstrations of how CSS and Javascript could be used for dynamic interlinear glosses that would not be possible on the printed page.

  • Plain — show static glosses
  • Hover — show glosses when a word is hovered over
  • Toggle — toggle showing a gloss when a word is clicked
  • Frequency — filter appearance of gloss by frequency

They might be interesting as little Javascript tutorials too.

by : Created on Jan. 28, 2006 : Last modified Jan. 28, 2006 : (permalink)


Javascript in IE

Nathan Vander Wilt has been helping me with my Javascript for Quisition in IE.

From him I've learnt a couple of key things recently:

  • don't name your variables the same as your element IDs
  • ['a', 'b', 'c', 'd',] has 4 elements in Firefox and Safari but 5 in IE (note the final comma)

Thanks Nathan! I've now (hopefully) fixed the Quisition Short-Term Test Demo for IE users.

I still have some suggestions from Tim Wegener to implement.

by : Created on Jan. 28, 2006 : Last modified Jan. 28, 2006 : (permalink)


More or Less

Yesterday I saw James Marcus using 'more' on the command line and I asked him why he didn't use 'less'. He responded by asking me why people use 'less' and not 'more'.

I use 'less' out of habit because when I started using Unix 13 years ago it wasn't the same as 'more'—it was more.

But I guess somewhere along the line, the old 'more' disappeared and the new 'more' became the same as 'less'. So if you want 'less' now you can just use 'more'.

I figured it's probably a symbolic link, just like 'sh' is often a symlink to 'bash'.

I just checked on Mac OS X and, sure enough, 'less' is 'more'; but it's actually a hard link, not a symbolic link.

In contrast, 'sh' and 'bash' on Mac OS X are distinct files but with the same content.

Go figure.

by : Created on Jan. 28, 2006 : Last modified Jan. 28, 2006 : (permalink)


Python Unicode Collation Algorithm

My preliminary attempt at a Python implementation of the Unicode Collation Algorithm (UCA) is done and available at:

http://jtauber.com/2006/01/27/pyuca.py (old version—see UPDATE below)

This only implements the simple parts of the algorithm but I have successfully tested it using the Default Unicode Collation Element Table (DUCET) to collate Ancient Greek correctly.

The core of the algorithm, which is what I have implemented, basically just involves multi-level comparison. For example, café comes before caff because at the primary level, the accent is ignored and the first word is treated as if it were cafe. The secondary level (which considers accents) only applies then to words that are equivalent at the primary level.

The UCA (and my code) also support contraction and expansion. Contraction is where multiple letters are treated as a single unit—in Spanish, ch is treated as a letter coming between c and d so that, for example, words beginning ch should sort after all other words beginnings with c. Expansion is where a single letter is treated as though it were multiple letters—in German, ä is sorted as if it were ae, i.e. after ad but before af.

Here is how to use the pyuca module.

Usage example:

from pyuca import Collator c = Collator("allkeys.txt")

sorted_words = sorted(words, key=c.sort_key)

allkeys.txt (1 MB) is available at

http://www.unicode.org/Public/UCA/latest/allkeys.txt

but you can always subset this for just the characters you are dealing with (and you will need to do this if any language-specific tailoring is needed)

UPDATE (2006-02-13): Now see bug fix

UPDATE (2012-06-21): Now see https://github.com/jtauber/pyuca

by : Created on Jan. 27, 2006 : Last modified June 21, 2012 : (permalink)


Mozart 250th

Today is the 250th anniversary of the birth of Wolfgang Amadeus Mozart.

It's hard to overstate just how much of an influence Mozart has been on me as a composer.

I think at some point around the age of 13, I decided that I liked Mozart more than Beethoven and while my esteem for Beethoven and (especially) Bach have increased over the years, Mozart dominated my teens.

I taught myself to compose almost entirely by studying scores of Mozart. The Western Australia State Library building had something called the Central Music Library which was the only part of the library you could borrow directly from (as opposed to via inter-library loan at a local library).

I think there was a period of my life where every couple of weekends my mum (whose birthday it also is today) would drive me to the Central Music Library to borrow scores of Mozart symphonies and concerti. I would mark on my calendar every Mozart piece scheduled to be played on the national classical music radio station and taped many of them. Over half the CDs I bought in high school were probably Mozart.

I'd listen to the music, reading along in the score, marking sections I liked and then going back and analyzing them. Studying his scores is how I learnt classical form, orchestration and harmony. Even when I wanted to learn to write fugues, my first model was the Kyrie from his Requiem rather than something from Bach's Well-Tempered Clavier or Art of Fugue.

Thank you Mozart.

by : Created on Jan. 27, 2006 : Last modified Jan. 27, 2006 : (permalink)


Python Web Frameworks and REST

When I've looked at Web frameworks in the past (not just in Python) I've been disappointed by their lack of a resource-oriented focus.

RESTafarians like myself typically want URIs to map to objects that then simply implement HTTP methods (assuming HTTP is what's being used—REST isn't limited to HTTP).

I was aware of mnot's Tarawa experiment but hadn't seen that sort of approach adopted in any other projects.

In Leonardo, I started down the path of being resource-oriented but it is still somewhat half-assed.

In Demokritos, I wanted it to be a focus from the start. This makes a lot of sense with the Atom Publishing Protocol because APP is really just a subset of HTTP. You have to be able to handle PUT and DELETE verbs, support reading and writing of HTTP headers and be able to return proper HTTP response codes.

(Incidently, my understanding is that something like Ruby on Rails is a bit of disaster in this area.)

Although I haven't released a version with this yet, I've refactored out the general resource-oriented HTTP parts of my Demokritos code. You can take a look in the svn repository at webbase.py for the module and server.py for a specific example of it in use for the Atom Publishing Protocol.

Since I started on Demokritos, web.py has come out. It takes a similar approach, does a bit more (especially in dispatching - where webbase.py currently lacks), but I think I still like webbase.py more.

Very recently, I've started talking to Sylvain Hellegouarch and it sounds like CherryPy might increasingly enable a RESTful approach so there's a possibility at some point that Demokritos could move over to CherryPy (which would probably mean Leonardo would too if Leonardo becomes a layer on top of Demokritos).

In the meantime, check out webbase.py. I welcome feedback on it—especially from other RESTafarian Pythonistas.

UPDATE (2006-02-10): The link to webbase.py above is now incorrect. See pyworks.web.

by : Created on Jan. 25, 2006 : Last modified Feb. 9, 2006 : (permalink)


Perelandra

Via Rick Brannan, I've discovered Loren Rosson's blogging about Perelandra.

Very few people know this, but one of my secret goals in life is to produce and direct a film adaptation of Perelandra and possibly the entire trilogy.

by : Created on Jan. 24, 2006 : Last modified Jan. 24, 2006 : (permalink)


Implementing the Unicode Collation Algorithm in Python

Has anyone implemented the Unicode Collation Algorithm in Python?

If not, I think I'll try.

by : Created on Jan. 22, 2006 : Last modified Jan. 22, 2006 : (permalink)


Subversion as a Persistence Layer

For almost as long as I've been working on Leonardo, I've been thinking about Subversion as a persistence layer. In fact, some of the design of Leonardo's current persistence layer (LFS = Leonardo File System) was inspired by Subversion and I've long thought about an alternative LFS implementation that sits directly on Subversion.

Adding the persistence layer to Demokritos I thought about starting out with Subversion right away so I've been doing some investigation.

The SWIG-based Python bindings that Subversion comes with scared me off pretty quickly. Then I found pysvn which provides a much more Pythonic (and well documented) interface to Subversion.

The problem is that pysvn assumes that you are checking out to a local workspace, which is not what I want. I just want to be able to send and receive Python strings, not create a workspace, have Demokritos read/write files from/to that workspace and then use pysvn to check-out/commit.

But it doesn't appear possible with pysvn. Not because of a limitation of pysvn itself but because the Subversion client API doesn't support it.

It would seem to me that it would still be possible to use Subversion the way I want to but it would involve one of

  • communicating straight on the wire with the Subversion server (i.e. essentially writing a new client that speaks the svn protocol)
  • directly manipulating a Subversion repository FSFS (i.e. essentially writing a new server that understands the FSFS back-end)

Subversion itself doesn't seem to expose the bits I need (certainly not in Python)

UPDATE: Literally seconds after posting this, Chris Curvey responded to a query I made on the pysvn mailing list and pointed me to a session given by Greg Stein at OSCON. The abstract for the session mentioned SubWiki which looks like it might be doing what I want to do (although it may still use a local workspace). Investigating more. Maybe I should just ask Greg.

UPDATE (2006-02-09): Good news! Now see Using the Python Subversion Binding.

by : Created on Jan. 21, 2006 : Last modified Feb. 8, 2006 : (permalink)


Planet Python Doesn't Support Atom 1.0

Looks like my move to Atom 1.0 didn't quite go as smoothly as I would have liked.

It appears Planet Python doesn't properly handle Atom 1.0 - or more specifically, content of type "html".

by : Created on Jan. 21, 2006 : Last modified Jan. 21, 2006 : (permalink)


Quisition Short-Term Demo (but not in IE)

Previously, I talked about Short-Term Testing in Quisition.

I've now made a demo of this available on the site.

It's actually the first bit of JavaScript more than a few lines I've ever written.

It works fine in Safari and Firefox but I haven't got it working in IE6 yet. If anyone with IE6 JavaScript experience could take a look and see what I've done wrong, that would be greatly appreciated.

And let me know if you have any suggestions about the test itself too.

People subscribed to the announcement feed already knew about this demo two weeks ago and I've got some good feedback. I always welcome more, though.

UPDATE: Now that Quisition is launched, I've removed the demo. You can sign up for the real thing at http://www.quisition.com/

by : Created on Jan. 21, 2006 : Last modified March 3, 2007 : (permalink)


No Internet Access

Sorry for the lack of posts of late. I've had no Internet access in my hotel room for most of the last week.

by : Created on Jan. 20, 2006 : Last modified Jan. 20, 2006 : (permalink)


iMac Ordering Link Inconsistencies

As of when I'm posting this, on the iMac page on Apple Australia's website,

http://www.apple.com/au/imac/

the Order Now button at the top right goes to the G5 ordering page while the Order Now button at the bottom right goes to the Intel ordering page.

On the equivalent US page,

http://www.apple.com/imac/

both Order Now buttons go to the G5 ordering page.

Oops.

(No, I'm not going to buy one just yet - was just pricing options)

UPDATE (2006-01-23): Apple Australia has fixed their links but the US page still has Order Now buttons going to the G5 ordering page.

by : Created on Jan. 15, 2006 : Last modified Jan. 23, 2006 : (permalink)


Switching This Site To Atom 1.0

Tomorrow, I'm going to switch over the atom feeds on this site to Atom 1.0

Hopefully no one will miss a beat.

UPDATE: Done. Just a couple of lines added to the Leonardo config file.

by : Created on Jan. 14, 2006 : Last modified Jan. 16, 2006 : (permalink)


Demokritos 0.2.0 Released

I'm pleased to announced the next release of Demokritos.

Demokritos is a Python library and content repository implementing the Atom Syndication Format (RFC4287) and Atom Publishing Protocol (currently a standards track Internet-Draft)

You can download the code at http://jtauber.com/2006/demokritos/demokritos-0.2.0.tgz

At this stage, Demokritos is not really intended for anything other than interoperability testing with Atom clients. However, the library for parsing and generating Atom feeds might be useful standalone.

There is no persistence and no security but most of RFC4287 and draft-ietf-atompub-protocol-07 is implemented.

by : Created on Jan. 14, 2006 : Last modified Jan. 14, 2006 : (permalink)


Welcome to the Blogosphere Tom

My friend and filmmaking partner-in-crime Tom Bennett has started blogging about his quest to make a feature film (hopefully with me!)

If you're at all interested in filmmaking and screenwriting, I suggest you check it out.

by : Created on Jan. 14, 2006 : Last modified Jan. 14, 2006 : (permalink)


Proof that Python Programmers are Smarter

The top three languages used in solving the Project Euler puzzles are, in order:

  • C/C++ (227)
  • Java (107)
  • Python (91)

However, the average score of people using those languages:

  • Python (31%)
  • C/C++ (19%)
  • Java (19%)

QED :-)

(NOTE: Delphi and APL/J/K programmers are even smarter, apparently)

UPDATE (2006-01-21): I may have inadvertently skewed the statistics by this post (and its appearance on Planet Python and the Daily Python URL).

Since my post, the number of C/C++ programmers has risen by 19%, the number of Java programmers by 13% but the number of Python programmers by 86%. So there are a disproportionate number of newcomers amongst the Python programmers. Because one starts off with a low score, the average score is skewed unless the Python-programming newcomers stick with it.

Note that even with this skewing, Python still beats C/C++ and Java for average programmer score :-)

by : Created on Jan. 13, 2006 : Last modified Jan. 21, 2006 : (permalink)


Maths Challenge: Project Euler

I haven't started it yet but I can just tell that this is going to take up a lot of the time this weekend I was planning on spending on Leonardo, Demokritos and Quisition.

by : Created on Jan. 13, 2006 : Last modified Jan. 13, 2006 : (permalink)


50mm Prime Arrives

My 50mm prime lens arrived today. It a Canon EF 50mm f/1.4.

A prime lens is one with a fixed focal length (unlike a telephoto which can zoom). This means a lot less glass which means it's faster (i.e. lets more light in) and the images are clearer.

My camera feels very different with the new lens attached because of the shift in centre of gravity. I also find myself constantly going to zoom while looking through the viewfinder which is a habit that will be good to get out of. Even when using my telephoto, I should decide on a focal length first and then move to get the right composition for that focal length. Having a prime will at least get me used to what 50mm looks like (or rather 80mm given the 1.6 multiplier on my Canon 10D—did I mention I want a 5D :-)

Being able to go to f/1.4 is amazing. To put things into perspective, I took pictures of the same subject, one with the new lens and one with my existing lens, a 28-135mm telephoto.

It was indoors without much light. The maximum aperture I could get on my telephoto at 50mm was f/4.5 and I had to use a shutter speed of 1/8s.

With my 50mm f/1.4 at f/1.4, I could take (roughly) the same picture with a shutter speed of 1/180s.

f/1.4 should let 10-times more light in than f/4.5. The more than 20x shutter speed increase is likely in part due to being a prime lens but the exposure was a little darker so it's hard to be sure.

Of course, with f/1.4, the depth-of-field is lovely and shallow.

The bokeh is very pleasing as well, but I need to test it more at smaller apertures. (Bokeh is the quality of the blur)

I'm certainly happy with it so far as a second lens.

by : Created on Jan. 10, 2006 : Last modified Jan. 10, 2006 : (permalink)


IM2000 and Atom

IM2000 is a pull-based mail transport proposal where the sender stores the mail and the recipient is just pinged to go collect it. (via Mark Baker)

It's particularly interesting to think about in terms of feeds and feed aggregation. Mailing lists just become feed aggregations, for example.

If you look at the proposed IM2000 architecture from Jonathan de Boyne Pollard, there's a lot you could do with the Atom format and Atom publishing protocol (APP):

"Message stores" could just be APP servers; the Message Store Originator Access Protocol would just be APP. The Message Store Recipient Access Protocol would just be Atom over HTTP. The Recipient Notification Agent Submission Protocol is just a form of trackback (which in turn could just be a specialised APP POST, in which case the Recipient Notification Agent could just be an APP server and the Recipient Notification Agent Query Protocol just APP as well).

by : Created on Jan. 3, 2006 : Last modified Jan. 3, 2006 : (permalink)


43 People

I've written about 43 Things before. It's a site that connects people who want to do things with people who have already done them.

Via Justin Johnson, I found out there's a sister site 43 People where you say who you'd like to meet and who you've already met.

If you're on the site already and you've met me, look me up.

There's also 43 Places. No prizes for guessing what that's about.

by : Created on Jan. 2, 2006 : Last modified Jan. 2, 2006 : (permalink)


File System Archaeology for MorphGNT

Some of you will be aware of Ulrik Petersen's work on augmenting Tischendorf's 8th edition with morphological tags and lemmata, based on work by Clint Yale and Maurice Robinson. Ulrik is also the developer of Emdros, an open-source text database engine for annotated text.

The overlap of Ulrik's interests and work with my own on MorphGNT is very exciting and so we've started talking about how we might be able to collaborate on some things together.

To help facilitate this, I've spent much of this long weekend so far going through the last 12 years of work on MorphGNT and putting things into Subversion. Because my work on MorphGNT has always been in fits and spurts and has spanned approximately five different desktop machines over the 12 years, it's required a fair bit of "file system archaeology".

The archaeology analogy seems apt because, I'm essentially piecing together a history based on what "layer" I'm finding the files in - e.g. a file on a backup of my website in 2002 probably dates later than those found in the tar balls from when I moved from one machine to another in 1997.

There's also an analogy with textual criticism as in some cases I have to look at two files and judge whether a change from A to B or B to A is more likely.

It's been a lot of fun, especially uncovering little scripts I wrote back in the nineties to do various analyses.

by : Created on Jan. 1, 2006 : Last modified Jan. 1, 2006 : (permalink)