HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.lang.scheme
Date: Sun, 22 Nov 92 16:51:02 EST
From: thayer@cs.columbia.edu (Charles Thayer)
Subject: Re: Re^2: Closures, Object-Oriented Equivalence, New version of Perl and TCL

In article <736@data.rain.com> you write:
>thayer@cs.columbia.edu (Charles Thayer) writes:
>
>>:)  Which brings up an interesting point in mit-scheme:
>
>>(begin
>>  (define a "moo")
>>  (define (foo) 
>>    (display a)
>>    (define a "bar")
>>    )
>>  (foo))
>
>>=> Unassigned variable a
>
>
>This is because the above is equivalent to the following:
>
>(letrec ( (a "moo")
>          (foo 
>            (lambda ()
>	         (display a)
>                 (define a "bar")) ;; <- ill-placed define
>          )
>        )
>  (foo)
>)
>
>The semantics of "internal defines" is that of LETREC (parallel
>assignment) and
>*** definitions must occur before other expressions within a block ***
>
>This difference between "internal defines" and "top-level defines"
>has been a subject of debate for some time.  I am not taking a
>position here, just trying to insure that the definition is
>understood.
>
>-Ken

I recognized the fact immediately because it was also discussed in the
realm of C++, which is even more complicated because of the
distinction neccessary for object construction.

foo() {
  cout << "test" << endl;	// declarations don't have to be at the top
				// of a block
  FooObj foo;			// calls FooObj();
  FooObj bar = 10;		// calls FooObj(int 10);
  FooObj baz; 			// calls FooObj();
  baz = 10;			// then op=(FooObj& baz, int 10);
  FooObj moo(10);		// calls FooObj(int 10), moo is like bar
}

A scheme programmer might wish to ask ``can I "cout << foo << endl;"
lexically before the declaration of foo?''  Which would introduce the
paradox for bar and moo which have initializers.

Anyway, I was hoping to point out this particular language
restriction, without judging it's benefits or limitations, does have
an effect on how one accesses outer closures in "programming
languages."  Some, responding to this thread have pointed out that 
in C++ a base class can be accessed explicitly:

class A {
  ..member..
};

class B: public A {
  .. B::member .. A::member ..
}

Likewise, I was reminding:

(begin
  (define a "moo")
  (define (foo) 
    (define BASE_a a)	;; nope
    (define a "bar")	;; nope
    (display a)
    )
  (foo))

disclaimers: I am not making any judgements or expressing any opinions
here, I just find such things interesting in the ways they affect
different languages regardless of whether those languages claim to be
object-oriented.

With the same disclaimer, there are languages that have chosen the
other path, and have traded efficiency to be more dynamic.

/charles
==============================================================================
Charles Thayer, Columbia University, Dept. CS, Tech-staff... my words only.
From: man@morayeel.micro.umn.edu (Man Nguyen)
Newsgroups: comp.lang.scheme
Subject: Re: What are good references on learning Scheme
Date: 21 Nov 92 04:57:12 GMT
Article-I.D.: news2.1992Nov21.045712.9255
Organization: University of Minnesota, Minneapolis: Under Grad Workstation Lab.


>What are some good books on Scheme?  I currently have only PC Scheme's
>User's Guide and Reference Manual.  Thanks!

>Chang Yoon
>c/o pmathis@utdallas.edu

>BTW:  I have had some Lisp experence, but not much.

If you really want to commit the time to learn Scheme from the view-point
of algorithms and ideas, I strongly recommend Structure and Interpretation
of Computer Programs by Harold Abelson and Gerald Jay Sussman.  I used it to
learn Scheme last spring and fell it love with it.  It's not a book about the
syntax -- it hardly discusses syntax at all.  Instead, it introduces you to
some fascinating ideas in computer science.  It's a pure book -- not meant
as a tutorial or anything really practical in the imperative sense.

I am a sophomore at the University of Minnesota -- double majoring in CSci
and EE.  Right now I'm writing a proposal to assist in the instruction of
Scheme.  Honestly, Scheme is an excellent "thinker's" language and SICP
really demonstrates it.  It's good reading -- worth reading word-for-word.

