# STklos Reference Manual 14. SRFIs

Contents
| *Top*
1 | Introduction
2 | Expressions
3 | Program structure
4 | Standard Procedures
5 | Regular Expressions
6 | Pattern Matching
7 | Exceptions and Conditions
8 | STklos Object System
9 | Threads, Mutexes and Condition Variables
10 | Customizations
11 | The ScmPkg Package System
12 | Foreign Function Interface
13 | Using the SLIB package
14 | SRFIs
| SRFI-0 -- Feature-based conditional expansion construct
| SRFI-1 -- List Library
| SRFI-2 -- AND-LET*: an AND with local bindings, a guarded LET* special form
| SRFI-4 -- Homogeneous numeric vector datatypes
| SRFI-6 -- Basic String Ports
| SRFI-7 -- Feature-based program configuration language
| SRFI-8 -- Receive: Binding to multiple values
| SRFI-9 -- Defining Record Types
| SRFI-10 -- Sharp Comma External Form
| SRFI-11 -- Syntax for receiving multiple values
| SRFI-13 -- String Library
| SRFI-14 -- Character-Set Library
| SRFI-16 -- Syntax for procedures of variable arity
| SRFI-17 -- Generalized set!
| SRFI-18 -- Multithreading support
| SRFI-22 -- Running Scheme Scripts on Unix
| SRFI-23 -- Error reporting mechanism
| SRFI-26 -- Notation for Specializing Parameters without Currying
| SRFI-27 -- Source of random bits
| SRFI-28 -- Basic Format Strings
| SRFI-30 -- Nested Multi-line Comments
| SRFI-31 -- A special form for recursive evaluation
| SRFI-34 -- Exception Handling for Programs
| SRFI-35 -- Conditions
| SRFI-36 -- I/O Conditions
| SRFI-38 -- External representation of shared structures
| SRFI-39 -- Parameters objects
| SRFI-45 -- Optional positional and named parameters
| SRFI-48 -- Intermediate Format Strings
| SRFI-55 -- Require-extension
| SRFI-59 -- Vicinity
| SRFI-60 -- Integers as bits
| SRFI-62 -- S-expression comments
| SRFI-66 -- Octet Vectors
| SRFI-69 -- Basic Hash Tables
| SRFI-70 -- Numbers
| SRFI-74 -- Octet-Addressed Binary Blocks
| SRFI-88 -- Keyword Objects
| SRFI-89 -- Optional Positional and Named Parameters
| SRFI-96 -- SLIB Prerequisites
| SRFI-96 -- SLIB Prerequisites
| SRFI-100 -- define-lambda-object
15 | Index
| Bibliography
> | 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. ### SRFI-0 -- Feature-based conditional expansion construct SRFI-0 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). STklos `cond-expand` accepts also some feature identifiers which are the same that the ones defined in igure 3 Furthermore, the feature identifier stklos is defined for application which need to know on which Scheme implementation they are running on. ### SRFI-1 -- List Library SRFI-1 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*: an AND with local bindings, a guarded LET* special form SRFI-2 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 vector datatypes SRFI-4 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 -- Basic String Ports SRFI-6 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 SRFI-7 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 -- Receive: Binding to multiple values SRFI-8 is fully supported and is completely described in this document (special form `receive`) ### SRFI-9 -- Defining Record Types SRFI-9 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-10 -- Sharp Comma External Form SRFI-10 is fully supported. This SRFI extends the STklos reader with the "`#,`" notation which is fully described in this document (see define-reader-ctor). ### SRFI-11 -- Syntax for receiving multiple values SRFI-11 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 Library SRFI-13 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 -- Character-Set Library SRFI-14 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-16 -- Syntax for procedures of variable arity SRFI-16 is fully supported and is completely described in this document (procedure `case-lambda`). ### SRFI-17 -- Generalized set! SRFI-17 is fully supported and is completely described in this document (procedures `set!` and `setter`). However, the following expression
>     (require "srfi-17")
> in your code (or the use of the `cond-expand` special form) permits to define the setters for the (numerous) cXXXXr list procedures. ### SRFI-18 -- Multithreading support SRFI-18 is fully supported and is completely described in this document ### SRFI-22 -- Running Scheme Scripts on Unix SRFI-22 describes basic prerequisites for running Scheme programs as Unix scripts in a uniform way. Specifically, it describes: the syntax of Unix scripts written in Scheme, a uniform convention for calling the Scheme script interpreter, and a method for accessing the Unix command line arguments from within the Scheme script. SRFI-22 (Running Scheme Scripts on Unix) 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 mechanism SRFI-23 is fully supported. See the documentation of the (ref :mark "error") primitive form more information (in fact STklos `error` is more general than the one defined in SRFI-23). ### SRFI-26 -- Notation for Specializing Parameters without Currying SRFI-26 is fully supported. To use SRFI-31, you need to insert the following expression
>     (require "srfi-26")
> in your code or uses the `cond-expand` special form. ### SRFI-27 -- Source of random bits SRFI-27 is fully supported. See random-integer and random-real. ### SRFI-28 -- Basic Format Strings SRFI-28 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 (Basic Format Strings)). ### SRFI-30 -- Nested Multi-line Comments SRFI-30 is fully supported by STklos reader. ### SRFI-31 -- A special form for recursive evaluation SRFI-31 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-34 -- Exception Handling for Programs SRFI-34 is fully supported and is completely described in this document (see `with-exception-handler` and `guard`). ### SRFI-35 -- Conditions SRFI-35 is fully supported. To use SRFI-35, you need to insert the following expression
>     (require "srfi-35")
> in your code or uses the `cond-expand` special form. See section Predefined Conditions for the predefined conditions and when it is required to load this file. ### SRFI-36 -- I/O Conditions SRFI-36 is fully supported. To use SRFI-36, you need to insert the following expression
>     (require "srfi-36")
> in your code or uses the `cond-expand` special form. See section Predefined Conditions for the predefined conditions and when it is required to load this file. ### SRFI-38 -- External representation of shared structures SRFI-38 is fully supported by STklos reader. ### SRFI-39 -- Parameters objects SRFI-39 is fully supported and is completely described in this document (procedures make-parameter and parameterize). ### SRFI-45 -- Optional positional and named parameters SRFI-45 is fully supported. To use SRFI-45, you need to insert the following expression
>     (require "srfi-45")
in your code or uses the `cond-expand` special form. ### SRFI-48 -- Intermediate Format Strings SRFI-48 is fully supported and is completely described in this document (procedure `format`). ### SRFI-55 -- Require-extension SRFI-55 is fully supported and is completely described in this document (procedure require-extension). Furthermore, STklos also accepts the symbols defined in figure 3 in a `require-extension` clause.
Symbol | require SRFI(s)
--- | ---
lists | srfi-1
and-let* | srfi-2
hvectors | srfi-4
program | srfi-7
records | srfi-9
strings | srfi-13
charsets | srfi-14
case-lambda | srfi-16
error | srfi-23
random | srfi-27
conditions | srfi-34, srfi-35, srfi-36
hash-tables | srfi-69
> Fig. 3: Feature identifiers ### SRFI-59 -- Vicinity SRFI-59 is fully supported. To use SRFI-59, you need to insert the following expression
>     (require "srfi-59")
> in your code or uses the `cond-expand` special form. ### SRFI-60 -- Integers as bits SRFI-60 is fully supported. To use SRFI-60, you need to insert the following expression
>     (require "srfi-60")
> in your code or uses the `cond-expand` special form. ### SRFI-62 -- S-expression comments SRFI-62 is fully supported. See Comments ### SRFI-66 -- Octet Vectors SRFI-66 is fully supported. To use SRFI-66, you need to insert the following expression
>     (require "srfi-66")
> in your code or uses the `cond-expand` special form. ### SRFI-69 -- Basic Hash Tables SRFI-69 is fully supported. Note that the default comparison function in STklos is `eq?` whereas it is `equal?` for the SRFI. Furthermore the hash functions defined in the SRFI are not defined by default in STklos. To have a fully compliant SRFI-69 (Basic Hash Tables) behaviour, you need to insert the following expression
>     (require "srfi-69")
> in your code or uses the `cond-expand` special form. ### SRFI-70 -- Numbers SRFI-70 is fully supported. ### SRFI-74 -- Octet-Addressed Binary Blocks SRFI-74 is fully supported. To use SRFI-74, you need to insert the following expression
>     (require "srfi-74")
> in your code or uses the `cond-expand` special form. ### SRFI-88 -- Keyword Objects SRFI-88 is fully supported. The only difference between the keywords defined in the SRFI document and the STklos keywords is on the zero-length keyword: in STklos, the keyword `:` is equivalent to the keyword `||:`, whereas the srfi considers that `:` is not a keyword but a symbol. ### SRFI-89 -- Optional Positional and Named Parameters SRFI-89 is fully supported. To use SRFI-89, you need to insert the following expression
>     (require "srfi-89")
> in your code or uses the `cond-expand` special form. ### SRFI-96 -- SLIB Prerequisites SRFI-96 is fully supported. To use SRFI-96, you need to insert the following expression
>     (require "srfi-96")
> in your code or uses the `cond-expand` special form. ### SRFI-96 -- SLIB Prerequisites SRFI-96 is fully supported and is completely described in this document (procedures `get-environment-variable`, and `get-environment-variables`). ### SRFI-100 -- define-lambda-object SRFI-100 is fully supported. To use SRFI-100, you need to insert the following expression
>     (require "srfi-100")
in your code or uses the `cond-expand` special form.

This Html page has been produced by Skribe.
Last update Sat Dec 31 15:49:35 2011