Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Scheme Programming Language

R7RS Scheme


R7RS Scheme Draft V2007-4-1
***************************
***************************

About
=====
R7RS Scheme is a Lisp dialect largely inspired by Scheme.

Summary
=======
R7RS Scheme is a statically scoped and properly tail-recursive dialect of
the Lisp programming language. It was designed to have an exceptionally
clear and simple semantics and few different ways to form expressions. A
wide variety of programming paradigms, including imperative, functional,
and message passing styles, find convenient expression in R7RS Scheme.

Introduction
============
Programming languages should be designed not by piling feature on top of
feature, but by removing the weaknesses and restrictions that make
additional features appear necessary. R7RS Scheme demonstrates that a very
small number of rules for forming expressions, with no restrictions on how
they are composed, suffice to form a practical and efficient programming
language that is flexible enough to support most of the major programming
paradigms in use today.

Implementation
==============
http://www.notam02.no/~kjetism/r7rs.tar.gz

Changes between R7RS Scheme and Scheme[1]
=========================================

* "define" can be used anywhere in an expression, just like on the top-level:

  (let ((a 1))
     (set! a 2)
     (define a 3)
     a)
  => 3

  (let ((a 1))
     (set! a 2)
     (define (a) (c))
     (define (c) 3)
     (a))
  => 3

  (let ((a 1))
     (set! a 2)
     (define (a) (c))
     (define (c) 3)
     (define a (+ (a) 1))
     a)
  => 4

* "include" includes code from another file:
  (define (cdr-list-copy list)
    (include "srfi-1.scm")
    (cdr (list-copy list)))

