Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANN: first draft of R7RS small language available

1,503 views
Skip to first unread message

Alex Shinn

unread,
Apr 15, 2011, 9:28:05 PM4/15/11
to
Apologies if you receive multiple copies of this message.

The first draft of the R7RS small language standard is now
available at:

http://trac.sacrideo.us/wg/attachment/wiki/WikiStart/r7rs-draft-1.pdf

This is a relatively small revision to the R5RS, adding many of
the most frequently requested features but keeping the overall
structure of the report the same, with a current count of 67
pages. In the spirit of the older reports, many situations are
left as errors or unspecified, leaving room for implementations
to experiment with their own extensions. The language is still
small enough to provide a very compact implementation of, and the
current development branch of Chibi-Scheme provides all of the
functionality of the draft (in some cases with different names or
modules, pending finalization of the standard).

The upcoming large language standard produced by WG2 will include
far more modules, and possibly provide more guarantees about the
behavior in currently unspecified situations.

Most importantly, we have added modules, allowing programmers to
share portable libraries with ease. We hope implementors
consider the effort of supporting the new standard small compared
to that important benefit. Keep in mind that nothing is
finalized yet, and at this stage we are seeking constructive
feedback.

The full list of changes up to this point follows.

* Modules have been added as a new program structure to improve
encapsulation and sharing of code. Some existing and new
identifiers have been factored out into separate modules.

* Exceptions can now be signalled explicitly with raise,
raise-continuable or error, and can be handled with
with-exception-handler and the guard syntax.

* New disjoint types supporting access to multiple fields can be
generated with define-record-type.

* Parameter objects can be created with make-parameter, and
dynamically rebound with parameterize.

* Blobs, homogeneous vectors of integers in the range [0..255],
have been added as a new disjoint type.

* Ports can now be designated as binary or character ports, with
new procedures for reading and writing binary data.

* String ports have been added as a way to write characters to
and read characters from strings.

* Current-input-port and current-output-port are now parameter
objects, along with the newly introduced current-error-port.

* Syntax-rules now recognizes as a wildcard, allows the ellipsis
symbol to be specified explicitly instead of the default ...,
allows template escapes with an ellipsis-prefixed list, and
allows tail patterns to follow an ellipsis pattern.

* Syntax-error has been added as a way to signal immediate and
more informative errors when a form is expanded.

* Internal define-syntax forms are now allowed preceding any
internal defines.

* Letrec* has been added, and internal define specified in terms
of it.

* Case now supports a => syntax analagous to cond.

* Case-lambda has been added to the base library as a way to
dispatch on the number of arguments passed to a procedure.

* Positive and negative infinity and a NaN object have been added
to the numeric tower as inexact values with the written
representations +inf.0, -inf.0 and +nan.0, respectively.

* Map and for-each are now required to terminate on the shortest
list when inputs have different length.

* Member and assoc now take an optional third argument for the
equality predicate to use.

* Exact-integer? and exact-integer-sqrt have been added.

* Make-list, copy-list, list-set!, string-map, string-for-each,
string->vector, copy-vector, vector-map, vector-for-each, and
vector->string have been added to round out the sequence
operations.

* The set of characters used is required to be consistent with
the latest Unicode standard only in so far as the
implementation supports Unicode.

* string-ni=? and related procedures have been added to compare
strings as though they had gone through an
implementation-defined normalization, without exposing the
normalization.

* The case-folding behavior of the reader can now be explicitly
controlled, with no folding as the default.

* The reader now recognizes the new comment syntax #; to skip the
next datum, and allows nested block comments with #| ... |#.

* Data prefixed with reader labels #<n>= can be referenced with
#<n># allowing for reading and writing of data with shared
structure.

* Strings and symbols now allow mnemonic and numeric escape
sequences, and the list of named characters has been extended.

* File-exists? and delete-file are available in the (scheme file)
module.

* An interface to the system environment and command line is
available in the (scheme process-context) module.

* Procedures for accessing the current time are available in
the (scheme time) module.

* A complete set of integer division operators is available in
the (scheme division) module.

* Transcript-on and transcript-off have been removed.

Thank you.

--
Alex Shinn, WG1 Chair

Bill

unread,
Apr 18, 2011, 9:00:17 AM4/18/11
to
On Apr 15, 6:28 pm, Alex Shinn <alexsh...@gmail.com> wrote:
> Apologies if you receive multiple copies of this message.
>
> The first draft of the R7RS small language standard is now
> available at:
>
> http://trac.sacrideo.us/wg/attachment/wiki/WikiStart/r7rs-draft-1.pdf
>

my copy must be defective -- I can't find blob->string, or
exact-integer-exp, or blob-for-each, or euclidean-modulo, or...

Jussi Piitulainen

unread,
Apr 18, 2011, 9:41:51 AM4/18/11
to
Bill writes:

> On Apr 15, 6:28 pm, Alex Shinn wrote:
> > Apologies if you receive multiple copies of this message.
> >
> > The first draft of the R7RS small language standard is now
> > available at:
> >
> > http://trac.sacrideo.us/wg/attachment/wiki/WikiStart/r7rs-draft-1.pdf
> >
>
> my copy must be defective -- I can't find blob->string, or
> exact-integer-exp, or blob-for-each, or euclidean-modulo, or...

My understanding is that blobs in the small language are only a rather
minimal infrastructure for the large language to build on. Look for
the other stuff there, later.

What use would exact-integer-exp be? To get exact 1 for (exp 0) and
nothing more?

It's euclidean-remainder.

On a second thought, I don't see the point of your observations. Even
if they are meant as sarcasm, I don't see the point. So if I hadn't
posted this already, I might well decide to not respond at all.

antonio

unread,
Apr 19, 2011, 1:20:12 PM4/19/11
to
Hi all,

Thank you very much and congratulations to all involved for this! I'm
going through it right now.

I've posted a small note at lambda-the-ultimate.org too.

Cheers,
Antonio

Pascal Costanza

unread,
Apr 23, 2011, 6:34:54 AM4/23/11
to
On 16/04/2011 03:28, Alex Shinn wrote:
> Apologies if you receive multiple copies of this message.
>
> The first draft of the R7RS small language standard is now
> available at:
>
> http://trac.sacrideo.us/wg/attachment/wiki/WikiStart/r7rs-draft-1.pdf

The draft says this about parameters:

"If an implementation supports multiple threads of execution, then
parameterize must not change the associated values of any parameters in
any thread created before or after the call to parameterize."

How would that interact with call/cc? It's desirable (and in line with
the suggested implementation for parameterize in the draft) that an
invocation of a continuation reestablishes the bindings of parameters.
If a continuation gets invoked in a thread other than the one in which
it was captured, the parameterize form would have to contradict the
above stated requirement, right?

Also: How does parameterize interact with partial continuations?


Pascal

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
The views expressed are my own, and not those of my employer.

William D Clinger

unread,
Apr 24, 2011, 12:08:39 PM4/24/11
to
Public discussion of the new draft R7RS is ongoing at
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports

Everyone's welcome to discuss the draft here, of course,
but technical comments at comp.lang.scheme are more likely
to be overlooked than comments made at the mailing list
that's been set up for technical comments and discussion
of Scheme standards and drafts.

See also http://www.scheme-reports.org/

Will

time

unread,
May 14, 2011, 3:48:27 PM5/14/11
to
Hello,

Help! While I can open scheme-wg1-progress1.pdf in Adobe Reader 9.4.4 I can not open r7rs-draft-1.pdf or r7rs-draft-1.pdf with Adobe reader. Nor can I open these files in Ghostview.

Thanks

0 new messages