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


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

Database and File Format Modules


json
Read write json formatted files. It is part of the S-Lang distribution.
netcdf
This module adds support for reading and writing netCDF files to the interpreter. Available from https://www.jedsoft.org/snapshots/.
cfitsio
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/.
csv
A module that reads/writes CSV (comma separated values) and TAB delimited files. It is part of the S-Lang distribution.
mysqlclient
A mysql client module. Available from https://bitbucket.org/pboekholt/mysqlclient.
slexpat
An XML parsing module. Available from https://bitbucket.org/pboekholt/slexpat.
slgdbm
This module provides access to gdbm databases. Available from https://bitbucket.org/pboekholt/slgdbm.
slhf
This module allows one to read/write HDF5 files. Available from http://space.mit.edu/cxc/software/slang/modules/slh5/.
slsqlite
This module wraps the sqlite3 database library. Available from https://www.jedsoft.org/snapshots/.
sltdb
This module provides access to TDB databases. Available from https://bitbucket.org/pboekholt/sltdb.

Distributed Computing Modules


pvm
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, Computational Geometry, and GUI Modules


grace
This modules makes use of the popular Grace plotting program. See the Grace Plotting Module page for more information.
gtk
This module provides access to the GIMP Tool kit. Available from http://space.mit.edu/~mnoble/slgtk/.
histogram
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/.
png
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.
slgtkdatabox
Bindings for GtkDatabox, a Gtk widget for data plotting. Available from http://laurent.perez2.free.fr/comp/slang/modules/modules.html.
SLxfig
SLxfig is a package that makes use of fig2dev (an xfig utility) to produce publication quality plots. It provides a contour module.
volview
A 3d volume visualization module. Available from http://space.mit.edu/cxc/software/slang/modules/volview/
voronoi
A voronoi tesselation module. Available from https://www.jedsoft.org/snapshots/
.

Numerical and Data Analysis Modules


gsl
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/.
histogram
This is an extremely useful module for anyone analysing data. It creates various types of one and two dimensional histograms. It is part of the S-Lang distribution.
rand
A random number/distribution module. It is part of the S-Lang distribution.
stats
This is a statistics module that provides various statistical tests (Kolmogorov-Smirnov, Mann-Whitney, Student, Kuiper, ...) and probability functions. It is part of the S-Lang distribution.

String Matching Modules


onig
This module provides an interface to the Oniguruma regular expression library. It is part of the S-Lang distribution.
pcre
This is a module that interfaces to the Perl Compatible Regular Expression library. It is part of the S-Lang distribution.
slwildcard
This module provides vectorized pattern matching. Available from https://bitbucket.org/pboekholt/slwildcard.

System-level Modules


fcntl
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.
ioctl
A module that wraps the IOCTL system call. Available from http://laurent.perez2.free.fr/comp/slang/modules/modules.html.
select
A module implementing an interface to the "select" system call. It is part of the S-Lang distribution.
sysconf
A module that interfaces to the POSIX sysconf and pathconf functions. It is part of the S-Lang distribution.
termios
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


base64
A base64 encoder/decoder module. It is part of the S-Lang distribution.
chksum
A module that computes various checksums (MD5, SHA1...). It is part of the S-Lang distribution.
iconv
This module wraps the GNU iconv library. It allows S-Lang scripts to easily perform character set conversions.
slcgi
This module provides bindings to cgilib. Available from https://bitbucket.org/pboekholt/slcgi.
slcrypto
This module wraps some of the OpenSSL EVP library functions. It is available from http://web.science.mq.edu.au/~arikm/code/slcrypto/slcrypto.tar.gz.
slhenke
This module is a high-level interface to the Henke data tables and may be used to compute multilayer reflectivities. See this document for a first principles derivation of electromagnetic reflection from a multilayer.
slgettext
This modules adds gettext internationization. Available from https://bitbucket.org/pboekholt/slgettext.
tess
A regression-testing module. Available from http://space.mit.edu/cxc/software/slang/modules/tess/.
varray
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.
zlib
Ths module wraps the zlib compression library. 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 autogenerate a module, then use the SLIRP code generator to generate the module for you.


This page was last updated Nov 13, 2021 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