From 3175ab2ce6be8213f89d7d2ebc8c6963bb228481 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 25 Feb 2013 01:25:44 -0500 Subject: [PATCH] Improve srfi-std html files. Re-encode in UTF-8, and for the main page also improve the text with some racket-isms. (Could use much more work, of course.) --- doc/srfi-std/index.html | 168 +++++++++++++++--------------- doc/srfi-std/srfi-19.html | 3 +- doc/srfi-std/srfi-41/srfi-41.html | 52 ++++----- doc/srfi-std/srfi-45.html | 4 +- doc/srfi-std/srfi-5.html | 16 +-- 5 files changed, 121 insertions(+), 122 deletions(-) diff --git a/doc/srfi-std/index.html b/doc/srfi-std/index.html index e1e5be8b5b..6f03f9ba71 100644 --- a/doc/srfi-std/index.html +++ b/doc/srfi-std/index.html @@ -1,11 +1,11 @@ - SRFI documents inside PLT + SRFI documents inside Racket -

SRFI documents inside PLT

+

SRFI documents inside Racket

Scheme Requests for Implementation

@@ -16,176 +16,176 @@ between implementations.

This manual includes the original documentation of all - the SRFIs already ported to PLT Scheme. For more information on + the SRFIs already ported to Racket. For more information on the SRFI process, please follow this link.

Loading

-

