Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Is there a Scheme standard?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 2nd April 19:03
bobueland
External User
 
Posts: 1
Default Is there a Scheme standard?



In his very good and funny talk "Swine before PERL" (see
http://technetcast.ddj.com/tnc_play_stream.html?stream_id=644) ,
Shriram Khrishnamurthi, compares Python to Scheme and says that it's
not true that Python has a standard but not Scheme. He says that PLT
Scheme is the standard (I don't know if he jokes or if he is telling
the truth).

I've seen several versions of Scheme and I am often confused to find
some primitives in one version, which are not in the other. For a
newbie this is frustrating, because it means that when you are looking
at some book or course using Scheme on the Net, you're not quite sure
if the environment that you currently have is OK or if you have to
download a new variant in order to test the given examples.

Is in fact R5RS *the* standard, that is the minimum what every Scheme
implementation must have?

I have one more question. Reading Paul Graham's "The Roots of Lisp" he
begins the article very simply (and IMO beautifully).

"... To start with we define an expression. An expression is either an
atom, which is a sequence of letters or a list of zero or more
expressions, separated by whitespace and enclosed by parentheses.
Valid Lisp expressions have values. If an expression e yields a value v
we say that e returns v. Our next step is to define what kinds of
expressions there can be and what value each kind returns. If an
expression is a list, we call the first element the operator and the
remaining elements the arguments. We are going to define seven
primitive operators (in the sense of axioms): quote, atom, eq, car,
cdr, cons, and cond."

I recognized all except atom. When I tested it in DrScheme it didn't
understand atom. I know that Graham is talking about Lisp and that
DrScheme is Scheme, but atom seems such a nice operation, which made me
wonder why Scheme doesn't have it or if they are using something
equivalent?

Bob
  Reply With Quote


  sponsored links


2 2nd April 19:04
max hailperin
External User
 
Posts: 1
Default Is there a Scheme standard?



bobueland@yahoo.com writes:

....

R5RS is the de facto standard, agreed upon informally by the community
of users and implementers. It is not a formal standard, adopted by
some standard-setting organization. Once upon a time, there was such
a formally adopted standard: IEEE Scheme. My memory is that it was
approximately contemporaneous to R4RS (the immediate predecesor of
R5RS in the same series of informal standards), but was more
restrictive. It had comparatively little support. My memory is that
when a certain number of years elapsed, the IEEE required the Scheme
standard to either be reissued or allowed to lapse; the community
allowed it to lapse.

....


The most conventional definition is

(define atom?
(lambda (datum)
(not (pair? datum))))

though some people prefer

(define atom? symbol?)

For the limited subset that Graham is talking about, the two would be
equivalent.

As to why Scheme doesn't have it (the negation of pair?) -- presumably
because isn't so helpful as to be worth the redundancy. -max
  Reply With Quote
3 2nd April 19:04
psy-kosh
External User
 
Posts: 1
Default Is there a Scheme standard?


I believe what he said was something to the effect that people don't
program in standards but in actual implementations. Python has a standard
only because there, what, two or three cannonical implementations of it.
Its standard is defined as "whatever the official Python implementation
does."

What Shriram was saying, I believe, was that it's not proper to compare
that with R5RS, but that instead something like Python ought to be
compared with specific implementations of Scheme. ie, Shriram was saying
he doesn't program in something called "R5RS Scheme" but "PLT Scheme"

Psy-Kosh
  Reply With Quote
4 2nd April 23:09
shiro kawai
External User
 
Posts: 1
Default Is there a Scheme standard?


Not only newbies, but experienced ones also needs to dig the
do***entation time to time if it's not their familiar implementation.

I started a wiki site to help the situation. It's far from complete,
but it may become of some use in a long span...
http://practical-scheme.net/wiliki/schemexref.cgi
  Reply With Quote
5 2nd April 23:10
sk@cs.brown.edu
External User
 
Posts: 1
Default Is there a Scheme standard?


Psy-Kosh gave the right response. Just to be ********:

I did not mean to suggest that PLT Scheme is *the* Scheme standard.
That would be unfair to the other wonderful Scheme implementations out
there. What I was trying to say was:

- R5RS is not a language in a meaningful, practical sense of the word.
It is therefore not a fair comparison to something like Python. (I
only even brought this up because a Python Web site had offered just
such a comparison in which, of course, Python came out looking much
better than RnRS Scheme.)

- A fair comparison would be between Python and, say, PLT Scheme. I
chose PLT because I could speak of it authoritatively.

- PLT Scheme stacks up more than favorably in this comparison. So
would many other Scheme systems.

- Whereas Python is defined purely by its implementation, PLT Scheme
has at least a core that is defined more abstractly, and has formal
definitions for most of the extensions, too.

Therefore, the comparison on the Python Web site was either bogus or
false, depending on how you want to view it.

Let my clarify my remark about R5RS (a clarification I have offered
here in the past, too):

I don't think of R5RS as a language; it is, rather, the core of a
language, atop which many actual languages can be defined. Those
actual languages sometimes diverge wildly.

To my mind, this is no more surprising than the wild divergence
between Perl and Python: nobody realistically expects feeding Perl
source to the Python interpreter to produce a meaningful value.
(Doing so might, however, be a good form of fuzz-testing, and may
usefully expose a seg fault.)

While many people rue that not every program built atop an R5RS
extension will run on every other extension, I view the fact that
*many* Gambit programs will run in PLT Scheme, or that *many* Stalin
programs will run in Larceny, as a *bonus*.

R5RS is a gem. Each actual Scheme system takes the responsibility of
wrapping that gem in an appropriate amount of mud to produce something
useful. But shine a light at just the right angle and you can still
catch a glint from that gem within. That's so damn cool, and an optic
treat those poor Ruby, Python and Perl folks will never get to see.

Shriram
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666