x
Loading
 Loading
Hello, Guest | Login | Register

Strategies for Scripting

Scripting has been a recurring theme in this column. It wasn’t planned that way — but the fact that every article to date has featured scripting in some way shouldn’t be overlooked.

Scripting has been a recurring theme in this column. It wasn’t planned that way — but the fact that every article to date has featured scripting in some way shouldn’t be overlooked.

When a program is scriptable, you can apply the program in novel and inventive ways. Better yet, if a program is scriptable, the work to extend the program can be distributed and delegated.

Can’t highlight C# in vim? Just copy the Java configuration file, add and subtract a few keywords, and you’re done. Need to convert ASCII text to an image? Check the Web for a suitable GIMP script (http://lemur.ecs.soton.ac.uk/~cjg/script-fu/).

Simply put, adding scripting to an application is powerful stuff. Provide some basics and all the hooks and leave the rest to your user’s imaginations.

While the concept of scripting isn’t new, it has only recently come into vogue. As a result, programmers often rush in with the best intentions to enable scripting, but don’t pause to consider or research prior art. Developers tend to reinvent the wheel or impose their own biases towards this language or that. For example, if a programmer’s favorite language is Python, he may make his application scriptable only in Python. This may not seem that harmful, but consider what could be achieved if biases could be transcended.

This month, let’s look at several approaches to scripting to see what works and to learn what to avoid.

Elisp-centric Emacs

emacs (http://www.gnu.org/software/emacs/emacs-paper.html) has been around for so long, there’s…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Helpful Tools for Software Developers
  2. The Github Hall of Fame
  3. Book'em, Github.
  4. This Week on Github: Stupid Ruby Tricks
  5. A Veritable Scatter Shot!
Follow Linux Magazine
Rackspace