Bruce Dodson

lua-users home
wiki

A GIS senior consultant / application architect with ESRI Canada, I enjoy working on open source projects in my spare time; it's satisfying and it helps to keep my C++ skills sharp. For the past few years one of my projects has been to help with the maintenance, distribution, and evolutionary prototyping of the Scintilla project. My focus has been mainly on the SciTE text editor which I use every day, but I have also worked on the core component when needed.

Although I've made a lot of surgical improvements to SciTE over the years, my biggest and perhaps most widely appreciated contribution to date has been to integrate Lua 5 into SciTE.

This project builds on previous efforts. In particular, a few years ago an early prototype embedding of Lua 3.2 was written as an illustration of the SciTE Extension Interface. I believe PhilippeLhoste was involved, although it might also have been largely NeilHodgson?'s work. In November 2003 I resurrected this code, got it working with the current SciTE codebase. In December I retrofitted it for Lua 5, based on prodding from folks like PhilippeLhoste and JeremyCowgar. In January I got it mostly-stable, and since then I've been working to improve its usability, incorporating ideas from the SciTE community. It has been a lot of work, but a lot of fun.

In terms of scripting languages, Python had always been my prime choice in the past, although I also use Perl when it's a more pragmatic choice. For embedding, Python has been my first choice because it's easy to embed and provides a lot of expressive power to the host application (e.g. http://avpython.sf.net/). However, as some of you know, Python users consider it a best practice to extend, rather than embed, in spite of the fact that Python has a rich, friendly API for embedding. (My anti-doctrinal position has been abided in the case of AVPython, since the application where I embedded Python was already written and does not ship with source code.)

I first learned about Lua back around 1995/1996 when I was a Dr. Dobbs reader. (I don't read it anymore since the price went up while the magazine shrunk.) I had messed around with it over the years but had not used it for anything serious until the SciTE Lua embedding project.

It has been asked on the SciTE list, "Lots of SciTE users come from Python; why isn't Python SciTE's extension language?" There are a number of answers to this. The main reason, initially, was that Lua is small enough that it can be included without bloating SciTE, yet from a user's perspective it's a nice dynamic language where Python users will quicky feel at home. Lua 3.x does have an embedding API that's just as friendly as Python's API, so it was easy to get started. When rewriting for Lua 5, I found that the new API felt idiosyncratic at first with its exposure of the underlying stack. While this has been the instigator of some bugs as I continue getting used to it, I've come to appreciate the merits of this approach as well.


RecentChanges · preferences
edit · history
Last edited April 10, 2004 3:02 pm GMT (diff)