HDTenEightyP/NetNews huggingface dataset:
From: bh@anarres.CS.Berkeley.EDU (Brian Harvey)
Newsgroups: comp.lang.scheme
Subject: Re: Whither eval?
Date: 17 Oct 1992 03:42:00 GMT
Organization: University of California, Berkeley
NNTP-Posting-Host: anarres.cs.berkeley.edu

davidf@golem.uucp (David J. Fiander) writes:
>I have noticed, however, that neither form is provided by scm
>(4a12), and nor is eval mandated by R4RS.  I'm sure that there
>are very good reasons why one might want to exclude eval from
>the language, but is there another way to achieve the same
>effect?

I feel funny being the one to answer this because (1) lots of other
people in the group know a lot more than I do about it, and (2) I wish
Scheme *did* have eval!  But since nobody really answered the first
time around, I guess I'll try to make myself useful...

If you think about how the metacircular evaluator in SICP figures out
the value of a symbol, it's pretty complicated.  It has to look through
a list of lists of pairs (environments containing frames containing
bindings) to find the first one that matches the name you wanted.  That
takes a lot of time, really slowing down the interpreted programs.

For the most part, a smarter implementation of Scheme wouldn't actually
have to chase down all those environments.  Because of lexical scope,
you can tell just by looking at the text of a program where a named
variable lives.  So instead of saying "look up X in this list of lists"
a variable reference could be turned into "take the third value in the
second frame surrounding this one."  That's just a couple of array
references and pointer dereferences, and no string comparisons to check
for names agreeing.

EVAL messes up this convenient situation because you can use it to
change the arrangement of bindings, or to look for a binding that
isn't lexically surrounding the call to eval.  So, if your language
has eval in it, then the implementation has to be prepared to do the
slow complicated SICP metacircular evaluator thing instead of the
turbocharged simple compiler thing.

Some of us think that the wonderfulness of eval is worth the efficiency
cost, and anyway those smart compiler people should be able to take
advantage of the easy way in code that doesn't happen to use eval,
just as they do with other hard features like call/cc.

Another issue, which you mentioned, is the decision between one-argument
and two-argument versions of eval.  Two-argument is obviously more general
but it opens another can of worms, namely the need for first-class
environments.  And if it's one-argument, which environment should be
used implicitly?  Two possible answers are the current one and the
global one.  Disagreements about these questions have so far kept the
Keepers of the Standard from agreeing about eval.

As for how to work around the lack, someone mentioned the idea of
writing your expression into a file and then loading the file.
That's the only way.  See, any equivalent mechanism would cause the
same efficiency headaches as eval, so if you don't have eval you
don't generally have anything equivalent either.
From: thinman@netcom.com (Technically Sweet)
Newsgroups: comp.lang.scheme
Subject: Re: string->proc w/o EVAL
Date: 16 Oct 92 20:04:30 GMT
Distribution: comp.lang.scheme
Organization: International Foundation for Internal Freedom

kobler@informatik.tu-muenchen.de (Daniel Kobler) writes:

>How can I convert a string (or symbol) into the respective procedure,
>e.g.,

>            ((string->proc "car") (cons 'a 'b))   ==> 'a

>but without using EVAL or table lookup.

You write a (list->procedure) routine which prints the
list to a file and then loads the file.  This is what
the macro package in SLIB does.  

This technique really bites, doesn't it?

New Scheme trivia question: how do you implement (promise?)
since it's not a required predicate?

-- 

Lance Norskog

Data is not information is not knowledge is not wisdom.
Newsgroups: comp.lang.scheme
From: mj@cs.brown.edu (Mark Johnson)
Subject: Scheme partial evaluator?
Organization: Brown University Department of Computer Science
Date: Mon, 12 Oct 1992 21:49:38 GMT

I think I saw a message here describing a partial evaluator
for Scheme.  I think somebody at SICS wrote it.

Anyway, I'd be interested to find out about it, and any
other related Scheme program transformation techniques.

Thanks in advance,

