James Tauber

journeyman of some

blog > 2006 >

James Tauber's Blog 2006/03

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 James Tauber : Created on March 31, 2006 : Last modified March 31, 2006 : Categories quisition : 0 comments (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 James Tauber : Created on March 28, 2006 : Last modified March 28, 2006 : Categories subversion latex : 2 comments (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 James Tauber : Created on March 24, 2006 : Last modified March 24, 2006 : Categories games javascript css : 6 comments (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 James Tauber : Created on March 20, 2006 : Last modified March 20, 2006 : Categories web lighttpd : 2 comments (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 James Tauber : Created on March 20, 2006 : Last modified March 20, 2006 : 2 comments (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 James Tauber : Created on March 18, 2006 : Last modified March 18, 2006 : Categories os_x emacs greek unicode : 0 comments (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 James Tauber : Created on March 17, 2006 : Last modified March 17, 2006 : Categories python announcements leonardo : 0 comments (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 James Tauber : Created on March 14, 2006 : Last modified March 14, 2006 : Categories web rest amazon : 0 comments (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 James Tauber : Created on March 14, 2006 : Last modified March 14, 2006 : Categories linguistics announcements phd : 12 comments (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 James Tauber : Created on March 14, 2006 : Last modified March 14, 2006 : 1 comment (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 James Tauber : Created on March 12, 2006 : Last modified March 12, 2006 : 2 comments (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 James Tauber : Created on March 12, 2006 : Last modified March 12, 2006 : Categories announcements morphgnt : 0 comments (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 James Tauber : Created on March 12, 2006 : Last modified March 12, 2006 : 2 comments (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 James Tauber : Created on March 10, 2006 : Last modified March 10, 2006 : Categories quisition : 0 comments (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 James Tauber : Created on March 10, 2006 : Last modified March 10, 2006 : 5 comments (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 James Tauber : Created on March 9, 2006 : Last modified March 9, 2006 : Categories ajax safari : 6 comments (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 James Tauber : Created on March 8, 2006 : Last modified March 8, 2006 : Categories atompub demokritos leukippos : 0 comments (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 James Tauber : Created on March 8, 2006 : Last modified March 8, 2006 : 1 comment (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 James Tauber : Created on March 8, 2006 : Last modified March 8, 2006 : Categories python atompub announcements demokritos : 0 comments (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 James Tauber : Created on March 7, 2006 : Last modified Dec. 7, 2007 : Categories demokritos economics : 0 comments (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 James Tauber : Created on March 3, 2006 : Last modified March 3, 2006 : Categories filmmaking photography : 2 comments (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 James Tauber : Created on March 3, 2006 : Last modified March 3, 2006 : Categories os_x : 6 comments (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 James Tauber : Created on March 1, 2006 : Last modified March 1, 2006 : Categories python esoteric_languages : 0 comments (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 James Tauber : Created on March 1, 2006 : Last modified March 1, 2006 : Categories python atompub demokritos : 0 comments (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 James Tauber : Created on Feb. 28, 2006 : Last modified March 1, 2006 : Categories python atompub demokritos : (permalink)