Go to the next section.


SLIB is a portable Scheme library meant to provide compatibility and utility functions for all standard Scheme implementations, and fixes several implementations which are non-conforming. SLIB conforms to Revised^4 Report on the Algorithmic Language Scheme and the IEEE P1178 specification. SLIB supports Unix and similar systems, VMS, and MS-DOS.

For a summary of what each file contains, see the file `README'. For a list of the features that have changed since the last SLIB release, see the file `ANNOUNCE'. For a list of the features that have changed over time, see the file `ChangeLog'.

The maintainer can be reached as jaffer@ai.mit.edu or Aubrey Jaffer, 84 Pleasant St., Wakefield, MA 01880-1846.


Check the manifest in `README' to find a configuration file for your Scheme implementation. Initialization files for most IEEE P1178 compliant Scheme Implementations are included with this distribution.

If the Scheme implementation supports getenv, then the value of the shell environment variable SCHEME_LIBRARY_PATH will be used for (library-vicinity) if it is defined. Currently, Chez, Elk, MITScheme, scheme->c, VSCM, and SCM support getenv.

You should check the definitions of software-type, scheme-implementation-version,
implementation-vicinity, and library-vicinity in the initialization file. There are comments in the file for how to configure it.

Once this is done you can modify the startup file for your Scheme implementation to load this initialization file. SLIB is then installed.

Multiple implementations of Scheme can all use the same SLIB. Simply configure each Scheme initialization files as outlined above.

The SCM implementation does not require any initialization file as SLIB support is already built in to SCM. See the documentation with SCM for installation instructions.


If there is no initialization file for your Scheme implementation, you will have to create one. Your Scheme implementation must be largely compliant with IEEE Std 1178-1990 or Revised^4 Report on the Algorithmic Language Scheme to support SLIB.

`Template.scm' is an example configuration file. The comments inside will direct you on how to customize it to reflect your system. Give your new initialization file the implementation's name with `.init' appended. For instance, if you were porting foo-scheme then the initialization file might be called `foo.init'.

Your customized version should then be loaded as part of your scheme implementation's initialization. It will load `require.scm' (See section Require) from the library; this will allow the use of provide, provided?, and require along with the vicinity functions (vicinity functions are documented in the section on Require. See section Require). The rest of the library will then be accessible in a system independent fashion.

Please mail new working configuration files to jaffer@ai.mit.edu so that they can be included in the SLIB distribution.

Coding Standards

All library packages are written in IEEE P1178 Scheme and assume that a configuration file and `require.scm' package have already been loaded. Other versions of Scheme can be supported in library packages as well by using, for example, (provided? 'rev3-report) or (require 'rev3-report) (See section Require).

`require.scm' defines *catalog*, an association list of module names and filenames. When a new package is added to the library, an entry should be added to `require.scm'. Local packages can also be added to *catalog* and even shadow entries already in the table.

The module name and `:' should prefix each symbol defined in the package. Definitions for external use should then be exported by having (define foo module-name:foo).

Submitted code should not duplicate routines which are already in SLIB files. Use require to force those features to be supported in your package. Care should be taken that there are no circularities in the requires and loads between the library packages.

Documentation should be provided in Emacs Texinfo format if possible, But documentation must be provided.

Your package will be released sooner with SLIB if you send me a file which tests your code. Please run this test before you send me the code!


Please document your changes. A line or 2 for `ChangeLog' is sufficient for simple fixes or extensions. Look at the format of `ChangeLog' to see what information is desired. Please send me diff files from the latest SLIB distribution (remember to send diffs of `slib.texi' and `ChangeLog'). This makes for less email traffic and makes it easier for me to integrate when more than one person is changing a file (this happens a lot with `slib.texi' and `*.init' files).

If someone else wrote a package you want to significantly modify, please try to contact the author, who may be working on a new version. This will insure against wasting effort on obsolete versions.

If you are considering adding behavior or functions to an SLIB package which implements standard constructs (from a Scheme Report or other Scheme book, Common Lisp, or Scheme implementations) you should also provide a version which enhances the standard version of these constructs.

Please do not reformat the source code with your favorite beautifier, make 10 fixes, and send me the resulting source code. I do not have the time to fish through 10000 diffs to find your 10 real fixes.


This section has instructions for SLIB authors regarding copyrights.

Each package in SLIB must either be in the public domain, or come with a statement of terms permitting users to copy, redistribute and modify it. The comments at the beginning of `require.scm' and `macwork.scm' illustrate copyright and appropriate terms.

If your code or changes amount to less than about 10 lines, you do not need to add your copyright or send a disclaimer.

Putting code into the Public Domain

In order to put code in the public domain you need to sign a copyright disclaimer and send it to the SLIB maintainer, Aubrey Jaffer, 84 Pleasant St., Wakefield, MA 01880-1846.

I, name, hereby affirm that I have placed the software package name in the public domain.

I affirm that I am the sole author and sole copyright holder for the software package, that I have the right to place this software package in the public domain, and that I will do nothing to undermine this status in the future.

                                        signature and date

This wording assumes that you are the sole author. If you are not the sole author, the wording needs to be different. If you don't want to be bothered with sending a letter every time you release or modify a module, make your letter say that it also applies to your future revisions of that module.

Make sure no employer has any claim to the copyright on the work you are submitting. If there is any doubt, create a copyright disclaimer and have your employer sign it. Mail the signed disclaim to Aubrey Jaffer, 84 Pleasant St., Wakefield, MA 01880-1846. An example disclaimer follows.

Explicit copying terms

If you submit more than about 10 lines of code which you are not placing into the Public Domain (by sending me a disclaimer) you need to:

Example: Company Copyright Disclaimer

This disclaimer should be signed by a vice president or general manager of the company. If you can't get at them, anyone else authorized to license out software produced there will do. Here is a sample wording:

employer Corporation hereby disclaims all copyright interest in the program program written by name.

employer Corporation affirms that it has no other intellectual property interest that would undermine this release, and will do nothing to undermine it in the future.

signature and date,
name, title, employer Corporation

Please mail the signed disclaimers to:

Aubrey Jaffer
84 Pleasant St.
Wakefield, MA 01880-1846

Manual Conventions

Things that are labeled as Functions are called for their return values. Things that are labeled as Procedures are called primarily for their side effects.

All examples throughout this text were produced using the scm Scheme implementation.

At the beginning of each section, there is a line that looks something like

(require 'feature).

This means that, in order to use feature, you must include the line (require 'feature) somewhere in your code prior to the use of that feature. require will make sure that the feature is loaded.

Go to the next section.