Mark Johnson

Mark Johnson
Cognitive Science, Box 1978
Brown University
From: reid@ss6.cps.msu.edu (Dr Richard J. Reid)
Newsgroups: comp.lang.scheme
Subject: Scheme Usage in CS1?
Date: 8 Oct 92 13:51:43 GMT
Organization: Department of Computer Science, Michigan State University
Originator: reid@ss6.cps.msu.edu


Among the 253 schools that have responded to our survey, the
following have indicated they are using

Scheme

in their CS1 course.

Do you know of any additions or corrections?

Thanks,

Dick

*************************** Scheme ********************************

Columbia University
Gustavus Adolphus College, St. Peter, Minnesota
Helsinki University of Technology, Finland
Indiana University  
Iowa State University
Linkoping University, Sweden (Common Lisp)
MIT   
Rice University
Ryerson Polytechnical Institute, Toronto
Syracuse University
The Royal Institute of Technology, Sweden
University of British Columbia
University of California at Berkeley
University of California at Davis (If advanced standing, else Pascal)
University of Delaware 
University of Illinois                   
University of Oregon					
Washington University
Newsgroups: comp.lang.scheme
From: blume@tyrolia.Princeton.EDU (Matthias Blume)
Subject: Re: string->proc w/o EVAL
Reply-To: blume@tyrolia.Princeton.EDU (Matthias Blume)
Organization: Dept. of Computer Science, Princeton University
Distribution: comp.lang.scheme
Date: Wed, 14 Oct 1992 23:01:57 GMT

In article <1992Oct13.114554.4676@Informatik.TU-Muenchen.DE>,
kobler@informatik.tu-muenchen.de (Daniel Kobler) writes:
|> hello,
|> 
|> How can I convert a string (or symbol) into the respective procedure,
|> e.g.,
|> 
|>             ((string->proc "car") (cons 'a 'b))   ==> 'a
|> 
|> but without using EVAL or table lookup.
|> 

You can't.

-Matthias
Newsgroups: comp.lang.scheme
From: brianbec@microsoft.COM (Brian Beckman, ATBD)
Subject: GL windows dying
Organization: The Internet
Date: Wed, 14 Oct 1992 16:20:11 GMT

|jinx@zurich.ai.mit.edu (Guillermo J. Rozas) writes:
|
|>What you sent applies to Scheme->C, not to MIT Scheme, which is what
|>the original poster asked about.
|
|Mr. Tessman of SGI also failed to mention that SGI is abandoning the
|GL window management calls.  Building an interface to them is, in some sense,
|shoeing a dying horse.  SGI boxes are switching over to X for 2D and
|window management.

That's a real shame to hear.  It sure was nice to say

(winopen "drawing")
(draw-this)
(draw-that)
...

rather than

