
This week’s Thing is the an update for the Shill project. Years ago I decided to write an programmer’s editor for the Linden Scripting Language (LSL) of Second Life. It sounded easy since the Eclipse platform was designed to construct tools like that. I created the Sloth editor.
While Sloth was being developed, new programming features were being added to LSL frequently. I got tired of updating the keyword lists of functions, events, and constants, so I decided to automate the process. The Shill project was born. I gathered the additions, deletions, and changes needed for the keyword lists, fed them to Shill, and it emitted a file that Sloth could use to do syntax highlighting and function lookup for LSL.
The trouble was I hadn’t saved much effort. I still had to sift through the changes, and the automation only benefited Sloth. By then, Second Life programmers were using dozens of external editors for their LSL code. I decided to update the syntax keyword lists for all editors. How hard could it be?
It’s not too hard to update the keyword list for one editor. It is a lot harder to update the lists for 20 editors. Each editor has a slightly different format for the list. I didn’t have access to every editor. Some of the editors had very little documentation. Through trial and error and with some help from the SL community, I replaced the static keyword lists in all the files with a little template program. When Shill runs, the template expands to the full list of functions, events, and constants, formatted correctly for a particular editor. The process uses the Ruby programs RDoc and erb.
By the time I finished Shill, someone had created a better Eclipse-based editor: ByronStar. I lost interest in creating the editor, but Shill lived on because anyone who cared enough to use an external editor for their LSL code wanted up-to-date syntax keyword lists. I updated the lists several times, but the process was not completely automated. LSL also changed less frequently. No one asked for further updates. Until now.
An avid SciTE editor user noticed that the keyword lists were missing about 40 entries that had built up since the last update. He’d tried to update the lists himself and couldn’t get them to work, so he contacted the Shill project for help. Linden Lab released the source code for the Second Life viewer a while back, and I was able to find the full lists of functions, events, and constants in the code. Having an authoritative list made the process much easier to automate.
You can find all the details (and a completely up-to-date syntax file for your favorite editor) at the Shill project. If you use an editor that’s not on the list or you’d like help with anything in this area, please let me know.
The Morganthall family reunion is held on the second Saturday in July at Hagerstown City Park in Hagerstown Maryland.