To load a SRFI with name conflicts (currently SRFIs 1, 5, 13, 17, 19, 43, +

To load a SRFI with name conflicts (currently SRFIs 1, 5, 13, 17, 19, 43, 45, 48, 61, 63, 69 and 87) in a module,
please see the note below.

To load a SRFI, use the following form:

-     (require (lib "N.ss" "srfi"))
+     (require srfi/N)

- if you know the number of the SRFI you want to load. This is the preferred - method, or this one:
+ if you know the number of the SRFI you want to load. This is the preferred + method. Alternatively, use this one:

-     (require (lib "NAME.ss" "srfi" "N"))
+     (require srfi/N/NAME)

if you know the `informative name' of the SRFI.

- N, is a number corresponding to the sub-collection that holds a particular - SRFI, and NAME is a more descriptive name we assigned to the main file in - which the SRFI is defined. For instance, to load SRFI-34 you have to do + N, is a number corresponding to the sub-collection that holds a particular + SRFI, and NAME is a more descriptive name we assigned to the main file in + which the SRFI is defined. For instance, to load SRFI-34 you have to do either one of:

-     (require (lib "34.ss" "srfi"))
+     (require srfi/34)

or,

-     (require (lib "exception.ss" "srfi" "34"))
+     (require srfi/34/exception)

- ¡¡

+

NOTE on SRFIs with name conflicts

- Certain SRFIs (currently SRFIs 1, 5, 13, 17, 19, 43, 45, 48, 61, 63, 69 and - 87) provide names which conflict with names provided by the 'mzscheme' - language. Attempting to require one of these SRFIs in a module written in - the 'mzscheme' language will result in an error.
+ Certain SRFIs (currently SRFIs 1, 5, 13, 17, 19, 43, 45, 48, 61, 63, 69 and + 87) provide names which conflict with names provided by the racket + language. Attempting to require one of these SRFIs in a module written in + the racket language will result in an error.

- To address this problem, the PLT implementations of these SRFIs provide a - different module which renames the problematic exports to avoid these - conflicts. For SRFI 1, this library is called list.ss, and should be + To address this problem, the Racket implementations of these SRFIs provide a + different module which renames the problematic exports to avoid these + conflicts. For SRFI 1, this library is called list, and should be required like this:

-     (require (lib "list.ss" "srfi" "1"))
+     (require srfi/1/list)

- which supplies the colliding names with a prefix of 's:' (e.g. "s:map", + which supplies the colliding names with a prefix of 's:' (e.g. "s:map", "s:reverse!") and is therefore suitable for requires in a module.

- For SRFI 19, this library is called time.ss, and should be required like + For SRFI 19, this library is called time, and should be required like this:

-     (require (lib "time.ss" "srfi" "19"))
+     (require srfi/19/time)

- which supplies the colliding names with a prefix of 'srfi:' (e.g. + which supplies the colliding names with a prefix of 'srfi:' (e.g. "srfi:date?", "srfi:date-second") and is therefore
suitable for requires in a module.

- ¡¡

+

Supported SRFIs
- ¡¡

+

-

SRFI           File - name           +

SRFI           File + name           Sub-collection
- SRFI-1         list.ss             + SRFI-1         list.rkt             1
- SRFI-2         and-let.ss          + SRFI-2         and-let.rkt          2
- SRFI-4(*1)     4.ss
- SRFI-5         let.ss              + SRFI-4(*1)     4.rkt
+ SRFI-5         let.rkt              5
- SRFI-6(+)      6.ss
- SRFI-7         program.ss          + SRFI-6(+)      6.rkt
+ SRFI-7         program.rkt          7
- SRFI-8         receive.ss          + SRFI-8         receive.rkt          8
- SRFI-9         record.ss           + SRFI-9         record.rkt           9
- SRFI-11(+)     11.ss
- SRFI-13        string.ss           + SRFI-11(+)     11.rkt
+ SRFI-13        string.rkt           13
- SRFI-14        char-set.ss         + SRFI-14        char-set.rkt         14
- SRFI-16(+)     16.ss
- SRFI-17        set.ss              + SRFI-16(+)     16.rkt
+ SRFI-17        set.rkt              17
- SRFI-19(*2)    time.ss             + SRFI-19(*2)    time.rkt             19
- SRFI-23(+)     23.ss
- SRFI-25        array.ss            + SRFI-23(+)     23.rkt
+ SRFI-25        array.rkt            25
- SRFI-26        cut.ss              + SRFI-26        cut.rkt              26
- SRFI-27        random-bits.ss      + SRFI-27        random-bits.rkt      27
- SRFI-28(+)     28.ss
- SRFI-29        localization.ss     + SRFI-28(+)     28.rkt
+ SRFI-29        localization.rkt     29
- SRFI-30(+)     30.ss
- SRFI-31        rec.ss              + SRFI-30(+)     30.rkt
+ SRFI-31        rec.rkt              31
- SRFI-32        sort.scm            + SRFI-32        sort.scm            32
- SRFI-34        exception.ss        + SRFI-34        exception.rkt        34
- SRFI-35        condition.ss        + SRFI-35        condition.rkt        35
- SRFI-38(+)     38.ss
- SRFI-39(+)     39.ss
- SRFI-40        stream.ss           + SRFI-38(+)     38.rkt
+ SRFI-39(+)     39.rkt
+ SRFI-40        stream.rkt           40
- SRFI-42        comprehensions.ss   + SRFI-42        comprehensions.rkt   42
- SRFI-43        vector-lib.ss       + SRFI-43        vector-lib.rkt       43
- SRFI-45(*3)    lazy.ss             + SRFI-45(*3)    lazy.rkt             45
- SRFI-48        format.ss           + SRFI-48        format.rkt           48
- SRFI-54        cat.ss              + SRFI-54        cat.rkt              54
- SRFI-57        records.ss          + SRFI-57        records.rkt          57
- SRFI-59        vicinity.ss         + SRFI-59        vicinity.rkt         59
- SRFI-60        60.ss               + SRFI-60        60.rkt               60
- SRFI-61        cond.ss             + SRFI-61        cond.rkt             61
SRFI-62(+)
- SRFI-63        63.ss               + SRFI-63        63.rkt               63
- SRFI-64        testing.ss          + SRFI-64        testing.rkt          64
- SRFI-66        66.ss               + SRFI-66        66.rkt               66
- SRFI-67        compare.ss          + SRFI-67        compare.rkt          67
- SRFI-69        hash.ss             + SRFI-69        hash.rkt             69
- SRFI-71        letvalues.ss        + SRFI-71        letvalues.rkt        71
- SRFI-74        74.ss               + SRFI-74        74.rkt               74
- SRFI-78        check.ss            + SRFI-78        check.rkt            78
- SRFI-86        86.ss               + SRFI-86        86.rkt               86
- SRFI-87        case.ss             + SRFI-87        case.rkt             87
-¡¡

+

Notes:

-

+ Supported by the core of PLT Scheme
+

+ Supported by the Racket core

- *1 The functionality is all part of mzscheme available - via (lib"foreign.ss"), the only missing part is the i/o + *1 The functionality is all part of racket available + via (require ffi/unsafe), the only missing part is the i/o syntax.

*2 The time module does not export its time structure @@ -193,11 +193,11 @@ the date-* accessors to tm:date-* so that you won't get errors when including this code in other modules. Care most be taken NOT to confuse the internal date structure - with the PLT Scheme one, they are not the same, and all + with the Racket one, they are not the same, and all procedures from this library expect the former.

*3 This port also provides promise? / srfi-45-promise?.
-¡¡

+

Ported SRFIs: original documents

@@ -249,7 +249,7 @@
  • SRFI 71: Extended LET-syntax for multiple values
  • SRFI 74: Octet-Addressed Binary Blocks
  • SRFI 78: Lightweight testing
  • -
  • SRFI 86: MU and NU simulating VALUES & +
  • SRFI 86: MU and NU simulating VALUES & CALL-WITH-VALUES, and their related LET-syntax
  • SRFI 87: => in case clauses
  • diff --git a/doc/srfi-std/srfi-19.html b/doc/srfi-std/srfi-19.html index 3d9a4df1a0..b2a612ea64 100644 --- a/doc/srfi-std/srfi-19.html +++ b/doc/srfi-std/srfi-19.html @@ -611,8 +611,7 @@ it might be good to use that code instead.

    Acknowledgements

    -Claus -Tøndering's Frequently Asked Questions about calendars was a very +Claus Tøndering's Frequently Asked Questions about calendars was a very useful resource. The implementation of Julian Day, Modified Julian Day, and Year Day comes from his FAQ. Markus Kuhn has a useful diff --git a/doc/srfi-std/srfi-41/srfi-41.html b/doc/srfi-std/srfi-41/srfi-41.html index 1ecb6eebb3..a937761696 100644 --- a/doc/srfi-std/srfi-41/srfi-41.html +++ b/doc/srfi-std/srfi-41/srfi-41.html @@ -137,7 +137,7 @@ two data types.

    α stream
       :: (promise stream-null)
       |  (promise (α stream-pair))
    α stream-pair
    -  :: (promise α) × (promise (α stream))

    + :: (promise α) × (promise (α stream))

    The object stored in the stream-car of a stream-pair is a promise that is forced the first @@ -364,7 +364,7 @@ See also list->stream

    procedure: (stream->list [n] stream)
    -nat × {α} → [α]
    +nat × {α} → [α]
    Stream->list takes a natural number n and a stream and returns a newly-allocated list containing in its elements the first n items in the stream. If the stream @@ -473,7 +473,7 @@ repeating the objects in succession forever.

    #t #f #t #f #t #f ...

    procedure: (stream-drop n stream) procedure
    -nat × {α} → {α}
    +nat × {α} → {α}
    Stream-drop returns the suffix of the input stream that starts at the next element after the first n elements. The output stream shares structure with the input @@ -487,7 +487,7 @@ also stream-take. (stream-drop n strm)))

    procedure: (stream-drop-while pred? stream)
    -(α → boolean) × {α} → {α}
    +(α → boolean) × {α} → {α}
    Stream-drop-while returns the suffix of the input stream that starts at the first element x for which (pred? x) is #f. @@ -509,7 +509,7 @@ only the first of any sub-sequences of repeated elements.
    procedure: (stream-filter pred? stream)
    -(α → boolean) × {α} → {α}
    +(α → boolean) × {α} → {α}
    Stream-filter returns a newly-allocated stream that contains only those elements x of the input stream for which (pred? x) @@ -520,7 +520,7 @@ is non-#f.

    procedure: (stream-fold proc base stream)
    -(α × β → α) × α × {β} → α
    +(α × β → α) × α × {β} → α
    Stream-fold applies a binary procedure to base and the first element of stream to compute a new base, then applies the procedure to the new base and @@ -572,7 +572,7 @@ it is useful to have stream-foldprocedure: (stream-for-each proc stream ...)
    -(α × β × ...) × {α} × {β} ...
    +(α × β × ...) × {α} × {β} ...
    Stream-for-each applies a procedure element-wise to corresponding elements of the input streams for its side-effects; it returns nothing. Stream-for-each stops as soon as any of its input @@ -587,7 +587,7 @@ procedure displays the contents of a file:

    procedure: (stream-from first [step])
    -number × number → {number}
    +number × number → {number}
    Stream-from creates a newly-allocated stream that contains first as its first element and increments each succeeding element by step. If step is not given it defaults @@ -605,7 +605,7 @@ for a similar procedure that creates finite streams.procedure: (stream-iterate proc base)
    -(α → α) × α → {α}
    +(α → α) × α → {α}
    Stream-iterate creates a newly-allocated stream containing base in its first element and applies proc to each element in turn to determine the succeeding element. See also stream-unfold @@ -681,7 +681,7 @@ with a stream-car xprocedure: (stream-map proc stream ...)
    -(α × β ... → ω) × {α} × {β} ... → {ω}
    +(α × β ... → ω) × {α} × {β} ... → {ω}
    Stream-map applies a procedure element-wise to corresponding elements of the input streams, returning a newly-allocated stream containing elements that are the results of those procedure @@ -841,7 +841,7 @@ containing only the element 1procedure: (stream-range first past [step])
    -number × number × number → {number}
    +number × number × number → {number}
    Stream-range creates a newly-allocated stream that contains first as its first element and increments each succeeding element by step. The stream is finite and ends before @@ -868,7 +868,7 @@ length of the output stream may differ from (ceili

    procedure: (stream-ref stream n)
    -{α} × nat → α
    +{α} × nat → α
    Stream-ref returns the nth element of stream, counting from zero. An error is signaled if n is greater than or equal to the length of stream.

    @@ -897,7 +897,7 @@ error: division by zero

    procedure: (stream-scan proc base stream)
    -(α × β → α) × α × {β} → {α}
    +(α × β → α) × α × {β} → {α}
    Stream-scan accumulates the partial folds of an input stream into a newly-allocated output stream. The output stream is the base followed by (stream-fold @@ -912,7 +912,7 @@ for each of the first i elements of stream.
    procedure: (stream-take n stream)
    -nat × {α} → {α}
    +nat × {α} → {α}
    Stream-take takes a non-negative integer n and a stream and returns a newly-allocated stream containing the first n elements of the input stream. If the @@ -934,7 +934,7 @@ the results:

    procedure: (stream-take-while pred? stream)
    -(α → boolean) × {α} → {α}
    +(α → boolean) × {α} → {α}
    Stream-take-while takes a predicate and a stream and returns a newly-allocated stream containing those elements x that form the maximal prefix of the input stream for which (pred? x) @@ -949,7 +949,7 @@ See also stream-drop-whileprocedure: (stream-unfold map pred? gen base)
    -(α → β) × (α → boolean) × (α → α) × α → {β}
    +(α → β) × (α → boolean) × (α → α) × α → {β}
    Stream-unfold is the fundamental recursive stream constructor. It constructs a stream by repeatedly applying gen to successive values of base, in the manner of stream-iterate, @@ -975,7 +975,7 @@ and stream-null ends the

    procedure: (stream-unfolds proc seed)
    -(α → (values α × β ...)) × α → (values {β} ...)
    +(α → (values α × β ...)) × α → (values {β} ...)
    Stream-unfolds returns n newly-allocated streams containing those elements produced by successive calls to the generator proc, which takes the current seed as its argument and returns @@ -1038,7 +1038,7 @@ pred? once for each element of strm.

    procedure: (stream-zip stream ...)
    -{α} × {β} × ... → {[α β ...]}
    +{α} × {β} × ... → {[α β ...]}
    Stream-zip takes one or more input streams and returns a newly-allocated stream in which each element is a list (not a stream) of the corresponding elements of the input streams. @@ -1210,7 +1210,7 @@ the offset trick is this definition of the fibonacci numbers:
    i·3j·5k, +Hamming numbers are all numbers expressible as 2i·3j·5k, where i, j and k are non-negative integers. The Hamming sequence starts with
    1 2 3 4 5 6 8 9 10 12 and @@ -2007,7 +2007,7 @@ the suspension through the two constructors of the stream data type:

    α stream-pair
    -  :: α × (α stream)

    + :: α × (α stream)

    That type captures the systematic suspension of recursive promises that is the essence @@ -2021,7 +2021,7 @@ the car and the cdr of the stream-pair:

    | (promise (α stream-pair))

    α stream-pair
    -  :: (promise α) × (promise (α stream))

    + :: (promise α) × (promise (α stream))

    The two outer promises, in the stream type, provide streams without memoization. @@ -2034,7 +2034,7 @@ can be derived from those primitives.

    It would seem that the same set of primitives could apply to streams, but in fact -one additional primitive is required. André van Tonder describes +one additional primitive is required. André van Tonder describes the reason in his discussion of the promise data type. The promises of R6RS are inadequate to support iterative algorithms because each time a promise is called iteratively it binds the old promise in the @@ -2076,8 +2076,8 @@ hardest tasks when writing any program library is to decide what to include and, more importantly, what to exclude. One important guideline is minimalism, since once an operator enters a library it must remain forever: Il semble que la perfection soit atteinte non -quand il n’y a plus rien à ajouter, mais quand il n’y a plus rien -à retrancher.

    +quand il n’y a plus rien à ajouter, mais quand il n’y a plus rien +à retrancher
    .

    Since streams are substantially slower than lists (the stream primitives require numerous @@ -2625,7 +2625,7 @@ Elements of Functional Programming. Addison-Wesley, April 1989. A textbook on functional programming.

    Antoine de -Saint-Exupéry. Chapter III “L’Avion” of Terre des Hommes. +Saint-Exupéry. Chapter III “L’Avion” of Terre des Hommes. 1939. “Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.”

    @@ -2640,7 +2640,7 @@ Revised
    6 Report on the Algorithmic Language Scheme. September 26, 2007.
    www.r6rs.org. The standard definition of the Scheme programming language.

    -

    André van +

    André van Tonder. Scheme Request for Implementation 45: Primitives for Expressing Iterative Lazy Algorithms. srfi.schemers.org/srfi-45. April, 2004. Describes the problems inherent in the promise diff --git a/doc/srfi-std/srfi-45.html b/doc/srfi-std/srfi-45.html index df80918fae..a9c326b543 100644 --- a/doc/srfi-std/srfi-45.html +++ b/doc/srfi-std/srfi-45.html @@ -742,7 +742,7 @@ Richard Jones. Tail recursion without space leaks, Journal of Functiona [Fee97] Marc Feeley, James S. Miller, Guillermo J. Rozas, Jason A. Wilson, Compiling Higher-Order Languages into Fully Tail-Recursive Portable C, -Rapport technique 1078, département d'informatique et r.o., Université de Montréal, août 1997. +Rapport technique 1078, département d'informatique et r.o., Université de Montréal, août 1997. @@ -775,7 +775,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


    -
    Author: André van Tonder
    +
    Author: André van Tonder
    Editor: Francisco Solsona
    diff --git a/doc/srfi-std/srfi-5.html b/doc/srfi-std/srfi-5.html index 594031f890..ee42593b0e 100644 --- a/doc/srfi-std/srfi-5.html +++ b/doc/srfi-std/srfi-5.html @@ -143,18 +143,18 @@ unique.

                 let = "(" "let" let-bindings body ")"
    -    expressions = nothing | expression expressions
    -   let-bindings = let-name bindings
    -                | "(" let-name "." bindings ")"
    -       let-name = identifier
    -       bindings = "(" ")"
    +    expressions = nothing | expression expressions
    +   let-bindings = let-name bindings
    +                | "(" let-name "." bindings ")"
    +       let-name = identifier
    +       bindings = "(" ")"
                     | rest-binding
                     | "(" normal-bindings ["." rest-binding] ")"
     normal-bindings = nothing
                     | normal-binding normal-bindings
    - normal-binding = "(" binding-name expression ")"
    -   binding-name = identifier
    -   rest-binding = "(" binding-name expressions ")"
    + normal-binding = "(" binding-name expression ")"
    +   binding-name = identifier
    +   rest-binding = "(" binding-name expressions ")"