(Xmotif-setup-splay-tree-of-resource-option-gargoyles
	... 800 lines of complicated syntax that nobody ever ...
	... gets really right and will never be portable because ...
	... of hard-coded directory names ...
	... just to open a lousy window and now I'm too tired ...
	... to do any graphics 'cause it took me a week to get this done)

|
|--
|
|Lance Norskog
|
|Data is not information is not knowledge is not wisdom.
|
From: bh@anarres.CS.Berkeley.EDU (Brian Harvey)
Newsgroups: comp.lang.scheme
Subject: Re: symbols: upcase = downcase. WHY?
Date: 14 Oct 1992 20:06:59 GMT
Organization: University of California, Berkeley
Distribution: world
NNTP-Posting-Host: anarres.cs.berkeley.edu

kobler@informatik.tu-muenchen.de (Daniel Kobler) writes:
>  WHY should 'WALL be the same as 'Wall? What is the reason for
>  not distinguishing between upper and lower case letters in
>  symbols?

This is a good question.  I think the answer is that symbols are
considered, not as strings of characters, but as the names of things.
You write your name as "Daniel Kobler" but if someone were to address
a message to "daniel kobler" you'd be surprised if that meant some
other person, right?

C programmers are accustomed to a style in which FOO and foo and Foo all
name different things, with the capitalization used as a sort of implicit
type declaration, so FOO is a flag bit, foo is a node, and Foo is a typedef,
let's say.  In Scheme we'd be more likely to make those conventions
explicit, using names like foo-flag, foo-node, and foo-type.  I suppose
longer names mean more typing, but if it really bothers you, you can just
use word abbrev mode in your text editor.
Newsgroups: comp.lang.scheme
From: kobler@informatik.tu-muenchen.de (Daniel Kobler)
Subject: string->proc w/o EVAL
Organization: Inst. fuer Informatik, Technische Univ. Muenchen, Germany
Date: Tue, 13 Oct 1992 11:45:54 GMT
Distribution: comp.lang.scheme

hello,

How can I convert a string (or symbol) into the respective procedure,
e.g.,

            ((string->proc "car") (cons 'a 'b))   ==> 'a

but without using EVAL or table lookup.

Thanks in advance,

-Daniel ][
 
--
Daniel Kobler                        kobler@kiss.informatik.tu-muenchen.de
 TU  Muenchen, Arcisstr.21,          "Once upon a time I had a good girl,
 8000 Muenchen 2, Germany             once upon a girl I had a good time."
From: gjc@mitech.com (George J. Carrette)
Newsgroups: comp.lang.scheme
Subject: Re: Looking for a scheme
Date: 12 Oct 92 08:25:28 GMT
Organization: Mitech Corporation, Concord MA

In article <JAFFER.92Oct9105743@camelot.ai.mit.edu>, jaffer@zurich.ai.mit.edu (Aubrey Jaffer) writes:
> From the copyright notice: (C-SCHEME)
>  * This software may be distributed (but not offered for sale or transferred
>  * for compensation) to third parties, provided such third parties agree to
>  * abide by the terms and conditions of this notice.  
> 
> Do these terms allow use in a commercial product?  Would the seller
> have to separate scheme-to-C from his proprietary code?  Would one
> have to put a shrink wrap licensce on the scheme-to-C part?

It is obviously a problem for embedded applications and value-added situation.

A commercial user would really have to consider the trade off:
 (I)  how much money to invest in solving the legal and marketting problems.
 (II) how much programming time and money it would take to invest in some
      other lisp implementation that didn't have the legal/marketting problems.


Newsgroups: comp.lang.scheme
From: patl@goldfish.mitron.tek.COM (Patrick Logan)
Subject: Read Tables (was: Symbol case)
Organization: The Internet
Date: Fri, 16 Oct 1992 16:15:22 GMT

   Date: Thu, 15 Oct 92 21:34:45 HKT
   From: "Olin G. Shivers" <shivers@csd.csd.hku.hk>

   Flushing case information removes a useful distinction. It is convenient to
   associate related things in a program by conventions on the case of related
   variables.  For example, a ship record type might be bound to Ship, and
   an individual record might be bound to ship.

   Throwing away case information has messed up my life recently because I have
   designed a Unix shell around Scheme. Now, in this shell, the run macro
   executes a Unix program. For example, here is how you untar a file, saving
   errors in file errlog:

   ...
   
   However, if I say

	   (run (more Readme))

   I get a surprise, since the shell, ignoring case information, ends
   up running the more program with argument "readme", not "Readme".
   To read the file I wanted, I needed to say

	   (run (more "Readme"))

   This is clumsy and irritating.

   ...

Modifying the reader is an easy way to accomodate this situation in
CommonLISP. If Scheme (or A. Jaffer's slib) had a reader like [a
subset of] CommonLISP's... hmm, a project for a rainy day. The
algorithm is even spelled out in CLTL.

I am not saying this solves the case-insensitive symbol problem in
Scheme, if you think that is a problem. But it is a way to have
slightly different readers available to do things like Unix shells and
other "little languages" in Scheme.
--
Patrick Logan         patl@goldfish.mitron.tek.com
Mitron Corporation    (503) 690-8350    FAX: (503) 690-9292
15256 NW Greenbrier Pkwy, Beaverton, OR 97006
From: andrew@astro.psu.edu (Andrew Wilcox)
Newsgroups: comp.lang.scheme
Subject: Re: Wanted: Scheme macrologist for SLIB
Date: 15 Oct 92 21:55:28 GMT
Organization: Department of Astronomy and Astrophysics, Penn State University

>   Modify sc-macros so that they can produce syntactic forms in
> addition to LAMBDA, IF, QUOTE, and SET!.  Some interpreters and
> compilers can optimize LETs, DOs, and other syntactic forms but not
> code composed only of primitive expression types.

Perhaps a post-processor that did some reverse conversions would be
enough.  For example, anything looking like ((lambda (a b) ...) e1 e2)
could be converted to (let ((a e1) (b e2) ...).

Andrew Wilcox
Department of Astronomy & Astrophysics, Pennsylvania State University
(awilcox@astro.psu.edu)
From: bevan@cs.man.ac.uk (Stephen J Bevan)
Newsgroups: comp.lang.scheme
Subject: Re: Compilation on SPARC
Date: 10 Oct 92 23:54:53 GMT
Organization: Department of Computer Science, University of Manchester
In-reply-to: schwartz@roke.cs.psu.edu's message of 10 Oct 92 21:43:07 GMT

In article <BvxAwM.DKw@cs.psu.edu> schwartz@roke.cs.psu.edu (Scott Schwartz) writes:
   Only a very small number of scheme developers seem interested in using
   scheme do to actual systems and application programming.  (If I'm
   wrong about that, post lots of messages here!)

I use Scheme to write applications (though none are currently
commercial).  The one I'm currently hacking reads a (binary) abstract
syntax tree produced by a C program and resolves references[1] (i.e.
given any reference in the file, it finds the definition).  Although
the files I'm reading can be more than a Mb, I still find an
interpreter[2] quick enough for the task, at least as far as development
goes anyway.

I occasionally compile programs using T, however for the 8Mb machine
that I mainly use, the speed advantage of compiling is nearly always
outweighed by the excessive paging that occurs.  I would guess that
the same would occur with MIT Scheme as it is approximately the same
size.  Therefore, although they are fine compilers, they just aren't
very useful to _me_.

At this point, the usual response is "buy more memory!".  Whilst I'd
dearly like to have more memory, there are two points I'd like to make
about this :-

* Justifying the extra memory is not easy when other languages don't
  require it e.g. "why not just use C/C++" is a typical argument I get.

* I think the current Scheme definition has too many procedures in it.
  You can therefore guess that I'm less than happy with systems such
  as T and MIT Scheme which seem to be closer to Common Lisp that
  Scheme to me (the perceived of size/power ratio of Scheme was one of
  the reasons I gave up Common Lisp to use Scheme)

In summary: yes I write applications in Scheme but I don't currently
use a compiler as I haven't found one that doesn't thrash an 8Mb
machine.

bevan

[1] The portable version reads the whole thing in as a Scheme string
    and then unpacks it on the fly.  (This should put the substring
    question I asked into context as it should be obvious that you
    don't want substring copying large chunks of a 1Mb string.)
    I expected this version to be slow and implemented only to
    maintain portability across systems.  However, I was suprised how
    quick it works and now I rarely use the system specific Scheme<->C
    interfaces I originally wrote (talk about premature optimisation!) 

[2] Aubry Jaffer's scm and occasionally Elk (for the backtrace/inspect
    commands)
From: gjc@mitech.com (George J. Carrette)
Newsgroups: comp.lang.scheme
Subject: Re: old DEC machines (what has this got to do with scheme?)
Date: 7 Oct 92 22:53:19 GMT
Organization: Mitech Corporation, Concord MA

In article <ld6at4INNg8h@exodus.Eng.Sun.COM>, chased@rbbb.Eng.Sun.COM (David Chase) writes:
> If you could enlighten me offline, I'm very curious to know just what
> was so wonderful with those particular boxes of silicon and wires.

In comp.lang.scheme you are in particular going to see some old timers.

There is a whole cabal of people who have a lot of vitriol and hate
toward DIGITAL for dropping the PDP-10. So the VAX was lost from
the very start with the DARPA/AI/ACADEMIC crowd.

"The only machine you will ever have to -know- (invest effort) in
is the PDP-10"

Academics are always acting like some -company- is going to come in
and save the world.

Gosh, I saw how so many smart people thought that Symbolics was going
to be the next IBM. "The only machine you will ever have to -know- is
the Symbolics Lispmachine."

It doesn't matter that the vax workstation on my desk runs Macsyma
just as fast as the fastest CRAY-X or Y machine. Or any RISC machine
for that matter. Yep, using a LISP that is at least 10 years old!
They thing hasn't been relinked in at least 8 years.

You know, "If you let something to rot long enough, it will no longer smell."

What is the thing now? 

"The only machine you will ever have to invest intellectual effort
 (emotional cash) is made by SUN, or is the generic idea of a Unix box, or"

-gjc
From: hopkins@CS.CMU.EDU (Don Hopkins)
Newsgroups: comp.lang.scheme
Subject: Re: DEC (was: SIOD now runs on ALPHA)
Date: 8 Oct 92 14:50:06 GMT
Article-I.D.: ECP.HOPKINS.92Oct8095006
	<TED.92Oct6110540@lole.nmsu.edu> <GUMBY.92Oct7051833@Cygnus.COM>
Organization: School of Computer Science, Carnegie Mellon University
Originator: hopkins@ECP.GARNET.CS.CMU.EDU

gumby@Cygnus.COM (David V. Henkel-Wallace) writes:

      Date: Tue, 6 Oct 1992 18:05:40 GMT
      From: ted@nmsu.edu (Ted Dunning)

				      i expect that everybody who ever used
      an pdp-8, or 11, or a decsystem 10, or 20 will have good reason to
      mourn before too long.

   I mourned when DEC left the computer business in the mid '80s.
   Somehow they thought that focussing on puny 32-bit IO processors was
   the way to go!

If you're not playing with 36 bits, you're not playing with a full DEC!

	-Don
From: thant@void.esd.sgi.com (Thant Tessman)
Newsgroups: comp.lang.scheme
Subject: Re: MIT Scheme <--> C
Date: 13 Oct 92 16:55:41 GMT
Organization: Silicon Graphics, Inc.  Mountain View, CA


>What you sent applies to Scheme->C, not to MIT Scheme, which is what
>the original poster asked about.

My mistake.  I glanced at the subject line and only saw "Scheme <--> C"
because my brain reflexes have been made extra sensitive to it.


Lance Norskog writes:

> Mr. Tessman of SGI also failed to mention that SGI is abandoning the
> GL window management calls.  Building an interface to them is, in some 
> sense,  shoeing a dying horse.  SGI boxes are switching over to X for 2D 
> and window management.

This might not be true.  There might be a replacement for the GL input
queue and window manager calls.  It won't be one-to-one compatible
with the old calls (--we hope to fix things), but it will be designed 
to be easy to port old GL applications to.

I'll try to get back with more information.  (The "official" position
is still that people should program mixed-model using their favorite
X-ness.)

thant
From: pk@cs.tut.fi (Kellom{ki Pertti)
Newsgroups: comp.lang.scheme
Subject: Implementations of Data structures and Algorithms in Scheme
Date: 16 Oct 92 10:24:59
Organization: Tampere Univ. of Technology, Finland.
Distribution: comp
NNTP-Posting-Host: talitiainen.cs.tut.fi

Due to the large number of queries I'm posting this here. I have made
Scheme implementations of a number of data structures and algorithms
available using anonymous ftp. The file is
cs.tut.fi:/pub/languages/schemes/scheme-algorithms.tar. Be forewarned
that the implementations have been written to be part of lecture notes
for our data structures and algorithms course. For many of them there
is practically no documentation other than the lecture notes, which
are in Finnish. I have not extensively tested or used many of them, so
there may be serious bugs.

If you do not have ftp, I can also mail them to you.
--
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)


Newsgroups: comp.lang.scheme
From: jaffer@zurich.ai.mit.edu (Aubrey Jaffer)
Subject: patch for scm4a12.tar.Z
Organization: M.I.T. Artificial Intelligence Lab.
Date: Mon, 12 Oct 1992 18:52:48 GMT

Many people reported a bug in scl.c.  The following is a patch for
scm4a12.tar.Z.  The other corrections are from fred@sce.carleton.ca. I
have just updated the versions on
altdorf.ai.mit.edu:archive/scm/scm4a12.tar.Z and
nexus.yorku.ca:pub/scheme/new/scm4a12.tar.Z

The lesson I just learned is: When developing with Make on 2
different machines, make sure their clocks do not differ by more
than one minute.

diff -c scm/temp/scm/MANUAL scm/MANUAL
*** scm/temp/scm/MANUAL	Sun Sep 27 23:30:23 1992
--- scm/MANUAL	Mon Oct 12 12:38:16 1992
***************
*** 325,331 ****
  
  Change the length of the first argument to the second.  If this
  shortens the object then the remaining contents are lost.  If it
! enlarges the object the the contents of the extended part are
  undefined but the original part is unchanged.  It is an error to
  change the length of literal datums.  The new object is returned.
  
--- 325,331 ----
  
  Change the length of the first argument to the second.  If this
  shortens the object then the remaining contents are lost.  If it
! enlarges the object then the contents of the extended part are
  undefined but the original part is unchanged.  It is an error to
  change the length of literal datums.  The new object is returned.
  
***************
*** 573,579 ****
  			 SCHEME BIBLIOGRAPHY
  
  Revised^4 Report on the Algorithmic Language Scheme can be obtained
! via anonymous ftp from: altorf.ai.mit.edu:archive/scheme-reports/
  
  IEEE Std 1178-1990,
  IEEE Standard for the Scheme Programming Language,
--- 573,579 ----
  			 SCHEME BIBLIOGRAPHY
  
  Revised^4 Report on the Algorithmic Language Scheme can be obtained
! via anonymous ftp from: altdorf.ai.mit.edu:archive/scheme-reports/
  
  IEEE Std 1178-1990,
  IEEE Standard for the Scheme Programming Language,
diff -c scm/temp/scm/makefile.unix scm/makefile.unix
*** scm/temp/scm/makefile.unix	Tue Oct  6 02:05:09 1992
--- scm/makefile.unix	Mon Oct 12 12:47:21 1992
***************
*** 119,126 ****
  	cp scm $(DEST)
  	strip $(DEST)scm
  	-cp scm.1 $(MANDEST)
! 	cp Init.scm $(IMPLPATH)
! 	cp COPYING $(IMPLPATH)
  
  tar:	scm.tar
  scm.tar:	temp/scm
--- 119,126 ----
  	cp scm $(DEST)
  	strip $(DEST)scm
  	-cp scm.1 $(MANDEST)
! 	-cp Init.scm $(IMPLPATH)
! 	-cp COPYING $(IMPLPATH)
  
  tar:	scm.tar
  scm.tar:	temp/scm
diff -c scm/temp/scm/scl.c scm/scl.c
*** scm/temp/scm/scl.c	Tue Oct  6 14:57:15 1992
--- scm/scl.c	Mon Oct 12 11:49:47 1992
***************
*** 910,916 ****
--- 910,918 ----
  {
    if NINUMP(z) {
      ASSERT(NIMP(z),z,ARG1,s_log);
+ #ifdef BIGDIG
      if BIGP(z) return makdbl(log(big2dbl(z)),0.0);
+ #endif
      if REALP(z)
        if (REALPART(z)>0.0) return makdbl(log(REALPART(z)),0.0);
        else return makdbl(log(-REALPART(z)),dpi);