- S-Lang (programming library)
The S-Lang programming library is a
software library forUnix ,
Windows,VMS ,OS/2 , andMac OS X . It provides routines for embeddingan interpreter for the
S-Lang scripting language, andcomponents to facilitate the creation of text-basedapplications. The latter class of functions include routines forconstructing and manipulating keymaps, an interactive line-editingfacility, and both low and high-level screen/terminal managementfunctions. It is distributed under the terms of the
GNU General Public License.Brief History
The S-Lang programming library was started in 1991 by John E. Davis asa convenient way to reuse code among several of his software projects.The earliest version of the library contained input/output routinesfor interacting with computer terminals, and included animplementation of a simple stack-based interpreter with apostscript-like syntax that he developed for use in a scientificplotting program. The JED text-editor was thefirst program to both embed the interpreter and use theterminal I/O components of the library.
Interpreter
The bulk of what makes up the S-Lang library is its interpreter, andit is also where most of the development takes place. Although theoriginal syntax supported by the interpreter resembled postscript, thesyntax has evolved to be much more C-like, with additional support forobject-oriented style constructs. As a reflection of Davis'sbackground in Physics and professional interest in ScientificComputing, the language natively supports many vectorized array-basedoperations familiar to
Matlab andIDL users.Up until the release of version 2.0, Davis had always advocated thatthe interpreter be embedded into applications to make them extensible.That is, using the interpreter meant either writing a C program thatembedded it, or using it in the context of another application (e.g.,the JED editor). In this sense, a standaloneprogram called the S-Lang interpreter did not exist. Version 2.0 wasreleased in 2005 with an interactive version of the S-Lang shell,
slsh , which until then was distributed as a demo program that wascapable of little more than running non-interactive scripts. Sincethenslsh has evolved into an application in own right, and hashad a number of external modules developed for use by it. As such, ithas become the S-Lang interpreter.Screen Management
In the mid-1990s while porting the sc spreadsheetto the S-Lang library, Davis developed the library's screen managementfacility. This component was designed to optimize screen output (byminimizing the number of characters sent to the terminal), and providea simple way of supporting a variety of terminals through an extra layerof abstraction between the application code and the terminal. The
slrn newsreader was the first application to make full use of thisinterface. Since then a number of other programs (e.g.,
Mutt) have taken advantage of this feature ofthe library, and it has become perhaps arguably the most used aspectof the library. Since version 2.0, the screen management routineshave had transparent support forUTF-8 .ee also
*S-Lang (programming language)
External links
* http://www.jedsoft.org/slang/
* http://www.jedsoft.org/slang/slsh/
* http://space.mit.edu/cxc/software/slang/modules/
Wikimedia Foundation. 2010.