* "define-toplevel":

  (let ((a* 1))
    (define-toplevel (a)
      a*))
  (a)
  => 1

  (let ((a* 1)
        (funcname 'a))
    (define-toplevel (,funcname)
      a*))
  (a)
  => 1

* "unquote" and "unquote-splicing" can appear outside quasiquotes:
  (let ((a 1))
     ,'a)
  => 1

  (let ()
    ,(+ 8 5))
  => 14
  ("(+ 8 6)" was calculated at compile time, and not at run time)

  (let ((a 1)
        (b 2))
    ,@(map (lambda (val)
             `(begin
                (display (string-append (symbol->string ',val) "=" (number->string ,val)))
                (newline)))
           '(a b)))
  => "a=1"
     "b=2"

* Arguments are evaluated in order left to right and top to bottom:

  (let ((a 1))
     (list (begin
             (set! a 2)
             3)
           a))
  => (3 2)

  (let ((a 1))
    `(,(begin
         (set! a 2)
         3)
      ,a))
  => (3 2)

  (let ((a 1))
    (let ((b (begin
               (set! a 2)
               3))
          (c a))
      (list b c)))
  => (3 2)

* "map" works like "map-in-order" as defined in scheme/srfi-1.

* Calling "car" on the empty list returns the empty list:
  (car '())
  => ()

* Calling "cdr" on the empty list returns the empty list:
  (cdr '())
  => ()

* "eval" takes one argument only:
  (let ((a 1))
     (eval '(+ a 2)))
  => 3

* "letrec*":
  (letrec* ((a d)
            (b (lambda () (c)))
            (c (lambda () a))
            (d 1))
    (b))
  => 1

* Symbols, keywords, syntax and function names are case sensitive.

* "define-macro" does not need to be placed at the top-level.
  However, the following expression does not work:

  (let ((a 1))
    (define-macro (gakk val)
      `(+ ,val a)))
  (gakk 2)
  => Error, undefined varible "a" in expression "(gakk 2) => (+ 2 a)"

* "macroexpand" and "macroexpand-1" are guaranteed to return expressions
  where the transformations are defined only by the use of "define-macro".

  For example, "define-macro" is not used to implement core functionality
  such as "cond" or "letrec*". So this will always work in a clean
  environment:

  (macroexpand '(cond (#t 5)(else 6)))
  => (cond (#t 5)(else 6))

* "(gensym)" returns a unique symbol. Handy for macros.

* Macros can be used as functions:

  (define-macro (add . rest)
     `(+ ,@rest))

  (apply add '(1 2))
  => 3

  (let ((list '(1 2)))
    (apply add list)
  => 3

  (map add '(1 2) '(3 4))
  => '(4 6)

  Max 30 arguments, and the macro must be defined before being referenced.

* Keywords:

  (list :this-is-a-keyword 'this-is-a-symbol)
  => (:this-is-a-keyword this-is-a-symbol)

  (keyword->symbol :gakk)
  => gakk

  (symbol->keyword 'gakk)
  => :gakk

  (keyword->string :gakk)
  => "gakk"

  (string->keyword "gakk")
  => :gakk

  (keyword? :gakk)
  => #t

  (keyword? 'gakk)
  => #f

* No hygenic macros. (Programming languages should be designed not by
  piling feature on top of feature, but by removing the weaknesses and
  restrictions that make additional features appear necessary).

Notes
=====

[1] As defined by the r5rs specification.

Kjetil Svalastog Matheussen wrote:
> R7RS Scheme is a Lisp dialect largely inspired by Scheme.

It's about time for Scheme to inspire a dialect of Lisp.

Will

Kjetil Svalastog Matheussen <kjet@notam02.no> writes:

> R7RS Scheme Draft V2007-4-1

Sounds good.  Perhaps R9RS will be indistinguishable enough from CL
that I'll be able to use it :-)

--
__Pascal Bourguignon__
http://www.informatimago.com
http://pjb.ogamita.org

Pascal Bourguignon <p@informatimago.com> wrote:
> Kjetil Svalastog Matheussen <kjet@notam02.no> writes:
>> R7RS Scheme Draft V2007-4-1

> Sounds good.  Perhaps R9RS will be indistinguishable enough from CL
> that I'll be able to use it :-)

        Actually, no way ! Quoting Mike Sperber at that Thai restaurant just 1
hour ago: "R6RS is just, you know, flushing the 80's. Objects are the 90's.
We're not quite there yet..." :-)

I think I'll put that one in my .sig for a while :-)

--
Didier Verna, did@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bictre, France   Fax.+33 (1) 53 14 59 22   did@xemacs.org

On Apr 2, 10:18 pm, Didier Verna <did@lrde.epita.fr> wrote:

> Quoting Mike Sperber at that Thai restaurant just 1
> hour ago: "R6RS is just, you know, flushing the 80's. Objects are the 90's.
> We're not quite there yet..." :-)

Oh no. Please tell me he was just talking shite after drinking too
much Asian beer. I thought that the category-theory people had all
made this abundantly clear during the late 90s ;)

--
The Scheme Underground deals harshly with recidivists. Have your self-
criticism prepared in advance.

"David Rush" <kumoy@gmail.com> writes:
> On Apr 2, 10:18 pm, Didier Verna <did@lrde.epita.fr> wrote:
>> Quoting Mike Sperber at that Thai restaurant just 1
>> hour ago: "R6RS is just, you know, flushing the 80's. Objects are the 90's.
>> We're not quite there yet..." :-)

> Oh no. Please tell me he was just talking shite after drinking too
> much Asian beer. I thought that the category-theory people had all
> made this abundantly clear during the late 90s ;)

Be that as it may, but you don't have worry, because ...

I WAS SPEAKING AS AN INDIVIDUAL MEMBER OF THE SCHEME COMMUNITY.  I WAS
NOT SPEAKING FOR THE R6RS EDITORS, AND THIS QUOTE SHOULD NOT BE
CONFUSED WITH THE EDITORS' OFFICIAL POSITION.

:-)

--
Cheers =8-} Mike
Friede, Vlkerverstndigung und berhaupt blabla

"David Rush" <kumoy@gmail.com> writes:
> On Apr 2, 10:18 pm, Didier Verna <did@lrde.epita.fr> wrote:
>> Quoting Mike Sperber at that Thai restaurant just 1
>> hour ago: "R6RS is just, you know, flushing the 80's. Objects are the 90's.
>> We're not quite there yet..." :-)

> Oh no. Please tell me he was just talking shite after drinking too
> much Asian beer. I thought that the category-theory people had all
> made this abundantly clear during the late 90s ;)

Not to worry.  We are well into the 00's.  Objects are soooo last
millenium...

:-)

Michael Sperber wrote:
> I WAS SPEAKING AS AN INDIVIDUAL MEMBER OF THE SCHEME COMMUNITY.  I WAS
> NOT SPEAKING FOR THE R6RS EDITORS, AND THIS QUOTE SHOULD NOT BE
> CONFUSED WITH THE EDITORS' OFFICIAL POSITION.

> :-)

Indeed, the R6RS editors don't have any official position on
the decade in which they are living.

Will

Michael Sperber <sper@informatik.uni-tuebingen.de> wrote:
> Be that as it may, but you don't have worry, because ...

> I WAS SPEAKING AS AN INDIVIDUAL MEMBER OF THE SCHEME COMMUNITY.  I WAS
> NOT SPEAKING FOR THE R6RS EDITORS, AND THIS QUOTE SHOULD NOT BE
> CONFUSED WITH THE EDITORS' OFFICIAL POSITION.

> :-)

        Right :-)

> "David Rush" <kumoy@gmail.com> writes:

>> On Apr 2, 10:18 pm, Didier Verna <did@lrde.epita.fr> wrote:
>>> Quoting Mike Sperber at that Thai restaurant just 1
>>> hour ago: "R6RS is just, you know, flushing the 80's. Objects are the 90's.
>>> We're not quite there yet..." :-)

>> Oh no. Please tell me he was just talking shite after drinking too
>> much Asian beer.

  He was drinking ice tea AFAICR. *I* was drinking too much asian beer :-)

--
Didier Verna, did@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bictre, France   Fax.+33 (1) 53 14 59 22   did@xemacs.org

Kjetil Svalastog Matheussen wrote:

> R7RS Scheme Draft V2007-4-1
> ***************************
> ***************************

> About
> =====
> R7RS Scheme is a Lisp dialect largely inspired by Scheme.

> Lots more stuff...

OK, I've been watching for 3 days and no one has bitten, so... I'll bite.

I know the scheme community is highly tolerant of the "I'm gonna go off
and do my own thing" mentality, but hijacking the term R7RS has got to
be way across the line.

I googled this Kjetil Svalastog Matheussen guy, and he seems to have
done something with kawa, but that's about it. I'm pretty certain he
decided on his own to call his new scheme implementation R7RS. If I'm
wrong, somebody please set me straight.

I don't like flaming or being mean to people in any way, and almost
didn't send this post. But as I see it, the confusion that this will
cause could be very harmful to scheme.

regards,
Nate T.

Dnia 04-04-2007, sro o godzinie 13:48 -0500, Nathan Thern napisal(a):

> I know the scheme community is highly tolerant of the "I'm gonna go off
> and do my own thing" mentality, but hijacking the term R7RS has got to
> be way across the line.

Perhaps the community is more tolerant on the 1st of April.

--
   __("<         Marcin Kowalczyk
   \__/       qrc@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/

Marcin 'Qrczak' Kowalczyk wrote:
> Dnia 04-04-2007, sro o godzinie 13:48 -0500, Nathan Thern napisal(a):

>> I know the scheme community is highly tolerant of the "I'm gonna go off
>> and do my own thing" mentality, but hijacking the term R7RS has got to
>> be way across the line.

> Perhaps the community is more tolerant on the 1st of April.

Yeah, I figured it was a joke at first. But the description looks like
some effort was put into it and seems sincere (if a bit cliche'). I
followed the link and found what _appears_ to be an actual new scheme
implementation (written to compile with an existing scheme
implementation - bigloo).

Perhaps if I try to run the code, I might see the real joke.

regards,
Nate T.

The only joke about my post was the name "R7RS".

> Perhaps if I try to run the code, I might see the real joke.

Nope its real.

PS. You are a really bad googler.

Kjetil Svalastog Matheussen wrote:
> The only joke about my post was the name "R7RS".

Glad to have that on the record. What are you really gonna call it. I
suggest "connive".

> PS. You are a really bad googler.

or a really impatient one

regards,
Nate T.

On Wed, 4 Apr 2007, Nathan Thern wrote:
> Kjetil Svalastog Matheussen wrote:
> > The only joke about my post was the name "R7RS".

> Glad to have that on the record. What are you really gonna call it. I
> suggest "connive".

Right. Practical Scheme or Non-pedant Scheme would be better names.
No, seriously, I'm not alone about these things. Some of the issues that I
wrote have been discussed on this list many times during the years. And I
think scheme might need to divide into two standards. Those who are
interested in working further on a new scheme standard should contact me
privatly by mail.

> > PS. You are a really bad googler.

> or a really impatient one

Or a really stupid one.

Kjetil Svalastog Matheussen wrote:

> Or a really stupid one.

I thought it was a cute April Fools' joke.
Reconsidering it as an actual programming
language, it still looks like a cute April
Fools' joke.

Will

On Apr 4, 5:59 pm, Kjetil Svalastog Matheussen <kjet@notam02.no>
wrote:

>>> The only joke about my post was the name "R7RS".

Since many people took your proposal as a joke, I suggest you post it
again.  This time, you should clearly state at the top of your
proposal: "This is not a joke, serious!".

> No, seriously, I'm not alone about these things. Some of the issues that I
> wrote have been discussed on this list many times during the years.

And no agreement has been achieved on any of them, right?

> And I think scheme might need to divide into two standards.

This solves which problem exactly?  Given the 15 issues (and possibly
more) that you mentioned, Scheme might need some 32,000 standards to
make everyone happy.

> Those who are
> interested in working further on a new scheme standard should contact me
> privatly by mail.

Just in case you haven't noticed, people are almost done working on
the new standard publicly on the r6rs-discuss mailing list.  But
anyways, do you have any restrictions on who may join your effort?

Aziz,,,

First off, my apologies for riffing off a throwaway comment made in no
context. My initial response was intended to be taken lightly. This
post, however, involves the congealing of what usually passes for a
months-long thought process.

On Apr 2, 10:18 pm, Didier Verna <did@lrde.epita.fr> wrote:

> Quoting Mike Sperber at that Thai restaurant just 1
> hour ago: "...Objects are the 90's. We're not quite there yet..." :-)

So I initially responded with some throwaway fluff alluding to the
relatively well-known equivalencies between OOPS and FPS, as well as
to my own personal prejudice in favor of HOF-style reuse. But looking
at it again today, I have to agree that there is probably some
territory worth exploring here, if by 'Objects' you mean 'patterns of
type structure reuse'.

Up until this last year, I felt that I had a fairly good grasp on the
various patterns of data structure reuse that occurred in commercial
programming tasks. Then I found myself with a need to actually learn
something about XML Schema - and then I started to write schemata. The
people at the W3C Schema WG have done an excellent job examining the
use cases and have a pretty comprehensive model. The main interesting
thing is that the schema model goes well beyond what you commonly see
in OOPS (at least IMNSHO), and y'all can just quang my poodle if it
doesn't actually all turn out to be useful.

And this *is* an actual weakness in Scheme. Well at least in the
SRFI-9 dialect (I am not familiar enough with how R6RS has amended the
SRFI-9 recommendation to have any comments on it). Data type reuse is
primarily achieved by delegation, which can be a bit clunky without
some additional support (even now a macro package is forming in my
mind).

And in Michael's totally un-needed defense: the quote doesn't actually
*advocate* the addition of OO machinery to Scheme, it just states what
people were thinking about during a particular decade. However, for
the sake of my favorite PL, I would suggest that we cast our gaze a
little further than the boundaries of OO when we look into this matter
of type structure reuse.

david rush
--
And yes, I am intentionally making a distinction between type
structure and data structure :)

On Thu, 4 Apr 2007, Abdulaziz Ghuloum wrote:
> On Apr 4, 5:59 pm, Kjetil Svalastog Matheussen <kjet@notam02.no>
> wrote:

> >>> The only joke about my post was the name "R7RS".

> Since many people took your proposal as a joke, I suggest you post it
> again.  This time, you should clearly state at the top of your
> proposal: "This is not a joke, serious!".

> > No, seriously, I'm not alone about these things. Some of the issues that I
> > wrote have been discussed on this list many times during the years.

> And no agreement has been achieved on any of them, right?

Right. But I hope it will be possible to make a standard that is
customizable for most of the issues, so that the new language doesn't
exclude that many people from wanting to use it.

> > Those who are
> > interested in working further on a new scheme standard should contact me
> > privatly by mail.

> Just in case you haven't noticed, people are almost done working on
> the new standard publicly on the r6rs-discuss mailing list.  But
> anyways, do you have any restrictions on who may join your effort?

No, and we will set up a public list if more people joins. We are
currently two persons discussing various thing. If more joins, I hope to
add all of the mails up til now into the mailing list archive available to
the public.
In article <Pine.LNX.4.58.0704052011190.2@notam02.uio.no>,
Kjetil Svalastog Matheussen  <kjet@notam02.no> wrote:

> Right. But I hope it will be possible to make a standard that is
> customizable for most of the issues, so that the new language doesn't
> exclude that many people from wanting to use it.

So what exactly is wrong with R[56]RS in this regard? None of the
features you are proposing seem to be fundamentally incompatible with
RnRS, except for the lack of hygienic macros.

And why, if you are so interested in creating a better Scheme standard
(instead of just a variant that is to your particular liking), have
you not participated in the R6RS process?

Lauri

On Thu, 5 Apr 2007, Lauri Alanko wrote:
> In article <Pine.LNX.4.58.0704052011190.2@notam02.uio.no>,
> Kjetil Svalastog Matheussen  <kjet@notam02.no> wrote:
> > Right. But I hope it will be possible to make a standard that is
> > customizable for most of the issues, so that the new language doesn't
> > exclude that many people from wanting to use it.

> So what exactly is wrong with R[56]RS in this regard? None of the
> features you are proposing seem to be fundamentally incompatible with
> RnRS, except for the lack of hygienic macros.

> And why, if you are so interested in creating a better Scheme standard
> (instead of just a variant that is to your particular liking), have
> you not participated in the R6RS process?

If you are serious about discussing this, please mail me privately.
I don't want to create noisy discussions here.
On Apr 5, 4:46 am, "William D Clinger" <cesur@yahoo.com> wrote:

> I thought it was a cute April Fools' joke.
> Reconsidering it as an actual programming
> language, it still looks like a cute April
> Fools' joke.

As opposed to, say, R6RS "plausible lists", Will?

- Aignde

> you not participated in the R6RS process?

Can't speak for the OP, but from my own POV, the R6RS mailing list
demonstrates a strong selection bias. It looks like it would be
impossible to get anything practical accepted (or drop the utopian
features). R6RS is clearly headed towards becoming a toy/academic/
research language, and there's no point in disturbing the editors or
so-called community: they're enjoying themselves too much.

The only cure for R6RS is ignoring it.

- Aignde

On Apr 5, 8:38 pm, aig@mailinator.com wrote:

> Can't speak for the OP, but from my own POV, the R6RS mailing list
> demonstrates a strong selection bias. It looks like it would be
> impossible to get anything practical accepted (or drop the utopian
> features).

The number of formal comments that people submitted and the number of
comments that got adopted by the editors say otherwise about how the
process is going.

Maybe you can elaborate on your opinion a little so that we avoid any
misunderstandings.  What do you mean by "strong selection bias"?

Aziz,,,

> The number of formal comments that people submitted and the

After you exclude formal comments that refer to typos, wording, bike
shed and other minor issues, that list doesn't look so impressive.

> misunderstandings.  What do you mean by "strong selection bias"?

Very simple:

1) People who make certain kinds of requests are silenced by the
editors and their fans

2) Normal Schemers don't bother participating even if they agree with
the original point.

3) The discussion gets archived and exerts a chilling effect on most
would-be posters in the future.

4) After a while all would-be dissenters give up on the discussion
list, and the editors and their fans think they have achieved
consensus.

Kind of like the way digg-ers self-select themselves to be more and
more idiotic month after month, yet they still think they are somehow
representative of the word at large.

By the way, didn't some R6RS editors leave early on due to serious
disagreements with the rest of the group?

- Aignde

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc