Morton Fox (mortonfox) wrote,
Morton Fox

TwitVim 0.5.4

I released TwitVim 0.5.4 yesterday, just a day ahead of Vim 7.3 final. I haven't written about TwitVim development in a few months. The last time I wrote in any detail was while I was in the middle of writing the OAuth code. From 0.5.0 to 0.5.4, there have been over 3 dozen revisions, mostly to complete the feature set with some bugfixes and documentation improvements thrown in the mix.

One issue I've struggled with in TwitVim 0.5.x is about requiring the user to use a Vim executable that has been compiled with one of the scripting interfaces. (Perl, Python, Ruby, or Tcl) The reason for this is I don't have a good implementation of the HMAC-SHA1 digest code in pure Vim script1, so TwitVim has to sign OAuth requests by calling a HMAC-SHA1 module from one of those scripting languages. This is a terrible inconvenience; if it were not for this requirement, one would be able to run TwitVim in a precompiled Vim executable. Because of this requirement, a prospective TwitVim user now needs to be reasonably familiar with compilers and be able to build Vim from scratch. Furthermore, the required module isn't present by default in most Perl distributions other than ActivePerl, so the user has to fetch it from CPAN. Fortunately, the TwitVim user base (which seems to number about 3 at the moment :) ) appears to be quite good at those things. So far, those who contacted me with questions only needed a nudge in the right direction to get it working.

Another problem that's still unresolved at this time is Vim breaks some Tcl 8.5 modules. In particular, this bug prevents TwitVim from using Twitter SSL via the Tcl interface if Vim is compiled with Tcl 8.5. (TwitVim needs the "tls" package that I mentioned in my post to vim_dev. Tcl 8.4 is fine.) It was too late to address this issue in Vim 7.3, but I hope there'll be an official patch for this before Vim 7.4. (The unofficial patch is simply to hack out the redefinition of the "catch" command in if_tcl.c.)

1 There are Vim script modules for HMAC and SHA1 but these are very slow. The problem is Vim script does not have bitwise operators, so all the shifts, rotates, ANDs, ORs, and XORs have to be done using regular math operators and table lookups. It's really quite clever but I'd rather wait until the necessary enhancements are in Vim script before implementing HMAC-SHA1 in pure Vim script.
Tags: coding, software development, twitvim, vim
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded