S-Lang Library Modules


A S-Lang module is defined to be a shared object, usually written in C, that is dynamically linked into a S-Lang application during runtime via the S-Lang import statement. Such modules are useful because they allow S-Lang intrinsics and variables to be shared between applications that support dynamic linking. See http://space.mit.edu/cxc/software/slang/modules/, which provides useful guidelines for the creation of modules, a longer essay on why modules are considered useful, and links to additional modules.

There are a growing number of modules for the S-Lang interpreter. Here are some listed by functionality.

Communication Modules

The cURL provides a powerful but simple to use interface to a variety of internet communication protocols.
A module that provides access to the serial port. Available from http://laurent.perez2.free.fr/comp/slang/modules/modules.html.
A module to talk to FTDI USB chips using libftdi. Available from http://laurent.perez2.free.fr/comp/slang/modules/modules.html.
This module provides an interface to the socket library. It is part of the S-Lang distribution.
Provides XPA interprocess communication with SAOds9 controller. Available from http://space.mit.edu/cxc/software/slang/modules/xpa/.

Database and File Format Modules

This module makes use of the cfitsio library to read and write FITS files. Available from http://space.mit.edu/cxc/software/slang/modules/cfitsio/.
An XML parsing module. Available from http://www.cheesit.com/downloads/slang/slexpat.html.
This module provides access to gdbm databases. Available from http://www.cheesit.com/downloads/slang/slgdbm.html.
This module allows one to read/write HDF5 files. Available from http://space.mit.edu/cxc/software/slang/modules/slh5/.
This is a module that provides S-Lang access to mysql. Available from http://www.cheesit.com/downloads/slang/slmysql.html.
This module wraps the sqlite3 database library. Available from http://www.cheesit.com/downloads/slang/slsqlite.html.
This module provides access to TDB databases. Available from http://www.cheesit.com/downloads/slang/sltdb.html.

Distributed Computing Modules

This module makes use of the the Parallel Virtual Machine library to distribute calculates across a network. See http://space.mit.edu/cxc/software/slang/modules/pvm/ for more information.

Image, Graphics, and GUI Modules

This modules makes use of the popular Grace plotting program. See the Grace Plotting Module page for more information.
This module provides access to the GIMP Tool kit. Available from http://space.mit.edu/~mnoble/slgtk/.
Images can be thought of as 2d histograms. For example, a CCD camera produces an image by histogramming the charge released when photons interact with the CCD. Available from http://space.mit.edu/cxc/software/slang/modules/hist/.
This is a module that makes use of libpng to provide functions for reading and writing PNG files. It is part of the S-Lang distribution.
Bindings for GtkDatabox, a Gtk widget for data plotting. Available from http://laurent.perez2.free.fr/comp/slang/modules/modules.html.
SLxfig is a package that makes use of fig2dev (an xfig utility) to produce publication quality plots. It provides a contour module.
A 3d volume visualization module. Available from http://space.mit.edu/cxc/software/slang/modules/volview/

Numerical and Data Analysis Modules

This module wraps the GNU Scientific Library to provide vectorized access to special functions, random numbers, FFTs, etc. Available from http://space.mit.edu/cxc/software/slang/modules/gsl/.
This is an extremely useful module for anyone analysing data. It creates various types of one and two dimensional histograms. Available from http://space.mit.edu/cxc/software/slang/modules/hist/.
This is a statistics module that provides various statistical tests (Kolmogorov-Smirnov, Mann-Whitney, Student, Kuiper, ...) and probability functions. Available from http://space.mit.edu/cxc/software/slang/modules/stats/.

String Matching Modules

This module provides an interface to the Oniguruma regular expression library. It is part of the S-Lang distribution.
This is a module that interfaces to the Perl Compatible Regular Expression library. It is part of the S-Lang distribution.
This module provides vectorized pattern matching. Available from http://www.cheesit.com/downloads/slang/slwildcard.html.

System-level Modules

This module contains several functions to to allow an interpreter to manipulate file descriptors via the C fcntl function. It is part of the S-Lang distribution.
A module that wraps the IOCTL system call. Available from http://laurent.perez2.free.fr/comp/slang/modules/modules.html.
A module implementing an interface to the "select" system call. It is part of the S-Lang distribution.
A module that provides access to the various termios functions, e.g., tcsetpgrp, tcflush, etc. It is part of the S-Lang distribution.

Miscellaneous Modules

This module wraps the GNU iconv library. It allows S-Lang scripts to easily perform character set conversions. It is part of the S-Lang distribution.
This module provides bindings to cgilib. Available from http://www.cheesit.com/downloads/slang/slcgi.html.
This modules adds gettext internationization. Available from http://www.cheesit.com/downloads/slang/slgettext.html.
A regression-testing module. Available from http://space.mit.edu/cxc/software/slang/modules/tess/.
The varray module is simple interface to the mmap system call found on many Unix systems. This module allows one to associate very large arrays with a file on disk. It is part of the S-Lang distribution.

A number of the external modules are readily available to debian users via the standard apt-get install mechanism. These include:

Finally, if you want to create a module, then you you might want to first trying using the SLIRP code generator to automatically generate the module for you.

This page was last updated Jan 21, 2008 by John E. Davis.
To comment on it or the material presented here, send email to jed at jedsoft org.
Valid HTML 4.01! Made with JED Viewable With Any Browser