Node: SRFIs, Next: , Previous: Using the SLIB package, Up: Top



     
     


SRFIs





The Scheme Request for Implementation (SRFI) process grew out of the Scheme Workshop held in Baltimore, MD, on September 26, 1998, where the attendees considered a number of proposals for standardized feature sets for inclusion in Scheme implementations. Many of the proposals received overwhelming support in a series of straw votes. Along with this there was concern that the next Revised Report would not be produced for several years and this would prevent the timely implementation of standardized approaches to several important problems and needs in the Scheme community.

Only the implemented SRFIs are (briefly) presented here. For further information on each SRFI, please look at the official SRFI site <http://srfi.schemers.org>

SRFI-0 - Conditional Expansion

This SRFI defines the cond-expand special form. It is fully supported by STKLOS. STKLOS defines several features identifiers which are of the form srfi-n where n represents the number of the SRFI supported by the implementation (for instance srfi-1 or srfi-30). Furthermore, the feature identifier stklos is defined for application which need to know on which Scheme implementation they are running on.

SRFI 1 - List Primitives

This SRFI defines an extensive library for list manipulation. The implementation used in STklos is based on the reference implementation from Olin Shivers. To use, SRFI-1 you need to insert the following expression

     (require "srfi-1")
     

in your code or uses the cond-expand special form.

SRFI 2 - and-let* special-form

This SRFI defines an and form with local binding which acts as a guarded let*. To use, SRFI-2 you need to insert the following expression

     (require "srfi-2")
     

in your code or uses the cond-expand special form.

SRFI 4 - Homogeneous Numeric Vectors

This SRFI defines a set of data types for vectors whose element are of the same numeric type (homogeneous vectors). To use SRFI-4, you need to insert the following expression

     (require "srfi-4")
     

in your code or uses the cond-expand special form.

SRFI 6 - String Ports

This SRFI is fully supported and is completely described in this document (procedures open-input-string, open-output-string and get-output-string).

SRFI 7 - Feature-based program configuration language

This SRFI is fully supported. To use SRFI-7, you need to insert the following expression

     (require "srfi-7")
     

in your code or uses the cond-expand special form.

SRFI 8 - Binding to Multiple Values

This SRFI is fully supported and is completely described in this document (special form receive)

SRFI 9 - Defining Record Types

This SRFI is fully supported (the implementation uses STKLOS classes to implement SRFI-9 records). To use SRFI-9, you need to insert the following expression

     (require "srfi-9")
     

in your code or uses the cond-expand special form.

SRFI 11 - let-values and let*-values

This SRFI is fully supported. To use SRFI-11, you need to insert the following expression

     (require "srfi-11")
     

in your code or uses the cond-expand special form.

SRFI 13 - String Libraries

This SRFI is fully supported. To use SRFI-13, you need to insert the following expression

     (require "srfi-13")
     

in your code or uses the cond-expand special form.

SRFI 14 - Characters sets

This SRFI is fully supported. To use SRFI-14, you need to insert the following expression

     (require "srfi-14")
     

in your code or uses the cond-expand special form.

SRFI 19 - Time Data Types and Procedures

This SRFI is fully supported. To use SRFI-19, you need to insert the following expression

     (require "srfi-19")
     

in your code or uses the cond-expand special form.

SRFI 22 - Unix Scheme Scripts

This SRFI describes basic prerequisites for running Scheme programs as Unix scripts in a uniform way. Specifically, it describes:

SRFI-22 recommends to invoke the Scheme script interpreter from the script via a /usr/bin/env trampoline, like this: #!/usr/bin/env <executable> where <executable> can recover several specified names. STKLOS uses only the name stklos-script for <executable>.

Here is an example of the classical echo command (without option) in Scheme:

     #!/usr/bin/env stklos-script
     
     (define (main arguments)
       (for-each (lambda (x) (display x) (display #\space))
                 (cdr arguments))
       (newline)
       0)
     

SRFI 23 - Error reporting mecanism

This SRFI is fully supported. See the documentation of the error primitive form more information (in fact STKLOS error is more general than the one defined in SRFI-23).

SRFI 27 - Sources of Random Bits

This SRFI is fully supported.

SRFI 28 - Basic Format Strings

This SRFI is fully supported. See the documentation of the format primitive form more information (in fact STKLOS format is more general than the one defined in SRFI-28).

SRFI 30 - Nested Multi-line Comments

This SRFI is fully supported by STKLOS reader.

SRFI 31 - A special form for recursive evaluation

This SRFI is fully supported. To use SRFI-31, you need to insert the following expression

     (require "srfi-31")
     

in your code or uses the cond-expand special form.

SRFI 38 - External Representation for Data With Shared Structure

This SRFI is fully supported by STKLOS reader.

SRFI 39 - Parameter objects

This SRFI is fully supported and is completely described in this document (procedures make-parameter and parameterize.