aboutsummaryrefslogtreecommitdiffstats
path: root/slib.texi
diff options
context:
space:
mode:
Diffstat (limited to 'slib.texi')
-rwxr-xr-x[-rw-r--r--]slib.texi641
1 files changed, 409 insertions, 232 deletions
diff --git a/slib.texi b/slib.texi
index b9d9cd7..d65a541 100644..100755
--- a/slib.texi
+++ b/slib.texi
@@ -23,7 +23,7 @@ Copyright @copyright{} 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
@quotation
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled ``GNU Free
@@ -143,11 +143,11 @@ returns @code{#t} if the symbol @var{feature} is the
@code{software-type}, the @code{scheme-implementation-type}
@footnote{scheme-implementation-type is the name symbol of the running
Scheme implementation (RScheme, |STk|, Bigloo, chez, Elk, gambit,
-guile, JScheme, kawa, MacScheme, MITScheme, Pocket-Scheme, Scheme48,
-Scheme->C, Scheme48, Scsh, SISC, T, umb-scheme, or Vscm). Dependence on
-scheme-implementation-type is almost always the wrong way to do
-things.}, or if @var{feature} has been provided by a module already
-loaded; and @code{#f} otherwise.
+gauche, guile, JScheme, kawa, MacScheme, MITScheme, Pocket-Scheme, S7,
+Scheme48, Scheme->C, Scheme48, Scsh, SISC, T, umb-scheme, or Vscm).
+Dependence on scheme-implementation-type is almost always the wrong
+way to do things.}, or if @var{feature} has been provided by a module
+already loaded; and @code{#f} otherwise.
In some implementations @code{provided?} tests whether a module has
been @code{require}d by any module or in any thread; other
@@ -351,8 +351,10 @@ standard SLIB packages.
@item
additional packages of interest to this site.
@item
-packages specifically for the variety of Scheme which this
-session is running.
+packages specifically for the variety of Scheme which this session is
+running. This catalog, if it exists, is the file @file{implcat} in
+@code{implementation-invicinity}, which is created by loading
+@file{mkimpcat.scm} in @code{implementation-invicinity} if it exists.
@item
packages this user wants to always have available. This catalog is the
file @file{homecat} in the user's @dfn{HOME} directory.
@@ -810,12 +812,14 @@ and the name of the operating system. An unspecified value is returned.
Displays the information of @code{(slib:report-version)} followed by
almost all the information neccessary for submitting a problem report.
An unspecified value is returned.
+@end defun
-@defunx slib:report #t
+@defun slib:report #t
provides a more verbose listing.
+@end defun
-@defunx slib:report filename
-Writes the report to file @file{filename}.
+@defun slib:report filename
+Writes the verbose report to file @file{filename}.
@example
(slib:report)
@@ -938,11 +942,12 @@ omitted, in which case it defaults to the value returned by
current position of the character in @var{port} which will next be
read or written. If the implementation does not support
file-position, then @code{#f} is returned.
+@end defun
-@defunx file-position port k
+@defun file-position port k
@var{port} must be open to a file. @code{file-position} sets the
current position in @var{port} which will next be read or written. If
-successful, @code{#f} is returned; otherwise @code{file-position}
+successful, @code{#t} is returned; otherwise @code{file-position}
returns @code{#f}.
@end defun
@@ -1000,11 +1005,12 @@ facility.
@end deffn
@deffn {Procedure} slib:eval-load filename eval
-@var{filename} should be a string. If filename names an existing file,
-the Scheme source code expressions and definitions are read from the
-file and @var{eval} called with them sequentially. The
+@var{filename} should be a string. If filename names an existing
+file, the Scheme source code expressions and definitions are read from
+the file and @var{eval} called with them sequentially. The
@code{slib:eval-load} procedure does not affect the values returned by
-@code{current-input-port} and @code{current-output-port}.
+@code{current-input-port}, @code{current-error-port}, and
+@code{current-output-port}.
@end deffn
@deffn {Procedure} slib:warn arg1 arg2 @dots{}
@@ -1148,6 +1154,7 @@ Syntax extensions (macros) included with SLIB.
* Define-Structure:: 'structure
* Define-Record-Type:: 'define-record-type, 'srfi-9
* Fluid-Let:: 'fluid-let
+* Parameter Objects:: 'srfi-39
* Binding to multiple values:: 'receive, 'srfi-8
* Guarded LET* special form:: 'and-let*, 'srfi-2
* Guarded COND Clause:: 'guarded-cond-clause, 'srfi-61
@@ -1175,13 +1182,13 @@ expression @var{e}.
@end defun
@defun defmacro:load filename
-@var{filename} should be a string. If filename names an existing file,
-the @code{defmacro:load} procedure reads Scheme source code expressions
-and definitions from the file and evaluates them sequentially. These
-source code expressions and definitions may contain defmacro
-definitions. The @code{macro:load} procedure does not affect the values
-returned by @code{current-input-port} and
-@code{current-output-port}.
+@var{filename} should be a string. If filename names an existing
+file, the @code{defmacro:load} procedure reads Scheme source code
+expressions and definitions from the file and evaluates them
+sequentially. These source code expressions and definitions may
+contain defmacro definitions. The @code{defmacro:load} procedure does
+not affect the values returned by @code{current-input-port},
+@code{current-error-port}, and @code{current-output-port}.
@end defun
@defun defmacro? sym
@@ -1240,12 +1247,13 @@ macro expansion, and returns the result of the evaluation.
@end defun
@deffn {Procedure} macro:load filename
-@var{filename} should be a string. If filename names an existing file,
-the @code{macro:load} procedure reads Scheme source code expressions and
-definitions from the file and evaluates them sequentially. These source
-code expressions and definitions may contain macro definitions. The
-@code{macro:load} procedure does not affect the values returned by
-@code{current-input-port} and @code{current-output-port}.
+@var{filename} should be a string. If filename names an existing
+file, the @code{macro:load} procedure reads Scheme source code
+expressions and definitions from the file and evaluates them
+sequentially. These source code expressions and definitions may
+contain macro definitions. The @code{macro:load} procedure does not
+affect the values returned by @code{current-input-port},
+@code{current-error-port}, and @code{current-output-port}.
@end deffn
@@ -1358,12 +1366,13 @@ environment.
@deffn {Procedure} macro:load filename
@deffnx {Procedure} macwork:load filename
-@var{filename} should be a string. If filename names an existing file,
-the @code{macro:load} procedure reads Scheme source code expressions and
-definitions from the file and evaluates them sequentially. These source
-code expressions and definitions may contain macro definitions. The
-@code{macro:load} procedure does not affect the values returned by
-@code{current-input-port} and @code{current-output-port}.
+@var{filename} should be a string. If filename names an existing
+file, the @code{macro:load} procedure reads Scheme source code
+expressions and definitions from the file and evaluates them
+sequentially. These source code expressions and definitions may
+contain macro definitions. The @code{macro:load} procedure does not
+affect the values returned by @code{current-input-port},
+@code{current-error-port}, and @code{current-output-port}.
@end deffn
References:
@@ -1545,12 +1554,13 @@ environment.
@deffn {Procedure} macro:load filename
@deffnx {Procedure} synclo:load filename
-@var{filename} should be a string. If filename names an existing file,
-the @code{macro:load} procedure reads Scheme source code expressions and
-definitions from the file and evaluates them sequentially. These
-source code expressions and definitions may contain macro definitions.
-The @code{macro:load} procedure does not affect the values returned by
-@code{current-input-port} and @code{current-output-port}.
+@var{filename} should be a string. If filename names an existing
+file, the @code{macro:load} procedure reads Scheme source code
+expressions and definitions from the file and evaluates them
+sequentially. These source code expressions and definitions may
+contain macro definitions. The @code{macro:load} procedure does not
+affect the values returned by @code{current-input-port},
+@code{current-error-port}, and @code{current-output-port}.
@end deffn
@subsection Syntactic Closure Macro Facility
@@ -1996,12 +2006,13 @@ environment.
@deffn {Procedure} macro:load filename
@deffnx {Procedure} syncase:load filename
-@var{filename} should be a string. If filename names an existing file,
-the @code{macro:load} procedure reads Scheme source code expressions and
-definitions from the file and evaluates them sequentially. These
-source code expressions and definitions may contain macro definitions.
-The @code{macro:load} procedure does not affect the values returned by
-@code{current-input-port} and @code{current-output-port}.
+@var{filename} should be a string. If filename names an existing
+file, the @code{macro:load} procedure reads Scheme source code
+expressions and definitions from the file and evaluates them
+sequentially. These source code expressions and definitions may
+contain macro definitions. The @code{macro:load} procedure does not
+affect the values returned by @code{current-input-port},
+@code{current-error-port}, and @code{current-output-port}.
@end deffn
This is version 2.1 of @code{syntax-case}, the low-level macro facility
@@ -2103,9 +2114,9 @@ Send bug reports, comments, suggestions, and questions to Kent Dybvig
@noindent
Included with the @code{syntax-case} files was @file{structure.scm}
which defines a macro @code{define-structure}. Here is its
-documentation from Gambit 4.0:
+documentation from Gambit-4.0:
-@deffn {special form} define-structure @var{name} @var{field}@dots{}
+@deffn {special form} define-structure (@var{name} @var{field}@dots{})
Record data types similar to Pascal records and C @code{struct}
types can be defined using the @code{define-structure} special form.
@@ -2143,7 +2154,11 @@ the name of the type and the name and value of each field.
For example:
@smallexample
-> @b{(define-structure point x y color)}
+> @b{(require 'syntax-case)}
+> @b{(require 'repl)}
+> @b{(repl:top-level macro:eval)}
+> @b{(require 'structure)}
+> @b{(define-structure (point x y color))}
> @b{(define p (make-point 3 5 'red))}
> @b{p}
#<point #3 x: 3 y: 5 color: red>
@@ -2182,12 +2197,18 @@ Where
@end defspec
-@node Fluid-Let, Binding to multiple values, Define-Record-Type, Scheme Syntax Extension Packages
+@node Fluid-Let, Parameter Objects, Define-Record-Type, Scheme Syntax Extension Packages
@section Fluid-Let
@code{(require 'fluid-let)}
@ftindex fluid-let
+@quotation
+@emph{Note:} @code{fluid-let} is not thread-safe. It is better to use
+@ref{Parameter Objects} (srfi-39) or @ref{Dynamic Data Type}, both of
+which will be made thread-safe in the future.
+@end quotation
+
@deffn Syntax fluid-let @code{(@var{bindings} @dots{})} @var{forms}@dots{}
@end deffn
@lisp
@@ -2210,7 +2231,16 @@ by the rules of lexical scoping) of its corresponding
@var{variable}.
-@node Binding to multiple values, Guarded LET* special form, Fluid-Let, Scheme Syntax Extension Packages
+@node Parameter Objects, Binding to multiple values, Fluid-Let, Scheme Syntax Extension Packages
+@section Parameter Objects
+
+@code{(require 'srfi-39)}
+@ftindex srfi-39
+
+@url{http://srfi.schemers.org/srfi-39/srfi-39.html}
+
+
+@node Binding to multiple values, Guarded LET* special form, Parameter Objects, Scheme Syntax Extension Packages
@section Binding to multiple values
@code{(require 'receive)} or @code{(require 'srfi-8)}
@@ -2336,15 +2366,10 @@ on LISP and Functional Programming, July 1988 [ACM #552880].
Another reference is:
-Ken Dickey.
-@ifset html
-<A HREF="ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/swob.txt">
-@end ifset
-Scheming with Objects
-@ifset html
-</A>
-@end ifset
-@cite{AI Expert} Volume 7, Number 10 (October 1992), pp. 24-33.
+Ken Dickey.@*
+Scheming with Objects@*
+@cite{AI Expert} Volume 7, Number 10 (October 1992), pp. 24-33.@*
+@url{ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/swob.txt}
@menu
* Yasos terms:: Definitions and disclaimer.
@@ -2403,7 +2428,7 @@ returns @code{#t} if @var{object} has an operation @var{opname?} and
@deffn Syntax object @code{((@var{name} @var{self} @var{arg} @dots{}) @var{body})} @dots{}
Returns an object (an instance of the object system) with operations.
-Invoking @code{(@var{name} @var{object} @var{arg} @dots{}} executes the
+Invoking @code{(@var{name} @var{object} @var{arg} @dots{})} executes the
@var{body} of the @var{object} with @var{self} bound to @var{object} and
with argument(s) @var{arg}@dots{}.
@end deffn
@@ -2698,7 +2723,7 @@ call graph of grammar rules effectively instantiate the sytnax tree.
@noindent
The JACAL symbolic math system
-(@url{http://swiss.csail.mit.edu/~jaffer/JACAL}) uses
+(@url{http://people.csail.mit.edu/jaffer/JACAL}) uses
@t{precedence-parse}. Its grammar definitions in the file
@file{jacal/English.scm} can serve as examples of use.
@@ -2819,8 +2844,8 @@ variable (for use when calling @code{prec:parse}).
(define my-ruleset *syn-defs*)
@end example
-@defun prec:parse ruleset delim
-@defunx prec:parse ruleset delim port
+@defun prec:parse ruleset delim column
+@defunx prec:parse ruleset delim column port
The @var{ruleset} argument must be a list of rules as constructed by
@code{prec:define-grammar} and extracted from @var{*syn-defs*}.
@@ -2836,6 +2861,10 @@ returns the next object parsable from the given input @var{port},
updating @var{port} to point to the first character past the end of the
external representation of the object.
+For the purpose of reporting problems in error messages, this package
+keeps track of the @dfn{current column}. Its initial value is passed
+as the third argument to @code{prec:parse}.
+
If an end of file is encountered in the input before any characters are
found that can begin an object, then an end of file object is returned.
If a delimiter (such as @var{delim}) is found before any characters are
@@ -2903,16 +2932,6 @@ Is the string consisting of all characters between 0 and 255 for which
@code{char-whitespace?} returns true.
@end defvr
-@noindent
-For the purpose of reporting problems in error messages, this package
-keeps track of the @dfn{current column}. When the column does not
-simply track input characters, @code{tok:bump-column} can be used to
-adjust the current-column.
-
-@defun tok:bump-column pos port
-Adds @var{pos} to the current-column for input-port @var{port}.
-@end defun
-
@node Nud and Led Definition, Grammar Rule Definition, Token definition, Precedence Parsing
@subsection Nud and Led Definition
@@ -3204,7 +3223,7 @@ The ruleset in effect before @var{tk} was parsed is restored;
@ftindex format
@c The @file{format.scm} package was removed because it was not
-@c reentrant. @url{http://swiss.csail.mit.edu/~jaffer/SLIB.FAQ} explains
+@c reentrant. @url{http://people.csail.mit.edu/jaffer/SLIB.FAQ} explains
@c more about FORMAT's woes.
@include format.texi
@@ -3384,7 +3403,7 @@ non-numeric conversions.
A character that specifies the conversion to be applied.
@end itemize
-@subsubsection Exact Conversions
+Exact Conversions
@table @asis
@item @samp{b}, @samp{B}
@@ -3410,7 +3429,7 @@ using the digits @samp{0123456789abcdef}. @samp{%X} prints using the
digits @samp{0123456789ABCDEF}.
@end table
-@subsubsection Inexact Conversions
+Inexact Conversions
@table @asis
@item @samp{f}
@@ -3435,7 +3454,8 @@ dot between number and prefix, @samp{%k} does not.
@end table
-@subsubsection Other Conversions
+Other Conversions
+
@table @asis
@item @samp{c}
Print a single character. The @samp{-} flag is the only one which can
@@ -4419,8 +4439,8 @@ are then @code{pretty-print}ed to this port.
Whitepsace and comments (introduced by @code{;}) which are not part of
scheme expressions are reproduced in the output. This procedure does
-not affect the values returned by @code{current-input-port} and
-@code{current-output-port}.
+not affect the values returned by @code{current-input-port},
+@code{current-error-port}, and @code{current-output-port}.
@end defun
@code{pprint-filter-file} can be used to pre-compile macro-expansion and
@@ -4576,11 +4596,13 @@ compatability. Because of shared state they are not thread-safe.
@defun tzset
Returns the default time-zone.
+@end defun
-@defunx tzset tz
+@defun tzset tz
Sets (and returns) the default time-zone to @var{tz}.
+@end defun
-@defunx tzset TZ-string
+@defun tzset TZ-string
Sets (and returns) the default time-zone to that specified by
@var{TZ-string}.
@@ -4654,11 +4676,13 @@ is a datatype encapsulating time.
@defun gmtime caltime
Converts the calendar time @var{caltime} to UTC and returns it.
+@end defun
-@defunx localtime caltime tz
+@defun localtime caltime tz
Returns @var{caltime} converted to UTC relative to timezone @var{tz}.
+@end defun
-@defunx localtime caltime
+@defun localtime caltime
converts the calendar time @var{caltime} to a vector of integers
expressed relative to the user's time zone. @code{localtime} sets the
variable @var{*timezone*} with the difference between Coordinated
@@ -4670,12 +4694,14 @@ Universal Time (UTC) and local standard time in seconds
@defun gmktime univtime
Converts a vector of integers in GMT Coordinated Universal Time (UTC)
format to a calendar time.
+@end defun
-@defunx mktime univtime
+@defun mktime univtime
Converts a vector of integers in local Coordinated Universal Time (UTC)
format to a calendar time.
+@end defun
-@defunx mktime univtime tz
+@defun mktime univtime tz
Converts a vector of integers in Coordinated Universal Time (UTC) format
(relative to time-zone @var{tz})
to calendar time.
@@ -5076,17 +5102,20 @@ reversed.
@defun integer->list k len
@defunx integer->list k
-@code{integer->list} returns a list of @var{len} booleans corresponding
-to each bit of the given integer. #t is coded for each 1; #f for 0.
-The @var{len} argument defaults to @code{(integer-length @var{k})}.
+@code{integer->list} returns a list of @var{len} booleans
+corresponding to each bit of the non-negative integer @var{k}. #t is
+coded for each 1; #f for 0. The @var{len} argument defaults to
+@code{(integer-length @var{k})}.
+@end defun
-@defunx list->integer list
+@defun list->integer list
@code{list->integer} returns an integer formed from the booleans in the
list @var{list}, which must be a list of booleans. A 1 bit is coded for
each #t; a 0 bit for #f.
-@code{integer->list} and @code{list->integer} are inverses so far as
-@code{equal?} is concerned.
+@example
+(list->integer (integer->list @var{k})) @result{} @var{k}
+@end example
@end defun
@defun booleans->integer bool1 @dots{}
@@ -5116,16 +5145,16 @@ Although this package defines real and complex functions, it is safe
to load into an integer-only implementation; those functions will be
defined to #f.
-@defun real-exp @var{x}
-@defunx real-ln @var{x}
-@defunx real-log @var{y} @var{x}
-@defunx real-sin @var{x}
-@defunx real-cos @var{x}
-@defunx real-tan @var{x}
-@defunx real-asin @var{x}
-@defunx real-acos @var{x}
-@defunx real-atan @var{x}
-@defunx atan @var{y} @var{x}
+@defun real-exp x
+@defunx real-ln x
+@defunx real-log y x
+@defunx real-sin x
+@defunx real-cos x
+@defunx real-tan x
+@defunx real-asin x
+@defunx real-acos x
+@defunx real-atan x
+@defunx atan y x
These procedures are part of every implementation that supports
general real numbers; they compute the usual transcendental functions.
@@ -5138,7 +5167,7 @@ then these procedures signal an error.
@end defun
-@defun real-sqrt @var{x}
+@defun real-sqrt x
For non-negative real @var{x} the result will be its positive square
root; otherwise an error will be signaled.
@@ -5273,7 +5302,7 @@ A pseudo-random number generator is only as good as the tests it passes.
George Marsaglia of Florida State University developed a battery of
tests named @dfn{DIEHARD} (@url{http://stat.fsu.edu/~geo/diehard.html}).
@file{diehard.c} has a bug which the patch
-@url{http://swiss.csail.mit.edu/ftpdir/users/jaffer/diehard.c.pat} corrects.
+@url{http://groups.csail.mit.edu/mac/ftpdir/users/jaffer/diehard.c.pat} corrects.
SLIB's PRNG generates 8 bits at a time. With the degenerate seed
@samp{0}, the numbers generated pass DIEHARD; but when bits are
@@ -5355,8 +5384,7 @@ Philip Koopman and Tridib Chakravarty,@*
The International Conference on Dependable Systems and Networks, DSN-2004.@*
@end itemize
-@exdent
-@url{http://www.ece.cmu.edu/~koopman/roses/dsn04/koopman04_crc_poly_embedded.pdf}
+@exdent @url{http://www.ece.cmu.edu/~koopman/roses/dsn04/koopman04_crc_poly_embedded.pdf}
@noindent
There is even some controversy over the polynomials themselves.
@@ -5502,8 +5530,9 @@ Computes the P1003.2/D11.2 (POSIX.2) 32-bit checksum of @var{file}.
(cksum (in-vicinity (library-vicinity) "ratize.scm"))
@result{} 157103930
@end example
+@end defun
-@defunx cksum port
+@defun cksum port
Computes the checksum of the bytes read from @var{port} until the
end-of-file.
@@ -5522,8 +5551,9 @@ checksum of the bytes in @var{str}, can be defined as follows:
@defun crc16 file
Computes the USB data-packet (16-bit) CRC of @var{file}.
+@end defun
-@defunx crc16 port
+@defun crc16 port
Computes the USB data-packet (16-bit) CRC of the bytes read from
@var{port} until the end-of-file.
@@ -5535,8 +5565,9 @@ in http://www.usb.org/developers/data/crcdes.pdf.
@defun crc5 file
Computes the USB token (5-bit) CRC of @var{file}.
+@end defun
-@defunx crc5 port
+@defun crc5 port
Computes the USB token (5-bit) CRC of the bytes read from
@var{port} until the end-of-file.
@@ -5702,7 +5733,7 @@ vector or list @var{data}
<A NAME="Color"></A>
@end ifset
-@uref{http://swiss.csail.mit.edu/~jaffer/Color}
+@uref{http://people.csail.mit.edu/jaffer/Color}
@noindent
The goals of this package are to provide methods to specify, compute,
@@ -5730,8 +5761,9 @@ encountered in practice and the literature.
@defun color? obj
Returns #t if @var{obj} is a color.
+@end defun
-@defunx color? obj typ
+@defun color? obj typ
Returns #t if @var{obj} is a color of color-space @var{typ}. The symbol
@var{typ} must be one of:
@@ -5944,14 +5976,16 @@ values.
Loads the Spectral Tristimulus Values
@cite{CIE 1964 Supplementary Standard Colorimetric Observer},
defining @var{cie:x-bar}, @var{cie:y-bar}, and @var{cie:z-bar}.
+@end deftp
-@deftpx {Feature} cie1931
+@deftp {Feature} cie1931
@ftindex cie1931
Loads the Spectral Tristimulus Values
@cite{CIE 1931 Supplementary Standard Colorimetric Observer},
defining @var{cie:x-bar}, @var{cie:y-bar}, and @var{cie:z-bar}.
+@end deftp
-@deftpx {Feature} ciexyz
+@deftp {Feature} ciexyz
@ftindex ciexyz
Requires Spectral Tristimulus Values, defaulting to cie1931,
defining @var{cie:x-bar}, @var{cie:y-bar}, and @var{cie:z-bar}.
@@ -6020,8 +6054,9 @@ result of applying @var{proc} to each element of @var{siv}.
computes the CIEXYZ(1931) values for the spectrum returned by @var{proc}
when called with arguments from 380e-9 to 780e-9, the wavelength in
meters.
+@end defun
-@defunx spectrum->XYZ spectrum x1 x2
+@defun spectrum->XYZ spectrum x1 x2
@var{x1} and @var{x2} must be positive real numbers specifying the
wavelengths (in meters) corresponding to the zeroth and last elements of
vector or list @var{spectrum}. @code{spectrum->XYZ} returns the
@@ -6143,8 +6178,9 @@ Returns a three element list: the @var{x} and @var{y} components of
scales each chromaticity so it sums to 1 or less; and divides the
@var{Y} values by the maximum @var{Y} in the dataset, so all lie between
0 and 1.
+@end defun
-@defunx xyY:normalize-colors colors n
+@defun xyY:normalize-colors colors n
If @var{n} is positive real, then @code{xyY:normalize-colors} divides
the @var{Y} values by @var{n} times the maximum @var{Y} in the dataset.
@@ -6189,23 +6225,26 @@ color2 in the function entries.
@defun L*a*b*:DE* lab1 lab2
Returns the Euclidean distance between @var{lab1} and @var{lab2}.
+@end defun
-@defunx CIE:DE* color1 color2 white-point
+@defun CIE:DE* color1 color2 white-point
@defunx CIE:DE* color1 color2
Returns the Euclidean distance in L*a*b* space between @var{color1} and
@var{color2}.
@end defun
-@defun L*C*h:DE*94 lch1 lch2 parametric-factors
-@defunx L*C*h:DE*94 lch1 lch2
+@defun L*a*b*:DE*94 lab1 lab2 parametric-factors
+@defunx L*a*b*:DE*94 lab1 lab2
@defunx CIE:DE*94 color1 color2 parametric-factors
@defunx CIE:DE*94 color1 color2
-Measures distance in the L*C*h cylindrical color-space.
-The three axes are individually scaled (depending on C*) in their
-contributions to the total distance.
+Measures distance in the L*a*b* color-space. The three axes are
+individually scaled in their contributions to the total distance.
+
+@code{DE*94} is not symmetrical in its arguments. @var{lab1} is the
+``reference'' color and @var{lab2} is the ``sample'' color.
The CIE has defined reference conditions under which the metric with
default parameters can be expected to perform well. These are:
@@ -6371,7 +6410,7 @@ Looks for @var{name} among the 19 saturated colors from
@item red purple @tab purplish red @tab red
@end multitable
-(@url{http://swiss.csail.mit.edu/~jaffer/Color/saturate.pdf}). If
+(@url{http://people.csail.mit.edu/jaffer/Color/saturate.pdf}). If
@var{name} is found, the corresponding color is returned. Otherwise #f
is returned. Use saturate only for light source colors.
@end defun
@@ -6387,7 +6426,7 @@ operated paint manufacturing company, has generously made their
@defun resene name
Looks for @var{name} among the 1300 entries in the Resene color-name
-dictionary (@url{http://swiss.csail.mit.edu/~jaffer/Color/resene.pdf}).
+dictionary (@url{http://people.csail.mit.edu/jaffer/Color/resene.pdf}).
If @var{name} is found, the corresponding color is returned. Otherwise
#f is returned. The @cite{Resene RGB Values List} is an excellent
source for surface colors.
@@ -6448,6 +6487,10 @@ Resene Paints Ltd.
@code{(require 'root)}
@ftindex root
+In the Newton method, divide the @var{df/dx} argument by the
+multiplicity of the desired root in order to preserve quadratic
+convergence.
+
@defun newton:find-integer-root f df/dx x0
Given integer valued procedure @var{f}, its derivative (with respect to
its argument) @var{df/dx}, and initial integer value @var{x0} for which
@@ -6702,8 +6745,9 @@ Defines a rule for the case when the operation represented by symbol
@var{sub-op2}, respectively. The argument @var{reduction} is a
procedure accepting 2 arguments which will be lists whose @code{car}s
are @var{sub-op1} and @var{sub-op2}.
+@end defun
-@defunx cring:define-rule op sub-op1 'identity reduction
+@defun cring:define-rule op sub-op1 'identity reduction
Defines a rule for the case when the operation represented by symbol
@var{op} is applied to a list whose @code{car} is @var{sub-op1}, and
some other argument. @var{Reduction} will be called with the list whose
@@ -6900,7 +6944,7 @@ Data Banks}). An SLIB relational database implementation can be created
from any @ref{Base Table} implementation.
Why relational database? For motivations and design issues see@*
-@uref{http://swiss.csail.mit.edu/~jaffer/DBManifesto.html}.
+@uref{http://people.csail.mit.edu/jaffer/DBManifesto.html}.
@menu
* Using Databases:: 'databases
@@ -7148,8 +7192,7 @@ it will be overwritten. The value returned is unspecified.
@dfn{Indexed Sequential Access Methods} are a way of arranging
database information so that records can be accessed both by key and
by key sequence (ordering). @dfn{ISAM} is not part of Codd's
-relational model. Hardcore relational programmers might use some
-least-upper-bound join for every row to get them into an order.
+relational model.
@noindent
Associative memory in B-Trees is an example of a database
@@ -7189,8 +7232,9 @@ Returns a procedure of arguments @var{key1} @var{key2} @dots{} which
returns the key-list identifying the lowest record higher than
@var{key1} @var{key2} @dots{} which is stored in the relational-table;
or false if no higher record is present.
+@end defop
-@defopx {Operation} {relational-table} isam-next column-name
+@defop {Operation} {relational-table} isam-next column-name
The symbol @var{column-name} names a key field. In the list returned
by @code{isam-next}, that field, or a field to its left, will be
changed. This allows one to skip over less significant key fields.
@@ -7201,8 +7245,9 @@ Returns a procedure of arguments @var{key1} @var{key2} @dots{} which
returns the key-list identifying the highest record less than
@var{key1} @var{key2} @dots{} which is stored in the relational-table;
or false if no lower record is present.
+@end defop
-@defopx {Operation} {relational-table} isam-prev column-name
+@defop {Operation} {relational-table} isam-prev column-name
The symbol @var{column-name} names a key field. In the list returned
by @code{isam-next}, that field, or a field to its left, will be
changed. This allows one to skip over less significant key fields.
@@ -7242,8 +7287,9 @@ Return a list of the column names, foreign-key table names, domain
names, or type names respectively for this table. These 4 methods are
different from the others in that the list is returned, rather than a
procedure to obtain the list.
+@end defop
-@defopx {Operation} {relational-table} primary-limit
+@defop {Operation} {relational-table} primary-limit
Returns the number of primary keys fields in the relations in this
table.
@end defop
@@ -7376,16 +7422,19 @@ Returns an open enhanced relational database associated with
supplied, @code{open-command-database} will attempt to deduce the correct
base-table-type. If the database can not be opened or if it lacks the
@code{*commands*} table, @code{#f} is returned.
+@end defun
-@defunx open-command-database! filename
+@defun open-command-database! filename
@defunx open-command-database! filename base-table-type
Returns @emph{mutable} open enhanced relational database @dots{}
+@end defun
-@defunx open-command-database database
+@defun open-command-database database
Returns @var{database} if it is an immutable relational database; #f
otherwise.
+@end defun
-@defunx open-command-database! database
+@defun open-command-database! database
Returns @var{database} if it is a mutable relational database; #f
otherwise.
@end defun
@@ -7740,7 +7789,7 @@ declarations for emacs:
etags -lscheme -r'/ *(define-\(command\|table\) (\([^; \t]+\)/\2/' \
source1.scm ...
@end example
-
+@c ))
@menu
* Within-database::
* Within-database Example::
@@ -7906,32 +7955,31 @@ without-documentation called
Prints the names of all the tables in @var{database} and sets browse's
default to @var{database}.
-
-@deffnx {Procedure} browse
+@end deffn
+@deffn {Procedure} browse
Prints the names of all the tables in the default database.
-
-@deffnx {Procedure} browse table-name
+@end deffn
+@deffn {Procedure} browse table-name
For each record of the table named by the symbol @var{table-name},
prints a line composed of all the field values.
-
-@deffnx {Procedure} browse pathname
+@end deffn
+@deffn {Procedure} browse pathname
Opens the database named by the string @var{pathname}, prints the names
of all its tables, and sets browse's default to the database.
-
-@deffnx {Procedure} browse database table-name
+@end deffn
+@deffn {Procedure} browse database table-name
Sets browse's default to @var{database} and prints the records of the
table named by the symbol @var{table-name}.
-
-@deffnx {Procedure} browse pathname table-name
+@end deffn
+@deffn {Procedure} browse pathname table-name
Opens the database named by the string @var{pathname} and sets browse's
default to it; @code{browse} prints the records of the table named by
the symbol @var{table-name}.
-
@end deffn
@@ -8554,8 +8602,9 @@ Returns a methods procedure for a new (open) relational table for
describing the columns of a new base table in this database, otherwise
returns @code{#f}. For the fields and layout of descriptor tables,
@xref{Catalog Representation}.
+@end defop
-@defopx {Operation} {relational-database} create-table table-name table-desc-name
+@defop {Operation} {relational-database} create-table table-name table-desc-name
Returns a methods procedure for a new (open) relational table with
columns as described by @var{table-desc-name}, otherwise returns
@code{#f}.
@@ -8984,6 +9033,61 @@ The example prints the tree:
@end example
@end deffn
+@deffn {procedure+} wt-tree/union-merge wt-tree-1 wt-tree-2 merge
+Returns a new tree containing all the associations from both trees. If
+both trees have an association for the same key, the datum associated
+with that key in the result tree is computed by applying the procedure
+@var{merge} to the key, the value from @var{wt-tree-1} and the value
+from @var{wt-tree-2}. @var{Merge} is of the form
+
+@example
+(lambda (@var{key} @var{datum-1} @var{datum-2}) ...)
+@end example
+
+If some key occurs only in one tree, that association will appear in the
+result tree without being processed by @var{merge}, so for this
+operation to make sense, either @var{merge} must have both a right and
+left identity that correspond to the association being absent in one of
+the trees, or some guarantee must be made, for example, all the keys in
+one tree are known to occur in the other.
+
+These are all reasonable procedures for @var{merge}
+
+@example
+@group
+(lambda (key val1 val2) (+ val1 val2))
+(lambda (key val1 val2) (append val1 val2))
+(lambda (key val1 val2) (wt-tree/union val1 val2))
+@end group
+@end example
+
+However, a procedure like
+
+@example
+(lambda (key val1 val2) (- val1 val2))
+@end example
+
+would result in a subtraction of the data for all associations with keys
+occuring in both trees but associations with keys occuring in only the
+second tree would be copied, not negated, as is presumably be intent.
+The programmer might ensure that this never happens.
+
+This procedure has the same time behavior as @code{wt-tree/union} but
+with a slightly worse constant factor. Indeed, @code{wt-tree/union}
+might have been defined like this:
+
+@example
+@group
+(define (wt-tree/union tree1 tree2)
+ (wt-tree/union-merge tree1 tree2
+ (lambda (key val1 val2) val2)))
+@end group
+@end example
+@end deffn
+
+The @var{merge} procedure takes the @var{key} as a parameter in case the
+data are not independent of the key.
+
@node Indexing Operations on Weight-Balanced Trees, , Advanced Operations on Weight-Balanced Trees, Weight-Balanced Trees
@subsection Indexing Operations on Weight-Balanced Trees
@@ -9273,7 +9377,7 @@ Examples:
@end lisp
@code{Reduce} called with two arguments will work as does the
-procedure of the same name from @xref{Common List Functions}).
+procedure of the same name from @xref{Common List Functions}.
@ftindex common-list-functions
@end defun
@@ -9583,7 +9687,7 @@ created the type represented by @var{rtd}.
* Sorting:: 'sort
* Topological Sort:: Keep your socks on.
* Hashing:: 'hash
-* Space-Filling Curves:: 'hilbert and 'sierpinski
+* Space-Filling Curves:: 'space-filling and 'sierpinski
* Soundex:: Dimension Reduction of Last Names
* String Search:: Also Search from a Port.
* Sequence Comparison:: 'diff and longest-common-subsequence
@@ -9823,14 +9927,16 @@ Example:
@defun list-of?? predicate
Returns a predicate which returns true if its argument is a list every
element of which satisfies @var{predicate}.
+@end defun
-@defunx list-of?? predicate low-bound high-bound
+@defun list-of?? predicate low-bound high-bound
@var{low-bound} and @var{high-bound} are non-negative integers.
@code{list-of??} returns a predicate which returns true if its argument
is a list of length between @var{low-bound} and @var{high-bound}
(inclusive); every element of which satisfies @var{predicate}.
+@end defun
-@defunx list-of?? predicate bound
+@defun list-of?? predicate bound
@var{bound} is an integer. If @var{bound} is negative, @code{list-of??}
returns a predicate which returns true if its argument is a list of
length greater than @code{(- @var{bound})}; every element of which
@@ -10069,7 +10175,7 @@ Example:
(last '(foo bar baz bang) 2)
@result{} (baz bang)
(last '(1 2 3) 0)
- @result{} 0
+ @result{} ()
@end lisp
@end defun
@@ -10443,12 +10549,19 @@ items have the same @code{hashv} implies the items have the same
@subsection Space-Filling Curves
@menu
-* Hilbert Space-Filling Curve:: Non-negative coordinates
-* Peano Space-Filling Curve:: Integer coordinates
-* Sierpinski Curve::
+* Multidimensional Space-Filling Curves:: Includes Hilbert and Peano curves
+* Hilbert Space-Filling Curve:: Legacy
+* Peano Space-Filling Curve:: Legacy
+* Sierpinski Curve:: Rank-2 to scalar
@end menu
-@node Hilbert Space-Filling Curve, Peano Space-Filling Curve, Space-Filling Curves, Space-Filling Curves
+@node Multidimensional Space-Filling Curves, Hilbert Space-Filling Curve, Space-Filling Curves, Space-Filling Curves
+@subsubsection Multidimensional Space-Filling Curves
+
+@include rmdsff.txi
+
+
+@node Hilbert Space-Filling Curve, Peano Space-Filling Curve, Multidimensional Space-Filling Curves, Space-Filling Curves
@subsubsection Hilbert Space-Filling Curve
@include phil-spc.txi
@@ -10607,16 +10720,19 @@ character of the first substring of @var{string} that is equal to
@deffn {Procedure} find-string-from-port? str in-port max-no-chars
Looks for a string @var{str} within the first @var{max-no-chars} chars
of the input port @var{in-port}.
+@end deffn
-@deffnx {Procedure} find-string-from-port? str in-port
+@deffn {Procedure} find-string-from-port? str in-port
When called with two arguments, the search span is limited by the end of
the input stream.
+@end deffn
-@deffnx {Procedure} find-string-from-port? str in-port char
+@deffn {Procedure} find-string-from-port? str in-port char
Searches up to the first occurrence of character @var{char} in
@var{str}.
+@end deffn
-@deffnx {Procedure} find-string-from-port? str in-port proc
+@deffn {Procedure} find-string-from-port? str in-port proc
Searches up to the first occurrence of the procedure @var{proc}
returning non-false when called with a character (from @var{in-port})
argument.
@@ -10802,7 +10918,7 @@ Kills the current process and runs the next process from
@code{(require 'metric-units)}
@ftindex metric-units
-@url{http://swiss.csail.mit.edu/~jaffer/MIXF}
+@url{http://people.csail.mit.edu/jaffer/MIXF}
@dfn{Metric Interchange Format} is a character string encoding for
numerical values and units which:
@@ -11408,6 +11524,8 @@ unspecified.
@item SRFI-23 @code{(define error slib:error)}
@ftindex srfi-28
@item SRFI-28 @ref{Format}
+@ftindex srfi-39
+@item SRFI-39 @ref{Parameter Objects}
@ftindex srfi-47
@item SRFI-47 @ref{Arrays}
@ftindex srfi-59
@@ -11556,12 +11674,14 @@ printer for @code{qp}. This example shows how to do this:
@deffn {Procedure} trace-all file @dots{}
Traces (@pxref{Trace}) all procedures @code{define}d at top-level in
@file{file} @dots{}.
+@end deffn
-@deffnx {Procedure} track-all file @dots{}
+@deffn {Procedure} track-all file @dots{}
Tracks (@pxref{Trace}) all procedures @code{define}d at top-level in
@file{file} @dots{}.
+@end deffn
-@deffnx {Procedure} stack-all file @dots{}
+@deffn {Procedure} stack-all file @dots{}
Stacks (@pxref{Trace}) all procedures @code{define}d at top-level in
@file{file} @dots{}.
@end deffn
@@ -11597,8 +11717,9 @@ which it was called on a continuation stack.
@defun continue
Pops the topmost continuation off of the continuation stack and returns
an unspecified value to it.
+@end defun
-@defunx continue arg1 @dots{}
+@defun continue arg1 @dots{}
Pops the topmost continuation off of the continuation stack and returns
@var{arg1} @dots{} to it.
@end defun
@@ -11606,7 +11727,9 @@ Pops the topmost continuation off of the continuation stack and returns
@defmac break proc1 @dots{}
Redefines the top-level named procedures given as arguments so that
@code{breakpoint} is called before calling @var{proc1} @dots{}.
-@defmacx break
+@end defmac
+
+@defmac break
With no arguments, makes sure that all the currently broken identifiers
are broken (even if those identifiers have been redefined) and returns a
list of the broken identifiers.
@@ -11614,7 +11737,9 @@ list of the broken identifiers.
@defmac unbreak proc1 @dots{}
Turns breakpoints off for its arguments.
-@defmacx unbreak
+@end defmac
+
+@defmac unbreak
With no arguments, unbreaks all currently broken identifiers and returns
a list of these formerly broken identifiers.
@end defmac
@@ -11689,7 +11814,9 @@ Prints the call-stack to @var{port} or the current-error-port.
@defmac trace proc1 @dots{}
Traces the top-level named procedures given as arguments.
-@defmacx trace
+@end defmac
+
+@defmac trace
With no arguments, makes sure that all the currently traced identifiers
are traced (even if those identifiers have been redefined) and returns a
list of the traced identifiers.
@@ -11697,7 +11824,8 @@ list of the traced identifiers.
@defmac track proc1 @dots{}
Traces the top-level named procedures given as arguments.
-@defmacx track
+@end defmac
+@defmac track
With no arguments, makes sure that all the currently tracked identifiers
are tracked (even if those identifiers have been redefined) and returns
a list of the tracked identifiers.
@@ -11705,7 +11833,8 @@ a list of the tracked identifiers.
@defmac stack proc1 @dots{}
Traces the top-level named procedures given as arguments.
-@defmacx stack
+@end defmac
+@defmac stack
With no arguments, makes sure that all the currently stacked identifiers
are stacked (even if those identifiers have been redefined) and returns
a list of the stacked identifiers.
@@ -11713,21 +11842,24 @@ a list of the stacked identifiers.
@defmac untrace proc1 @dots{}
Turns tracing, tracking, and off for its arguments.
-@defmacx untrace
+@end defmac
+@defmac untrace
With no arguments, untraces all currently traced identifiers and returns
a list of these formerly traced identifiers.
@end defmac
@defmac untrack proc1 @dots{}
Turns tracing, tracking, and off for its arguments.
-@defmacx untrack
+@end defmac
+@defmac untrack
With no arguments, untracks all currently tracked identifiers and returns
a list of these formerly tracked identifiers.
@end defmac
@defmac unstack proc1 @dots{}
Turns tracing, stacking, and off for its arguments.
-@defmacx unstack
+@end defmac
+@defmac unstack
With no arguments, unstacks all currently stacked identifiers and returns
a list of these formerly stacked identifiers.
@end defmac
@@ -11789,7 +11921,8 @@ If @code{(provided? 'system)}:
@defun system command-string
Executes the @var{command-string} on the computer and returns the
-integer status code.
+integer status code. This behaves the same as the POSIX @code{system}
+call.
@end defun
@noindent
@@ -11865,52 +11998,33 @@ from SLIB sites are:
@table @asis
@item SLIB-PSD
@cindex PSD
-is a portable debugger for Scheme (requires emacs editor).
-
-@ifset html
-<A HREF="http://swiss.csail.mit.edu/ftpdir/scm/slib-psd1-3.tar.gz">
-@end ifset
-http://swiss.csail.mit.edu/ftpdir/scm/slib-psd1-3.tar.gz
-@ifset html
-</A>
-@end ifset
-
-swiss.csail.mit.edu:/pub/scm/slib-psd1-3.tar.gz
-
-ftp.maths.tcd.ie:pub/bosullvn/jacal/slib-psd1-3.tar.gz
-
-ftp.cs.indiana.edu:/pub/scheme-repository/utl/slib-psd1-3.tar.gz
-@sp 1
+is a portable debugger for Scheme (requires emacs editor).@*
+@url{http://groups.csail.mit.edu/mac/ftpdir/scm/slib-psd1-3.tar.gz}@*
+@url{ftp://ftp.cs.indiana.edu/pub/scheme-repository/utl/slib-psd1-3.tar.gz}@*
With PSD, you can run a Scheme program in an Emacs buffer, set
-breakpoints, single step evaluation and access and modify the program's
-variables. It works by instrumenting the original source code, so it
-should run with any R4RS compliant Scheme. It has been tested with SCM,
-Elk 1.5, and the sci interpreter in the Scheme->C system, but should
-work with other Schemes with a minimal amount of porting, if at
-all. Includes documentation and user's manual. Written by Pertti
-Kellom\"aki, pk @@ cs.tut.fi. The Lisp Pointers article describing PSD
-(Lisp Pointers VI(1):15-23, January-March 1993) is available as
+breakpoints, single step evaluation and access and modify the
+program's variables. It works by instrumenting the original source
+code, so it should run with any R4RS compliant Scheme. It has been
+tested with SCM, Elk 1.5, and the sci interpreter in the Scheme->C
+system, but should work with other Schemes with a minimal amount of
+porting, if at all. Includes documentation and user's manual.
@ifset html
-<A HREF="http://www.cs.tut.fi/staff/pk/scheme/psd/article/article.html">
-@end ifset
-http://www.cs.tut.fi/staff/pk/scheme/psd/article/article.html
-@ifset html
-</A>
+Written by Pertti Kellomäki,
@end ifset
+@ifclear html
+Written by Pertti Kellom@"aki,
+@end ifclear
+the Lisp Pointers article describing
+PSD (Lisp Pointers VI(1):15-23, January-March 1993) is available at@*
+@url{http://www.cs.tut.fi/staff/pk/scheme/psd/article/article.html}
@sp 1
@item SCHELOG
@cindex SCHELOG
@cindex Prolog
is an embedding of Prolog in Scheme.@*
-@ifset html
-<A HREF="http://www.ccs.neu.edu/~dorai/schelog/schelog.html">
-@end ifset
-http://www.ccs.neu.edu/~dorai/schelog/schelog.html
-@ifset html
-</A>
-@end ifset
+@url{http://www.ccs.neu.edu/~dorai/schelog/schelog.html}
@sp 1
@item JFILTER
@@ -11920,13 +12034,7 @@ http://www.ccs.neu.edu/~dorai/schelog/schelog.html
@cindex EUC
is a Scheme program which converts text among the JIS, EUC, and
Shift-JIS Japanese character sets.@*
-@ifset html
-<A HREF="http://www.sci.toyama-u.ac.jp/~iwao/Scheme/Jfilter/index.html">
-@end ifset
-http://www.sci.toyama-u.ac.jp/~iwao/Scheme/Jfilter/index.html
-@ifset html
-</A>
-@end ifset
+@url{http://www.math.u-toyama.ac.jp/~iwao/Scheme/Jfilter}
@end table
@@ -11939,14 +12047,14 @@ you!
@quotation
SLIB @value{SLIBVERSION}, released @value{SLIBDATE}.@*
-Aubrey Jaffer <agj @@ alum.mit.edu>@*
+Aubrey Jaffer <agj@@alum.mit.edu>@*
@c @i{Hyperactive Software} -- The Maniac Inside!@*
@end quotation
Current information about SLIB can be found on SLIB's @dfn{WWW} home
page:
-@center @url{http://swiss.csail.mit.edu/~jaffer/SLIB}
+@center @url{http://people.csail.mit.edu/jaffer/SLIB}
SLIB is part of the GNU project.
@@ -11954,6 +12062,7 @@ SLIB is part of the GNU project.
* Installation:: How to install SLIB on your system.
* The SLIB script:: Run interactive SLIB sessions.
* Porting:: SLIB to new platforms.
+* Compiled and Implementation-Specific Features::
* Coding Guidelines:: How to write modules for SLIB.
* Copyrights:: Intellectual propery issues.
* About this manual::
@@ -11979,9 +12088,10 @@ Install documentation and @code{slib} script.
Configure the Scheme implementation(s) to locate the SLIB directory
and implementation directories.
@item
-Arrange for Scheme implementation to load its SLIB initialization file.
+Arrange for each Scheme implementation to load its SLIB initialization
+file.
@item
-Build the SLIB catalog for the Scheme implementation.
+Build the SLIB catalog for each Scheme implementation.
@end itemize
@subsection Unpacking the SLIB Distribution
@@ -11995,7 +12105,7 @@ 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 @file{/usr/share/slib}, @file{/usr/local/lib/slib}, or
@file{/usr/lib/slib}. If you know where SLIB should go on other
-platforms, please inform agj @@ alum.mit.edu.
+platforms, please inform agj@@alum.mit.edu.
@subsection Install documentation and slib script
@@ -12011,14 +12121,16 @@ make install
If the Scheme implementation supports @code{getenv}, then the value of
the shell environment variable @var{SCHEME_LIBRARY_PATH} will be used
for @code{(library-vicinity)} if it is defined. Currently, Bigloo,
-Chez, Elk, Gambit, Guile, Jscheme, Larceny, MITScheme, MzScheme,
-RScheme, STk, VSCM, and SCM support @code{getenv}. Scheme48 supports
-@code{getenv} but does not use it for determining
+Chez, Elk, Gambit, Gauche, Guile, Jscheme, Larceny, MITScheme,
+MzScheme, RScheme, S7, STk, VSCM, and SCM support @code{getenv}.
+Scheme48 supports @code{getenv} but does not use it for determining
@code{library-vicinity}. (That is done from the Makefile.)
The @code{(library-vicinity)} can also be set from the SLIB
initialization file or by implementation-specific means.
+@subsection Configure Scheme Implementation to Locate and Implementation Directory
+
Support for locating an implementation's auxiliary directory is uneven
among implementations. Also, the person installing SLIB may not have
write permission to some of these directories (necessary for writing
@@ -12039,12 +12151,16 @@ as an implementation-vicinity!
@item MIT-Scheme @tab MITSCHEME_IMPLEMENTATION_PATH
@item MzScheme @tab MZSCHEME_IMPLEMENTATION_PATH
@item RScheme @tab RSCHEME_IMPLEMENTATION_PATH
+@item S7 @tab S7_IMPLEMENTATION_PATH
@item STk @tab STK_IMPLEMENTATION_PATH
@item Vscm @tab VSCM_IMPLEMENTATION_PATH
@end multitable
@subsection Loading SLIB Initialization File
+If you use the @code{slib} script to start your SLIB session, then
+this step is unnecessary.
+
Check the manifest in @file{README} to find a configuration file for
your Scheme implementation. Initialization files for most IEEE P1178
compliant Scheme Implementations are included with this distribution.
@@ -12061,7 +12177,7 @@ comments in the file for how to configure it.
Once this is done, modify the startup file for your Scheme
implementation to @code{load} this initialization file.
-@subsection Build New SLIB Catalog for Implementation
+@subsection Build New SLIB Catalog for the Implementation
When SLIB is first used from an implementation, a file named
@file{slibcat} is written to the @code{implementation-vicinity} for that
@@ -12110,6 +12226,17 @@ larceny -- -e "(require 'srfi-96)"
@end example
@end deftp
+
+@deftp Implementation {Gauche-0.9}
+Gauche also supports SLIB. It finds SLIB at installation time;
+@code{(use slib)} to enable.
+
+@example
+gosh -u slib
+@end example
+@end deftp
+
+
@deftp Implementation {ELK}
@example
elk -i -l $@{SCHEME_LIBRARY_PATH@}elk.init
@@ -12176,11 +12303,23 @@ ln -s $@{SCHEME_LIBRARY_PATH@} /usr/share/guile/1.6/slib
@code{$@{SCHEME_LIBRARY_PATH@}} is where SLIB gets installed.
-Guile with SLIB can then be started thus:
+Guile before version 1.8 with SLIB can then be started thus:
@example
guile -l $@{SCHEME_LIBRARY_PATH@}guile.init
@end example
+
+Guile version 1.8 and after with SLIB can then be started thus:
+
+@example
+guile -l $@{SCHEME_LIBRARY_PATH@}guile.init \
+ -l $@{SCHEME_LIBRARY_PATH@}guile.use
+@end example
+
+The Guile manual has a different way of installing SLIB:
+
+@exdent @url{http://www.gnu.org/software/guile/manual/html_node/SLIB-installation.html}
+
@end deftp
@@ -12232,6 +12371,18 @@ See Makefile (definition of DDP) for details.
@end enumerate
@end deftp
+@deftp Implementation S7
+
+S7 is not a standalone implementation, but runs as the extension
+language for the Snd sound editor.
+@file{$@{@var{SCHEME_LIBRARY_PATH}@}s7.init} can be loaded from the
+Snd init file or on the Snd command line thus:
+
+@example
+snd -l $@{@var{SCHEME_LIBRARY_PATH}@}s7.init
+@end example
+@end deftp
+
@node The SLIB script, Porting, Installation, About SLIB
@section The SLIB script
@@ -12251,7 +12402,7 @@ implementation to run. Absent the argument, it searches for
implementations in the above order.
-@node Porting, Coding Guidelines, The SLIB script, About SLIB
+@node Porting, Compiled and Implementation-Specific Features, The SLIB script, About SLIB
@section Porting
If there is no initialization file for your Scheme implementation, you
@@ -12268,6 +12419,10 @@ in order to support SLIB. @footnote{If you are porting a
implementation, then you will need to finish writing @file{sc4sc3.scm}
and @code{load} it from your initialization file.}
+@noindent
+@url{http://cvs.savannah.gnu.org/viewcvs/*checkout*/scm/scm/r4rstest.scm}
+is a file which checks compliance with much of R4RS.
+
@file{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
@@ -12283,11 +12438,33 @@ functions (these functions are documented in the sections
@ref{Feature} and @ref{Require}). The rest of the library will then
be accessible in a system independent fashion.
-Please mail new working configuration files to @code{agj @@ alum.mit.edu}
+Please mail new working configuration files to @code{agj@@alum.mit.edu}
so that they can be included in the SLIB distribution.
-@node Coding Guidelines, Copyrights, Porting, About SLIB
+@node Compiled and Implementation-Specific Features, Coding Guidelines, Porting, About SLIB
+@section Compiled and Implementation-Specific Features
+
+Often an implementation can implement an SLIB feature more efficiently
+than the R4RS-compliant source code in SLIB. Alternatively,
+implementations with compilers can compile SLIB source code into
+binary files which run faster than loading source code.
+
+Additionally, the SLIB catalog can be augmented with extra-SLIB
+features which can be loaded by the implementation.
+The catalog format is described in @xref{Library Catalogs}.
+
+These implementation-specific modifications are made when a new
+catalog is created (@pxref{Catalog Creation}). If @file{mkimpcat.scm}
+in @code{implementation-invicinity} exists, it is loaded. That should
+produce the file @file{implcat} in @code{implementation-invicinity},
+whose associations will override those of SLIB. @file{implcat} is
+copied into @file{slibcat} in @code{implementation-vicinity} as part
+of the catalog creation process; modifications to @file{implcat} after
+that will have no effect.
+
+
+@node Coding Guidelines, Copyrights, Compiled and Implementation-Specific Features, About SLIB
@section Coding Guidelines
All library packages are written in IEEE P1178 Scheme and assume that a
@@ -12367,7 +12544,7 @@ need to add your copyright or send a disclaimer.
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.
+agj@@alum.mit.edu for the address to mail the disclaimer to.
@need 1000
@quotation
@@ -12392,7 +12569,7 @@ 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
+SLIB maintainer. Contact agj@@alum.mit.edu for the address to mail
the disclaimer to. An example disclaimer follows.
@subsection Explicit copying terms
@@ -12413,7 +12590,7 @@ different from those already in the file.
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 the SLIB
-maintainer. Contact agj @@ alum.mit.edu for the address to mail the
+maintainer. Contact agj@@alum.mit.edu for the address to mail the
disclaimer to.
@end itemize