Fwd: Two more errata for R7RS small

10 views
Skip to first unread message

Arthur A. Gleckler

unread,
Nov 22, 2022, 1:09:36 AM11/22/22
to scheme-reports-wg1, Chris Hanson
Chris Hanson reported two issues with R7RS Small, and agreed for me to relay them to the list:

---------- Forwarded message ---------
From: Chris Hanson <c...@chris-hanson.org>
Date: Mon, Nov 21, 2022 at 6:48 PM
Subject: Two more errata for R7RS small
To: John Cowan <co...@ccil.org>
Cc: <a...@speechcode.com>


1. In the index, syntax-rules is listed on page 26; it’s actually on page 23.

2. In 4.3.2, in the paragraph preceding the be-like-begin example, there is
discussion about quoting the ellipsis in templates. However, the example shows
the same syntax in the pattern, while there is no text permitting and
explaining it. MIT/GNU Scheme currently treats that syntax as a quoting
mechanism, analogous to the use in templates.

Also, an errata in the errata. In https://github.com/johnwcowan/r7rs-work/
blob/master/R7RSSmallErrata.md
item number 16 is missing some text.


Marc Feeley

unread,
Nov 22, 2022, 8:52:09 AM11/22/22
to scheme-re...@googlegroups.com, Arthur A. Gleckler, John Cowan
> --
> You received this message because you are subscribed to the Google Groups "scheme-reports-wg1" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to scheme-reports-...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/scheme-reports-wg1/CALnw4L%2Bn1oOxHny2v2dV2ykY_G82VGg_ukW7Z8x-W3RdQP11pQ%40mail.gmail.com.

While we’re on the topic of R7RS-small errata, the latest one I found is this on page 61:

(define (time-length)
(let ((list (make-list 100000))
(start (current-jiffy)))
(length list)
(/ (- (current-jiffy) start)
(jiffies-per-second))))

This is probably meant as an example showing how to measure the time to compute `(length list)`, but because `let` may evaluate the second expression first, the execution time may include the execution time of `(make-list 100000)`. This would not be a good way to compare the execution speed of two Scheme implementations. The simple fix is to use `let*`.

Marc



Marc




Reply all
Reply to author
Forward
0 new messages