Sun Day

Spent a significant portion of the day lying in the sun while leafing through Ian M. Banks' The Algebraist, which I happened to find in a bookstore yesterday. Not too shabby, but somehow I'm not that much into Sci Fi anymore. Took some photos (will be up soon), lounged about trying to relax. Completely failed to clean up my desktop.

Pored over Snakelets for a bit more. The last release stopped working on Python 2.3 - which is now fixed, but also completely broke my templates, and I've been pondering whether to re-write them or pick up my core classes and move them to something a bit more "stable" as far as the codebase is concerned. It's very neat and well thought out, but the relationship between templates and classes isn't as clear cut as in a MVC framework, and I'd like to stick to a single way of doing most things from now on.

Since I needed to test some Ajax that has been in the back of my head for a couple of weeks, I decided to get Rails running on Cygwin and jot down a few notes.

Ruby does have its strong points, but I keep making the same embarassing typos and syntax errors - got to find a decent autocompletion mode for vim...

Update: It turned out that my office laptop already had this in .vimrc:

function InsertTabWrapper(direction)
    let col = col('.') - 1
    if !col || getline('.')[col - 1] !~ '\k'
        return "\<tab>"
    elseif "backward" == a:direction
        return "\<c-p>"
        return "\<c-n>"

inoremap <tab> <c-r>=InsertTabWrapper ("forward")<cr>
inoremap <s-tab> <c-r>=InsertTabWrapper ("backward")<cr>

...which mostly works, but not for member invocations (obviously). Next up, I'll be looking for a decent Ruby-oriented editor that isn't TextMate.