Morton Fox (mortonfox) wrote,
Morton Fox
mortonfox

Ruby, Tcl, and Vim

Old Troy Park

After digging into the Vim mailing list archives, I found out why the networking code in Ruby/if_ruby was failing in Vim. It is because if_ruby.c didn't call NtInitialize() when setting up the if_ruby interface. Better yet, someone posted a patch for this a few months ago and Bram added a slight correction to the patch. Unfortunately, this patch still isn't in the Vim source distribution. Why? Because it was a drive-by patching. The original poster didn't follow up with Bram and Bram cannot include the patch without knowing the author's name. And so the bug remains to this day. I'll see if there's anything I can do to get this patch into the source (even if I have to take responsibility for it) but in the meantime, I added a Ruby version of the networking code to TwitVim in r13.

I also added a Tcl version of the code in r14. That was fun to do, mostly because I had no idea it was at all possible. I hadn't touched Tcl in over a decade and back then, the Tcl standard library didn't have half as many commands as it does now. One thing I noticed is the ActiveTcl 8.5 download doesn't include Tcllib by default. I don't know why ActiveState would omit such an important library component but it is easy to install using the teacup program afterwards.
Tags: if_ruby, if_tcl, ruby, tcl, twitvim, vim
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments