[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8. About SLIB

More people than I can name have contributed to SLIB. Thanks to all of you!

SLIB 3a1, released January 2005.
Aubrey Jaffer <agj @ alum.mit.edu>
Hyperactive Software -- The Maniac Inside!
http://swissnet.ai.mit.edu/~jaffer/SLIB.html

8.1 Installation  How to install SLIB on your system.
8.2 Porting  SLIB to new platforms.
8.3 Coding Guidelines  How to write modules for SLIB.
8.4 Copyrights  Intellectual propery issues.
8.5 About this manual  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1 Installation

<A NAME="Installation"> </A>

There are four parts to installation:


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1.1 Unpacking the SLIB Distribution

If the SLIB distribution is a Linux RPM, it will create the SLIB directory `/usr/share/slib'.

If the SLIB distribution is a ZIP file, unzip the distribution to create the SLIB directory. Locate this `slib' directory either in your home directory (if only you will use this SLIB installation); or put it in a location where libraries reside on your system. On unix systems this might be `/usr/share/slib', `/usr/local/lib/slib', or `/usr/lib/slib'. If you know where SLIB should go on other platforms, please inform agj @ alum.mit.edu.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1.2 Configure Scheme Implementation to Locate SLIB

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. Scheme48 supports getenv but does not use it for determining library-vicinity. (That is done from the Makefile.)

The (library-vicinity) can also be specified from the SLIB initialization file or by implementation-specific means.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1.3 Loading SLIB Initialization File

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.

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, modify the startup file for your Scheme implementation to load this initialization file.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1.4 Build New SLIB Catalog for Implementation

When SLIB is first used from an implementation, a file named `slibcat' is written to the implementation-vicinity for that implementation. Because users may lack permission to write in implementation-vicinity, it is good practice to build the new catalog when installing SLIB.

To build (or rebuild) the catalog, start the Scheme implementation (with SLIB), then:

 
(require 'new-catalog)

The catalog also supports color-name dictionaries. With an SLIB-installed scheme implementation, type:

 
(require 'color-names)
(make-slib-color-name-db)
(require 'new-catalog)
(slib:exit)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1.5 Implementation-specific Instructions

Multiple implementations of Scheme can all use the same SLIB directory. Simply configure each implementation's initialization file as outlined above.

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

Implementation: VSCM
 
From: Matthias Blume <blume @ cs.Princeton.EDU>
Date: Tue, 1 Mar 1994 11:42:31 -0500

Disclaimer: The code below is only a quick hack. If I find some time to spare I might get around to make some more things work.

You have to provide `vscm.init' as an explicit command line argument. Since this is not very nice I would recommend the following installation procedure:

  1. run scheme
  2. (load "vscm.init")
  3. (slib:dump "dumpfile")
  4. mv dumpfile place-where-vscm-standard-bootfile-resides e.g. mv dumpfile /usr/local/vscm/lib/scheme-boot (In this case vscm should have been compiled with flag -DDEFAULT_BOOTFILE='"/usr/local/vscm/lib/scheme-boot"'. See Makefile (definition of DDP) for details.)

Implementation: Scheme48
To make a Scheme48 image for an installation under <prefix>,

  1. cd to the SLIB directory
  2. type make prefix=<prefix> slib48.
  3. To install the image, type make prefix=<prefix> install48. This will also create a shell script with the name slib48 which will invoke the saved image.

Implementation: PLT Scheme
Implementation: DrScheme
Implementation: MzScheme

The `init.ss' file in the _slibinit_ collection is an SLIB initialization file.

To use SLIB in MzScheme, set the SCHEME_LIBRARY_PATH environment variable to the installed SLIB location; then invoke MzScheme thus:

mzscheme -f ${SCHEME_LIBRARY_PATH}DrScheme.init

Implementation: MIT Scheme
scheme -load ${SCHEME_LIBRARY_PATH}mitscheme.init

Implementation: Guile
guile -l ${SCHEME_LIBRARY_PATH}guile.init


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.2 Porting

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,
Revised^4 Report on the Algorithmic Language Scheme, or
Revised^5 Report on the Algorithmic Language Scheme
in order to support SLIB. (7)

`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' from the library; this will allow the use of provide, provided?, and require along with the vicinity functions (these functions are documented in the sections 1.1 Feature and 1.2 Require). The rest of the library will then be accessible in a system independent fashion.

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


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.3 Coding Guidelines

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? 'r3rs) or (require 'r3rs) (see section 1.2 Require).

If a procedure defined in a module is called by other procedures in that module, then those procedures should instead call an alias defined in that module:

 
(define module-name:foo foo)

The module name and `:' should prefix that symbol for the internal name. Do not export internal aliases.

A procedure is exported from a module by putting Schmooz-style comments (see section 4.14 Schmooz) or `;@' at the beginning of the line immediately preceding the definition (define, define-syntax, or defmacro). Modules, exports and other relevant issues are discussed in 1.6 Compiling Scheme.

Code submitted for inclusion in SLIB should not duplicate (more than one) routines already in SLIB files. Use require to force those library routines to be used by your package.

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!


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.3.1 Modifications

Please document your changes. A line or two 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.

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.4 Copyrights

<A NAME="Copyrights"> </A>

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.4.1 Putting code into the Public Domain

In order to put code in the public domain you should sign a copyright disclaimer and send it to the SLIB maintainer. Contact agj @ alum.mit.edu for the address to mail the disclaimer to.

I, <my-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 disclaimer to the SLIB maintainer. Contact agj @ alum.mit.edu for the address to mail the disclaimer to. An example disclaimer follows.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.4.2 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:


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.4.3 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


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.5 About this manual


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Steve Langasek on January, 10 2005 using texi2html