Possible project: How about implementing an AC circuit simulator or a
Motorola 65C02 "interpreter"?  Throw some ideas at me, I need some fascinating
ideas for my proposal.

Man Nguyen
man@mermaid.micro.umn.edu
From: gjr@zurich.ai.mit.edu (Guillermo J. Rozas)
Newsgroups: comp.lang.scheme
Subject: Re: What are good references on learning Scheme
Date: 23 Nov 92 22:25:46
Organization: M.I.T. Artificial Intelligence Lab.
	<1992Nov22.033413.1020@linus.mitre.org>
	<GJR.92Nov23094656@chamarti.ai.mit.edu> <By6MoB.7qH@rice.edu>
Reply-To: gjr@zurich.ai.mit.edu
NNTP-Posting-Host: chamartin.ai.mit.edu
In-reply-to: dorai@cs.rice.edu's message of 23 Nov 92 18:43:23 GMT

In article <By6MoB.7qH@rice.edu> dorai@cs.rice.edu (Dorai Sitaram) writes:

|   That said, while I agree that SICP chooses to teach thinking
|   about programs over teaching programming, I don't think the
|   passing over of call/cc in the book can be attributed to
|   that choice.  Arguably, if SICP were written today, it would
|   contain call/cc or some variant, without such an act
|   spelling a compromise of any of its lofty goals.

I think that you are wrong.  The course has not remained fixed at MIT,
and each semester different topics have replaced some of the sections
of the book (which is a polished old snapshot of the course).  To my
knowledge, not _once_ has cwcc been mentioned except possibly as an
aside.  Some of the experiments have introduced continuations (without
calling them by that name) within the workings of an interpreter, in
order to implement back-tracking or some such.  However, the focus was
not on the implementation, but on the new language and using it to
perform speculative computation or whatever.  Never has something like
cwcc been used, rather than implemented directly by modifying an
interpreter.

Hal and Gerry can speak for themselves, but I am quite confident in
stating that they think cwcc is an interesting detail for systems
construction, but it does not add that much to the teaching aspects.
The more complex systems have typically been based on modifications of
an interpreter, which can supply its own control mechanisms whether
cwcc is provided by the system or not.

In other words, CWCC is a tool, and the tool is not nearly as
interesting as the things that can be built with it.  It is even less
interesting when there are other ways to accomplish it that (in a
teaching setting) might be more illuminating about what's really going
on.
Newsgroups: comp.lang.scheme
From: mj@cs.brown.edu (Mark Johnson)
Subject: Why is the exact/inexact distinction built into Scheme?
Organization: Brown University Department of Computer Science
Date: Tue, 17 Nov 1992 18:27:40 GMT

As someone attempting to use Scheme to solve real world
problems, I often find that I need to floor or round 
inexact reals to exact integers.  In the Scheme I'm using,
(inexact->exact (round x)) is comparitavely slow (so much so that
it slows my image processing routines considerably).

As I sit waiting for my machine to finish a job that a
corresponding C program would have completed 15 mins or so
earlier, I keep wondering what it was that inspired the
Scheme language designers to build in the inexact/exact
distinction.

Are there so many algorithms that depend on distinguishing
inexact from exact numbers that it was important to build
the distinction into Scheme?  Isn't it the case that it would
be easy to write a generic arithmetic package that supports
the inexact/exact distinction in a version of Scheme that
didn't support this distinction?

Mark

Mark Johnson
Cognitive Science, Box 1978
Brown University
Newsgroups: comp.lang.scheme
From: matt@volga.Berkeley.EDU (Matt Wright)
Subject: Re: What are good references on learning Scheme
Organization: University of California, at Berkeley
Date: Fri, 20 Nov 1992 00:11:32 GMT

crawford@boole.mitre.org (Randy Crawford) writes:
>SIPC is good if you want to spend a _long_ time learning about an older
>version of scheme (pre-R3RS?).  Its audience is more appropriately those who 
>are new to both programming and algorithms.  It's well over 300 pages long 
>and about 8 years old.  It treats the language more as a state of mind than
>a bag of tricks.  I own it and respect it for what it is, but I've chosen a
>different book to learn scheme.

I'm not sure how to take this.  On one hand it's true that SICP treats
Scheme more as a state of mind than a language, but I think your
characterization of it is somewhat unfair.  It's not the case that SICP
takes a long time to read because it's dumbed-down for beginners!  SICP
takes a long time to read because it's about all of computer science, and
not a tutorial for learning Scheme.

As for the out-of-dateness, I don't think it's such a big deal as you're
making it.  It's true that after you finish SICP you have to learn that
SEQUENCE is now called BEGIN and that PRINC is now called DISPLAY and that
() isn't #f.  But that's 5 minutes of little details; it's not like learning
a different language.

Once you read SICP you should be able to glance through the latest rnrs and
"know" the most current definition of Scheme.

-Matt
From: pk@cs.tut.fi (Kellom{ki Pertti)
Newsgroups: comp.lang.scheme
Subject: Re: R4RS in Emacs-Info-format?
Date: 16 Nov 92 17:41:38
Organization: Tampere Univ. of Technology, Finland.
Distribution: comp
NNTP-Posting-Host: talitiainen.cs.tut.fi
In-reply-to: f88-mdj@byse.nada.kth.se's message of Sat, 14 Nov 1992 00:31:08 GMT

In article <F88-MDJ.92Nov14013108@byse.nada.kth.se> f88-mdj@byse.nada.kth.se (Mikael Djurfeldt) writes:
   Does anyone know if R4RS exists in GNU Emacs Info-format?

As it happens, I was just about to ask the same. I have chapter 6
(Standard Procedures) in info format, but the conversion is far from
finished. Anyway, I've made it available for anon. ftp as
cs.tut.fi:/pub/src/languages/schemes/misc/r4rs-info.tar.Z. Here's the
README:
----------------------------------------------------------------------
The file r4rs-latexinfo.tex contains chapter 6 (Standard Procedures)
of r4rs in the GNU Latexinfo format. The file r4rs is the same thing
converted to Emacs info format by `M-x latexinfo-format-buffer'. The
conversion to latexinfo is by no means finished, let alone elegant,
but it has been useful as a quick reference to r4rs procedures. I
will work on it again some day...

I got Latexinfo from nic.funet.fi, but archie says it is available in
many places carrying GNU stuff.

Pertti Kellom\"aki (TeX format), pk@cs.tut.fi
 Tampere Univ. of Technology 
    Software Systems Lab  
        Finland

--
Pertti Kellom\"aki (TeX format)  #       These opinions are mine, 
  Tampere Univ. of TeXnology     #              ALL MINE !
      Software Systems Lab       #  (but go ahead and use them, if you like)
From: hassan@cs.ubc.ca (Moustafa Hassan)
Newsgroups: comp.lang.scheme
Subject: File and string handling
Date: 19 Nov 1992 10:03:39 -0800
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
NNTP-Posting-Host: brutus.cs.ubc.ca
Keywords: references

I'm trying to hack together a simple unix-like shell for my mac
using scm4a11 (the only scheme interpreter that's small enough to share
an 800K floppy with an old version of MacOS).  Reading and writing 
to files is easy enough, but are there any (standard) advanced file-
handling techniques in scheme?  In particular, I'm trying to write a 
program to list directory contents (like 'ls') and one to remove files
(like 'rm').  I've already written 'cat'.

Any references would be helpful.  Thanks.

********************************************************************
* Moustafa Hassan          |                                       *
* hassan@cs.ubc.ca         |  Political correctness is a euphemism *  
* TEL/FAX: (604) 535-2826  |  for intellectual stagnation.         *
********************************************************************



Newsgroups: comp.lang.scheme
From: crawford@boole.mitre.org (Randy Crawford)
Subject: Re: What are good references on learning Scheme
Organization: The MITRE Corporation, McLean, VA
Date: Sun, 22 Nov 1992 03:34:13 GMT

In article <1992Nov20.001132.28991@pasteur.Berkeley.EDU> matt@volga.Berkeley.EDU (Matt Wright) writes:
>crawford@boole.mitre.org (Randy Crawford) writes:
>>SIPC is good if you want to spend a _long_ time learning about an older
>>version of scheme (pre-R3RS?).  Its audience is more appropriately those who 
>>are new to both programming and algorithms.  It's well over 300 pages long 
>>and about 8 years old.  It treats the language more as a state of mind than
>>a bag of tricks.  I own it and respect it for what it is, but I've chosen a
>>different book to learn scheme.
>
>I'm not sure how to take this.  On one hand it's true that SICP treats
>Scheme more as a state of mind than a language, but I think your
>characterization of it is somewhat unfair.  It's not the case that SICP
>takes a long time to read because it's dumbed-down for beginners!  SICP
>takes a long time to read because it's about all of computer science, and
>not a tutorial for learning Scheme.

Exactly why I don't prefer it as a scheme primer.

>
>As for the out-of-dateness, I don't think it's such a big deal as you're
>making it.  It's true that after you finish SICP you have to learn that
>SEQUENCE is now called BEGIN and that PRINC is now called DISPLAY and that
>() isn't #f.  But that's 5 minutes of little details; it's not like learning
>a different language.

Except that SICP doesn't mention call/cc anywhere.  I think that's a significant
omission.  And since R3RS _does_ include continuations, I have to conclude that
SICP didn't attempt to cover all of even R3RS, much less R4.

>
>Once you read SICP you should be able to glance through the latest rnrs and
>"know" the most current definition of Scheme.

The same might be said for reading only "The Little Lisper" then R4RS.  That
doesn't say much for SICP as a scheme primer, given that you just read 500 
pages of dense material and _still_ need to read R4RS.

-- 

| Randy Crawford        crawford@mitre.org        The MITRE Corporation
|                                                 7525 Colshire Dr., MS Z421
| N=1 -> P=NP           703 883-7940              McLean, VA  22102
From: beard@toadflax.cs.ucdavis.edu (Patrick C. Beard)
Newsgroups: comp.lang.scheme
Subject: Re: case sensitivity
Date: 19 Nov 92 07:22:12 GMT
Organization: Department of Computer Science, University of California, Davis

In article <9211122110.AA06534@corn-pops> Alan@lcs.mit.EDU (Alan Bawden) writes:

>  (string->symbol "foo;comment")
>
>and
>
>  (string->symbol "foo")
>
>are different.
>
>`string->symbol' isn't the reader (the thing that constructs Scheme objects
>given their printed representations).  The thing you are looking for might
>perhaps be called `string->object', but standard scheme doesn't have it.
>Perhaps it should.
>
>				- Alan

Gambit Scheme 1.9 has "string ports." These CAN be used to do exactly
what you are saying. An example:

Gambit (v1.9)

: (define ip (open-input-string "(a b c) 'XyZ"))
ip

: (read ip)
(a b c)

: (read ip)
'xyz

: (read ip)
#[eof]

This does exactly what you want.


// Patrick C. Beard
// Department of Computer Science, U. C. Davis
// pcbeard@ucdavis.edu
Newsgroups: comp.lang.scheme,comp.windows.x
From: net@cs.tu-berlin.de (Oliver Laumann)
Subject: Elk 2.0 available
Organization: Technical University of Berlin, Germany
Date: Sun, 22 Nov 1992 15:15:09 GMT

Release 2.0 of Elk, the Extension Language Kit, is now available.

Elk is a Scheme interpreter intended to be used as a general, reusable
extension language subsystem for integration into existing and future
applications.  Elk can also be used as a stand-alone implementation of
the Scheme programming language.

Elk supports several additional language features to increase its
usability as an extension language, among them dynamic, incremental
loading of object files and `freezing' of a fully customized application
into a new executable file (`dump').

The current release of Elk includes several dynamically-loadable
extensions, among them interfaces to the X11 Xlib and to the application
programmer interface of the Xt intrinsics, and interfaces to the Athena
and OSF/Motif widget sets.  These extensions are especially useful for
application writers whose applications have graphical user-interfaces
based on X; they also can be used to interactively explore X and its
libraries and as a platform for rapid prototyping of X-based
applications.

Release 2.0 is a major new release, as some of the interfaces between
the interpreter kernel and extensions have been simplified and made more
general, i.e. minor massaging of existing extensions will be required
(see file MIGRATE).

The distribution has been tested on several new systems (such as IBM
RS/6000, HP9000/700, SGI, Sony NEWS; see the file MACHINES).
The build and install process has been simplified significantly;
system-specific configuration files are supplied for the systems
on which Elk has been tested.

Dynamic loading of object files is supported on all systems that have a
functional "ld -A" interface, as well as the NeXT and the HP9000/700.

Major internal reorganization has simplified porting Elk to further new
systems (assembly language support and a stack-extending version of
"alloca" are no longer required).

Nearly all artificial limitations have been removed (such as number of
before-GC and after-GC functions and of statically GC-linked objects).

Elk is now easily usable with ANSI C and C++ (as well as with pre-ANSI C).

A number of hooks are provided that will allow the seamless insertion of
a new generational/incremental garbage collector that is planned for
release 2.1.


Elk release 2.0 can be obtained via anonymous FTP from
tub.cs.tu-berlin.de (pub/elk/elk-2.0.tar.Z), and from
export.lcs.mit.edu (contrib/elk-2.0.tar.Z).


--
Oliver Laumann     net@cs.tu-berlin.de   net@tub.BITNET
Carsten Bormann   cabo@cs.tu-berlin.de  cabo@tub.BITNET
Newsgroups: comp.lang.scheme
From: Alan@lcs.mit.EDU (Alan Bawden)
Subject: Why is the exact/inexact distinction built into Scheme?
Organization: The Internet
Date: Sat, 21 Nov 1992 19:45:28 GMT

   Date: 17 Nov 92 18:27:40 GMT
   From: Mark Johnson <mj@cs.brown.edu>
   ...  As I sit waiting for my machine to finish a job that a
   corresponding C program would have completed 15 mins or so earlier, I
   keep wondering what it was that inspired the Scheme language designers
   to build in the inexact/exact distinction.

The Scheme designers are not responsible for the fact that 
`(inexact->exact (round x))' is slow in your implementation.  

You don't spell out why it is that you think the inexact/exact distinction
is responsible for the slowness -- so I have to guess that you think that
if `round' were defined to return an exact result given an inexact
argument, then somehow your Scheme compiler would be able to generate
better code.  Well, why doesn't your Scheme compiler generate that same
code for `(inexact->exact (round x))'?
From: markf@zurich.ai.mit.edu (Mark Friedman)
Newsgroups: comp.lang.scheme
Subject: Re: Closures, Object-Oriented Equivalence, New version of Perl and TCL
Date: 23 Nov 92 15:25:37
Organization: M.I.T. Artificial Intelligence Lab.
	<9211222151.AA09161@cs.columbia.edu>
Reply-To: markf@zurich.ai.mit.edu
NNTP-Posting-Host: montreux.ai.mit.edu
In-reply-to: thayer@cs.columbia.edu's message of Sun, 22 Nov 92 16:51:02 EST

In article <9211222151.AA09161@cs.columbia.edu> thayer@cs.columbia.edu (Charles Thayer) writes:

** Likewise, I was reminding:
** 
** (begin
**   (define a "moo")
**   (define (foo) 
**     (define BASE_a a)	;; nope
**     (define a "bar")	;; nope
**     (display a)
**     )
**   (foo))

I don't really understand what the point of this example is. If you
want the 'a' in "(define BASE_a a)" to refer to the outer 'a' you can
do (for example):

(begin
  (define a "moo")
  (define (foo) 
    (define BASE_a a)	;; yep
    (let ((a "bar"))	;; yep
      (display a)))
  (foo))

If you want the 'a' to refer to the 'a' that you've defined in FOO then
you can do (for example):

(begin
  (define a "moo")
  (define (foo) 
    (let* ((a "bar")    ;; yep
           (BASE_a a))	;; yep
      (display a)))
  (foo))

The fact that you can't do these things via the DEFINE syntax doesn't
seem to be very important.

-Mark

** With the same disclaimer, there are languages that have chosen the
** other path, and have traded efficiency to be more dynamic.

What are the two paths again?  I must have missed (or forgotten) the
beginning of this thread.

-Mark
--

Mark Friedman
42 Wyatt St.
Somerville, Ma. 02143

markf@zurich.ai.mit.edu
Newsgroups: comp.lang.scheme.c
From: ak@iic1u206.seri.philips.nl (Cuma Ak)
Subject: xr-xr-x   2 cs          1024 Oct 15 09:03 sh.example
Originator: news@phcoms.seri.philips.nl
Organization: SERI-CEN Network Services, Philips C&P, Eindhoven, The Netherlands
X-Newsreader: Tin 1.1 PL4
Date: Mon, 23 Nov 1992 15:02:53 GMT


Newsgroups: comp.lang.scheme
From: jaffer@zurich.ai.mit.edu (Aubrey Jaffer)
Subject: scm4a13 Scheme implementation available
Organization: M.I.T. Artificial Intelligence Lab.
Date: Fri, 20 Nov 1992 23:10:47 GMT

This message announces the availability of Scheme release scm4a13.

I have added DYNAMIC-WIND, EVAL, COPY-TREE, READ-LINE, READ-LINE!, and
WRITE-LINE to scm.  Reading lists is now tail-recursive in the CDR
direction.

I have added procedures PROCEDURE->MACRO and PROCEDURE->MEMOIZING-MACRO
which give scm a both global and local macro capability.  I hope that
someone will implement R4RS macros using these procedures.

hugh@ear.MIT.EDU (Hugh Secker-Walker) has improved eval.  A compile
time flag CAUTIOUS enables full checking of all argument counts.

HEDDEN@esdsdf.dnet.ge.com has fixed bugs in the transcendental
functions and number i/o.

Scm conforms to Revised^4 Report on the Algorithmic Language Scheme
and the IEEE P1178 specification.  Scm is written in C and runs under
Amiga, Atari-ST, MacOS, MS-DOS, NOS/VE, VMS, Unix and similar systems.
ASCII and EBCDIC are supported.

Documentation is included explaining the many Scheme Language
extensions in scm, the internal representation and how to extend or
include scm in other programs.

SCM can be obtained via FTP (detailed instructions follow) from:
altdorf.ai.mit.edu:archive/scm/scm4a13.tar.Z
nexus.yorku.ca:pub/scheme/new/scm4a13.tar.Z

SLIB is a portable scheme library which SCM uses:
altdorf.ai.mit.edu:archive/scm/slib1c2.tar.Z
nexus.yorku.ca:pub/scheme/new/slib1c2.tar.Z

SMG-SCM is an SMG interface package which works with SCM on VMS.
altdorf.ai.mit.edu:archive/scm/smg-scm.com
nexus.yorku.ca:pub/scheme/new/smg-scm.com

TURTLSCM is a turtle graphics package which works with SCM on MSDOS
machines:
altdorf.ai.mit.edu:archive/scm/turtlscm4a10.lzh
nexus.yorku.ca:pub/scheme/new/turtlscm4a10.lzh

XSCM is a X windows interface package which works with SCM:
altdorf.ai.mit.edu:archive/scm/xscm1.05.tar.Z
nexus.yorku.ca:pub/scheme/new/xscm1.05.tar.Z

  ftp altdorf.ai.mit.edu [18.43.0.246] (anonymous)
  bin
  cd archive/scm
  get scm4a13.tar.Z
  get slib1c2.tar.Z
or
  ftp nexus.yorku.ca (anonymous)
  bin
  cd pub/scheme/new
  get scm4a13.tar.Z
  get slib1c2.tar.Z

`scm4a13.tar.Z' is a compressed tar file of the C code distribution.
`slib1c2.tar.Z' is a compressed tar file of a Scheme Library.

Remember to use binary mode when transferring the files.
Be sure to get and read the GNU General Public License (COPYING).
It is included in scm4a13.tar.Z.

To receive an IBM PC floppy disk with the source files and MSDOS
and i386 MSDOS executables send $60 to
   Aubrey Jaffer, 84 Pleasant St. Wakefield MA 01880, USA.
Net 30 day purchase orders are minimum $100.

If you like scm you can support the developement and maintainence of
it by buying a disk from me or by sending money to the above address.
Money received will also help speed the release of a free symbolic
mathematics system (written in scheme).
Newsgroups: comp.lang.scheme