Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 21 Apr 89 10:55:56 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 21 Apr 89 09:47:59 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 21 Apr 89 08:22:28 GMT From: mcvax!kth!draken!tut!pk@uunet.uu.net (Kellom{ki Pertti) Organization: Tampere Univ. of Technology, Finland. Subject: Re: where define is legal Message-Id: References: <8904201554.AA13117@spt.entity.com> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8904201554.AA13117@spt.entity.com> alms@spt.entity.COM (andrew lm shalit) writes: Offhand, the following definition seems bogus: (define (foo bool) (if bool (define (result) #true) (define (result) #false)) (result)) And indeed, when I try to run this in MacScheme, I get an error message. I agree with the semantics, but I couldn't find anything in the R3 description of DEFINE which restricts where it may appear. See section 5.2. Definitions: "Definitions are valid in some, but not all, contexts where expressions are. The are vlid only at the top level of a and, in some implementations, at the beginning of a . [that is, the body of a lambda, let, let*, letrec or define expression (from 5.2.2)]" pertti -- Pertti Kellom\"aki (TeX format) # pk@tut.fi # Wasting time is Tampere Univ. of Technology # # an important part Software Systems Lab # # of living  Received: from ALLEGHENY.SCRC.Symbolics.COM (TCP 20024224455) by MC.LCS.MIT.EDU 21 Apr 89 02:12:14 EDT Received: from PERTA.SCRC.Symbolics.COM by ALLEGHENY.SCRC.Symbolics.COM via CHAOS with CHAOS-MAIL id 135482; Fri 21-Apr-89 02:11:21 EDT Date: Fri, 21 Apr 89 02:11 EDT From: Andre van Meulebrouck Subject: Re: Question with binding To: Scheme@mc.lcs.mit.edu cc: titan!dorai@rice.edu, vanmeule@ALLEGHENY.SCRC.Symbolics.COM Message-ID: <19890421061138.6.VANMEULE@PERTA.SCRC.Symbolics.COM> Date: 20 Apr 89 18:49:34 GMT From: titan!dorai@rice.edu (Dorai Sitaram) Subject: Re: Question with binding Message-Id: <3131@kalliope.rice.edu> [. . .] I agree with Andre that redefinition of system-defined functions could infringe upon the integrity of the system. In the old Chez, one needed to just type (set! cons 0) to have the whole session come tumbling down like a house of cards. But then, I don't think the guy who said "Eternal vigilance is the price of liberty" meant it as an argument _against_ liberty. Okay. All the zeal and arguments shown for allowing the redefinition of car to garbage sound pretty good. And, I'm NOT religious or dogmatic about not allowing redefinition. (In fact, I'm religious about NOT being religious.) I just enjoyed the feature in MacScheme because of all those sleepless nights that it saved me from lots of potential inadvertent mistakes that could have made already sleepless nights more sleepless. Recall also, that MacScheme is a "micro" computer implementation. Perhaps what might be nice for "PC"s might not be universally acceptable for "large scale" systems. I just have one question for anyone that's in favor of redefinition. Are you saying you want redefinition-with-wild-abandon? I.e. do you NOT want the system to warn you and ask you: "Are you sure?"? (Admittedly there could be a hackerish thrill in living dangerously....safety is wimps. :-) Or, do you want the system to ask you? (Which could be annoying, especially for loading files.) Or, do you want the system to warn you by default, unless you set a global-dont-warn-me-about-redefinitions flag appropriately? (And if the latter, are you prepared to have zillions of such global variables for similar things in a BIG MOBY system?) Just curious (And by NO means intending raging controvery and/or heated religious debates. If I'm espousing unpopular ideas, well, I derived them from reading Salmon Rushdie--so he's to blame!) =:0) --dorai ------------------------------------------------------------------------------ We must believe in free will. We have no choice. --Isaac Bashevis Singer ------------------------------------------------------------------------------ [. . .]  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 21 Apr 89 00:39:09 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 21 Apr 89 00:23:01 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 21 Apr 89 02:50:39 GMT From: emo@iuvax.cs.indiana.edu (Eric Ost) Organization: Indiana University, Bloomington Subject: Re: where define is legal Message-Id: <19891@iuvax.cs.indiana.edu> References: <8904201554.AA13117@spt.entity.com> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu >> Offhand, the following definition seems bogus: >>> >>> (define (foo bool) >>> (if bool >>> (define (result) #true) >>> (define (result) #false)) >>> (result)) >>> >>> And indeed, when I try to run this in MacScheme, I get an error message. I suspect you get an unbound global variable error, correct? What about the following, slightly different definition for "foo"? (define (foo bool) (define (result) (if bool #t #f)) (result)) eric  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 20 Apr 89 23:24:34 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 20 Apr 89 22:49:40 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 21 Apr 89 01:16:00 GMT From: centauri!bohica@sun.com (Tom McReynolds) Organization: Sun Microsystems, Mountain View Subject: Re: where define is legal Message-Id: <100242@sun.Eng.Sun.COM> References: <8904201554.AA13117@spt.entity.com> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I have a copy of Cscheme from prep.ai.mit.edu. I ran the example described: Scheme saved on Monday April 3, 1989 at 7:14:37 PM Release 6.1.2 Microcode 10.2 Runtime 13.91 SF 3.13 Student 13.3 *** Note: no graphics available in this system. *** 1 ==> (define (foo bool) (if bool (define (result) 't) (define (result) 'f)) (result)) FOO 1 ==> (foo nil) F 1 ==> (foo 't) T Am I missing something? -Tom  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 20 Apr 89 16:58:07 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 20 Apr 89 16:05:21 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 20 Apr 89 18:49:34 GMT From: titan!dorai@rice.edu (Dorai Sitaram) Organization: Rice University, Houston Subject: Re: Question with binding Message-Id: <3131@kalliope.rice.edu> References: <19890418050732.4.VANMEULE@PERTA.SCRC.Symbolics.COM>, <8904191633.AA14869@sesame.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8904191633.AA14869@sesame.Stanford.EDU> mkatz@sesame (Morris Katz) writes: $ Date: Tue, 18 Apr 89 01:07 EDT $ From: Andre van Meulebrouck $ Date: 17 Apr 89 20:36:41 GMT $ From: titan!dorai@rice.edu (Dorai Sitaram) $ [...] $ A bunch of primitive functions, e.g., +, cons, etc., were treated as $ _constants_ in the sense that the names could not have other values $ assigned to them. [...] $ $ ^^That's my understanding too: the idea that certain procedures can't change $ during the course of a compilation/computation, otherwise things couldn't be $ guaranteed to make sense if they were meanwhile allowed to change underneath $ your feet during the computation/compilation. As to user defined $ functions--well if you want to do those sorts of things with your own functions, $ okay, but the system won't let you do that with its functions (upon which it $ might depend, or otherwise feels some responsibility to protect the integrity $ of). [...] $ $ In MacScheme, if you try (define + ...) you get: $ $ ERROR: Integrable procedures may not be redefined. $ (set! + ...) $ $ I like the idea of that a great deal...I don't think the convenience of being $ able to redefine things (advertently or inadvertently--with or without warning) $ is a wonderful feature. You can always write your own similar functions with $ different names, and call out to those in preference if a system function isn't $ quite what you wanted, right? $ $ --dorai ^^^^^^^ Not right (for me). BTW, I did _not_ say the above. They are Andre's words. I needed to say this, because I tend to the diametrically opposite opinion >:-]. $Yes, but this may not be the correct way to think about things. Lets say that $I want to count the number of cons cells that are formed in a suite of $programs. A good way to do this might be to create an environment in which the $constructors like CONS and LIST were aliased to versions that counted the $number of cells they allocated. The program suite could then be run in this $new environment to gather the desired statistics. I would find the alternative $of modifying all of the programs in the test suite much less elegant and quite $inconvenient. In on approach the cost of implementation is constant and in the $other it is proportional to the size of the test suite. $ Morry Katz An earlier version of Chez did in fact allow redefinition of system "constants" to be visible in existing system code, not just in existing (and of course future) user code. One can use this to good effect to define modified versions of the interpreter-eval, Morry's cell-counting cons, etc. However, the current Chez has a most curious stance on this matter. System "constants" can be redefined, but while existing user code reflects these changes, system code is immune. Obviously, there is no inlining going on. It's almost as if the implementors took care to seal off system code with a huge "let", i.e., (let ([cons cons] ... [ ] ...) ), so that any redefinition of the 's doesn't affect . I agree with Andre that redefinition of system-defined functions could infringe upon the integrity of the system. In the old Chez, one needed to just type (set! cons 0) to have the whole session come tumbling down like a house of cards. But then, I don't think the guy who said "Eternal vigilance is the price of liberty" meant it as an argument _against_ liberty. --dorai ------------------------------------------------------------------------------ We must believe in free will. We have no choice. --Isaac Bashevis Singer ------------------------------------------------------------------------------  Received: from EDDIE.MIT.EDU by MC.LCS.MIT.EDU via Chaosnet; 20 APR 89 16:40:10 EDT Received: by EDDIE.MIT.EDU with UUCP with smail2.5 with sendmail-5.45/4.7 id ; Thu, 20 Apr 89 16:39:58 EDT Received: by spt.entity.com (smail2.5); 20 Apr 89 15:54:43 EDT (Thu) To: Scheme@mc.lcs.mit.edu Subject: where define is legal Message-Id: <8904201554.AA13117@spt.entity.com> Date: 20 Apr 89 15:54:43 EDT (Thu) From: alms@spt.entity.com (andrew lm shalit) Offhand, the following definition seems bogus: (define (foo bool) (if bool (define (result) #true) (define (result) #false)) (result)) And indeed, when I try to run this in MacScheme, I get an error message. I agree with the semantics, but I couldn't find anything in the R3 description of DEFINE which restricts where it may appear. Some people from non-scheme backgrounds might think programmatic DEFINEs perfectly reasonable, so it's probably worth mentioning the restriction in the language description.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 20 Apr 89 13:23:02 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 20 Apr 89 12:37:29 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 20 Apr 89 12:36:06 GMT From: mcvax!tuvie!brock@uunet.uu.net (Inst.f.Prakt.Info 1802) Organization: TU Vienna EDP-Center, Vienna, AUSTRIA Subject: package question Message-Id: <683@tuvie> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Hi I have a question or two to experienced Lisp/Scheme programmers about the package mechanism. 1.) Are packages an acceptable equivalent to modules in conv. programming lang.? 2.) Do you use them for all of Your code? 3.) Are there any common problems programmers normally have when beginning using packages? (perhaps some of you holding courses may answer this) 4.) How do you handle I/O? 5.) Do there exist alternatives to packages. (Well OO-extensions, but are there also simpler alternatives?) Please answer directly to me, I'll post a summary to comp.lang.lisp. Thanks in advance Ulrich Please answer to: (ulrich@vip.at UUCP: ...!mcvax!tuvie!vip!ulrich)  Received: from polya.Stanford.EDU (TCP 4402000240) by MC.LCS.MIT.EDU 20 Apr 89 09:05:38 EDT Received: from Sesame.Stanford.EDU by polya.Stanford.EDU with SMTP (5.61/25-eef) id AA04558; Wed, 19 Apr 89 12:29:41 -0700 Received: by sesame.Stanford.EDU (5.57/Ultrix2.4-C) id AA14869; Wed, 19 Apr 89 09:33:13 PDT Date: Wed, 19 Apr 89 09:33:13 PDT From: mkatz@sesame (Morris Katz) Message-Id: <8904191633.AA14869@sesame.Stanford.EDU> To: vanMeule@allegheny.scrc.symbolics.com Cc: Scheme@mc.lcs.mit.edu In-Reply-To: Andre van Meulebrouck's message of Tue, 18 Apr 89 01:07 EDT <19890418050732.4.VANMEULE@PERTA.SCRC.Symbolics.COM> Subject: Question with binding Date: Tue, 18 Apr 89 01:07 EDT From: Andre van Meulebrouck Date: 17 Apr 89 20:36:41 GMT From: titan!dorai@rice.edu (Dorai Sitaram) Subject: Re: Question with binding Message-Id: <3107@kalliope.rice.edu> In article <8904171910.AA26688@polya.Stanford.EDU> shap@POLYA.STANFORD.EDU (Jonathan S. Shapiro) writes: >I have been thinking about compiling scheme, and am confused about the >following possibility: > > (define foo (lambda (x) (+ x 2))) > (define + (lambda (x y) something)) > (foo) > >If this is legal, I don't understand how a compiler can validly inline >primitives. Is there some provision in R3RS or R4RS that resolves >this problem, or is it really a problem? If the latter, how do >compilers deal with it? > >Jon [...] A bunch of primitive functions, e.g., +, cons, etc., were treated as _constants_ in the sense that the names could not have other values assigned to them. [...] ^^That's my understanding too: the idea that certain procedures can't change during the course of a compilation/computation, otherwise things couldn't be guaranteed to make sense if they were meanwhile allowed to change underneath your feet during the computation/compilation. As to user defined functions--well if you want to do those sorts of things with your own functions, okay, but the system won't let you do that with its functions (upon which it might depend, or otherwise feels some responsibility to protect the integrity of). Something like that...(and I too profusely apologize if I misstated or oversimply stated...). In MacScheme, if you try (define + ...) you get: ERROR: Integrable procedures may not be redefined. (set! + ...) I like the idea of that a great deal...I don't think the convenience of being able to redefine things (advertently or inadvertently--with or without warning) is a wonderful feature. You can always write your own similar functions with different names, and call out to those in preference if a system function isn't quite what you wanted, right? --dorai Yes, but this may not be the correct way to think about things. Lets say that I want to count the number of cons cells that are formed in a suite of programs. A good way to do this might be to create an environment in which the constructors like CONS and LIST were aliased to versions that counted the number of cells they allocated. The program suite could then be run in this new environment to gather the desired statistics. I would find the alternative of modifying all of the programs in the test suite much less elegant and quite inconvenient. In on approach the cost of implementation is constant and in the other it is proportional to the size of the test suite. Morry Katz katz@polya.stanford.edu  Received: from chamartin.AI.MIT.EDU (TCP 2212600253) by MC.LCS.MIT.EDU 19 Apr 89 10:33:42 EDT Received: by chamartin.AI.MIT.EDU (5.61/1.2) id ; Wed, 19 Apr 89 09:33:23 -0500 Date: Wed, 19 Apr 89 09:33:23 -0500 From: jinx@chamartin.AI.MIT.EDU (Guillermo J. Rozas) Message-Id: <8904191433.AA09504@chamartin.AI.MIT.EDU> To: vanMeule@ALLEGHENY.SCRC.Symbolics.COM Cc: Scheme@mc.lcs.mit.edu In-Reply-To: Automatic Scheme Digestifier's message of 19 APR 89 00:06:19 EDT Subject: Question with binding Reply-To: jinx@zurich.ai.mit.edu [...] A bunch of primitive functions, e.g., +, cons, etc., were treated as _constants_ in the sense that the names could not have other values assigned to them. [...] ^^That's my understanding too: the idea that certain procedures can't change during the course of a compilation/computation, otherwise things couldn't be guaranteed to make sense if they were meanwhile allowed to change underneath your feet during the computation/compilation. As to user defined functions--well if you want to do those sorts of things with your own functions, okay, but the system won't let you do that with its functions (upon which it might depend, or otherwise feels some responsibility to protect the integrity of). Something like that...(and I too profusely apologize if I misstated or oversimply stated...). What is the difference between variables holding standard procedures and those holding user procedures or those holding other kinds of values (ie. pi, true, etc)? There are two different issues here: - The first is whether "system/language definitions" should be more binding than user definitions. I certainly think that they should not. The system is just a set of tools/utilities for the user, who should be free to ignore them/replace them or do anything s/he wants. For example, I may not like a system's definition of LENGTH, because it is not generic accross lists, vectors ans strings. I should be able to go ahead and redefine it. Since my new definition works on lists as well, no one should notice except myself, who will be considerably happier. - The second issue is whether there should be immutable bindings, and again I don't believe in them either. Say that you have written a program which creates and maintains a database and that 10 years down the road (during which it has been running continuously) you find a bug in some utility. It would be nice to be able to replace it by a correct version and continue as if nothing had happened. Not being able to redefine it might waste 10 years worth of computation. Nobody but yourself will change things underneath your feet, and you can certainly impose any convention that you want on your variables, but please don't build it into the language since I may consider your conventions unreasonable. In MacScheme, if you try (define + ...) you get: ERROR: Integrable procedures may not be redefined. (set! + ...) I like the idea of that a great deal...I don't think the convenience of being able to redefine things (advertently or inadvertently--with or without warning) is a wonderful feature. You are viewing it as an idle feature, which it is not. Consider it a way that the system provides for installing patches and improvements. As far as MacScheme is concerned, I'm not sure whether Will Clinger still agrees to this or not, but I think that the last time we talked about it he agreed that all bindings should be mutable, although implementations might default to a "benchmark mode" in which some bindings would be considered constant. You can always write your own similar functions with different names, and call out to those in preference if a system function isn't quite what you wanted, right? Why should the system have precedence over me, the user? The system should be just a library of utilities for me to use as I please. More power to users, not to programs! :-)  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 19 Apr 89 07:36:56 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 19 Apr 89 07:21:52 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 19 Apr 89 07:38:36 GMT From: agate!web-2d.berkeley.edu!laba-4he@ucbvax.berkeley.edu (The Cybermat Rider) Organization: University of California, Berkeley Subject: Re: Question with binding Message-Id: <23293@agate.BERKELEY.EDU> References: <26688@polya.Stanford.EDU>, <56700003@silver>, <23115@shemp.CS.UCLA.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Here's my $0.02, from R(3.5)RS (apologies if it's already been posted by someone else): 2.1 Identifiers [.....] Identifiers have several uses within Scheme programs: + Certain identifiers are reserved for use as syntactic keywords (see below) ====> + Any identifier that is not a syntactic keyword may be used as a ====> variable [.....] The following identifiers are syntactic keywords, and should not be used as variables: => do or and else quasiquote [.....] + is NOT defined as a syntactic keyword, and hence can (IMHO) be bound to just about anything, even (gasp!) an integer. Whether a particular implementation chooses to allow such a re-binding, though, is really the decision of the implementor. Btw, if any of you think this could cause major headaches, try reading "Oaklisp: an Object-Oriented Scheme with First Class Types" [Lang & Pearlmutter, OOPSLA '86 Proceedings]. As the title implies, even data types can be re-defined!! ---------------------------------------------------------------------------- Adrian Ho a.k.a. The Cybermat Rider University of California, Berkeley laba-4he@web.berkeley.edu (WEB Evans, Home of The CS Freakies) Disclaimer: Nobody takes me seriously, so is it really necessary?  Received: from lcs.mit.edu (TCP 2206400044) by MC.LCS.MIT.EDU 19 Apr 89 01:29:01 EDT Received: from BLOOM-BEACON.MIT.EDU by mintaka.lcs.mit.edu id aa07975; 18 Apr 89 23:37 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 18 Apr 89 23:24:38 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 19 Apr 89 02:36:52 GMT From: Brad Pierce Organization: UCLA Computer Science Department Subject: Re: Question with binding Message-Id: <23115@shemp.CS.UCLA.EDU> References: <26688@polya.Stanford.EDU>, <56700003@silver> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <56700003@silver> mitchemt@silver.bacs.indiana.edu writes: > >As far as I know, (define + (lambda (x y) (* x y))) will work just fine under >Chez Scheme. I agree that it would be hard to write a compiler for this type >of code. I don't think it will bomb but you might get some weird results. Hope >this is of some help. > Terrence Mitchem, Indiana University. The way Chez Scheme handles this problem is to have 4 different optimization levels, numbered 0-3. At levels 0 and 1, the lower levels, this definition will work just fine. At levels 2 and 3 redefining a primitive such as + will not be allowed. This has worked well for me. Why force one approach or the other on a user when both needs can be accomodated? -- Brad Pierce, UCLA  Received: from lcs.mit.edu (TCP 2206400044) by MC.LCS.MIT.EDU 19 Apr 89 01:26:13 EDT Received: from BLOOM-BEACON.MIT.EDU by mintaka.lcs.mit.edu id aa07351; 18 Apr 89 21:37 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 18 Apr 89 21:19:05 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 19 Apr 89 00:26:00 GMT From: silver!mitchemt@iuvax.cs.indiana.edu Organization: Indiana University CSCI, Bloomington Subject: Re: Question with binding Message-Id: <56700003@silver> References: <26688@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu As far as I know, (define + (lambda (x y) (* x y))) will work just fine under Chez Scheme. I agree that it would be hard to write a compiler for this type of code. I don't think it will bomb but you might get some weird results. Hope this is of some help. Terrence Mitchem, Indiana University.  Received: from mitvma.mit.edu (TCP 2227000003) by MC.LCS.MIT.EDU 18 Apr 89 14:14:49 EDT Received: from MITVMA.MIT.EDU by mitvma.mit.edu (IBM VM SMTP R1.2) with BSMTP id 7479; Tue, 18 Apr 89 14:14:32 EDT Received: from DACTH51.BITNET (FM) by MITVMA.MIT.EDU (Mailer X1.25) with BSMTP id 8992; Tue, 18 Apr 89 14:04:12 EDT Date: Tue, 18 Apr 89 19:58 N From: Subject: Re: Oaklisp bignum multiplication To: scheme@mc.lcs.mit.edu X-Original-To: scheme@mc.lcs.mit.edu, FM In my original posting I asked about Oaklisp's multiplication method. Barak Pearlmutter answered: "Actually, Sun3 benchmarks came out in favor of the elementary school algorithm for numbers below a certain size, so the fancy algorithm doesn't kick in unless both numbers are pretty big." Just how big ? I evaluated various multiplication methods once, and found that numbers have to be bigger than ~1000 decimal digits to gain from using Karatsubas method. Such large numbers don't occur very often, even in a computational algebra system. "In any case, you're correct that things are O( n^.59 m ) where n Subject: Help me get Oaklisp To: scheme@mc.lcs.mit.edu X-Original-To: scheme@mc.lcs.mit.edu, FM This is a repost of an article I accidently posted to info-cscheme instead of scheme@mc. I still don't know how to get Oaklisp over BITNET. Please don't mail to martins@rwthinf.uucp, they make me pay for my mail. A while ago somebody, I think one of the authors, K. Lang or B. Pearlmutter, posted a arcticle saying that a new release of OakLisp is available. I don't have this article anymore, but anyhow it would be pretty useless since I can't ftp. Does somebody know a way I can get Oaklisp over BITNET ? I really like the ideas in Oaklisp and I can't wait to play with it. ! Martin Schoenert, martins@rwthinf.uucp, fm@dacth51.bitnet, +49 241 804551 ! ! Lehrstuhl D Mathematik, RWTH, Templergraben 64, D 51 Aachen, West Germany !  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 18 Apr 89 09:21:23 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 18 Apr 89 09:11:06 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 18 Apr 89 03:30:35 GMT From: mailrus!jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!ists!mike@ohio-state.arpa (Mike Clarkson) Organization: Institute for Space and Terrestrial Science Subject: Defsystem for Scheme ? Message-Id: <380@ists.ists.ca> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Does anyone have a defsystem for Scheme? Something along the lines of the Symbolics 6.x type would be nice. If not I'll hack one. Mike. -- Mike Clarkson mike@ists.ists.ca Institute for Space and Terrestrial Science uunet!attcan!ists!mike York University, North York, Ontario, FORTRAN - just say no. CANADA M3J 1P3 +1 (416) 736-5611  Received: from ALLEGHENY.SCRC.Symbolics.COM (TCP 20024224455) by MC.LCS.MIT.EDU 18 Apr 89 01:40:23 EDT Received: from PERTA.SCRC.Symbolics.COM by ALLEGHENY.SCRC.Symbolics.COM via CHAOS with CHAOS-MAIL id 134814; Tue 18-Apr-89 01:07:14 EDT Date: Tue, 18 Apr 89 01:07 EDT From: Andre van Meulebrouck Subject: Question with binding To: Scheme@mc.lcs.mit.edu cc: vanmeule@ALLEGHENY.SCRC.Symbolics.COM Message-ID: <19890418050732.4.VANMEULE@PERTA.SCRC.Symbolics.COM> Date: 17 Apr 89 20:36:41 GMT From: titan!dorai@rice.edu (Dorai Sitaram) Subject: Re: Question with binding Message-Id: <3107@kalliope.rice.edu> In article <8904171910.AA26688@polya.Stanford.EDU> shap@POLYA.STANFORD.EDU (Jonathan S. Shapiro) writes: >I have been thinking about compiling scheme, and am confused about the >following possibility: > > (define foo (lambda (x) (+ x 2))) > (define + (lambda (x y) something)) > (foo) > >If this is legal, I don't understand how a compiler can validly inline >primitives. Is there some provision in R3RS or R4RS that resolves >this problem, or is it really a problem? If the latter, how do >compilers deal with it? > >Jon [...] A bunch of primitive functions, e.g., +, cons, etc., were treated as _constants_ in the sense that the names could not have other values assigned to them. [...] ^^That's my understanding too: the idea that certain procedures can't change during the course of a compilation/computation, otherwise things couldn't be guaranteed to make sense if they were meanwhile allowed to change underneath your feet during the computation/compilation. As to user defined functions--well if you want to do those sorts of things with your own functions, okay, but the system won't let you do that with its functions (upon which it might depend, or otherwise feels some responsibility to protect the integrity of). Something like that...(and I too profusely apologize if I misstated or oversimply stated...). In MacScheme, if you try (define + ...) you get: ERROR: Integrable procedures may not be redefined. (set! + ...) I like the idea of that a great deal...I don't think the convenience of being able to redefine things (advertently or inadvertently--with or without warning) is a wonderful feature. You can always write your own similar functions with different names, and call out to those in preference if a system function isn't quite what you wanted, right? --dorai  Received: from chamartin.AI.MIT.EDU (TCP 2212600253) by MC.LCS.MIT.EDU 18 Apr 89 00:49:29 EDT Received: by chamartin.AI.MIT.EDU (5.61/1.2) id ; Mon, 17 Apr 89 23:49:51 -0500 Date: Mon, 17 Apr 89 23:49:51 -0500 From: jinx@chamartin.AI.MIT.EDU (Guillermo J. Rozas) Message-Id: <8904180449.AA07981@chamartin.AI.MIT.EDU> To: shap@polya.Stanford.EDU Cc: Scheme@mc.lcs.mit.edu In-Reply-To: Automatic Scheme Digestifier's message of 18 APR 89 00:06:13 EDT Subject: Question with binding Reply-To: jinx@zurich.ai.mit.edu I have been thinking about compiling scheme, and am confused about the following possibility: (define foo (lambda (x) (+ x 2))) (define + (lambda (x y) something)) (foo) If this is legal, I don't understand how a compiler can validly inline primitives. Is there some provision in R3RS or R4RS that resolves this problem, or is it really a problem? If the latter, how do compilers deal with it? Hopefully calling foo with no arguments gives a "wrong number of arguments error" irrelevant of whether + is open coded. :-) Now seriously, according to (my interpretation of) r3rs/r4rs, assigning a new value to the variables which hold the standard procedures is legal, and should have the "expected" effect. Thus open coding standard procedures is "strictly" illegal in a pure r3rs/r4rs environment. In MIT Scheme, no open coding happens by default, and there are no constant bindings. There are, however, a variety of declarations, of which the most frequently found is (declare (usual-integrations)) which tell the compiler that some set of common variables will have their standard values at run time and that the compiler can freely integrate/open-code these values. In the absence of this (or another relevant) declaration, the compiler will issue code which will act as if it referenced the variable at call time and then invoked the resulting value. Thus changing the value of + at run time will change the behavior of compiled code that references +.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 17 Apr 89 17:36:23 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 17 Apr 89 17:25:25 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 17 Apr 89 20:36:41 GMT From: titan!dorai@rice.edu (Dorai Sitaram) Organization: Rice University, Houston Subject: Re: Question with binding Message-Id: <3107@kalliope.rice.edu> References: <8904171910.AA26688@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8904171910.AA26688@polya.Stanford.EDU> shap@POLYA.STANFORD.EDU (Jonathan S. Shapiro) writes: >I have been thinking about compiling scheme, and am confused about the >following possibility: > > (define foo (lambda (x) (+ x 2))) > (define + (lambda (x y) something)) > (foo) > >If this is legal, I don't understand how a compiler can validly inline >primitives. Is there some provision in R3RS or R4RS that resolves >this problem, or is it really a problem? If the latter, how do >compilers deal with it? > >Jon Indiana University's Schemefolk treated this problem as follows (it's possible I err here, in which case I profusely apologize to those concerned): A bunch of primitive functions, e.g., +, cons, etc., were treated as _constants_ in the sense that the names could not have other values assigned to them. This is not weird, since it recalls the usual treatment of certain other constant names, e.g., 1, nil (or rather #f), "hello", etc. Thus your (define + ...) would bomb. They went on to add the facility (declare-constant ...) to the language (Scheme84) so that the user could define hir own set of constants. This was merely for the user's convenience, _not_ a directive to the compiler to inline. Just to make things interesting, they also added the facility (undeclare-constant ...). It works as expected for user-defined constants, which aren't inlined anyway. But for the system-constants, while previous inlining stays, any new uses of the constant name take on the new definition if any. (Is that clear? >:-]) --dorai ------------------------------------------------------------------------------ We must believe in free will. We have no choice. --Isaac Bashevis Singer ------------------------------------------------------------------------------  Received: from ZURICH.AI.MIT.EDU (TCP 2206400260) by MC.LCS.MIT.EDU 17 Apr 89 15:10:46 EDT Return-Path: Received: from polya.Stanford.EDU (polya.stanford.edu) by ZURICH.AI.MIT.EDU; Mon, 17 Apr 89 15:09:06 edt Received: by polya.Stanford.EDU (5.61/25-eef) id AA26688; Mon, 17 Apr 89 12:10:33 -0700 Date: Mon, 17 Apr 89 12:10:33 -0700 From: Jonathan S. Shapiro Message-Id: <8904171910.AA26688@polya.Stanford.EDU> To: scheme@ZURICH.AI.MIT.EDU Subject: Question with binding I have been thinking about compiling scheme, and am confused about the following possibility: (define foo (lambda (x) (+ x 2))) (define + (lambda (x y) something)) (foo) If this is legal, I don't understand how a compiler can validly inline primitives. Is there some provision in R3RS or R4RS that resolves this problem, or is it really a problem? If the latter, how do compilers deal with it? Jon  Received: from ZURICH.AI.MIT.EDU (TCP 2206400260) by MC.LCS.MIT.EDU 15 Apr 89 23:25:16 EDT Return-Path: Received: from polya.Stanford.EDU (polya.stanford.edu) by ZURICH.AI.MIT.EDU; Sat, 15 Apr 89 23:23:36 edt Received: by polya.Stanford.EDU (5.61/25-eef) id AA17437; Sat, 15 Apr 89 20:25:00 -0700 Date: Sat, 15 Apr 89 20:25:00 -0700 From: Jonathan S. Shapiro Message-Id: <8904160325.AA17437@polya.Stanford.EDU> To: scheme@ZURICH.AI.MIT.EDU Subject: Comments from ieee spec I recently grabbed a copy of the standard dated April 15 from zurich.ai.mit.edu. I am forwarding some comments that I think are relevant for R4RS to this group too. Since I am new to the scheme community, it would be presumptuous to assume that I have understood the subtleties of all of the standard, but there are some areas that were unclear to me or seemed to permit contradictory interpretations, and I thought I would send out comments on these areas. I hope the scheme group will accept those comments that are helpful, and I look forward to any feedback I may get on my misunderstandings. DEFINE: The semantics of DEFINE is historically problematic. The change in R3RS that eliminated the implicit LETREC in defines forces me to generate code that checks to see if the procedure's variable has been side effected by someone I call before I do the tail-recursive call. If there were no other way to achieve side-effectability I would be content with this, but it seems to me that there is an alternative that does not require the compiler to pessimize the most-common-case: First, I suggest that including (define ) in R4RS, and specifying that gets bound to an unspecified value addresses the needs of both compilers and users. If this change is made (I am sending this proposal to the scheme-standard group too on the grounds that usage has effectively standardized it), then the common case can be rewritten as: (define name => (begin (define name) (lambda ...)) (set! name (letrec ((name (lambda ...))) name))) and the less-common case is still handled when needed by explicitly writing the sequence (define name) (set! name (lambda ...)) Whatever is done, the semantics of what scope the lambda appears in should be specified. The only real problem I see with this is that it may imply a need to extend BEGIN to handle things like (begin (define ...) (set! ...) (define ...)) WRITE: Write should return #f on failure and #t on success, or it should be an error to write a value to an external port that lacks an external representation. I advocate returning #t or #f, which would permit me to build a wrapper function to deal with failure rationally, and avoids the need to define external ports. Failing to distinguish external ports from internal ports is a bad idea because it constrains an implementation from defining something analogous to a pipe. Returning #t or #f lets the program deal with write errors by attempting to tell someone. This would also permit an implementation to extend write such that it can write continuations, and thereby implement DUMP-HEAP. Programs could assume this facility, try it, and issue an appropriate diagnostic if it doesn't work. The standard shouldn't include DUMP-HEAP, but it shouldn't constrain WRITE in a way that prohibits it either. GENERAL: 1) Implementations should be encouraged somewhere to implement (WRITE ). A representation should be written that when read with READ results in a thunk that is an equivalent function to the written continuation. The representation of continuations should be implementation-defined. Rationale: We all acknowledge that this is pragmatically something that we want, and there should be a standard interface. Having write return a value lets me assume the capability without causing problems for implementations that don't support it. 2) I believe that the user-interface section should specify a procedure (DUMP-WORLD "filename" ) that writes a representation that can be executed in an implementation-dependent way to arrive at the specified continuation. The argument should be optional, and if left unspecified should default to the continuation that DUMP-WORLD will return to. DUMP-WORLD should return #t if it succeeds or #f if it fails or the implementation doesn't supply the functionality. Rationale: The whole community acknowledges that we want this, but that it is implementation-dependent. This proposal permits us to specify the interface to it and construct our programs in a way that deals gracefully with failure and doesn't impose it on implmementations that don't or can't do it. Why DUMP-WORLD and not DUMP-HEAP? Unlike DUMP-HEAP, which is covered by WRITE, DUMP-WORLD does something fundamentally implementation-specific.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 15 Apr 89 22:05:30 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 15 Apr 89 21:55:33 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 16 Apr 89 00:00:25 GMT From: husc8!houpt@husc6.harvard.edu (Thomas Houpt) Organization: Harvard University Science Center Cambridge, MA Subject: Scheme on Macintosh Message-Id: <1636@husc6.harvard.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I am looking for a good implementation of Scheme or its dialects for use on a Mac (specifically an SE-30). I would like it to support Abelson and Sussman compatability, as well as compiling to stand-alone Mac applications (with full Mac interface stuff) Is MacScheme+Toolsmith the thing to get? Or do other people have things in the works that would be better? Thanks in advance!  Received: from lcs.mit.edu (TCP 2206400044) by MC.LCS.MIT.EDU 12 Apr 89 23:07:46 EDT Received: from BLOOM-BEACON.MIT.EDU by mintaka.lcs.mit.edu id aa00249; 12 Apr 89 23:06 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 12 Apr 89 22:16:18 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 13 Apr 89 00:08:22 GMT From: Robert Steven Glickstein Organization: Information Technology Center, Carnegie Mellon, Pittsburgh, PA Subject: Belaboring the subject Message-Id: Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I am very eager to know the status of the R^4 Report on Scheme. A recent post mentioned the R^3.95 Report, but I can't find it anywhere, and if a more recent revision exists, I'd be more interested in that. Can anyone help me? ============== Bob Glickstein ITC Database Group Information Technology Center Carnegie Mellon University Pittsburgh, PA ==============  Received: from ZURICH.AI.MIT.EDU (TCP 2206400260) by MC.LCS.MIT.EDU 7 Apr 89 18:11:59 EDT Return-Path: Received: from polya.Stanford.EDU (polya.stanford.edu) by ZURICH.AI.MIT.EDU; Fri, 7 Apr 89 18:10:53 edt Received: by polya.Stanford.EDU (5.61/25-eef) id AA23851; Fri, 7 Apr 89 15:11:41 -0700 Date: Fri, 7 Apr 89 15:11:41 -0700 From: Jonathan S. Shapiro Message-Id: <8904072211.AA23851@polya.Stanford.EDU> To: scheme-standard@wheaties.ai.mit.edu, scheme@ZURICH.AI.MIT.EDU Subject: My force example Should have read (define escape^ ) (set! expr (delay (if get-out (escape^ #f) #t))) (call/cc (lambda (cont) (set! escape^ cont) (set! get-out #t) (force expr))) (set! get-out #f) (force expr) Apologies for the inconvenience of redistribution... Jon  Received: from ZURICH.AI.MIT.EDU (TCP 2206400260) by MC.LCS.MIT.EDU 7 Apr 89 16:37:40 EDT Return-Path: Received: from polya.Stanford.EDU (polya.stanford.edu) by ZURICH.AI.MIT.EDU; Fri, 7 Apr 89 16:36:22 edt Received: by polya.Stanford.EDU (5.61/25-eef) id AA16743; Fri, 7 Apr 89 13:36:56 -0700 Date: Fri, 7 Apr 89 13:36:56 -0700 From: Jonathan S. Shapiro Message-Id: <8904072036.AA16743@polya.Stanford.EDU> To: scheme@ZURICH.AI.MIT.EDU, scheme-standard.ai.mit.edu@polya.Stanford.EDU Subject: Clarification to force needed I am sending this to both lists, though I don't know if this is a problem in the ANSI spec. I believe that the current definition of (force ) could use some rewording to make it clear that FORCE is only entitled to memoize when the promise has returned. That is, the sequence: (set! expr (delay (if get-out (escape^ #f) #t))) (call/cc (lambda (cont) (set! escape! cont) (set! escape #t) (force expr))) (set! escape #f) (force expr) A problem can arise if forces change their type codes too early. The intent is that if executing a force succeeds everything is fine, but that one is entitled to restart a force that has been thrown out of. My intent is also that (set! fred (delay (begin ... (force blah) (throw...)))) (force fred) is entitled to memoize blah if it succeeds, even if the overall delay FRED is thrown from. I believe this was the original intent, but it would be useful to make the behavior outlined above explicitly correct in the standard. Jon Shapiro Stanford University  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 6 Apr 89 22:04:53 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 6 Apr 89 21:54:41 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 6 Apr 89 07:50:29 GMT From: jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!ists!mike@rutgers.edu (Mike Clarkson) Organization: Institute for Space and Terrestrial Science Subject: TI Macros for MIT C-Scheme - Patch #1 Message-Id: <375@ists.ists.ca> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I am embarrassed. The shar that I used to package the previous postings of macros for TI functionality junked the last line if it didn't end with a line-feed. So some of the files were truncated. Enclosed are patches to fix the problem, plus a new feature (PP), and some hooks for future development of the FLUIDS package. My apologies to those who were frustrated by my error. Snip here and feed to patch. Mike. ------------------------------------------------------------------------------- diff -c dist1.0/README dist1.1/README *** dist1.0/README Thu Apr 6 03:03:42 1989 --- dist1.1/README Thu Apr 6 02:52:22 1989 *************** *** 2,9 **** TI PC COMPATIBILITY PACKAGE ! Version 1.0 ! March 1989 For MIT C-Scheme 6.2.2 --- 2,9 ---- TI PC COMPATIBILITY PACKAGE ! Version 1.1 ! April 1989 For MIT C-Scheme 6.2.2 *************** *** 82,90 **** ASSERT GET-FILE-POSITION (Needs support in C for opening files with append) (SET! (VECTOR-REF vector n) value) (not implemented yet) - (SET! (FLUID var) value) (not implemented yet) SYNTAX (Conflicts with the MIT syntax) The windows code will have to wait until the next release of C-Scheme, which should have some windowing code to support Edwin: --- 82,98 ---- ASSERT GET-FILE-POSITION (Needs support in C for opening files with append) (SET! (VECTOR-REF vector n) value) (not implemented yet) SYNTAX (Conflicts with the MIT syntax) + The fluids code is being worked on (with many thanks to jinx); + at the moment there are just "Not implemented yet" macros in place. + + FLUID + FLUID-BOUND + FLUID-LAMBDA + TI-FLUID-LET + (SET! (FLUID var) value) + The windows code will have to wait until the next release of C-Scheme, which should have some windowing code to support Edwin: *************** *** 107,114 **** WINDOW-SET-SIZE! WINDOW? ! Engines have not been implemented, though I may look at making kwh's ! tasks act like engines: MAKE-ENGINE ENGINE-RETURN --- 115,122 ---- WINDOW-SET-SIZE! WINDOW? ! Engines have not been implemented. Jinx has supplied me with a set of ! engines that I am testing out, at least for Bsd systems. MAKE-ENGINE ENGINE-RETURN *************** *** 130,136 **** POSITION-PEN The line editor hasn't been ported, but in these days od Gnu, does anyone ! reall care? EDIT --- 138,144 ---- POSITION-PEN The line editor hasn't been ported, but in these days od Gnu, does anyone ! really care? EDIT diff -c dist1.0/compile-the-files.scm dist1.1/compile-the-files.scm *** dist1.0/compile-the-files.scm Thu Apr 6 03:03:43 1989 --- dist1.1/compile-the-files.scm Wed Apr 5 10:12:49 1989 *************** *** 16,18 **** --- 16,19 ---- (sf "window.scm") ;; The main file that loads or auto-loads the rest + (sf "ti.scm") diff -c dist1.0/parser-escape.scm dist1.1/parser-escape.scm *** dist1.0/parser-escape.scm Thu Apr 6 03:03:46 1989 --- dist1.1/parser-escape.scm Wed Apr 5 10:18:50 1989 *************** *** 24,26 **** --- 24,27 ---- (intern-string-no-coerce! (loop (read-string delimiters)))))) ;; end in-package parser-package + ) diff -c dist1.0/scoops.scm dist1.1/scoops.scm *** dist1.0/scoops.scm Thu Apr 6 03:03:39 1989 --- dist1.1/scoops.scm Wed Apr 5 10:19:00 1989 *************** *** 1161,1163 **** --- 1161,1165 ---- ((access ,(%sc-concat "SET-" var) (%sc-method-env ,class)) ,val))))) ;; end scoops-package environment + )) + diff -c dist1.0/sort.scm dist1.1/sort.scm *** dist1.0/sort.scm Thu Apr 6 03:03:32 1989 --- dist1.1/sort.scm Wed Apr 5 10:19:08 1989 *************** *** 107,109 **** --- 107,111 ---- (vector-copy v) 0 (-1+ (vector-length v))) + v) + diff -c dist1.0/ti.scm dist1.1/ti.scm *** dist1.0/ti.scm Thu Apr 6 03:03:34 1989 --- dist1.1/ti.scm Thu Apr 6 02:52:35 1989 *************** *** 165,174 **** ((string? pathname) (string->pathname pathname)) (else (error "DOS-CHDIR: Not a pathname, symbol or string"))))) - - - ;;; DOS-COPY-FILE (define dos-file-copy copy-file) --- 165,171 ---- *************** *** 221,226 **** --- 218,240 ---- ;;; EXPLODE (autoload-from-file "$SCHEME/xplode" '(explode)) + ;;; FLUID + (add-syntax! 'fluid (macro (var) + `(writeln "Not implemented yet"))) + + ;;; FLUID-BOUND? + (add-syntax! 'fluid-bound? (macro (var) + `(writeln "Not implemented yet"))) + + ;;; FLUID-LAMBDA + (add-syntax! 'fluid-lambda (macro (bindings . code) + `(writeln "Not implemented yet"))) + + ;;; FLUID-LET + ;; Renamed to TI-FLUID-LET as it Conflicts with MIT's fluid-let + (add-syntax! 'ti-fluid-let (macro (bindings . code) + `(writeln "Not implemented yet"))) + ;;; FLUSH-INPUT (define (flush-input #!optional port) (let ((newline-delimiters (char-set #\Newline))) *************** *** 370,378 **** --- 384,435 ---- ;; Not implemented yet - needs C support (autoload-from-file "$TISCHEME/file-extend" '(open-extend-file)) + ;;; PCS-DEBUG-MODE + ;; Just a stub - always true + (define pcs-debug-mode #T) + ;;; PI (define pi (* 4.0 (atan 1.0 1.0))) + ;;; PP + (define pp + (let () + (define (prepare scode) + (let ((s-expression (unsyntax scode))) + (if (and (pair? s-expression) + (eq? (car s-expression) 'NAMED-LAMBDA)) + `(DEFINE ,@(cdr s-expression)) + s-expression))) + + (lambda (scode #!optional port width) + + (define (kernel as-code?) + (if (scode-constant? scode) + ((access ti-pp scheme-pretty-printer) scode as-code? width) + ((access ti-pp scheme-pretty-printer) (prepare scode) true width))) + + (cond ((unassigned? port) + (set! port *current-output-port*)) + ((not (port? port)) (error 'PP "Bad port" port))) + (cond ((unassigned? width) + (set! width + (let ((x-size ((access :x-size port)))) + (if x-size (min 72 x-size) 72)))) + ((not (integer? width)) (error 'PP "Bad width" width))) + (with-output-to-port port + (lambda () (kernel false))) + *the-non-printing-object*))) + + (in-package scheme-pretty-printer + (define (ti-pp expression as-code? width) + (fluid-let ((x-size width)) + (let ((node (numerical-walk expression))) + (*unparse-newline) + ((if as-code? print-node print-non-code-node) node 0 0) + ((access :write-char *current-output-port*) char:newline) + ((access :flush-output *current-output-port*))))) + ) + ;;; POINT-COLOR (autoload-from-file "$TISCHEME/graphics" '(point-color)) *************** *** 434,440 **** eof-object))) ;;; REC ! ;; You may want to change REC of lambdas to named lambdas (syntax-table-define system-global-syntax-table 'REC (macro (var exp) `(letrec ((,var ,exp)) ,var))) --- 491,497 ---- eof-object))) ;;; REC ! ;; You may want to change REC of lambdas to NAMED-LAMBDAs (syntax-table-define system-global-syntax-table 'REC (macro (var exp) `(letrec ((,var ,exp)) ,var))) *************** *** 527,532 **** (newline) (define (ti-compatibility-package-version) ! "1.0") (writeln "TI Functions loaded.") --- 584,590 ---- (newline) (define (ti-compatibility-package-version) ! "1.1") (writeln "TI Functions loaded.") + -- Mike Clarkson mike@ists.UUCP Institute for Space and Terrestrial Science mike@ists.ists.ca York University, North York, Ontario, uunet!mnetor!yunexus!ists!mike CANADA M3J 1P3 +1 (416) 736-5611  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 6 Apr 89 14:49:56 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 6 Apr 89 14:46:20 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 6 Apr 89 17:57:52 GMT From: agate!web-3b.berkeley.edu!c60c-3ds@ucbvax.berkeley.edu Organization: University of California, Berkeley Subject: Please help me with Xscheme Message-Id: <22714@agate.BERKELEY.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu 2 questions: Where can I get documentation for Dave Betz's Xscheme? I just tried to compile it on the ST with Sozobon C and encountered some problems. First, some of the function names are >7 chars, and lose uniqueness. I just put some defines in to take care of this. Second, the loader might be broken, because I get errors like "Undefined: __sscanf from d(fscanf.o)" My copy of Xscheme sources had no ststuff.c file, so I used the one from xlisp, and added the missing file functions. I doubt if that is where the bug is. ( ( John Kawakami ) ) ) ) c60c-3ds@web.berkeley.edu ( ( ( ( ) )  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 31 Mar 89 21:06:02 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 31 Mar 89 20:54:23 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 31 Mar 89 07:22:05 GMT From: mailrus!jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!ists!mike@ohio-state.arpa (Mike Clarkson) Organization: Institute for Space and Terrestrial Science Subject: TI Scheme functions for MIT C-Scheme - 2 of 3 Message-Id: <372@ists.ists.ca> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu #--------------------------------CUT HERE------------------------------------- #! /bin/sh # # This is a shell archive. Save this into a file, edit it # and delete all lines above this comment. Then give this # file to sh by executing the command "sh file". The files # will be extracted into the current directory owned by # you with default permissions. # # The files contained herein are: # # -rw-r----- 1 mike 38772 Mar 30 14:35 scoops.scm # echo 'x - scoops.scm' if test -f scoops.scm; then echo 'shar: not overwriting scoops.scm'; else sed 's/^X//' << '________This_Is_The_END________' > scoops.scm X;;; X;;; Copyright (c) 1986 Texas Instruments Incorporated X;;; X;;; Permission to copy this software, to redistribute it, and X;;; to use it for any purpose is granted, subject to the X;;; following restrictions and understandings. X;;; X;;; 1. Any copy made of this software must include this copyright X;;; notice in full. X;;; X;;; 2. All materials developed as a consequence of the use of X;;; this software shall duly acknowledge such use, in accordance X;;; with the usual standards of acknowledging credit in academic X;;; research. X;;; X;;; 3. TI has made no warranty or representation that the X;;; operation of this software will be error-free, and TI is X;;; under no obligation to provide any services, by way of X;;; maintenance, update, or otherwise. X;;; X;;; 4. In conjunction with products arising from the use X;;; of this material, there shall be no use of the name of X;;; Texas Instruments (except for the above copyright credit) X;;; nor of any adaptation thereof in any advertising, promotional, X;;; or sales literature without prior written consent from TI in X;;; each case. X;;; X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X;;; ;;; X;;; S c o o p s ;;; X;;; ;;; X;;; File updated : 5/23/86 ;;; X;;; ;;; X;;; File : class.scm ;;; X;;; ;;; X;;; Amitabh Srivastava ;;; X;;; ;;; X;;; This file handles class creation. ;;; X;;; ;;; X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X X(declare (usual-integrations)) X X(define ALL-CLASSVARS) X(define ALL-INSTVARS) X(define ALL-METHODS) X(define CLASS-COMPILED?) X(define CLASSVARS) X(define DESCRIBE) X(define INSTVARS) X(define METHODS) X(define MIXINS) X X;;; X(define scoops-package X (make-environment X X(define %%class-tag (make-interned-symbol "#!CLASS")) X X(set! (access named-objects parser-package) X (cons (cons 'CLASS %%class-tag) (access named-objects parser-package))) X X X((access add-unparser-special-object! unparser-package) %%class-tag X (lambda (class) X ((access unparse-with-brackets unparser-package) X (lambda () X (write-string "SCOOPS Class ") X (write (hash class)))))) X X X(define %sc-make-class X (lambda (name cv allivs mixins method-values) X (let ((method-structure X (mapcar (lambda (a) (list (car a) (cons name name))) X method-values)) X (class (make-vector 15))) X (vector-set! class 0 %%class-tag) X (vector-set! class 1 name) X (vector-set! class 2 cv) X (vector-set! class 3 cv) X (vector-set! class 4 allivs) X (vector-set! class 5 mixins) X (vector-set! class 6 (%uncompiled-make-instance class)) X (vector-set! class 9 method-structure) X (vector-set! class 13 method-values) X (vector-set! class 14 allivs) X (putprop name class '%class) X class))) X X(define %scoops-chk-class X (lambda (class) X (and (not (and (vector? class) X (> (vector-length class) 0) X (equal? %%class-tag (vector-ref class 0)))) X (error-handler class 6 #!TRUE)))) X X X;;; %sc-name X(define-integrable (%sc-name class) X (vector-ref class 1)) X X;;; %sc-cv X(define-integrable (%sc-cv class) X (vector-ref class 2)) X X;;; %sc-allcvs X(define-integrable (%sc-allcvs class) X (vector-ref class 3)) X X;;; %sc-allivs X(define-integrable (%sc-allivs class) X (vector-ref class 4)) X X;;; %sc-mixins X(define-integrable (%sc-mixins class) X (vector-ref class 5)) X X;;; %sc-inst-template X(define-integrable (%sc-inst-template class) X (vector-ref class 6)) X X;;; %sc-method-env X(define-integrable (%sc-method-env class) X (vector-ref class 7)) X X;;; %sc-class-env X(define-integrable (%sc-class-env class) X (vector-ref class 8)) X X X;;; %sc-method-structure X(define-integrable (%sc-method-structure class) X (vector-ref class 9)) X X;;; %sc-subclasses X(define-integrable (%sc-subclasses class) X (vector-ref class 10)) X X;;; %sc-class-compiled X(define-integrable (%sc-class-compiled class) X (vector-ref class 11)) X X;;; %sc-class-inherited X(define-integrable (%sc-class-inherited class) X (vector-ref class 12)) X X;;; %sc-method-values X(define-integrable (%sc-method-values class) X (vector-ref class 13)) X X(define-integrable (%sc-iv class) X (vector-ref class 14)) X X;;; %sc-set-name X(define-integrable (%sc-set-name class val) X (vector-set! class 1 val)) X X;;; %sc-set-cv X(define-integrable (%sc-set-cv class val) X (vector-set! class 2 val)) X X X;;; %sc-set-allcvs X(define-integrable (%sc-set-allcvs class val) X (vector-set! class 3 val)) X X;;; %sc-set-allivs X(define-integrable (%sc-set-allivs class val) X (vector-set! class 4 val)) X X;;; %sc-set-mixins X(define-integrable (%sc-set-mixins class val) X (vector-set! class 5 val)) X X;;; %sc-set-inst-template X(define-integrable (%sc-set-inst-template class val) X (vector-set! class 6 val)) X X;;; %sc-set-method-env X(define-integrable (%sc-set-method-env class val) X (vector-set! class 7 val)) X X;;; %sc-set-class-env X(define-integrable (%sc-set-class-env class val) X (vector-set! class 8 val)) X X;;; %sc-set-method-structure X(define-integrable (%sc-set-method-structure class val) X (vector-set! class 9 val)) X X;;; %sc-set-subclasses X(define-integrable (%sc-set-subclasses class val) X (vector-set! class 10 val)) X X X;;; %sc-set-class-compiled X(define-integrable (%sc-set-class-compiled class val) X (vector-set! class 11 val)) X X;;; %sc-set-class-inherited X(define-integrable (%sc-set-class-inherited class val) X (vector-set! class 12 val)) X X;;; %sc-set-method-values X(define-integrable (%sc-set-method-values class val) X (vector-set! class 13 val)) X X;;; %sc-set-iv X(define-integrable (%sc-set-iv class val) X (vector-set! class 14 val)) X X X;;; X(define %sc-name->class X (lambda (name) X (apply-if (getprop name '%class) X (lambda (a) a) X (error-handler name 2 #!TRUE)))) X X;;; %sc-get-meth-value X(define-integrable (%sc-get-meth-value meth-name class) X (cdr (assq meth-name (%sc-method-values class)))) X X;;; %sc-get-cv-value X(define-integrable (%sc-get-cv-value var class) X (cadr (assq var (%sc-cv class)))) X X;;; %sc-concat X(define-integrable (%sc-concat str sym) X (string->symbol (string-append str (symbol->string sym)))) X X X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X;;; ;;; X;;; S c o o p s ;;; X;;; ;;; X;;; ;;; X;;; Rewritten 5/20/87 for cscheme ;;; X;;; by Steve Sherin--U of P ;;; X;;; File : methods.scm ;;; X;;; ;;; X;;; Amitabh Srivastava ;;; X;;; ;;; X;;; This file handles the addition/redefinition of methods. ;;; X;;; ;;; X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X X X;;; is class1 before class2 in class ? X;;; class1 is not equal to class2 X X(define %before X (lambda (class1 class2 class) X (or (eq? class1 class) X (memq class2 (memq class1 (%sc-mixins (%sc-name->class class))))))) X X;;; DEFINE-METHOD X(syntax-table-define system-global-syntax-table 'DEFINE-METHOD X (macro e X (let ((class-name (caar e)) X (method-name (cadar e)) X (formal-list (cadr e)) X (body (cddr e))) X `(%sc-class-add-method X ',class-name X ',method-name X ',class-name X ',class-name X (append (list 'lambda ',formal-list) ',body) X (lambda (env quoted-val) X (let* ((method-name ',method-name) X (temp `(in-package ,env X (define ,method-name X ,quoted-val)))) X (eval temp (the-environment))) X ))))) X;;; X X(define %sc-class-add-method X (lambda (class-name X method-name X method-class X mixin-class X method X assigner) X (let ((class (%sc-name->class class-name))) X (begin X (let ((temp (assq method-name (%sc-method-values class)))) X (if temp X (set-cdr! temp method) X (%sc-set-method-values X class X (cons (cons method-name method) (%sc-method-values class)))))) X (%compiled-add-method class-name method-name method-class mixin-class X method assigner)))) X;;; X X(define %inform-subclasses X (lambda (class-name method-name method-class mixin-class method assigner) X ((rec loop X (lambda (class-name method-name method-class mixin-class X method assigner subclass) X (if subclass X (begin X (%compiled-add-method X (car subclass) method-name method-class class-name X method assigner) X (loop class-name method-name method-class mixin-class X method assigner X (cdr subclass)))))) X class-name method-name method-class mixin-class method assigner X (%sc-subclasses (%sc-name->class class-name))))) X;;; X X(define %compiled-add-method X (lambda (class-name X method-name X method-class X mixin-class X method X assigner) X (letrec X ((class (%sc-name->class class-name)) X X (insert-entry X (lambda (previous current) X (cond ((null? current) X (set-cdr! previous X (cons (cons method-class mixin-class) '()))) X ((eq? mixin-class (cdar current)) X (set-car! (car current) method-class)) X ((%before mixin-class (cdar current) X class-name) X (set-cdr! previous X (cons (cons method-class mixin-class) current))) X (else '())))) X X X (loop-insert X (lambda (previous current) X (if (not (insert-entry previous current)) X (loop-insert (current) (cdr current))))) X X (insert X (lambda (entry) X (if (insert-entry entry (cdr entry)) ;;; insert at head X (add-to-environment) X (loop-insert (cdr entry) (cddr entry))))) X X (add-to-environment X (lambda () X (begin X (if (%sc-class-compiled class) X (assigner (%sc-method-env class) method)) X (if (%sc-subclasses class) X (%inform-subclasses class-name method-name method-class X mixin-class method assigner))))) X X (add-entry X (lambda () X (begin X (%sc-set-method-structure class X (cons (list method-name (cons method-class mixin-class)) X (%sc-method-structure class))) X (add-to-environment)))) X ) X X (let ((method-entry (assq method-name (%sc-method-structure class)))) X (if method-entry X (insert method-entry) X (add-entry)) X method-name)))) X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X;;; ;;; X;;; S c o o p s ;;; X;;; ;;; X;;; ;;; X;;; Rewritten 5/20/87 for cscheme ;;; X;;; by Steve Sherin--U of P ;;; X;;; File : meth2.scm ;;; X;;; ;;; X;;; Amitabh Srivastava ;;; X;;; ;;; X;;; This file handles the deletion of a method from a class. ;;; X;;; ;;; X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X X;;; DELETE-METHOD X(syntax-table-define system-global-syntax-table 'DELETE-METHOD X (macro e X (let ((class-name (caar e)) X (method-name (cadar e))) X `(%sc-class-del-method X ',class-name X ',method-name X ',class-name X ',class-name X (LAMBDA (ENV VAL) X (SET! (ACCESS ,method-name ENV) VAL)) X #!false)))) X;;; X X(define %deleted-method X (lambda (name) X (lambda args X (error-handler name 3 #!TRUE)))) X;;; X X(define %sc-class-del-method X (lambda (class-name method-name method-class mixin-class assigner del-value) X (let ((class (%sc-name->class class-name))) X (let ((temp (assq method-name (%sc-method-values class)))) X (if temp X (begin X (%sc-set-method-values class X (delq! temp (%sc-method-values class))) X (%compiled-del-method class-name method-name method-class mixin-class X assigner del-value)) X X (error-handler method-name 4 #!true)))))) X;;; X X(define %inform-del-subclasses X (lambda (class-name method-name method-class mixin-class assigner del-value) X ((rec loop X (lambda (class-name method-name method-class mixin-class assigner X del-value subclass) X (if subclass X (begin X (%compiled-del-method (car subclass) method-name X method-class class-name assigner del-value) X (loop class-name method-name method-class mixin-class assigner X del-value (cdr subclass)))))) X class-name method-name method-class mixin-class assigner del-value X (%sc-subclasses (%sc-name->class class-name))))) X;;; X X(define %compiled-del-method X (lambda (class-name method-name method-class mixin-class assigner del-value) X (let ((class (%sc-name->class class-name))) X (letrec X ((delete-entry X (lambda (previous current) X (cond ((eq? mixin-class (cdar current)) X (set-cdr! previous (cdr current)) #!TRUE) X (else #!FALSE)))) X X (loop-delete X (lambda (previous current) X (cond ((or (null? current) X (%before mixin-class (cdar previous) X class-name)) X (error-handler method-name 4 #!TRUE)) X ((delete-entry previous current) #!TRUE) X (else (loop-delete current (cdr current)))))) X X (delete X (lambda (entry) X (if (delete-entry entry (cdr entry)) ;;; delete at head X (modify-environment entry) X (loop-delete (cdr entry) (cddr entry))))) X X (modify-environment X (lambda (entry) X (cond ((null? (cdr entry)) X (%sc-set-method-structure class X (delq! (assq method-name (%sc-method-structure class)) X (%sc-method-structure class))) X (if (%sc-class-compiled class) X (assigner (%sc-method-env class) X (or del-value X (set! del-value X (%deleted-method method-name))))) X (if (%sc-subclasses class) X (%inform-del-subclasses class-name method-name X method-class mixin-class assigner del-value))) X (else X (let ((meth-value X (%sc-get-meth-value method-name X (%sc-name->class (caadr entry))))) X (if (%sc-class-compiled class) X (assigner (%sc-method-env class) meth-value)) X (if (%sc-subclasses class) X (%inform-subclasses class-name X method-name X method-class X mixin-class X meth-value assigner))))))) X ) X X (let ((method-entry (assq method-name (%sc-method-structure class)))) X (if method-entry X (delete method-entry) X (error-handler method-name 4 #!TRUE)) X method-name))))) X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X;;; ;;; X;;; S c o o p s ;;; X;;; ;;; X;;; ;;; X;;; Rewritten 5/20/87 for cscheme ;;; X;;; by Steve Sherin--U of P ;;; X;;; File : instance.scm ;;; X;;; ;;; X;;; Amitabh Srivastava ;;; X;;; ;;; X;;; This file contains compiling and making of an instance. ;;; X;;; ;;; X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X X;;; COMPILE-CLASS X(syntax-table-define system-global-syntax-table 'COMPILE-CLASS X (macro e X `(let* ((class ,(car e)) X (name (%sc-name class))) X (if (%sc-class-compiled class) X name X (begin X (%inherit-method-vars class) X (eval (%make-template name class) (the-environment))))))) X;;; X X(define (%sc-compile-class class) X (begin X (%inherit-method-vars class) X (eval (%make-template (%sc-name class) class) X user-initial-environment))) X X;;; MAKE-INSTANCE X(syntax-table-define system-global-syntax-table 'MAKE-INSTANCE X (macro e X (cons (list '%sc-inst-template (car e)) (cdr e)))) X;;; X X(define %uncompiled-make-instance X (lambda (class) X (lambda init-msg X (%sc-compile-class class) X (apply (%sc-inst-template class) init-msg)))) X;;; X X(define %make-template X (lambda (name class) X `(begin X;;; do some work to make compile-file work X (%sc-set-allcvs ,name ',(%sc-allcvs class)) X (%sc-set-allivs ,name ',(%sc-allivs class)) X (%sc-set-method-structure ,name X ',(%sc-method-structure class)) X;;; prepare make-instance template X (%sc-set-inst-template ,name X ,(%make-inst-template (%sc-allcvs class) X (%sc-allivs class) X (%sc-method-structure class) X name class)) X (%sc-method-thrust ,name) X (%sc-set-class-compiled ,name #!TRUE) X (%sc-set-class-inherited ,name #!TRUE) X (%sign-on ',name ,name) X ',name))) X;;; X X(define %make-inst-template X (lambda (cvs ivs method-structure name class) X (let ((methods '((%*methods*% '-))) X (classvar (append cvs '((%*classvars*% '-)))) X (instvar (append ivs '((%*instvars*% '-))))) X;;; dummy variables are added to methods, cvs, and ivs to prevent the X;;; compiler from folding them away. X `(let ,classvar X (%sc-set-class-env ,name (the-environment)) X (let ,methods X (%sc-set-method-env ,name (the-environment)) X (let ((%sc-class ,name)) X (lambda %sc-init-vals X (let ,instvar X (the-environment))))))))) X X X X;;; %sc-method-thrust evaluates each method in the method-environment X;;; for the class, enabling methods to grab free variables from the X;;; class-environment without a special code-replacement call. X X(define (%sc-method-thrust class) X (define (iter binding-pair) X (let* ((method-name (car binding-pair)) X (quoted-val (cdr binding-pair)) X (temp `(in-package (%sc-method-env class) X (define ,method-name ,quoted-val)))) X (eval temp (the-environment)))) X(mapcar iter (%sc-method-values class))) X X X X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X;;; ;;; X;;; S c o o p s ;;; X;;; ;;; X;;; ;;; X;;; Rewritten 5/20/87 for cscheme ;;; X;;; by Steve Sherin--U of P ;;; X;;; File : inht.scm ;;; X;;; ;;; X;;; Amitabh Srivastava ;;; X;;; ;;; X;;; This file contains routines to handle inheritance. ;;; X;;; ;;; X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X X;;; X X(define %inherit-method-vars X (lambda (class) X (or (%sc-class-inherited class) X (%inherit-from-mixins X (%sc-allcvs class) X (%sc-allivs class) X (%sc-method-structure class) X (%sc-mixins class) X class X (lambda (class cvs ivs methods) X (%sc-set-allcvs class cvs) X (%sc-set-allivs class ivs) X (%sc-set-method-structure class methods) X (%sc-set-class-inherited class #!true) X (%sign-on (%sc-name class) class) X class))))) X;;; X X(define %sign-on X (lambda (name class) X (mapcar X (lambda (mixin) X (let* ((mixin-class (%sc-name->class mixin)) X (subc (%sc-subclasses mixin-class))) X (if (not (%sc-class-inherited mixin-class)) X (%inherit-method-vars mixin-class)) X (or (memq name subc) X (%sc-set-subclasses mixin-class (cons name subc))))) X (%sc-mixins class)))) X;;; X X(define %inherit-from-mixins X (letrec X ((insert-entry X (lambda (entry class1 method-entry name2 previous current) X (cond ((null? current) X (set-cdr! previous X (cons (cons (caadr method-entry) name2) '()))) X ((%before name2 (cdar current) (%sc-name class1)) X (set-cdr! previous X (cons (cons (caadr method-entry) name2) current))) X (else '())))) X X (insert X (lambda (struct1 entry class1 struct2 name2) X ((rec loop-insert X (lambda (struct1 entry class1 struct2 name2 previous current) X (if (insert-entry entry class1 struct2 name2 previous current) X struct1 X (loop-insert struct1 entry class1 struct2 name2 X current (cdr current))))) X struct1 entry class1 struct2 name2 entry (cdr entry)))) X X (add-entry X (lambda (struct1 class1 method-entry name2) X (cons (list (car method-entry) (cons (caadr method-entry) name2)) X struct1))) X X (combine-methods X (lambda (struct1 class1 struct2 name2) X (if struct2 X (combine-methods X (let ((entry (assq (caar struct2) struct1))) X (if entry X (insert struct1 entry class1 (car struct2) name2) X (add-entry struct1 class1 (car struct2) name2))) X class1 X (cdr struct2) X name2) X struct1))) X X (combine-vars X (lambda (list1 list2) X (if list2 X (combine-vars X (if (assq (caar list2) list1) X list1 X (cons (car list2) list1)) X (cdr list2)) X list1))) X ) X X (lambda (cvs ivs methods mixins class receiver) X ((rec loop-mixins X (lambda (cvs ivs methods mixins class receiver) X (if mixins X (let ((mixin-class (%sc-name->class (car mixins)))) X (%inherit-method-vars mixin-class) X (loop-mixins X (combine-vars cvs (%sc-allcvs mixin-class)) X (combine-vars ivs (%sc-allivs mixin-class)) X (combine-methods methods class X (%sc-method-structure mixin-class) (car mixins)) X (cdr mixins) X class X receiver)) X (receiver class cvs ivs methods )))) X cvs ivs methods mixins class receiver)))) X X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X;;; ;;; X;;; S c o o p s ;;; X;;; ;;; X;;; ;;; X;;; Rewritten 5/20/87 for cscheme ;;; X;;; by Steve Sherin--U of P ;;; X;;; File : interf.scm ;;; X;;; ;;; X;;; Amitabh Srivastava ;;; X;;; ;;; X;;; This file contains class definition and processing of ;;; X;;; define-class. ;;; X;;; ;;; X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X X;;; DEFINE-CLASS X(syntax-table-define system-global-syntax-table 'DEFINE-CLASS X (macro e X (let ((name (car e)) X (classvars '()) X (instvars '()) (mixins '()) X (options '()) X (allvars '()) X (method-values '())(inits '())) X (letrec X ((chk-class-def X (lambda (deflist) X (if deflist X (begin X (cond ((eq? (caar deflist) 'classvars) X (set! classvars (cdar deflist))) X ((eq? (caar deflist) 'instvars) X (set! instvars (cdar deflist))) X ((eq? (caar deflist) 'mixins) X (set! mixins (cdar deflist))) X ((eq? (caar deflist) 'options) X (set! options (cdar deflist))) X (else (error-handler (caar deflist) 0 '()))) X (chk-class-def (cdr deflist))) X (update-allvars)))) X X (update-allvars X (lambda () X (set! allvars X (append (mapcar (lambda (a) (if (symbol? a) a (car a))) X classvars) X (mapcar (lambda (a) (if (symbol? a) a (car a))) X instvars))))) X X X (chk-option X (lambda (opt-list) X (let loop ((opl opt-list)(meths '())) X (if opl X (loop X (cdr opl) X (cond ((eq? (caar opl) 'gettable-variables) X (append (generate-get (cdar opl)) meths)) X ((eq? (caar opl) 'settable-variables) X (append (generate-set (cdar opl)) meths)) X ((eq? (caar opl) 'inittable-variables) X (set! inits (cdar opl)) meths) X (else (error-handler (car opl) 1 '())))) X meths)))) X X (chk-cvs X (lambda (list-var) X (mapcar X (lambda (a) X (if (symbol? a) X (list a #!false) X a)) X list-var))) X X (chk-init X (lambda (v-form) X (if (memq (car v-form) inits) X `(,(car v-form) X (let ((temp (memq ',(car v-form) %sc-init-vals))) X ;was '%sc-init-vals X (if temp (cadr temp) X ,(cadr v-form)))) X v-form))) X X (chk-ivs X (lambda (list-var) X (mapcar X (lambda (var) X (chk-init X (cond ((symbol? var) (list var #!false)) X ((not-active? (cadr var)) var) X (else (active-val (car var) (cadr var)))))) X list-var))) X X (not-active? X (lambda (a) X (or (not (pair? a)) X (not (eq? (car a) 'active))))) X X (empty-slot? X (lambda (form) X (cond X ((symbol? form) #f) X ((eq? form #f) #t) X (else #f)))) X X (active-val X (lambda (var active-form) X (let loop ((var var)(active-form active-form) X (getfns '())(setfns '%sc-val)) X (if (not-active? (cadr active-form)) X (create-active X var X (if (empty-slot? (caddr active-form)) X getfns X (cons (caddr active-form) getfns)) X (list 'set! var X (if (empty-slot? (cadddr active-form)) X setfns X (list (cadddr active-form) setfns))) X (cadr active-form)) X (loop X var X (cadr active-form) X (if (empty-slot? (caddr active-form)) X getfns X (cons (caddr active-form) getfns)) X (if (empty-slot? (cadddr active-form)) X setfns X (list (cadddr active-form) setfns))))))) X X (create-active X (lambda (var getfns setfns localstate) X (begin X (set! method-values X (cons `(CONS ',(concat "GET-" var) X (list 'lambda '() ',(expand-getfns var getfns))) X (cons `(CONS ',(concat "SET-" var) X (list 'lambda (list '%sc-val) X ',setfns)) X method-values))) X (list var localstate)))) X X (expand-getfns X (lambda (var getfns) X (let loop ((var var)(gets getfns)(exp-form var)) X (if gets X (loop X var X (cdr gets) X (list (car gets) exp-form)) X exp-form)))) X (concat X (lambda (str sym) X (string->symbol (string-append str (symbol->string sym))))) X X (generate-get X (lambda (getlist) X (mapcar X (lambda (a) X `(CONS ',(concat "GET-" a) X (list 'lambda '() X ',a))) X getlist))) X X (generate-set X (lambda (setlist) X (mapcar X (lambda (a) X `(CONS ',(concat "SET-" a) X (list 'lambda (list '%sc-val) X (list 'set! ',a '%sc-val)))) X setlist))) X X ) X X;; define-class begins here. X X (begin X (chk-class-def (cdr e)) X (set! method-values X (chk-option X (mapcar (lambda (a) (if (symbol? a) (cons a allvars) a)) X options))) X (set! instvars (if instvars (chk-ivs instvars))) X;; Evaluate here so that active-value functions are generated properly. X;; --Steve Sherin X (set! classvars (if classvars (chk-cvs classvars))) X X (eval X `(DEFINE ,name X (%SC-MAKE-CLASS X ',name X ',classvars X ',instvars X ',mixins X ,(if method-values (cons 'list method-values)) X )) X user-initial-environment) X ))))) X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X;;; ;;; X;;; S c o o p s ;;; X;;; ;;; X;;; ;;; X;;; Rewritten 5/20/87 for cscheme ;;; X;;; by Steve Sherin--U of P ;;; X;;; File : send.scm ;;; X;;; ;;; X;;; Amitabh Srivastava ;;; X;;; ;;; X;;;-----------------------------------------------------------------;;; X;;; One does not have to use the SEND form to invoke methods ;;; X;;; in the same class; they can be invoked as Scheme functions. ;;; X;;; ;;; X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X X;;; SEND X(syntax-table-define system-global-syntax-table 'SEND X (macro e X X (let ((args (cddr e)) X (msg (cadr e)) X (obj (car e))) X `(let* ((set-parent! (access system-environment-set-parent! X environment-package)) X (ep environment-parent) X (ibot ,obj) X (itop (ep (ep ibot))) X (ipar (ep itop)) X (class (access %sc-class ibot)) X (ctop (%sc-class-env class)) X (cpar (ep ctop)) X (cbot (%sc-method-env class)) X (instance-safe? (eq? ipar cbot))) X X (without-interrupts X (lambda () X (dynamic-wind X (lambda () X (set-parent! ctop ibot) X (if instance-safe? X (set-parent! itop cpar))) X X X (lambda () X (in-package cbot (,msg ,@args))) X X (lambda () X (set-parent! ctop cpar) X (set-parent! itop cbot)) X ))))))) X X X;;; SEND-IF-HANDLES X(syntax-table-define system-global-syntax-table 'SEND-IF-HANDLES X (macro e X (let ((obj (car e)) X (msg (cadr e)) X (args (cddr e))) X `(let X ((self ,obj)) X X (if (assq ',msg (%sc-method-structure (access %sc-class self))) X (send self ,msg ,@args) X #!false))))) X X X X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X;;; ;;; X;;; S c o o p s ;;; X;;; ;;; X;;; ;;; X;;; Rewritten 5/20/87 for cscheme ;;; X;;; by Steve Sherin--U of P ;;; X;;; File : utl.scm ;;; X;;; ;;; X;;; Amitabh Srivastava ;;; X;;; ;;; X;;; This file contains misc. routines ;;; X;;; ;;; X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X X X;;; Error handler. Looks up the error message in the table and X;;; prints it. X X(define error-handler X (let ((error-table X (let ((table (make-vector 8))) X (vector-set! table 0 " Invalid class definition ") X (vector-set! table 1 " Invalid option ") X (vector-set! table 2 " Class not defined ") X (vector-set! table 3 " Method has been deleted ") X (vector-set! table 4 " Method is not present ") X (vector-set! table 5 " Variable is not present") X (vector-set! table 6 " Not a Scoops Class") X (vector-set! table 7 " Class not compiled ") X table))) X (lambda (msg number flag) X (if flag X (error (vector-ref error-table number) msg) X (breakpoint (vector-ref error-table number) msg))))) X X X;;; some functions defined globally which will be moved locally later X X (define %sc-class-description X (lambda (class) X (writeln " ") X (writeln " CLASS DESCRIPTION ") X (writeln " ================== ") X (writeln " ") X (writeln " NAME : " (%sc-name class)) X (writeln " CLASS VARS : " X (mapcar car (%sc-allcvs class))) X (writeln " INSTANCE VARS : " X (mapcar car (%sc-allivs class))) X (writeln " METHODS : " X (mapcar car (%sc-method-structure class))) X (writeln " MIXINS : " (%sc-mixins class)) X (writeln " CLASS COMPILED : " (%sc-class-compiled class)) X (writeln " CLASS INHERITED : " (%sc-class-inherited class)) X )) X;;; X X (define %sc-inst-desc X (lambda (inst) X (letrec ((class (access %sc-class inst)) X (printvars X (lambda (f1 f2) X (if f1 ; another var X (begin X (writeln " " (caar f1) " : " X (cadr (assq (caar f1) f2))) X;; environment bindings in list form vs. pair form. Steve Sherin X (printvars (cdr f1) f2)) X *the-non-printing-object*)))) X (writeln " ") X (writeln " INSTANCE DESCRIPTION ") X (writeln " ==================== ") X (writeln " ") X (writeln " Instance of Class : " (%sc-name class)) X (writeln " ") X (writeln " Class Variables : ") X (printvars (%sc-allcvs class) X (environment-bindings (%sc-class-env class))) X (writeln " ") X (writeln " Instance Variables :") X (printvars (%sc-allivs class) (environment-bindings inst)) X ))) X X;;; X(define %scoops-chk-class-compiled X (lambda (name class) X (or (%sc-class-compiled class) X (error-handler name 7 #!true)))) X X;;; X(define %sc-class-info X (lambda (fn) X (lambda (class) X (%scoops-chk-class class) X (mapcar car (fn class))))) X X;;; ALL-CLASSVARS X(set! all-classvars (%sc-class-info %sc-allcvs)) X X;;; ALL-INSTVARS X(set! all-instvars (%sc-class-info %sc-allivs)) X X;;; ALL-METHODS X(set! all-methods (%sc-class-info %sc-method-structure)) X X;;; (CLASS-COMPILED? CLASS) X(set! class-compiled? X (lambda (class) X (%scoops-chk-class class) X (%sc-class-compiled class))) X X;;; (CLASS-OF-OBJECT OBJECT) X(syntax-table-define system-global-syntax-table 'CLASS-OF-OBJECT X (macro e X `(%sc-name (access %sc-class ,(car e))))) X X;;; CLASSVARS X(set! classvars (%sc-class-info %sc-cv)) X X;;; DESCRIBE X(set! describe X (lambda (class-inst) X (if (vector? class-inst) X (begin X (%scoops-chk-class class-inst) X (%sc-class-description class-inst)) X (%sc-inst-desc class-inst)))) X X;;; (GETCV CLASS VAR) X(syntax-table-define system-global-syntax-table 'GETCV X (macro e X (let ((class (car e)) X (var (cadr e))) X `(begin X (and (%sc-name->class ',class) X (%scoops-chk-class-compiled ',class ,class)) X ((access ,(%sc-concat "GET-" var) (%sc-method-env ,class))))))) X X;;; INSTVARS X(set! instvars (%sc-class-info %sc-iv)) X X;;; METHODS X(set! methods (%sc-class-info %sc-method-values)) X X;;; MIXINS X(set! mixins X (lambda (class) X (%scoops-chk-class class) X (%sc-mixins class))) X X;;; (NAME->CLASS NAME) X(syntax-table-define system-global-syntax-table 'NAME->CLASS X (macro e X `(%sc-name->class ,(car e)))) X X;;; (RENAME-CLASS (CLASS NEW-NAME)) X(syntax-table-define system-global-syntax-table 'RENAME-CLASS X (macro e X (let ((class (caar e)) X (new-name (cadar e))) X `(begin X (%sc-name->class ',class) X (%sc-set-name ,class ',new-name) X (eval (define ,new-name ,class) user-initial-environment) X ',new-name)))) X X;;; (SETCV CLASS VAR VAL) X(syntax-table-define system-global-syntax-table 'SETCV X (macro e X (let ((class (car e)) X (var (cadr e)) X (val (caddr e))) X `(begin X (and (%sc-name->class ',class) X (%scoops-chk-class-compiled ',class ,class)) X ((access ,(%sc-concat "SET-" var) (%sc-method-env ,class)) ,val))))) X X;; end scoops-package environment ________This_Is_The_END________ if test `wc -l < scoops.scm` -ne 1163; then echo 'shar: scoops.scm was damaged during transit (should have been 1163 lines)' fi fi ; : end of overwriting check exit 0 -- Mike Clarkson mike@ists.UUCP Institute for Space and Terrestrial Science mike@ists.ists.ca York University, North York, Ontario, uunet!mnetor!yunexus!ists!mike CANADA M3J 1P3 +1 (416) 736-5611  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 31 Mar 89 21:04:33 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 31 Mar 89 20:56:44 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 31 Mar 89 07:21:09 GMT From: mailrus!jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!ists!mike@ohio-state.arpa (Mike Clarkson) Organization: Institute for Space and Terrestrial Science Subject: TI Scheme functions for MIT C-Scheme - 1 of 3 Message-Id: <371@ists.ists.ca> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu This is a package of functions and macros to make MIT C-Scheme work with TI Scheme code. This package has some nice features such as auto-loading, and it allows you to use the TI Scheme manual, which is worth buying a copy of PC Scheme for on its own. Also included is Kent Dybvig's extend-syntax, and TI's SCOOPS. See the README file for a (meagre) description of what it does and doesn't do. It is incomplete and is still being worked on; I will post revisions to the net as new versions are finished. You may wish to keep a virgin copy of this around so that I can send out official patches for application by Larry Wall's patch program. Similarly, you may wish to send me context diffs of bugs and improvements, relative to the virgin distribution. Snip here and feed to sh. Mike. #--------------------------------CUT HERE------------------------------------- #! /bin/sh # # This is a shell archive. Save this into a file, edit it # and delete all lines above this comment. Then give this # file to sh by executing the command "sh file". The files # will be extracted into the current directory owned by # you with default permissions. # # The files contained herein are: # # -rw-r--r-- 1 mike 4392 Mar 30 14:35 README # -rw-r----- 1 mike 2451 Mar 30 14:35 auto-load.scm # -rw-r--r-- 1 mike 309 Mar 30 14:35 compile-the-files.scm # -rw-r----- 1 mike 4044 Mar 30 14:35 escape.scm # -rw-r--r-- 1 mike 10153 Mar 30 14:35 extend.scm # -rw-r----- 1 mike 1013 Mar 30 14:35 graphics.scm # -rw-r----- 1 mike 668 Mar 30 14:35 parser-escape.scm # -rw-r----- 1 mike 4788 Mar 30 14:35 scoops.doc # echo 'x - README' if test -f README; then echo 'shar: not overwriting README'; else sed 's/^X//' << '________This_Is_The_END________' > README X X TI PC COMPATIBILITY PACKAGE X X X Version 1.0 X March 1989 X X For MIT C-Scheme 6.2.2 X XThis directory contains a set of files to make MIT C-Scheme behave like XTI's PC-Scheme. It is incomplete and is still being worked on; I will post Xrevisions to the net as new versions are finished. This package has some Xnice features such as auto-loading, and it allows you to use the TI Scheme Xmanual, which is worth buying a copy of PC Scheme for on its own. X XMost of the code is in the file "ti.scm". Look through that file Xfor an idea of what has been added or replaced (use the source, Luke!). XIn the true MIT tradition, it is very sparsely commented. X XTo use these modifications, set the environment variable TISCHEME to Xthe directory where the files are located X X setenv TISCHEME X XAlso set the environment variable SCHEME to the directory where the XMIT C-Scheme runtime files are located X X setenv SCHEME /usr/local/src/scheme/runtime X XAnd finally, include the line X X (load "$TISCHEME/ti") X Xin your ~/.scheme.init initialization file. X XThe compile all of the files, cd to the $TISCHEME directory, start Xup a copy of C-Scheme (version 6.1 or 6.2), and X X (load "compile-the-files.scm") X XNotes: X----- X XThe auto-loading sometimes tries to auto-load define variables, if the same Xvariable name is on the auto-load list. The net result is usually harmless. XIf I can figure out a better way of auto-loading, I will post it. X XThe TI Scheme MACRO form has been renamed to TI-MACRO, to avoid conflict Xwith the MIT macro form. X XKent Dybvig's extend-syntax has been included, in an updated form from Xwhat is included with TI-Scheme 3.02. The reference manual for this is X X The Scheme Programming Language X R. Kent Dybvig X Prentice-Hall, Englewood Cliffs, New Jersey, 07632 (1987) X Library of Congress Catalog Card Number 86-63489 X XAs it is not a part of the TI Scheme dialect per se, it is not set to Xautoload. Do (load "extend.scm") to load this. X XThe SCOOPS code appears to work, but I have not tested it much. XThere are some notes previously distributed on the net in scoops.doc, Xbut the best reference is Chapter 5 of the TI-Scheme Reference Manual. X XThe SORT! will only destructively sort vectors, although it accepts lists. X XThe parser escape for |funny atoms| is implemented only for the reader. XDisplaying a funny atom will not result in |funny atom| as it should. X XNot Yet Done: X------------ X XThere a number of functions that have not been converted yet. XMost of these have been defined to raise an error with the message X X Not implemented yet. X XAmong the functions that are missing include: X X ALIAS (I can't figure out the right incantation) X ASSERT X GET-FILE-POSITION (Needs support in C for opening files with append) X (SET! (VECTOR-REF vector n) value) (not implemented yet) X (SET! (FLUID var) value) (not implemented yet) X SYNTAX (Conflicts with the MIT syntax) X XThe windows code will have to wait until the next release of C-Scheme, Xwhich should have some windowing code to support Edwin: X X CURRENT-COLUMN X EDWIN X FRESH-LINE X WINDOW-CLEAR X WINDOW-DELETE X WINDOW-GET-ATTRIBUTE X WINDOW-GET-CURSOR X WINDOW-GET-POSITION X WINDOW-GET-SIZE X WINDOW-POPUP X WINDOW-POPUP-DELETE X WINDOW-RESTORE-CONTENTS X WINDOW-SAVE-CONTENTS X WINDOW-SET-ATTRIBUTE! X WINDOW-SET-CURSOR! X WINDOW-SET-POSITION! X WINDOW-SET-SIZE! X WINDOW? X XEngines have not been implemented, though I may look at making kwh's Xtasks act like engines: X X MAKE-ENGINE X ENGINE-RETURN X XNone of the graphics have been implemented. Maybe someone familiar with the XC-Scheme Xlib code could make something... X X CLEAR-GRAPHICS X CLEAR-POINT X DRAW-BOX-TO X DRAW-FILLED-BOX-TO X DRAW-LINE-TO X DRAW-POINT X GET-PEN-COLOR X GET-VIDEO-MODE X *GRAPHICS-COLORS* X IS-POINT-ON? X POINT-COLOR X POSITION-PEN X XThe line editor hasn't been ported, but in these days od Gnu, does anyone Xreall care? X X EDIT X XPlease send bug reports to me, and any unimplemented functions that you Xmay have. If possible, keep a virgin copy of this distribution, and send Xme context diffs to apply by Larry Wall's patch program. I will distribute Xminor version patches in this form. X X XMike Clarkson mike@ists.ists.ca XInstitute for Space and Terrestrial Science mike@ists.uucp XYork University, North York, Ontario, uunet!mnetor!yunexus!ists!mike XCANADA M3J 1P3 +1 (416) 736-5611 ________This_Is_The_END________ if test `wc -l < README` -ne 146; then echo 'shar: README was damaged during transit (should have been 146 lines)' fi fi ; : end of overwriting check echo 'x - auto-load.scm' if test -f auto-load.scm; then echo 'shar: not overwriting auto-load.scm'; else sed 's/^X//' << '________This_Is_The_END________' > auto-load.scm X(declare (usual-integrations)) X X(define (autoload-from-file filename variables #!optional environment) X (if (unassigned? environment) X (set! environment (the-environment))) X (for-each (lambda (var) X (2d-put! var 'AUTOLOAD (cons filename environment))) X variables) X variables) X X(in-package syntaxer-package X X (define (syntax? item #!optional table) X (if (unassigned? table) (set! table *rep-current-syntax-table*)) X (syntax-table-ref table item)) X X (define (autoload variable-name) X (if (and (symbol? variable-name) (2d-get variable-name 'AUTOLOAD)) X (do-autoload variable-name))) X X (define (do-autoload name) X (if (symbol? name) X (let ((file-env (2d-get name 'autoload))) X (if file-env X (let ((file (car file-env)) X (env (cdr file-env))) X ; remove it just in case it doesn't define it. X ; or in case it references itself X (remove-from-autoloads file) X (display "Autoloading from file ") (display file) X (display " to define ") (display name) (newline) X;; (set! env *rep-current-environment*) ; for the moment X (load file env) X (if (and (lexical-unreferenceable? env name) X (not (syntax? name syntax-table))) X (begin X (beep) X (display "Autoloading failed to define ") (display name) X (display " in environment ") (display env) X (newline)) X (begin X (display "Autoloading done.") (newline)))))))) X X(define (list-all-autoloads) X (2d-get-alist-y 'autoload)) X X (define (remove-from-autoloads filename) X "Remove all autoloads associated with this file" X (for-each X (lambda (al) X (2d-remove! (car al) 'AUTOLOAD)) X (list-transform-positive X (list-all-autoloads) X (lambda (elt) X (string-ci=? (cadr elt) filename))))) X X;; Alter the syntaxer to check for autoloading X;; modify syntax-expression to autoload if neccesary X X (define (syntax-expression expression) X (if (and (symbol? expression) X (lexical-unreferenceable? *rep-current-environment* expression) X (not (syntax? expression syntax-table))) X (autoload expression)) X (cond ((pair? expression) X (let ((quantum (syntax-table-ref syntax-table (car expression)))) X (if quantum X (fluid-let ((saved-keyword (car expression))) X (quantum expression)) X (make-combination (syntax-expression (car expression)) X (syntax-expressions (cdr expression)))))) X ((symbol? expression) X (make-variable expression)) X (else X expression)))) X ________This_Is_The_END________ if test `wc -l < auto-load.scm` -ne 76; then echo 'shar: auto-load.scm was damaged during transit (should have been 76 lines)' fi fi ; : end of overwriting check echo 'x - compile-the-files.scm' if test -f compile-the-files.scm; then echo 'shar: not overwriting compile-the-files.scm'; else sed 's/^X//' << '________This_Is_The_END________' > compile-the-files.scm X;; The order of these file is significant X X(sf "auto-load.scm") X(sf "escape.scm") X X(load "ti.scm") X(sf "parser-escape.scm") X X(sf "sort.scm") X X;; SCOOPS X(sf "scoops.scm") X X;; Files of not implimented stuff. X(sf "graphics.scm") X(sf "window.scm") X X;; The main file that loads or auto-loads the rest ________This_Is_The_END________ if test `wc -l < compile-the-files.scm` -ne 18; then echo 'shar: compile-the-files.scm was damaged during transit (should have been 18 lines)' fi fi ; : end of overwriting check echo 'x - escape.scm' if test -f escape.scm; then echo 'shar: not overwriting escape.scm'; else sed 's/^X//' << '________This_Is_The_END________' > escape.scm X(declare (usual-integrations)) X X(let-syntax ((define-primitives X (macro names X `(BEGIN ,@(map (lambda (name) X `(LOCAL-ASSIGNMENT X SYSTEM-GLOBAL-ENVIRONMENT X ',name X ,(make-primitive-procedure name))) X names))))) X (define-primitives X make-char char-code char-bits char->integer integer->char char->ascii X char-ascii? ascii->char char-upcase char-downcase)) X X(let () X X (define char-type X (microcode-type 'CHARACTER)) X X (define 0-code (char-code (ascii->char #x30))) X (define upper-a-code (char-code (ascii->char #x41))) X (define lower-a-code (char-code (ascii->char #x61))) X (define space-char (ascii->char #x20)) X (define hyphen-char (ascii->char #x2D)) X (define backslash-char (ascii->char #x5C)) X X (define named-codes X `(("Backspace" . #x08) X ("Tab" . #x09) X ("Linefeed" . #x0A) X ("VT" . #x0B) X ("Page" . #x0C) X ("Return" . #x0D) X ("Call" . #x1A) X ("Altmode" . #x1B) X ("Escape" . #x1B) X ("Backnext" . #x1F) X ("Space" . #x20) X ("Rubout" . #x7F) X )) X X (define named-bits X `(("C" . #o01) X ("Control" . #o01) X ("M" . #o02) X ("Meta" . #o02) X ("S" . #o04) X ("Super" . #o04) X ("H" . #o10) X ("Hyper" . #o10) X ("T" . #o20) X ("Top" . #o20) X )) X X (define (-map-> alist string start end) X (define (loop entries) X (and (not (null? entries)) X (let ((key (caar entries))) X (if (substring-ci=? string start end X key 0 (string-length key)) X (cdar entries) X (loop (cdr entries)))))) X (loop alist)) X X (define (<-map- alist n) X (define (loop entries) X (and (not (null? entries)) X (if (= n (cdar entries)) X (caar entries) X (loop (cdr entries))))) X (loop alist)) X X (set! char? X (named-lambda (char? object) X (primitive-type? char-type object))) X X (set! name->char X (named-lambda (name->char string) X (let ((end (string-length string)) X (bits '())) X (define (loop start) X (let ((left (- end start))) X (cond ((zero? left) X (error "Missing character name")) X ((= left 1) X (let ((char (string-ref string start))) X (if (char-graphic? char) X (char-code char) X (error "Non-graphic character" char)))) X (else X (let ((hyphen (substring-find-next-char string start end X hyphen-char))) X (if (not hyphen) X (name->code string start end) X (let ((bit (-map-> named-bits string start hyphen))) X (if (not bit) X (name->code string start end) X (begin (if (not (memv bit bits)) X (set! bits (cons bit bits))) X (loop (1+ hyphen))))))))))) X (let ((code (loop 0))) X (make-char code (apply + bits)))))) X X (define (name->code string start end) X (if (substring-ci=? string start end "Newline" 0 7) X (char-code char:newline) X (or (-map-> named-codes string start end) X (error "Unknown character name" (substring string start end))))) X X (set! char->name X (named-lambda (char->name char #!optional slashify?) X (if (unassigned? slashify?) (set! slashify? false)) X (define (loop weight bits) X (if (zero? bits) X (let ((code (char-code char))) X (let ((base-char (code->char code))) X (cond ((<-map- named-codes code)) X ((and slashify? X (not (zero? (char-bits char))) X (or (char=? base-char backslash-char) X (char-set-member? (access atom-delimiters X parser-package) X base-char))) X (string-append "\\" (char->string base-char))) X ((char-graphic? base-char) X (char->string base-char)) X (else X (string-append ""))))) X (let ((qr (integer-divide bits 2))) X (let ((rest (loop (* weight 2) (integer-divide-quotient qr)))) X (if (zero? (integer-divide-remainder qr)) X rest X (string-append (or (<-map- named-bits weight) X (string-append "")) X "-" X rest)))))) X (loop 1 (char-bits char)))) X X ) ________This_Is_The_END________ if test `wc -l < escape.scm` -ne 143; then echo 'shar: escape.scm was damaged during transit (should have been 143 lines)' fi fi ; : end of overwriting check echo 'x - extend.scm' if test -f extend.scm; then echo 'shar: not overwriting extend.scm'; else sed 's/^X//' << '________This_Is_The_END________' > extend.scm X;;; Copyright (C) 1987 Cadence Research Systems X;;; Permission to copy this software, in whole or in part, to use this X;;; software for any lawful noncommercial purpose, and to redistribute X;;; this software is granted subject to the restriction that all copies X;;; made of this software must include this copyright notice in full. X;;; Cadence makes no warranties or representations of any kind, either X;;; express or implied, including but not limited to implied warranties X;;; of merchantability or fitness for any particular purpose. X X;;; The basic design of extend-syntax is due to Eugene Kohlbecker. See X;;; "E. Kohlbecker: Syntactic Extensions in the Programming Language Lisp", X;;; Ph.D. Dissertation, Indiana University, 1986." The structure of "with" X;;; pattern/value clauses, the method for compiling extend-syntax into X;;; Scheme code, and the actual implementation are due to Kent Dybvig. X X;;; Made available courtesy R. Kent Dybvig X;;; MacScheme conversion by Jeff De Vries X;;; note: requires the use of MacScheme Version 1.2 or greater X X;;; Skim conversion by Alain Deutsch. X;;; C-Scheme conversion by Mike Clarkson (mike@ists.ists.ca). X X(declare (usual-integrations)) X X(in-package system-global-environment X (define (add-syntax! name expander) X (SYNTAX-TABLE-DEFINE SYSTEM-GLOBAL-SYNTAX-TABLE name expander) X name) X ) X X;;; GENSYM X;; Make gensym a version of generate-uninterned-symbol that accepts X;; a number or a string, as well as a symbol as the optional argument X(define gensym X (let ((name-counter 0) X (name-prefix "G")) X (define (get-number) X (let ((result name-counter)) X (set! name-counter (1+ name-counter)) X result)) X (named-lambda (gensym #!optional argument) X (if (not (unassigned? argument)) X (cond ((string? argument) X (set! name-prefix argument)) X ((symbol? argument) X (set! name-prefix (symbol->string argument))) X ((integer? argument) X (set! name-counter argument)) X (else X (error "Bad argument: GENSYM" X argument)))) X (string->uninterned-symbol X (string-append name-prefix (write-to-string (get-number))))))) X X;;; IF X(set! undefined-conditional-branch '()) X X;;; MACRO X(add-syntax! 'TI-MACRO X (macro (symbol def) X (let ((var (caadr def)) X (body (cddr def))) X (display body) X `(add-syntax! X ',symbol X (macro ,var X (let ((,var (cons ',symbol ,var))) X ,@body)))))) X X;;; WHEN X(add-syntax 'WHEN X (macro args X `(if ,(car args) X (begin ,@(cdr args))))) X X;;; UNLESS X(add-syntax! 'UNLESS X (macro args X `(if ,(car args) #t X (begin ,@(cdr args))))) X X X(define syntax-match?) X(define andmap) X X(define extend-package X (make-environment X X (define (cadadr x) (car (cdr (car (cdr x))))) X (define (cadddr x) (car (cdr (cdr (cdr x))))) X (define (cdaddr x) (cdr (car (cdr (cdr x))))) X X (set! andmap X (lambda (p . args) X ;; use "first-finish" rule X (let andmap X ((args args) X (value #t)) X (if (let any-at-end? X ((ls args)) X (and (pair? ls) X (or (not (pair? (car ls))) X (any-at-end? (cdr ls))))) X value X (let ((value (apply p (map car args)))) X (and value (andmap (map cdr args) value))))))) X X ;; syntax-match? is used by extend-syntax to choose among clauses and X ;; to check for syntactic errors. It is also available to the user. X (set! syntax-match? X (lambda (keys pat exp) X (cond X ((symbol? pat) (if (memq pat keys) (eq? exp pat) #t)) X ((pair? pat) X (if (equal? (cdr pat) '(...)) X (let f ((lst exp)) X (or (null? lst) X (and (pair? lst) X (syntax-match? keys (car pat) (car lst)) X (f (cdr lst))))) X (and (pair? exp) X (syntax-match? keys (car pat) (car exp)) X (syntax-match? keys (cdr pat) (cdr exp))))) X (else (equal? exp pat))))) X X (define id list) X (define id-name car) X (define id-access cadr) X (define id-control caddr) X X (define loop X (lambda () X (list '()))) X (define loop-ids car) X (define loop-ids! set-car!) X X (define c...rs X `((car caar . cdar) X (cdr cadr . cddr) X (caar caaar . cdaar) X (cadr caadr . cdadr) X (cdar cadar . cddar) X (cddr caddr . cdddr) X (caaar caaaar . cdaaar) X (caadr caaadr . cdaadr) X (cadar caadar . cdadar) X (caddr caaddr . cdaddr) X (cdaar cadaar . cddaar) X (cdadr cadadr . cddadr) X (cddar caddar . cdddar) X (cdddr cadddr . cddddr))) X X (define add-car X (lambda (access) X (let ((x (and (pair? access) (assq (car access) c...rs)))) X (if (not (pair? x)) X `(car ,access) X `(,(cadr x) ,@(cdr access)))))) X X (define add-cdr X (lambda (access) X (let ((x (and (pair? access) (assq (car access) c...rs)))) X (if (not (pair? x)) X `(cdr ,access) X `(,(cddr x) ,@(cdr access)))))) X X (define parse X (lambda (keys pat acc cntl ids) X (cond X ((symbol? pat) X (if (memq pat keys) X ids X (cons (id pat acc cntl) ids))) X ((pair? pat) X (if (equal? (cdr pat) '(...)) X (let ((x (gensym))) X (parse keys (car pat) x (id x acc cntl) ids)) X (parse keys (car pat) (add-car acc) cntl X (parse keys (cdr pat) (add-cdr acc) cntl ids)))) X (else ids)))) X X (define gen X (lambda (keys exp ids loops) X (cond X ((symbol? exp) X (let ((id (lookup exp ids))) X (if (not id) X exp X (begin X (add-control! (id-control id) loops) X (list 'UNQUOTE (id-access id)))))) X ((pair? exp) X (cond X ((eq? (car exp) 'with) X (unless (syntax-match? '(with) '(with ((p x) ...) e) exp) X (error 'extend-syntax "invalid 'with' form" exp)) X (list 'UNQUOTE X (gen-with X keys X (map car (cadr exp)) X (map cadr (cadr exp)) X (caddr exp) X ids X loops))) X ((and (pair? (cdr exp)) (eq? (cadr exp) '...)) X (let ((x (loop))) X (make-loop X x X (gen keys (car exp) ids (cons x loops)) X (gen keys (cddr exp) ids loops)))) X (else X (let ((a (gen keys (car exp) ids loops)) X (d (gen keys (cdr exp) ids loops))) X (if (and (pair? d) (eq? (car d) 'UNQUOTE)) X (list a (list 'UNQUOTE-SPLICING (cadr d))) X (cons a d)))))) X (else exp)))) X X (define gen-with X (lambda (keys pats exps body ids loops) X (if (null? pats) X (make-quasi (gen keys body ids loops)) X (let ((p (car pats)) (e (car exps)) (g (gensym))) X `(let ((,g ,(gen-quotes keys e ids loops))) X (if (syntax-match? '() ',p ,g) X ,(gen-with X keys X (cdr pats) X (cdr exps) X body X (parse '() p g '() ids) X loops) X (error ',(car keys) X "does not fit 'with' pattern" X '(,g ,p)))))))) X X (define gen-quotes X (lambda (keys exp ids loops) X (cond X ((syntax-match? '(quote) '(quote x) exp) X (make-quasi (gen keys (cadr exp) ids loops))) X ((pair? exp) X (cons (gen-quotes keys (car exp) ids loops) X (gen-quotes keys (cdr exp) ids loops))) X (else exp)))) X X (define lookup X (lambda (sym ids) X (let loop ((ls ids)) X (cond X ((null? ls) #f) X ((eq? (id-name (car ls)) sym) (car ls)) X (else (loop (cdr ls))))))) X X (define add-control! X (lambda (id loops) X (unless (null? id) X (when (null? loops) X (error 'extend-syntax "missing ellipsis in expansion")) X (let ((x (loop-ids (car loops)))) X (unless (memq id x) X (loop-ids! (car loops) (cons id x)))) X (add-control! (id-control id) (cdr loops))))) X X (define make-loop X (lambda (loop body tail) X (let ((ids (loop-ids loop))) X (when (null? ids) X (error 'extend-syntax "extra ellipsis in expansion")) X (cond X ((equal? body (list 'UNQUOTE (id-name (car ids)))) X (if (null? tail) X (list 'UNQUOTE (id-access (car ids))) X (cons (list 'UNQUOTE-SPLICING (id-access (car ids))) X tail))) X ((and (null? (cdr ids)) X (syntax-match? '(UNQUOTE) '(UNQUOTE (f x)) body) X (eq? (cadadr body) (id-name (car ids)))) X (let ((x `(map ,(caadr body) ,(id-access (car ids))))) X (if (null? tail) X (list 'UNQUOTE x) X (cons (list 'UNQUOTE-SPLICING x) tail)))) X (else X (let ((x `(map (lambda ,(map id-name ids) ,(make-quasi body)) X ,@(map id-access ids)))) X (if (null? tail) X (list 'UNQUOTE x) X (cons (list 'UNQUOTE-SPLICING x) tail)))))))) X X (define make-quasi X (lambda (exp) X (if (and (pair? exp) (eq? (car exp) 'UNQUOTE)) X (cadr exp) X (list 'QUASIQUOTE exp)))) X X (define make-clause X (lambda (keys cl x) X (cond X ((syntax-match? '() '(pat fender exp) cl) X (let ((pat (car cl)) (fender (cadr cl)) (exp (caddr cl))) X (let ((ids (parse keys pat x '() '()))) X `((and (syntax-match? ',keys ',pat ,x) X ,(gen-quotes keys fender ids '())) X ,(make-quasi (gen keys exp ids '())))))) X ((syntax-match? '() '(pat exp) cl) X (let ((pat (car cl)) (exp (cadr cl))) X (let ((ids (parse keys pat x '() '()))) X `((syntax-match? ',keys ',pat ,x) X ,(make-quasi (gen keys exp ids '())))))) X (else X (error 'extend-syntax "invalid clause" cl))))) X X (define make-syntax X (let ((x (gensym "x"))) X (lambda (keys clauses) X `(lambda (,x) X (cond X ,@(map (lambda (cl) (make-clause keys cl x)) clauses) X (else X (error ',(car keys) "invalid syntax" ,x))))))) X X (ti-macro extend-syntax X (lambda (x) X (cond X ((and X (syntax-match? X '(extend-syntax) X '(extend-syntax (key1 key2 ...) clause ...) X x) X (andmap symbol? (cadr x))) X (let ((f (make-syntax `(,(caadr x) ,@(cdadr x)) (cddr x)))) X `(ti-macro ,(caadr x) ,f))) X (else (error 'extend-syntax "invalid syntax" x))))) X X (ti-macro extend-syntax/code X (lambda (x) X (cond X ((and X (syntax-match? X '(extend-syntax/code) X '(extend-syntax/code (key1 key2 ...) clause ...) X x) X (andmap symbol? `(,(caadr x) ,@(cdadr x)))) X (let ((f (make-syntax `(,(caadr x) ,@(cdadr x)) (cddr x)))) X (if (syntax-match? '() 'proc f) X `',f X (error 'extend-syntax/code X "does not fit 'with' pattern" X (list f 'proc))))) X (else (error 'extend-syntax/code "invalid syntax" x))))) X X));; end of extend-package X ________This_Is_The_END________ if test `wc -l < extend.scm` -ne 353; then echo 'shar: extend.scm was damaged during transit (should have been 353 lines)' fi fi ; : end of overwriting check echo 'x - graphics.scm' if test -f graphics.scm; then echo 'shar: not overwriting graphics.scm'; else sed 's/^X//' << '________This_Is_The_END________' > graphics.scm X(declare (usual-integrations)) X X;;; CLEAR-GRAPHICS X(define (clear-graphics x y) X (not-implimented-yet 'CLEAR-GRAPHICS)) X X;;; CLEAR-POINT X(define (clear-point x y) X (not-implimented-yet 'CLEAR-POINT)) X X;;; DRAW-BOX-TO X(define (draw-box-to x y) X (not-implimented-yet 'DRAW-BOX-TO)) X X;;; DRAW-FILLED-BOX-TO X(define (draw-filled-box-to x y) X (not-implimented-yet 'DRAW-FILLED-BOX-TO)) X X;;; DRAW-LINE-TO X(define (draw-line-to x y) X (not-implimented-yet 'DRAW-LINE-TO)) X X;;; DRAW-POINT X(define (draw-point x y) X (not-implimented-yet 'DRAW-POINT)) X X;;; GET-PEN-COLOR X(define (get-pen-color) X (not-implimented-yet 'GET-PEN-COLOR)) X X;;; GET-VIDEO-MODE X(define (get-video-mode) X (not-implimented-yet 'GET-VIDEO-MODE)) X X;;; *GRAPHICS-COLORS* X(define *graphics-colors*) X X;;; IS-POINT-ON? X(define (is-point-on? x y) X (not-implimented-yet 'IS-POINT-ON?)) X X X;;; POINT-COLOR X(define (point-color) X (not-implimented-yet 'POINT-COLOR)) X X;;; POSITION-PEN X(define (position-pen x y) X (not-implimented-yet 'POSITION-PEN)) X ________This_Is_The_END________ if test `wc -l < graphics.scm` -ne 50; then echo 'shar: graphics.scm was damaged during transit (should have been 50 lines)' fi fi ; : end of overwriting check echo 'x - parser-escape.scm' if test -f parser-escape.scm; then echo 'shar: not overwriting parser-escape.scm'; else sed 's/^X//' << '________This_Is_The_END________' > parser-escape.scm X(declare (usual-integrations)) X X;; Extend the parser to recognize | X;; This needs more work so that the |'s show on printing. X X(in-package parser-package X X (define undefined-atom-delimiters X (char-set #\[ #\] #\{ #\} )) X X (define (intern-string-no-coerce! string) X (string->symbol string)) X X (define-char #\| X (let ((delimiters (char-set #\| #\\))) X (lambda () X (define (loop string) X (if (char=? #\| (read-char)) X string X (string-append string X (char->string (read-char)) X (loop (read-string delimiters))))) X (discard-char) X (intern-string-no-coerce! (loop (read-string delimiters)))))) X X;; end in-package parser-package ________This_Is_The_END________ if test `wc -l < parser-escape.scm` -ne 26; then echo 'shar: parser-escape.scm was damaged during transit (should have been 26 lines)' fi fi ; : end of overwriting check echo 'x - scoops.doc' if test -f scoops.doc; then echo 'shar: not overwriting scoops.doc'; else sed 's/^X//' << '________This_Is_The_END________' > scoops.doc XFrom: sherin@linc.cis.upenn.edu XDate: 17-JUN-1987 00:47 XSubj: Re: Scoops Request X XDefault values are set to #!false or '() instead of some unassigned Xvalue. The reason is simple: if variables were actually unassigned Xit would be necessary to check this out before looking up their Xvalues. So the alternative was to use 'unassigned or such, and XI thought why not just use the "standard" nonsense value. X X XTo compile scoops, execute X X (sf "scoops.scm") X XAfterwards, just load in the binary with X X(load "scoops.bin") X XClasses are are defined in a global context!. X XFunctions: X---------- X XDEFINE-CLASS X X(define-class name (mixins ) X (classvars ) X (instvars " " " ) X (options )) X X = settable-variables (all can be set!) | X (settable-variables ) X X analogous to X X analogous to the set-/get-lists except for initialization X of (only instance) variables. X XMAKE-INSTANCE X X(make-instance name ' ... ' ) X Xcreates an instance of class name with those variables bound Xto those values provided they are inittable. XUse a variable to bind the instance returned as it does not side-effect Xthe environment. X XCOMPILE-CLASS X X(compile-class ) sets up the environments for classvars and methods. XClasses could be auto-compiled upon generation, but the TI version Xdoes not do this. If anyone really wants it set up that way, get in touch. X Xclass-of-object X(class-of-object ) simply returns the class-name of an object. X XNAME->CLASS X X(name->class ') {Ex. (name->class 'klass) } X Xreturns the class structure of . X XMETHODS X X(methods ) Xreturns a list of methods available to that class and defined within Xthat class. X Xall-methods X(all-methods ) Xcf methods--returns inherited methods as well. X Xclassvars Xsimilar to methods. X Xall-classvars Xsimilar to all-methods. X XINSTVARS Xsimilar to classvars and methods. X XALL-INSTVARS Xsimilar to all-classvars and all-methods. X XMIXINS Xreturns all of the class's parents. X XRENAME-CLASS X(rename-class ( )) Xredefines as , replacing the internal name flags. X XGETCV X(getcv ) Xreturns a gettable class-var. X XSETCV X(setcv ) Xsets a settable class-var to val. X XCLASS-COMPILED? X(class-compiled? ) does what it ought to do. X XDESCRIBE X(describe ) Xgives relevant information about either a class or an instance. X XSEND X(send ) Xevaluates wrt the class and instance and whatever args Xare required. X XSEND-IF-HANDLES X(Same syntax as send.) XSend-if-handles returns #!false if the method (message) is Xinappropiate. X XDEFINE-METHOD X(define-method ( ) )) Xdefines a function that has access to class and instance variables X(HOW DOES IT KNOW WHICH INSTANCE? See send.scm for some fast Xflying.) The method also has access to other methods (something Xand ordinary function as an inst-var or class-var would not). X XDELETE-METHOD X(delete-method ( ) ) Xdestroys a method. X X XSHORT EX. X========= X X X(load "scoops.bin") X(define-class thing (classvars (location 'here)) X;;Don't use where! It gets into the debugger in the new cscheme. X(instvars (one 1) two (three (active 4 1+ 1+))) X X(options gettable-variables (settable-variables one) inittable-variables)) X X X;;variable attributes: X;; X;; X;; name init- get- set- X;;================================================================== X;; location no yes no X;; X;; one yes yes yes X;; X;; two yes yes no X;; X;; three yes yes yes X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; X X;;NB If some variable is initialized, that value overrides X;;any default from active instance variables or stated defaults X;;(eg (thisvar 'this-val) ). X;; X;;Actives: X;; X;; by setting the initial value of an instance variable to X;; (active ) X;; X;; the variable gets init'ed to (unless otherwise stated X;; previously) and the "enhancers" are called each time the get- X;; and set- methods are used. Actives automatically generate X;; get- and set- methods (which override any declarations X;; of settable/gettable variables at class definition time). X;; X;; NB The methods generated to access variables at startup time X;; are called get- and set-. X;;------------------------------------------------------------------ X X X XI hope the above (short) documentation helps. Enjoy!! XQuestions to me: X Xsherin@linc.cis.upenn.edu X X ________This_Is_The_END________ if test `wc -l < scoops.doc` -ne 182; then echo 'shar: scoops.doc was damaged during transit (should have been 182 lines)' fi fi ; : end of overwriting check exit 0 -- Mike Clarkson mike@ists.UUCP Institute for Space and Terrestrial Science mike@ists.ists.ca York University, North York, Ontario, uunet!mnetor!yunexus!ists!mike CANADA M3J 1P3 +1 (416) 736-5611  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 31 Mar 89 21:03:20 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 31 Mar 89 20:55:34 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 31 Mar 89 07:23:19 GMT From: mailrus!jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!ists!mike@ohio-state.arpa (Mike Clarkson) Organization: Institute for Space and Terrestrial Science Subject: TI Scheme functions for MIT C-Scheme - 3 of 3 Message-Id: <373@ists.ists.ca> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu #--------------------------------CUT HERE------------------------------------- #! /bin/sh # # This is a shell archive. Save this into a file, edit it # and delete all lines above this comment. Then give this # file to sh by executing the command "sh file". The files # will be extracted into the current directory owned by # you with default permissions. # # The files contained herein are: # # -rw-r--r-- 1 mike 3472 Mar 30 14:35 sort.scm # -rw-r----- 1 mike 13385 Mar 30 14:35 ti.scm # -rw-r----- 1 mike 1982 Mar 30 14:35 window.scm # echo 'x - sort.scm' if test -f sort.scm; then echo 'shar: not overwriting sort.scm'; else sed 's/^X//' << '________This_Is_The_END________' > sort.scm X;;; -*-Scheme-*- X;;; X;;; $Header: msort.scm,v 13.42 87/11/21 18:06:51 GMT jinx Rel $ X;;; X;;; Copyright (c) 1987 Massachusetts Institute of Technology X;;; X;;; This material was developed by the Scheme project at the X;;; Massachusetts Institute of Technology, Department of X;;; Electrical Engineering and Computer Science. Permission to X;;; copy this software, to redistribute it, and to use it for any X;;; purpose is granted, subject to the following restrictions and X;;; understandings. X;;; X;;; 1. Any copy made of this software must include this copyright X;;; notice in full. X;;; X;;; 2. Users of this software agree to make their best efforts (a) X;;; to return to the MIT Scheme project any improvements or X;;; extensions that they make, so that these may be included in X;;; future releases; and (b) to inform MIT of noteworthy uses of X;;; this software. X;;; X;;; 3. All materials developed as a consequence of the use of X;;; this software shall duly acknowledge such use, in accordance X;;; with the usual standards of acknowledging credit in academic X;;; research. X;;; X;;; 4. MIT has made no warrantee or representation that the X;;; operation of this software will be error-free, and MIT is X;;; under no obligation to provide any services, by way of X;;; maintenance, update, or otherwise. X;;; X;;; 5. In conjunction with products arising from the use of this X;;; material, there shall be no use of the name of the X;;; Massachusetts Institute of Technology nor of any adaptation X;;; thereof in any advertising, promotional, or sales literature X;;; without prior written consent from MIT in each case. X;;; X X;;;; Merge Sort X X(declare (usual-integrations)) X X;; Functional and unstable X X(define (sort obj #!optional pred) X (define (loop l) X (if (and (pair? l) (pair? (cdr l))) X (split l '() '()) X l)) X X (define (split l one two) X (if (pair? l) X (split (cdr l) two (cons (car l) one)) X (merge (loop one) (loop two)))) X X (define (merge one two) X (cond ((null? one) two) X ((pred (car two) (car one)) X (cons (car two) X (merge (cdr two) one))) X (else X (cons (car one) X (merge (cdr one) two))))) X X (if (unassigned? pred) (set! pred <)) X (cond ((or (pair? obj) (null? obj)) X (loop obj)) X ((vector? obj) X (sort! (vector-copy obj) pred)) X (else X (error "sort: argument should be a list or vector" obj)))) X X;; This merge sort is stable for partial orders (for predicates like X;; <=, rather than like <). X X;; This is not destructive for lists X(define (sort! v #!optional pred) X (define (sort-internal! vec temp low high) X (if (< low high) X (let* ((middle (quotient (+ low high) 2)) X (next (1+ middle))) X (sort-internal! temp vec low middle) X (sort-internal! temp vec next high) X (let loop ((p low) (p1 low) (p2 next)) X (if (not (> p high)) X (cond ((> p1 middle) X (vector-set! vec p (vector-ref temp p2)) X (loop (1+ p) p1 (1+ p2))) X ((or (> p2 high) X (pred (vector-ref temp p1) X (vector-ref temp p2))) X (vector-set! vec p (vector-ref temp p1)) X (loop (1+ p) (1+ p1) p2)) X (else X (vector-set! vec p (vector-ref temp p2)) X (loop (1+ p) p1 (1+ p2))))))))) X X (if (unassigned? pred) (set! pred <)) X (cond ((list? obj) X (writeln "Warning: SORT! is not destructive on lists." v) X (set! v (vector->list v))) X ((not (vector? v)) X (error "sort!: argument not a vector or list." v))) X X (sort-internal! v X (vector-copy v) X 0 X (-1+ (vector-length v))) ________This_Is_The_END________ if test `wc -l < sort.scm` -ne 109; then echo 'shar: sort.scm was damaged during transit (should have been 109 lines)' fi fi ; : end of overwriting check echo 'x - ti.scm' if test -f ti.scm; then echo 'shar: not overwriting ti.scm'; else sed 's/^X//' << '________This_Is_The_END________' > ti.scm X(declare (usual-integrations)) X X;; Some required and worthwile definitions X(define file-attributes (make-primitive-procedure 'FILE-ATTRIBUTES)) X X(in-package system-global-environment X (define (add-syntax! name expander) X (SYNTAX-TABLE-DEFINE SYSTEM-GLOBAL-SYNTAX-TABLE name expander) X name) X ) X X;; Extend the parser to recognize | X(load "$TISCHEME/parser-escape" parser-package) X X(define (not-implemented-yet name) X (error "Not implemented yet" name)) X X;; Set up autoloading first X;;; AUTOLOAD-FROM-FILE X(load "$TISCHEME/auto-load") X X;;; ADD1 X(define add1 1+) X X;;; ALIAS X X;;; ALL-CLASSVARS X(autoload-from-file "$TISCHEME/scoops" '(all-classvars)) X X;;; ALL-INSTVARS X(autoload-from-file "$TISCHEME/scoops" '(all-instvars)) X X;;; ALL-METHODS X(autoload-from-file "$TISCHEME/scoops" '(all-methods)) X X;;; APPLY-IF X(syntax-table-define system-global-syntax-table 'APPLY-IF X (macro (pred proc exp) X `(let ((t1 ,pred) (t2 (lambda () ,exp))) X (if t1 (,proc t1) X (t2))))) X X;;; ASCII->SYMBOL X;; This is not really the same. TI's (ASCII->SYMBOL 39) returns |'| X;; This one returns ' X(define (ascii->symbol number) X (if (and (integer? number) (positive? number) (<= number 255)) X (string->symbol (char->string (ascii->char 39))) X (error "ASCII->SYMBOL: Not an integer between 0 and 255" number))) X X;;; ASSERT X(define (assert predicate . messages) X (not-implemented-yet 'ASSERT)) X X;;; ATOM? X(define (atom? object) X (not (pair? object))) X X X;;; ATAN X(let () X (let-syntax () X (define-macro (define-primitives . names) X `(BEGIN ,@(map (lambda (name) X `(LOCAL-ASSIGNMENT X (the-environment) X ',name X ,(make-primitive-procedure name))) X names))) X (define-primitives &= &< &> &+ &- &* &/ &atan)) X X (declare (integrate-primitive-procedures X &= &< &> &+ &- &* &/ &atan)) X X (define pi/4 (&atan 1)) X (define pi/2 (&* pi/4 2)) X (define -pi/2 (&- 0 pi/2)) X (define pi (&* pi/4 4)) X X (set! atan X (named-lambda (atan y #!optional x) X (if (unassigned? x) (set! x 1)) X (if (zero? x) X (if (negative? y) -pi/2 pi/2) X (let ((atan1 (&atan (&/ y x)))) X (cond ((positive? x) atan1) X ((negative? y) (&- atan1 pi)) X (else (&+ atan1 pi))))))) X ) X X;;; BEGIN0 X(define-macro (begin0 first . rest) X `(let ((temp ,first)) ,@rest temp)) X X;;; CALL/CC X(define call/cc call-with-current-continuation) X X;;; CLASS-COMPILED? X(autoload-from-file "$TISCHEME/scoops" '(class-compiled?)) X X;;; CLASS-OF-OBJECT X(autoload-from-file "$TISCHEME/scoops" '(class-of-object)) X X;;; CLASSVARS X(autoload-from-file "$TISCHEME/scoops" '(classvars)) X X;;; CLEAR-GRAPHICS X(autoload-from-file "$TISCHEME/graphics" '(clear-graphics)) X X;;; CLEAR-POINT X(autoload-from-file "$TISCHEME/graphics" '(clear-point)) X X;;; CLOSURE? X(define closure? procedure?) X X;;; COMPILE-CLASS X(autoload-from-file "$TISCHEME/scoops" '(compile-class)) X X;;; COMPILE-FILE X(define compile-file sf) X X;;; CURRENT-COLUMN X(define (current-column #!optional port) X (cond ((unassigned? port) (set! port *current-input-port*)) X ((not (port? port)) (error "FLUSH-INPUT: Bad port" port))) X (not-implemented-yet 'CURRENT-COLUMN)) X X;;; DEFINE-CLASS X(autoload-from-file "$TISCHEME/scoops" '(define-class)) X X;;; DEFINE-INTEGRABLE X(syntax-table-define system-global-syntax-table 'DEFINE-INTEGRABLE X (macro (pattern . body) X `(BEGIN (DECLARE (INTEGRATE-OPERATOR ,(car pattern))) X (DEFINE ,pattern X (DECLARE (INTEGRATE ,@(cdr pattern))) X ,@body)))) X X X;;; DEFINE-METHOD X(autoload-from-file "$TISCHEME/scoops" '(define-method)) X X;;; DESCRIBE X(autoload-from-file "$TISCHEME/scoops" '(describe)) X X;;; DELAYED-OBJECT? X(define delayed-object? X (microcode-type-predicate 'DELAYED)) X X;;; DOS-CHDIR X(define (dos-chdir pathname) X (set-working-directory-pathname! X (cond ((pathname? pathname) pathname) X ((symbol? pathname) (symbol->pathname pathname)) X ((string=? pathname ".") X (working-directory-pathname)) X ((string=? pathname "..") X (make-pathname X (pathname-device (%pwd)) X (simplify-directory X (append (pathname-directory (%pwd)) '(UP))) X false X false X false)) X ((string? pathname) X (string->pathname pathname)) X (else (error "DOS-CHDIR: Not a pathname, symbol or string"))))) X X X X X;;; DOS-COPY-FILE X(define dos-file-copy copy-file) X X;;; DOS-DELETE X(define dos-delete delete-file) X X;;; DOS-FILE-SIZE X(define (dos-file-size filename) X (if (file-exists? filename) X (vector-ref (file-attributes filename) 7))) X X;;; DOS-RENAME X(define dos-rename rename-file) X X;;; DRAW-BOX-TO X(autoload-from-file "$TISCHEME/graphics" '(draw-box-to)) X X;;; DRAW-FILLED-BOX-TO X(autoload-from-file "$TISCHEME/graphics" '(draw-filled-box-to)) X X;;; DRAW-LINE-TO X(autoload-from-file "$TISCHEME/graphics" '(draw-line-to)) X X;;; DRAW-POINT X(autoload-from-file "$TISCHEME/graphics" '(draw-point)) X X;;; EDIT X(define (edit pair) X (not-implemented-yet 'EDIT)) X X;;; EDWIN X(define (edwin) X (not-implemented-yet 'EDWIN)) X X;;; ENGINE-RETURN X(define (engine-return val) X (not-implemented-yet 'ENGINE-RETURN)) X X;;; #\ESCAPE X(load "$TISCHEME/escape") X X(define (eval expression #!optional environment) X (if (unassigned? environment) (set! environment *rep-current-environment*)) X (scode-eval (syntax expression *rep-current-syntax-table*) X environment)) X X;;; EXIT X(define exit %exit) X X;;; EXPLODE X(autoload-from-file "$SCHEME/xplode" '(explode)) X X;;; FLUSH-INPUT X(define (flush-input #!optional port) X (let ((newline-delimiters (char-set #\Newline))) X (cond ((unassigned? port) (set! port *current-input-port*)) X ((not (port? port)) (error "FLUSH-INPUT: Bad port" port))) X (or ((access :discard-chars port) newline-delimiters) X eof-object))) X X;;; FREESP X(define (freesp) X (vector-ref (car (gc-statistics)) 5)) X X;;; FRESH-LINE X(define (fresh-line #!optional port) X (cond ((unassigned? port) (set! port *current-output-port*)) X ((not (port? port)) (error "Bad port" port))) X (not-implemented-yet 'FRESH-LINE)) X X;;; GC X(define gc gc-flip) X X;;; GENSYM X;; Make gensym a version of generate-uninterned-symbol that accepts X;; a number or a string, as well as a symbol as the optional argument X(define gensym X (let ((name-counter 0) X (name-prefix "G")) X (define (get-number) X (let ((result name-counter)) X (set! name-counter (1+ name-counter)) X result)) X (named-lambda (gensym #!optional argument) X (if (not (unassigned? argument)) X (cond ((string? argument) X (set! name-prefix argument)) X ((symbol? argument) X (set! name-prefix (symbol->string argument))) X ((integer? argument) X (set! name-counter argument)) X (else X (error "Bad argument: GENSYM" X argument)))) X (string->uninterned-symbol X (string-append name-prefix (write-to-string (get-number))))))) X X;;; GETCV X(autoload-from-file "$TISCHEME/scoops" '(getcv)) X X;;; GET-FILE-POSITION X;; Not implemented yet - needs C support X(define (get-file-position port) X (if (not (port? port)) (error "Bad port" port)) X (not-implemented-yet 'GET-FILE-POSITION)) X X;;; GET-PEN-COLOR X(autoload-from-file "$TISCHEME/graphics" '(get-pen-color)) X X;;; GETPROP X(define getprop 2D-get) X X;;; GET-VIDEO-MODE X(autoload-from-file "$TISCHEME/graphics" '(get-video-mode)) X X;;; *GRAPHICS-COLORS* X(autoload-from-file "$TISCHEME/graphics" '(*graphics-colors*)) X X;;; IF X(set! undefined-conditional-branch '()) X X;;; IMPLODE X(autoload-from-file "$scheme/xplode" '(implode)) X X;;; INSTVARS X(autoload-from-file "$TISCHEME/scoops" '(instvars)) X X;;; INTEGER->STRING X(define (integer->string number base) X (cond ((not (integer? number)) X (error "INTEGER->STRING: Not an integer" number)) X ((not (integer? base)) X (error "INTEGER->STRING: Not an integer" base)) X (else (list->string X (fluid-let ((*radix* base)) X ((access unparse-signed-integer X number-unparser-package) number)))))) X X;;; IS-POINT-ON? X(autoload-from-file "$TISCHEME/graphics" '(is-point-on?)) X X;;; LINE-LENGTH X(define (line-length #!optional port) X (cond ((unassigned? port) (set! port *current-output-port*)) X ((not (port? port)) (error "Bad port" port))) X ((access :x-size port))) X X;;; LIST* X(define list* cons*) X X;;; LIST->STREAM X;; This may be wrong. (cons (car obj) (delay (cdr obj))) ?? X(define (list->stream obj) X (if (not (list? obj)) (error "LIST->STREAM: Not a list" obj)) X (let loop ((lyst obj) X (result)) X (if (null? lyst) X (reverse! result) X (loop (cdr lyst) (cons-stream (car lyst) result))))) X X;;; MACRO X;; TI's macro conflicts with MIT's macro. X;; TI's MACRO has been renamed to ti-macro X(add-syntax! 'ti-macro X (macro (symbol def) X (let ((var (caadr def)) X (body (cddr def))) X `(add-syntax! X ',symbol X (macro ,var X (let ((,var (cons ',symbol ,var))) X ,@body)))))) X X;;; MAKE-ENGINE X(define (make-engine thunk) X (not-implemented-yet 'MAKE-ENGINE)) X X;;; MAKE-INSTANCE X(autoload-from-file "$TISCHEME/scoops" '(make-instance)) X X;;; MAKE-WINDOW X(autoload-from-file "$TISCHEME/window" '(make-window)) X X;;; METHODS X;;; MIXINS X;;; NAME->CLASS X(autoload-from-file "$TISCHEME/scoops" '(methods mixins name->class)) X X;;; NIL X(define nil '()) X X;;; OPEN-BINARY-INPUT-FILE X(define open-binary-input-file open-input-file) X X;;; OPEN-BINARY-OUTPUT-FILE X(define open-binary-output-file open-output-file) X X;;; OPEN-EXTEND-FILE X;; Not implemented yet - needs C support X(autoload-from-file "$TISCHEME/file-extend" '(open-extend-file)) X X;;; PI X(define pi (* 4.0 (atan 1.0 1.0))) X X;;; POINT-COLOR X(autoload-from-file "$TISCHEME/graphics" '(point-color)) X X;;; PORT? X(define (port? port) X (or (output-port? port) X (input-port? port))) X X;;; POSITION-PEN X(autoload-from-file "$TISCHEME/graphics" '(position-pen)) X X;;; PRINC X(define princ display) X X;;; PRIN1 X(define prin1 write) X X;;; PRINT X(define (print object #!optional port) X (cond ((unassigned? port) (set! port *current-output-port*)) X ((not (output-port? port)) (error "Bad output port" port))) X (newline port) X (write object port) X (write " " port) X *the-non-printing-object*) X X;;; PRINT-LENGTH X(define (print-length object) X (string-length X (with-output-to-string X (lambda () X (display object))))) X X;;; PROC? X(define (proc? object) X (or (procedure? object) (continuation? object))) X X;;; PROPLIST X(define proplist 2d-get-alist-x) X X;;; PUTPROP X(define (putprop name val prop) X (2D-put! name prop val)) X X;;; READ-ATOM X(define (read-atom #!optional port) X (let ((atom-delimiters (access atom-delimiters parser-package))) X (cond ((unassigned? port) (set! port *current-input-port*)) X ((not (port? port)) (error "READ-ATOM: Bad port" port))) X (or ((access :read-string port) atom-delimiters) X eof-object))) X X;;; READ-LINE X(define (read-line #!optional port) X (let ((newline-delimiters (char-set #\Newline))) X (cond ((unassigned? port) (set! port *current-input-port*)) X ((not (port? port)) (error "READ-LINE: Bad port" port))) X (or ((access :read-string port) newline-delimiters) X eof-object))) X X;;; REC X;; You may want to change REC of lambdas to named lambdas X(syntax-table-define system-global-syntax-table 'REC X (macro (var exp) X `(letrec ((,var ,exp)) ,var))) X X;;; REMPROP X(define remprop 2D-remove!) X X;;; RENAME-CLASS X;;; SEND X;;; SEND-IF-HANDLES X(autoload-from-file "$TISCHEME/scoops" '(rename-class send send-if-handles)) X X;;; SET-LINE-LENGTH! X(define (set-line-length! number #!optional port) X (cond ((unassigned? port) (set! port *current-output-port*)) X ((not (port? port)) (error "SET-LINE-LENGTH!: Bad port" port))) X (if (not (and (integer? number) (>= number 0))) X (error "SET-LINE-LENGTH!: number must be a positive integer" number)) X (set! (access :x-size port) `(lambda () ,number))) X X;;; SET! X;; (SET! (VECTOR-REF vector n) value) is not implemented yet. X;; (SET! (FLUID var) value) is not implemented yet. X X;;; SETCV X(autoload-from-file "$TISCHEME/scoops" '(setcv)) X X;;; SORT X(load "$TISCHEME/sort") X X;;; STREAM? X(define (stream? obj) X (and (pair? obj) X (delayed? (cdr obj)))) X X;;; STREAM->LIST X(define (stream->list obj) X (if (not (stream? obj)) (error "STREAM->LIST: Not a stream" obj)) X (let loop ((stream obj) X (result)) X (if (empty-stream? stream) X (reverse! result) X (loop (force (cdr stream)) (cons (car stream) result))))) X X;;; SUB1 X(define sub1 -1+) X X;;; SYMBOL->ASCII X(define (symbol->ascii symbol) X (char->ascii (car (string->list (symbol->string symbol))))) X X;;; SYNTAX X;; Confilicts with MIT definition X X;;; T X(define t #!true) X X;;; WHEN X(syntax-table-define system-global-syntax-table 'WHEN X (macro args X `(if ,(car args) X (begin ,@(cdr args))))) X X;;; WINDOW-CLEAR X;;; WINDOW-DELETE X;;; WINDOW-GET-ATTRIBUTE X;;; WINDOW-GET-CURSOR X;;; WINDOW-GET-POSITION X;;; WINDOW-GET-SIZE X;;; WINDOW-POPUP X;;; WINDOW-POPUP-DELETE X;;; WINDOW-RESTORE-CONTENTS X;;; WINDOW-SAVE-CONTENTS X;;; WINDOW-SET-ATTRIBUTE! X;;; WINDOW-SET-CURSOR! X;;; WINDOW-SET-POSITION! X;;; WINDOW-SET-SIZE! X;;; WINDOW? X X(autoload-from-file "$TISCHEME/window" '(window-clear window-delete Xwindow-get-attribute window-get-cursor window-get-position window-get-size Xwindow-popup window-popup-delete window-restore-contents Xwindow-save-contents window-set-attribute! window-set-cursor! Xwindow-set-position! window-set-size! window?)) X X;;; WRITELN X(define (writeln #!rest objects) X (for-each display objects) X (newline)) X X(newline) X(define (ti-compatibility-package-version) X "1.0") X X(writeln "TI Functions loaded.") ________This_Is_The_END________ if test `wc -l < ti.scm` -ne 532; then echo 'shar: ti.scm was damaged during transit (should have been 532 lines)' fi fi ; : end of overwriting check echo 'x - window.scm' if test -f window.scm; then echo 'shar: not overwriting window.scm'; else sed 's/^X//' << '________This_Is_The_END________' > window.scm X(declare (usual-integrations)) X X;;; MAKE-WINDOW X(define (make-window #!optional label border) X (not-implemented-yet 'make-window)) X X;;; WINDOW-CLEAR X(define (window-clear window) X (not-implemented-yet 'window-clear)) X X;;; WINDOW-DELETE X(define (window-delete window) X (not-implemented-yet 'window-delete)) X X;;; WINDOW-GET-ATTRIBUTE X(define (window-get-attribute window name) X (case name X (BORDER-ATTRIBUTES) X (TEXT-ATTRIBUTES) X (WINDOW-FLAGS) X (else (error "WINDOW-GET-ATTRIBUTE: Unknown attribute" name))) X (not-implemented-yet 'window-get-attribute)) X X;;; WINDOW-GET-CURSOR X(define (window-get-cursor window) X (not-implemented-yet 'window-get-cursor)) X X;;; WINDOW-GET-POSITION X(define (window-get-position window) X (not-implemented-yet 'window-get-position)) X X;;; WINDOW-GET-SIZE X(define (window-get-size window) X (not-implemented-yet 'window-get-size)) X X;;; WINDOW-POPUP X(define (window-popup window) X (not-implemented-yet 'window-popup)) X X;;; WINDOW-POPUP-DELETE X(define (window-popup-delete window) X (not-implemented-yet 'window-popup-delete)) X X;;; WINDOW-RESTORE-CONTENTS X(define (window-restore-contents window contents) X (not-implemented-yet 'window-restore-contents)) X X;;; WINDOW-SAVE-CONTENTS X(define (window-save-contents window) X (not-implemented-yet 'window-save-contents)) X X;;; WINDOW-SET-ATTRIBUTE! X(define (window-set-attribute! window name value) X (case name X (BORDER-ATTRIBUTES) X (TEXT-ATTRIBUTES) X (WINDOW-FLAGS) X (else (error "WINDOW-SET-ATTRIBUTE!: Unknown attribute" name))) X (not-implemented-yet 'window-set-attribute!)) X X;;; WINDOW-SET-CURSOR! X(define (window-set-cursor! window line col) X (not-implemented-yet 'window-set-cursor!)) X X;;; WINDOW-SET-POSITION! X(define (window-set-position! window line col) X (not-implemented-yet 'window-set-position!)) X X;;; WINDOW-SET-SIZE! X(define (window-set-size! window lines cols) X (not-implemented-yet 'window-set-size!)) X X;;; WINDOW? X(define (window? obj) X (not-implemented-yet 'window?)) X ________This_Is_The_END________ if test `wc -l < window.scm` -ne 76; then echo 'shar: window.scm was damaged during transit (should have been 76 lines)' fi fi ; : end of overwriting check exit 0 -- Mike Clarkson mike@ists.UUCP Institute for Space and Terrestrial Science mike@ists.ists.ca York University, North York, Ontario, uunet!mnetor!yunexus!ists!mike CANADA M3J 1P3 +1 (416) 736-5611  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 25 Mar 89 20:15:57 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 25 Mar 89 20:05:42 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 25 Mar 89 22:16:59 GMT From: mailrus!jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!oz@husc6.harvard.edu (Ozan Yigit) Organization: York U. Computing Services - Magic Group Subject: Re: Scheme implementation techniques? Message-Id: <1394@yunexus.UUCP> References: <1229@mina.liu.se> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <1229@mina.liu.se> mikpe@mina.liu.se (Mikael Pettersson) writes: > >What are the approaches that have been used to implement interactive >Scheme systems? I am more-or-less familiar with the following ones: ... usual implementation techniques ... > >Are there any other approaches worth considering? > There is one other way I know of, having gone thru most of the material included in my bibliography. This method may be called (in a very loose way) the "threaded code" technique, or enclosing everything into a lambda closure. The technique is discussed in detail in the following paper: %A Marc Feeley %A Guy LaPalme %T Using Cloures for Code Generation %J Journal of Computer Languages %V 12 %N 1 %P 47-66 %I Pergamon Press %D 1987 Or, in a lot greater detail, including 68000 code generation, in the following thesis: %A Marc Feeley %T Deux Approches a' L'implantation du Language Scheme %I M.Sc. Thesis, De'partement d'Informatique et de Recherche Ope'rationelle, University of Montreal %D May 1986 Here is the "optimizing compiler" from the first paper. It worked for the example in the paper, so I think I typed it right. ; ; Optimizing scheme compiler ; supports quote, set!, if, lambda special forms, ; constant refs, variable refs and proc applications ; ; Using Clusures for Code Generation ; Marc Feeley and Guy LaPalme ; Computer Language, Vol. 12, No. 1, pp. 47-66 ; 1987 ; (define (compile expr) ((gen expr nil #f))) (define (gen expr env term) (cond ((symbol? expr) (ref (variable expr env) term)) ((not (pair? expr)) (cst expr term)) ((eq? (car expr) 'quote) (cst (cadr expr) term)) ((eq? (car expr) 'set!) (set (variable (cadr expr) env) (gen (caddr expr) env #f) term)) ((eq? (car expr) 'if) (gen-tst (gen (cadr expr) env #f) (gen (caddr expr) env term) (gen (cadddr expr) env term))) ((eq? (car expr) 'lambda) (let ((p (cadr expr))) (prc p (gen (caddr expr) (allocate p env) #t) term))) (else (let ((args (map (lambda (x) (gen x env #f)) (cdr expr)))) (let ((var (and (symbol? (car expr)) (variable (car expr) env)))) (if (global? var) (app (cons var args) #t term) (app (cons (gen (car expr) env #f) args) #f term))))))) (define (allocate parms env) (cond ((null? parms) env) ((symbol? parms) (cons parms env)) (else (cons (car parms) (allocate (cdr parms) env))))) (define (variable symb env) (let ((x (memq symb env))) (if x (- (length env) (length x)) (begin (if (not (assq symb -glo-env-)) (define-global symb '-undefined-)) (assq symb -glo-env-))))) (define (global? var) (pair? var)) (define (cst val term) (cond ((eqv? val 1) ((if term gen-1* gen-1))) ((eqv? val 2) ((if term gen-2* gen-2))) ((eqv? val nil) ((if term gen-null* gen-null))) (else ((if term gen-cst* gen-cst) val)))) (define (ref var term) (cond ((global? var) ((if term gen-ref-glo* gen-ref-glo) var)) ((= var 0) ((if term gen-ref-loc-1* gen-ref-loc-1))) ((= var 1) ((if term gen-ref-loc-2* gen-ref-loc-2))) ((= var 2) ((if term gen-ref-loc-3* gen-ref-loc-3))) (else ((if term gen-ref* gen-ref) var)))) (define (set var val term) (cond ((global? var) ((if term gen-set-glo* gen-set-glo) var val)) ((= var 0) ((if term gen-set-loc-1* gen-set-loc-1) val)) ((= var 1) ((if term gen-set-loc-2* gen-set-loc-2) val)) ((= var 2) ((if term gen-set-loc-3* gen-set-loc-3) val)) (else ((if term gen-set* gen-set) var val)))) (define (prc parms body term) ((cond ((null? parms) (if term gen-pr0* gen-pr0)) ((symbol? parms) (if term gen-pr1/rest* gen-pr1/rest)) ((null? (cdr parms)) (if term gen-pr1* gen-pr1)) ((symbol? (cdr parms)) (if term gen-pr2/rest* gen-pr2/rest)) ((null? (cddr parms)) (if term gen-pr2* gen-pr2)) ((symbol? (cddr parms)) (if term gen-pr3/rest* gen-pr3/rest)) ((null? (cdddr parms)) (if term gen-pr3 gen-pr3)) (else (error "too many parameters in a lambda-expression"))) body)) (define (app vals glo term) (apply (case (length vals) ((1) (if glo (if term gen-ap0-glo* gen-ap0-glo) (if term gen-ap0* gen-ap0))) ((2) (if glo (if term gen-ap1-glo* gen-ap1-glo) (if term gen-ap1* gen-ap1))) ((3) (if glo (if term gen-ap2-glo* gen-ap2-glo) (if term gen-ap2* gen-ap2))) ((4) (if glo (if term gen-ap3-glo* gen-ap3-glo) (if term gen-ap3* gen-ap3))) (else (error "too many arguments in a proc application"))) vals)) ; ; code generation for non-terminal evaluations ; ; ; constants ; (define (gen-1) (lambda () 1)) (define (gen-2) (lambda () 2)) (define (gen-null) (lambda () #!null)) (define (gen-cst a) (lambda () a)) ; ; variable reference ; (define (gen-ref-glo a) (lambda () (cdr a))) ; global var (define (gen-ref-loc-1) (lambda () (cadr *env*))) ; first local var (define (gen-ref-loc-2) (lambda () (caddr *env*))) ; second local var (define (gen-ref-loc-3) (lambda () (cadddr *env*))) ; third local var (define (gen-ref a) (lambda () (do ((i 0 (1+ i)) ; any non-global (env (cdr *env*) (cdr env))) ((= i a) (car env))))) ; ; assignment ; (define (gen-set-glo a b) (lambda () (set-cdr! a (b)))) (define (gen-set-loc-1 a) (lambda () (set-car! (cdr *env*) (a)))) (define (gen-set-loc-2 a) (lambda () (set-car! (cddr *env*) (a)))) (define (gen-set-loc-3 a) (lambda () (set-car! (cdddr *env*) (a)))) (define (gen-set a b) (lambda () (do ((i 0 (1+ i)) (env (cdr *env*) (cdr env))) ((= i a) (set-car! env (b)))))) ; ; conditional ; (define (gen-tst a b c) (lambda () (if (a) (b) (c)))) ; ; procedure application ; (define (gen-ap0-glo a) (lambda () ((cdr a)))) (define (gen-ap1-glo a b) (lambda () ((cdr a) (b)))) (define (gen-ap2-glo a b c) (lambda () ((cdr a) (b) (c)))) (define (gen-ap3-glo a b c d) (lambda () ((cdr a) (b) (c) (d)))) (define (gen-ap0 a) (lambda () ((a)))) (define (gen-ap1 a b) (lambda () ((a) (b)))) (define (gen-ap2 a b c) (lambda () ((a) (b) (c)))) (define (gen-ap3 a b c d) (lambda () ((a) (b) (c) (d)))) ; ; lambda expressions ; (define (gen-pr0 a) ; without "rest" parameter (lambda () (let ((def (cdr *env*))) (lambda () (set! *env* (cons *env* def)) (a))))) (define (gen-pr1 a) (lambda () (let ((def (cdr *env*))) (lambda (x) (set! *env* (cons *env* (cons x def))) (a))))) (define (gen-pr2 a) (lambda () (let ((def (cdr *env*))) (lambda (x y) (set! *env* (cons *env* (cons x (cons y def)))) (a))))) (define (gen-pr3 a) (lambda () (let ((def (cdr *env*))) (lambda (x y z) (set! *env* (cons *env* (cons x (cons y (cons z def))))) (a))))) (define (gen-pr1/rest a) (lambda () (let ((def (cdr *env*))) (lambda x (set! *env* (cons *env* (cons x def))) (a))))) (define (gen-pr2/rest a) (lambda () (let ((def (cdr *env*))) (lambda (x . y) (set! *env* (cons *env* (cons x (cons y def)))) (a))))) (define (gen-pr3/rest a) (lambda () (let ((def (cdr *env*))) (lambda (x y . z) (set! *env* (cons *env* (cons x (cons y (cons z def))))) (a))))) ; ; code generation for terminal evaluations ; ; ; constants ; (define (gen-1*) (lambda () (set! *env* (car *env*)) 1)) (define (gen-2*) (lambda () (set! *env* (car *env*)) 2)) (define (gen-null*) (lambda () (set! *env* (car *env*)) #!null)) (define (gen-cst* a) (lambda () (set! *env* (car *env*)) a)) ; ; variable reference ; (define (gen-ref-glo* a) (lambda () (set! *env* (car *env*)) (cdr a))) (define (gen-ref-loc-1*) (lambda () (let ((val (cadr *env*))) (set! *env* (car *env*)) val))) (define (gen-ref-loc-2*) (lambda () (let ((val (caddr *env*))) (set! *env* (car *env*)) val))) (define (gen-ref-loc-3*) (lambda () (let ((val (cadddr *env*))) (set! *env* (car *env*)) val))) (define (gen-ref* a) (lambda () (do ((i 0 (1+ i)) (env (cdr *env*) (cdr env))) ((= i a) (set! *env* (car *env*)) (car env))))) ; ; assignment ; (define (gen-set-glo* a b) (lambda () (set! *env* (car *env*)) (set-cdr! a (b)))) (define (gen-set-loc-1* a) (lambda () (set! *env* (car *env*)) (set-car! (cdr *env*) (a)))) (define (gen-set-loc-2* a) (lambda () (set! *env* (car *env*)) (set-car! (cddr *env*) (a)))) (define (gen-set-loc-3* a) (lambda () (set! *env* (car *env*)) (set-car! (cdddr *env*) (a)))) (define (gen-set* a b) (lambda () (do ((i 0 (1+ i)) (env (cdr *env*) (cdr env))) ((= i 0) (set! *env* (car *env*)) (set-car! env (b)))))) ; ; procedure application ; (define (gen-ap0-glo* a) (lambda () (set! *env* (car *env*)) ((cdr a)))) (define (gen-ap1-glo* a b) (lambda () (let ((x (b))) (set! *env* (car *env*)) ((cdr a) x)))) (define (gen-ap2-glo* a b c) (lambda () (let ((x (b)) (y (c))) (set! *env* (car *env*)) ((cdr a) x y)))) (define (gen-ap3-glo* a b c d) (lambda () (let ((x (b)) (y (c)) (z (d))) (set! *env* (car *env*)) ((cdr a) x y z)))) (define (gen-ap0* a) (lambda () (let ((w (a))) (set! *env* (car *env*)) (w)))) (define (gen-ap1* a b) (lambda () (let ((w (a)) (x (b))) (set! *env* (car *env*)) (w x)))) (define (gen-ap2* a b c) (lambda () (let ((w (a)) (x (b)) (y (c))) (set! *env* (car *env*)) (w x y)))) (define (gen-ap3* a b c d) (lambda () (let ((w (a)) (x (b)) (y (c)) (z (d))) (set! *env* (car *env*)) (w x y z)))) ; ; lambda ; (define (gen-pr0* a) (lambda () (let ((def (cdr *env*))) (set! *env* (car *env*)) (lambda () (set! *env* (cons *env* def)) (a))))) (define (gen-pr1* a) (lambda () (let ((def (cdr *env*))) (set! *env* (car *env*)) (lambda (x) (set! *env* (cons *env* (cons x def))) (a))))) (define (gen-pr2* a) (lambda () (let ((def (cdr *env*))) (set! *env* (car *env*)) (lambda (x y) (set! *env* (cons *env* (cons x (cons y def)))) (a))))) (define (gen-pr3* a) (lambda () (let ((def (cdr *env*))) (set! *env* (car *env*)) (lambda (x y z) (set! *env* (cons *env* (cons x (cons y (cons z def))))) (a))))) (define (gen-pr1/rest* a) (lambda () (let ((def (cdr *env*))) (set! *env* (car *env*)) (lambda x (set! *env* (cons *env* (cons x def))) (a))))) (define (gen-pr2/rest* a) (lambda () (let ((def (cdr *env*))) (set! *env* (car *env*)) (lambda (x . y) (set! *env* (cons *env* (cons x (cons y def)))) (a))))) (define (gen-pr1/rest* a) (lambda () (let ((def (cdr *env*))) (set! *env* (car *env*)) (lambda (x y . z) (set! *env* (cons *env* (cons x (cons y (cons z def))))) (a))))) ; ; global defs ; (define (define-global var val) (if (assq var -glo-env-) (set-cdr! (assq var -glo-env-) val) (set! -glo-env- (cons (cons var val) -glo-env-)))) (define -glo-env- (list (cons 'define define-global))) (define-global 'cons cons) (define-global 'car car) (define-global 'cdr cdr) (define-global 'null? null?) (define-global 'not not) (define-global '< <) (define-global '-1+ -1+) (define-global '+ +) (define-global '- -) ; ; current environment ; (define *env* '(dummy))) ; ; environment manipulation ; (define (restore-env) (set! *env* (car *env*))) ; ; evaluator ; (define (evaluate expr) ((compile (list 'lambda '() expr)))) ; ; (evaluate '(define 'fib ; (lambda (x) ; (if (< x 2) ; x ; (+ (fib (- x 1)) ; (fib (- x 2))))))) ; ; -- ... and I say to them, Usenet: oz@nexus.yorku.ca `Where the hell were you ......!uunet!utai!yunexus!oz when the page was blank?' Bitnet: oz@[yulibra|yuyetti] Harlan Ellison Phonet: +1 416 736-5257x3976  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 25 Mar 89 06:00:32 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 25 Mar 89 05:49:02 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 24 Mar 89 14:41:13 GMT From: leverich@rand-unix.arpa (Brian Leverich) Organization: RAND Corp., Santa Monica, CA Subject: SPEED OF TI's PC-SCHEME, EXPANDED AND EXTENDED MEMORY VERSIONS Message-Id: <1917@randvax.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Has anyone done timing runs of both the expanded and extended memory versions of TI's PC-Scheme? Is one version faster than the other? Also, are there any programming tricks you can use to speed up the large-memory versions? Using PC-Scheme 3.03, I'm suffering an almost tripling of run times when I use the extended memory version... (Sure is nice having the big heap space, though!) Tnx in advance. -B -- "Simulate it in ROSS" Brian Leverich | U.S. Snail: 1700 Main St. ARPAnet: leverich@rand-unix | Santa Monica, CA 90406 UUCP/usenet: decvax!randvax!leverich | Ma Bell: (213) 393-0411 X7769  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 24 Mar 89 07:45:10 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 24 Mar 89 07:35:18 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 23 Mar 89 23:58:26 GMT From: mcvax!kth!draken!liuida!mikpe@uunet.uu.net (Mikael Pettersson) Organization: CIS Dept, Univ of Linkoping, Sweden Subject: Scheme implementation techniques? Message-Id: <1229@mina.liu.se> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu What are the approaches that have been used to implement interactive Scheme systems? I am more-or-less familiar with the following ones: 1) interpreting unprocessed S-expressions (parse trees) (using "meta-circular" or flat coded interpreters) 2) interpreting processed S-expressions (syntax trees) (this is what my current interpreter does) 3) bytecode compilation and interpretation 4) compiling to native machine code (is it worth while to always use compilation rather than having an interpreter with a compile option?) Are there any other approaches worth considering? -- Mikael Pettersson, Dept of Comp & Info Sci, University of Linkoping, Sweden email: mpe@ida.liu.se or ..!{mcvax,munnari,uunet}!enea!liuida!mpe  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 24 Mar 89 06:00:10 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 24 Mar 89 05:46:35 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 22 Mar 89 19:21:57 GMT From: hefley@rand-unix.arpa (Charlene Hefley) Organization: Rand Corp., Santa Monica, Ca. Subject: Scheme input buffer Message-Id: <1915@randvax.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I'm running TI Scheme on an IBM compatible (Compaq 286). Does anyone know of a way to increase the input buffer size so that I can type ahead more than 15 characters? Thanks a bunch, Charlene Hefley inet: rand-unix.arpa uucp: ...!randvax!hefley  Received: from EDDIE.MIT.EDU by MC.LCS.MIT.EDU via Chaosnet; 23 MAR 89 18:17:41 EST Received: by EDDIE.MIT.EDU with UUCP with smail2.5 with sendmail-5.45/4.7 id ; Thu, 23 Mar 89 18:18:45 EST Received: by spt.entity.com (smail2.5); 23 Mar 89 11:47:45 EST (Thu) To: Scheme@mc.lcs.mit.edu Subject: please add me to this mailing list Message-Id: <8903231147.AA14996@spt.entity.com> Date: 23 Mar 89 11:47:45 EST (Thu) From: alms@spt.entity.com (andrew lm shalit) the subject says it all. thanks. -andrew  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 23 Mar 89 17:44:58 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 23 Mar 89 17:36:49 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 23 Mar 89 19:52:29 GMT From: mailrus!uflorida!haven!uvaarpa!hudson!smf7s@ohio-state.arpa (friedman steven michael) Organization: University of Virginia Subject: Scheme and C Message-Id: <1267@hudson.acc.virginia.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I am running PC-Scheme on an AT compatible. I am using it to design an expert system, but I would like to write the user interface in C, since it will be graphics intensive. Does anybody have any experience with this? (BTW I have Microsoft C) Thanks in advance for any help. Steven M Friedman Mail path: smf7s@virginia.BITNET Voice path: (804) 295 0235 -- Home (804) 924 7625 -- Office  Received: from AI.AI.MIT.EDU (CHAOS 3130) by MC.LCS.MIT.EDU 22 Mar 89 23:52:05 EST Date: Wed, 22 Mar 89 23:57:34 EST From: "Christopher M. Maeda" Subject: Common Requests To: Scheme@MC.LCS.MIT.EDU In-reply-to: Msg of 22 MAR 89 00:14:49 EST from Automatic Scheme Digestifier Message-ID: <561870.890322.MAEDA@AI.AI.MIT.EDU> Perhaps we should write a mail demon that periodically posts answers to the most commonly asked questions such as... What are the differences between lisp and scheme? Where can I find the Gabriel benchmarks? Where do I find the xscheme sources? Then no one will have to ask anymore.  Received: from Xerox.COM (TCP 1500006350) by MC.LCS.MIT.EDU 21 Mar 89 19:28:01 EST Received: from Burger.ms by ArpaGateway.ms ; 21 MAR 89 11:45:23 PST Sender: "Ron_Fischer.mvenvos"@Xerox.COM Date: 21 Mar 89 11:45:05 PST (Tuesday) Subject: Wanted: Comparison of OakLisp and CLOS object systems From: "Ron_Fischer.mvenvos"@Xerox.COM To: Scheme@mc.lcs.mit.EDU Message-ID: <890321-114523-9186@Xerox> Could some kind person who has seriously used OakLisp expound on its similarities and differences to CLOS? Secondary query: could the current implementation of OakLisp be run w/o virtual memory? (ron)  Received: from ZURICH.AI.MIT.EDU (TCP 2206400260) by MC.LCS.MIT.EDU 21 Mar 89 12:31:52 EST Return-Path: Received: from sesame.Stanford.EDU (sesame.stanford.edu) by ZURICH.AI.MIT.EDU; Tue, 21 Mar 89 12:06:07 est Received: by sesame.Stanford.EDU (5.57/Ultrix2.4-C) id AA12277; Tue, 21 Mar 89 09:07:17 PST Date: Tue, 21 Mar 89 09:07:17 PST From: mkatz@sesame.stanford.edu (Morris Katz) Message-Id: <8903211707.AA12277@sesame.Stanford.EDU> To: scheme@ZURICH.AI.MIT.EDU Subject: Billiard Ball Simulator I have been innundated with request for my Billiard Ball Simulator so despite its long length I have decided to post the code. Please note its limitations. This program is NOT a usefull simulator for Billiards, but only a medium sized test program. Morry Katz katz@polya.stanford.edu The following code is a quick hack I wrote for testing my parallelization system on a medium sized program (larger than a toy). It is sort of a billiard ball simulator (see comments at header of program). CAVEAT EMPTOR: 1) I make no promises that this code is bug free. It seems to work on simple test cases, but I have not tested it exhaustively. 2) It uses the MIT Cscheme macro package. A conversion to extend-syntax should be simple. Also, the code could probably be converted to just use functions, with some performance loss. (If you do either of the above, please let me know since it seems silly for multiple people to do the same work. ;;; ;;; BILLIARD.SCM: This file contains code for a very simple billiard ball ;;; simulator. The simulation takes place in two dimensions. ;;; The balls are really disks in that their height is not taken ;;; into account. All interactions are assumed to be ;;; frictionless so spin in irrelevant and not accounted for. ;;; (See section on limitations.) ;;; ;;; NOTES: A simulation is initiated by creating a number of balls and bumpers ;;; and and specifying a duration for the simulation. For each ball, ;;; its mass, radius, initial position, and initial velocity must be ;;; specified. For each bumper, the location of its two ends must be ;;; specified. (Bumpers are assumed to have zero width.) ;;; ;;; A sample run might be started as follows: ;;; (simulate ;;; (list (make-ball 2 1 9 5 -1 -1) ;;; (make-ball 4 2 2 5 1 -1)) ;;; (list (make-bumper 0 0 0 10) ;;; (make-bumper 0 0 10 0) ;;; (make-bumper 0 10 10 10) ;;; (make-bumper 10 0 10 10)) ;;; 30) ;;; ;;; It would create one billiard ball of mass 2 and radius 1 at position ;;; (9, 5) with initial velocity (-1, -1) and a second ball of mass 4 ;;; and radius 2 at position (2, 5) with initial velocity (1, -1). The ;;; table would be a 10X10 square. (See diagram below) ;;; ;;; +---------------------------+ ;;; | | ;;; | | ;;; | XXXX | ;;; | XXXXXXXX XX | ;;; |XXXXXX4XXXXX XXX2XX| ;;; | XXXXXXXX /XX | ;;; | XXXX \ | ;;; | | ;;; | | ;;; +---------------------------+ ;;; ;;; LIMITATIONS: This simulator does not handle 3 body problems correctly. If ;;; 3 objects interact at one time, only the interactions of 2 of ;;; the bodies will be accounted for. This can lead to strange ;;; effects like balls tunneling through walls and other balls. ;;; It is also possible to get balls bouncing inside of each ;;; other in this way. ;;; ;;MAKE-QUEUE-RECORD returns a queue record with the given next, previous, and ;;value values ;;NEXT = The next record pointer ;;PREV = The previous record pointer ;;REST = A list of values for any optional fields (this can be used for ;; creating structure inheritance) (define-macro (make-queue-record next prev . rest) `(vector ,next ,prev ,@rest)) ;;QUEUE-RECORD-NEXT returns the next field of the given queue record ;;QUEUE-RECORD = The queue record whose next field is to be returned (define-macro (queue-record-next queue-record) `(vector-ref ,queue-record 0)) ;;SET-QUEUE-RECORD-NEXT! sets the next field of the given queue record ;;QUEUE-RECORD = The queue record whose next field is to be set ;;VALUE = The value to which the next field is to be set (define-macro (set-queue-record-next! queue-record value) `(vector-set! ,queue-record 0 ,value)) ;;QUEUE-RECORD-PREV returns the prev field of the given queue record ;;QUEUE-RECORD = The queue record whose prev field is to be returned (define-macro (queue-record-prev queue-record) `(vector-ref ,queue-record 1)) ;;SET-QUEUE-RECORD-PREV! sets the prev field of the given queue record ;;QUEUE-RECORD = The queue record whose prev field is to be set ;;VALUE = The value to which the prev field is to be set (define-macro (set-queue-record-prev! queue-record value) `(vector-set! ,queue-record 1 ,value)) ;;QUEUE-RECORD-LEN returns the length of a queue record which has no optional ;;fields (define-macro (queue-record-len) 2) ;;QUEUE-HEAD returns a dummy record at the end of the queue with the record ;;with the smallest key. ;;QUEUE = the queue whose head record is to be returned (define-macro (queue-head queue) `(vector-ref ,queue 0)) ;;QUEUE-TAIL returns a dummy record at the end of the queue with the record ;;with the largest key. ;;QUEUE = the queue whose tail record is to be returned (define-macro (queue-tail queue) `(vector-ref ,queue 1)) ;;QUEUE- dot-product bumper-length-squared)) '() ;Return infinity (+ delta-t ;Else, return the contact time (ball-collision-time ball)))))))))))) ;;BALL-COLLISION-PROCEDURE calculates the new velocities of the given balls ;;based on their collision at the given time. Also, tells all other balls ;;about the new trajectories of these balls so they can update their event ;;queues ;;BALL1 = The first ball ;;BALL2 = The second ball ;;COLLISION-TIME = The collision time ;;GLOBAL-EVENT-QUEUE = The global queue of earliest events for each ball (define (ball-collision-procedure ball1 ball2 collision-time global-event-queue) (queue-remove ;Remove the earliest event associated (ball-global-event-queue-record ;with each ball from the global event ball1)) ;queue (queue-remove (ball-global-event-queue-record ball2)) (let ((ball1-collision-x-position ;Calculate the positions of both balls (+ (ball-collision-x-position ;when they collide ball1) (* (ball-x-velocity ball1) (- collision-time (ball-collision-time ball1))))) (ball1-collision-y-position (+ (ball-collision-y-position ball1) (* (ball-y-velocity ball1) (- collision-time (ball-collision-time ball1))))) (ball2-collision-x-position (+ (ball-collision-x-position ball2) (* (ball-x-velocity ball2) (- collision-time (ball-collision-time ball2))))) (ball2-collision-y-position (+ (ball-collision-y-position ball2) (* (ball-y-velocity ball2) (- collision-time (ball-collision-time ball2)))))) (let ((delta-x ;Calculate the displacements of the (- ball2-collision-x-position ;centers of the two balls ball1-collision-x-position)) (delta-y (- ball2-collision-y-position ball1-collision-y-position))) (let* ((denominator ;Calculate the angle of the line (sqrt (+ (square ;joining the centers at the collision delta-x) ;time with the x-axis (this line is (square ;the normal to the balls at the delta-y)))) ;collision point) (cos-theta (/ delta-x denominator)) (sin-theta (/ delta-y denominator))) (let ((ball1-old-normal-velocity ;Convert the velocities of the balls (+ (* (ball-x-velocity ;into the coordinate system defined by ball1) ;the normal and tangential lines at cos-theta) ;the collision point (* (ball-y-velocity ball1) sin-theta))) (ball1-tang-velocity (- (* (ball-y-velocity ball1) cos-theta) (* (ball-x-velocity ball1) sin-theta))) (ball2-old-normal-velocity (+ (* (ball-x-velocity ball2) cos-theta) (* (ball-y-velocity ball2) sin-theta))) (ball2-tang-velocity (- (* (ball-y-velocity ball2) cos-theta) (* (ball-x-velocity ball2) sin-theta))) (mass1 (ball-mass ball1)) (mass2 (ball-mass ball2))) (let ((ball1-new-normal-velocity ;Calculate the new velocities (/ ;following the collision (the (+ ;tangential velocities are unchanged (* ;because the balls are assumed to be (* 2 ;frictionless) mass2) ball2-old-normal-velocity) (* (- mass1 mass2) ball1-old-normal-velocity)) (+ mass1 mass2))) (ball2-new-normal-velocity (/ (+ (* (* 2 mass1) ball1-old-normal-velocity) (* (- mass2 mass1) ball2-old-normal-velocity)) (+ mass1 mass2)))) (set-ball-x-velocity! ;Store data about the collision in the ball1 ;structure for each ball after (- (* ball1-new-normal-velocity ;converting the information back cos-theta) ;to the x,y frame (* ball1-tang-velocity sin-theta))) (set-ball-y-velocity! ball1 (+ (* ball1-new-normal-velocity sin-theta) (* ball1-tang-velocity cos-theta))) (set-ball-x-velocity! ball2 (- (* ball2-new-normal-velocity cos-theta) (* ball2-tang-velocity sin-theta))) (set-ball-y-velocity! ball2 (+ (* ball2-new-normal-velocity sin-theta) (* ball2-tang-velocity cos-theta))) (set-ball-collision-time! ball1 collision-time) (set-ball-collision-time! ball2 collision-time) (set-ball-collision-x-position! ball1 ball1-collision-x-position) (set-ball-collision-y-position! ball1 ball1-collision-y-position) (set-ball-collision-x-position! ball2 ball2-collision-x-position) (set-ball-collision-y-position! ball2 ball2-collision-y-position)))))) (newline) (display "Ball ") (display (ball-number ball1)) (display " collides with ball ") (display (ball-number ball2)) (display " at time ") (display (ball-collision-time ball1)) (newline) (display " Ball ") (display (ball-number ball1)) (display " has a new velocity of ") (display (ball-x-velocity ball1)) (display ",") (display (ball-y-velocity ball1)) (display " starting at ") (display (ball-collision-x-position ball1)) (display ",") (display (ball-collision-y-position ball1)) (newline) (display " Ball ") (display (ball-number ball2)) (display " has a new velocity of ") (display (ball-x-velocity ball2)) (display ",") (display (ball-y-velocity ball2)) (display " starting at ") (display (ball-collision-x-position ball2)) (display ",") (display (ball-collision-y-position ball2)) (recalculate-collisions ball1 global-event-queue) (recalculate-collisions ball2 global-event-queue)) ;;BUMPER-COLLISION-PROCEDURE calculates the new velocity of the given ball ;;following its collision with the given bumper at the given time. Also, tells ;;other balls about the new trajectory of the given ball so they can update ;;their event queues. ;;BALL = The ball ;;BUMPER = The bumper ;;COLLISION-TIME = The collision time ;;GLOBAL-EVENT-QUEUE = The global queue of earliest events for each ball (define (bumper-collision-procedure ball bumper collision-time global-event-queue) (queue-remove ;Remove the earliest event associated (ball-global-event-queue-record ;with the ball from the global event ball)) ;queue (let ((delta-x-bumper ;Compute the bumper's delta-x (- (bumper-x2 bumper) (bumper-x1 bumper))) (delta-y-bumper ;delta-y (- (bumper-y2 bumper) (bumper-y1 bumper)))) (let ((bumper-length ;length (sqrt (+ (square delta-x-bumper) (square delta-y-bumper))))) (let ((cos-theta ;and cosine and sine of its angle with (/ delta-x-bumper ;respect to the positive x-axis bumper-length)) (sin-theta (/ delta-y-bumper bumper-length)) (x-velocity ;Cache the ball's velocity in the x,y (ball-x-velocity ball)) ;frame (y-velocity (ball-y-velocity ball))) (let ((tang-velocity ;Calculate the ball's velocity in the (+ (* x-velocity ;bumper frame cos-theta) (* y-velocity sin-theta))) (normal-velocity (- (* y-velocity cos-theta) (* x-velocity sin-theta)))) (set-ball-collision-x-position! ;Store the collision position ball (+ (ball-collision-x-position ball) (* (- collision-time (ball-collision-time ball)) (ball-x-velocity ball)))) (set-ball-collision-y-position! ball (+ (ball-collision-y-position ball) (* (- collision-time (ball-collision-time ball)) (ball-y-velocity ball)))) (set-ball-x-velocity! ;Calculate the new velocity in the ball ;x,y frame based on the fact that (+ (* tang-velocity ;tangential velocity is unchanged and cos-theta) ;the normal velocity is inverted when (* normal-velocity ;the ball collides with the bumper sin-theta))) (set-ball-y-velocity! ball (- (* tang-velocity sin-theta) (* normal-velocity cos-theta))) (set-ball-collision-time! ball collision-time))))) (newline) (display "Ball ") (display (ball-number ball)) (display " collides with bumper ") (display (bumper-number bumper)) (display " at time ") (display (ball-collision-time ball)) (newline) (display " Ball ") (display (ball-number ball)) (display " has a new velocity of ") (display (ball-x-velocity ball)) (display ",") (display (ball-y-velocity ball)) (display " starting at ") (display (ball-collision-x-position ball)) (display ",") (display (ball-collision-y-position ball)) (recalculate-collisions ball global-event-queue)) ;;RECALCULATE-COLLISIONS removes all old collisions for the given ball from ;;all other balls' event queues and calcultes new collisions for these balls ;;and places them on the event queues. Also, updates the global event queue if ;;the recalculation of the collision effects the earliest collision for any ;;other balls. ;;BALL = The ball whose collisions are being recalculated ;;GLOBAL-EVENT-QUEUE = The global queue of earliest events for each ball (define (recalculate-collisions ball global-event-queue) (clear-queue (ball-event-queue ;Clear the queue of events for this ball)) ;ball as they have all changed (let ((event-queue ;Calculate all ball collision events (ball-event-queue ball))) ;with balls of lower number (let ((ball-vector (ball-ball-vector ball))) (do ((i (-1+ (ball-number ball)) (-1+ i))) ((negative? i)) (let ((ball2-queue-record (vector-ref ball-vector i))) (set-event-queue-record-collision-time! ball2-queue-record (ball-ball-collision-time ball (event-queue-record-object ball2-queue-record))) (queue-insert event-queue ball2-queue-record)))) (let ((bumper-vector ;Calculate all bumper collision events (ball-bumper-vector ball))) (do ((i (-1+ (vector-length bumper-vector)) (-1+ i))) ((negative? i)) (let ((bumper-queue-record (vector-ref bumper-vector i))) (set-event-queue-record-collision-time! bumper-queue-record (ball-bumper-collision-time ball (event-queue-record-object bumper-queue-record))) (queue-insert event-queue bumper-queue-record)))) (let ((global-queue-record ;Get the global event queue record (ball-global-event-queue-record ;for this ball ball))) (set-event-queue-record-collision-time! ;Set the new earliest event time global-queue-record ;for this ball (if (empty-queue? event-queue) '() (event-queue-record-collision-time (queue-smallest event-queue)))) (queue-insert ;Enqueue on the global event queue global-event-queue ;the earliest event between this ball global-queue-record))) ;and any ball of lower number or any ;bumper (for-each ;For each ball on the ball list: (lambda (ball2) (let ((ball2-event-queue (ball-event-queue ball2))) (let ((alter-global-event-queue? ;Set flag to update global event queue (and ;if the earliest event for ball2 was (not (empty-queue? ;with the deflected ball ball2-event-queue)) (eq? ball (event-queue-record-object (queue-smallest ball2-event-queue))))) (ball-event-queue-record ;Get the queue record for the deflected (vector-ref ;ball for this ball (ball-ball-vector ball2) (ball-number ball)))) (queue-remove ;Remove the queue record for the ball-event-queue-record) ;deflected ball (set-event-queue-record-collision-time! ;Recalculate the collision ball-event-queue-record ;time for this ball and the deflected (ball-ball-collision-time ;ball ball ball2)) (queue-insert ;Enqueue the new collision event ball2-event-queue ball-event-queue-record) (if (or alter-global-event-queue? ;If the earliest collision event for (eq? ball ;this ball has changed: (event-queue-record-object (queue-smallest ball2-event-queue)))) (let ((queue-record ;Remove the old event from the global (ball-global-event-queue-record ;event queue and replace it ball2))) ;with the new event (set-event-queue-record-collision-time! queue-record (event-queue-record-collision-time (queue-smallest ball2-event-queue))) (queue-remove queue-record) (queue-insert global-event-queue queue-record)))))) (ball-ball-list ball))) ;;SIMULATE performs the billiard ball simulation for the given ball list and ;;bumper list until the specified time. ;;BALL-LIST = A list of balls ;;BUMPER-LIST = A list of bumpers ;;END-TIME = The time at which the simulation is to terminate (define (simulate ball-list bumper-list end-time) (let ((num-of-balls ;Cache the number of balls and bumpers (length ball-list)) (num-of-bumpers (length bumper-list)) (global-event-queue ;Build the global event queue (make-sorted-queue collision-time-; Tue, 21 Mar 89 05:02:07 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 18 Mar 89 21:01:04 GMT From: tboutell@vax1.acs.udel.edu (Thomas B Boutell) Organization: University of Delaware Subject: Scheme/ Lisp Differentiation Message-Id: <3130@udccvax1.acs.udel.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I realize I'm not the first to post this question, but I've seen other postings of it and no replies, curiously enough. What are the differences between Scheme and Lisp, essentially? -- *ping!* KIDS, DON'T TRY THIS AT HOME! "in bed. EVERYTHING ends with 'in bed.'" "Look, it's Scooby Doo in bondage!" DISCLAIMER: Datclaimer. Da wun ova there. "Maybe we all is spiderman. Maybe dat's your pwoblem too." "Want a cookie?" What happens if I decrement the user count? (scream in the distance.) *ping!*  Received: from rutgers.edu (TCP 20001402007) by MC.LCS.MIT.EDU 20 Mar 89 05:03:22 EST Received: from mimsy.UUCP by rutgers.edu (5.59/SMI4.0/RU1.1/3.04) with UUCP id AA12755; Mon, 20 Mar 89 05:04:30 EST Received: by mimsy.UMD.EDU (smail2.5) id AA03307; 20 Mar 89 05:02:42 EST (Mon) Received: from prlb2.UUCP by uunet.UU.NET (5.61/1.14) with UUCP id AA18943; Mon, 20 Mar 89 04:53:34 -0500 Received: by prlb2.UUCP (4.12/4.7) id AA12126; Mon, 20 Mar 89 10:48:41 +0100 Received: from apollo12.prl.philips.co.uk by prlhp1.prl.philips.co.uk; Mon, 20 Mar 89 08:55:16 gmt From: Ashok Gupta Date: Mon, 20 Mar 89 08:51:28 bst Message-Id: <375.8903200851@apollo12.prl.philips.co.uk> To: Scheme@mc.lcs.mit.edu Subject: Re: Scheme Digest #86 The tests are in the book "Performance & Evaluation of Lisp Systems" by Richard Gabriel.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 19 Mar 89 19:53:07 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sun, 19 Mar 89 19:23:18 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 19 Mar 89 22:18:17 GMT From: bobg+@andrew.cmu.edu (Robert Steven Glickstein) Organization: Information Technology Center, Carnegie Mellon, Pittsburgh, PA Subject: extend-syntax Message-Id: Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I'm just getting started with Scheme and I have MIT's CScheme, release 6.1.2 (microcode 10.2, runtime 13.91, sf 3.13). I've been reading Dybvig's "The Scheme Programming Language", and I'd like to try out some of the examples in Dybvig's book. Dybvig's Scheme ("Chez Scheme") differs from CScheme in that CScheme does not have the "extend-syntax" function. Does anyone have a R3RS definition of extend-syntax? Thanks in advance, -Bob Glickstein -Information Technology Center, Carnegie Mellon University, Pittsburgh, PA  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 17 Mar 89 17:42:53 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 17 Mar 89 17:30:36 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 17 Mar 89 21:24:30 GMT From: srivas@louie.udel.edu (Mandayam Srivas) Organization: University of Delaware Subject: Gabriel Benchmarks Message-Id: <11096@louie.udel.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I am looking for the Gabriel benchmarks that often used in testing different lisps. What I need really are the tests themselves, along with notes on what aspect of lisp each test is supposed to examine. Does anyone in networld know where I could obtain them, or if they happen to have them, could they mail them to me? Thanks in advance. Srivas.  Received: from XX.LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 15 Mar 89 15:56:41 EST Received: from sesame.Stanford.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Wed 15 Mar 89 15:58:09-EST Received: by sesame.Stanford.EDU (5.57/Ultrix2.4-C) id AA06583; Wed, 15 Mar 89 12:56:59 PST Date: Wed, 15 Mar 89 12:56:59 PST From: mkatz@sesame.stanford.edu (Morris Katz) Message-Id: <8903152056.AA06583@sesame.Stanford.EDU> To: shelby!polya!carcoar.Stanford.EDU!wilson@decwrl.dec.com Cc: Scheme@mc.lcs.mit.edu In-Reply-To: (Paul Wilson's message of 2 Mar 89 18:28:26 GMT <7336@polya.Stanford.EDU> Subject: vanilla Scheme code now or in future? I have a billiard ball simulator which is written in vanilla scheme plus a set of very simple macros which are used to create an object based abstraction for billiard balls and walls. These macros shoulb be convertable to functions in less than 1 hours work. Would you like me to mail you a copy of this code? Morry Katz katz@polya.stanford.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 13 Mar 89 23:56:56 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 13 Mar 89 23:43:01 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 13 Mar 89 14:22:13 GMT From: mcvax!inria!geocub!casteran@uunet.uu.net (Pierre Casteran) Organization: Greco, Bordeaux, France. Subject: Uniformity Message-Id: <1068@geocub.greco-prog.fr> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In Scheme, there are two basic reifying forms: (the-environment)  Received: from ZURICH.AI.MIT.EDU (TCP 2206400260) by MC.LCS.MIT.EDU 13 Mar 89 15:51:39 EST Return-Path: Received: from sesame.Stanford.EDU ([36.22.0.169]) by ZURICH.AI.MIT.EDU; Mon, 13 Mar 89 15:52:11 est Received: by sesame.Stanford.EDU (5.57/Ultrix2.4-C) id AA03884; Mon, 13 Mar 89 12:53:26 PST Date: Mon, 13 Mar 89 12:53:26 PST From: mkatz@sesame.stanford.edu (Morris Katz) Message-Id: <8903132053.AA03884@sesame.Stanford.EDU> To: scheme@ZURICH.AI.MIT.EDU Subject: Lisp compilation I seem to remember reading or hearing about a Lisp system which did "on-the-fly" compilation. In particular, I believe that it compiled specialized versions of polymorphic functions at runtime. It would then cache the specialized version of the code in such a way that repeated uses of the function with the same type arguments would run more efficiently than performing a truly polymorphic dispatch each time. Anybody out there remember anything of this sort? Can you give me a reference to a paper on it? I need this information for a paper which goes to press in 1 week, so please send any replies to me via email ASAP. Thanks in advance, Morry Katz katz@polya.stanford.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 13 Mar 89 12:11:46 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 13 Mar 89 12:03:46 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 13 Mar 89 16:44:28 GMT From: chaynes@iuvax.cs.indiana.edu (Chris Haynes) Organization: Indiana University Subject: Re: HOW DO YOU FREEZE A TI PC-SCHEME SESSION? Message-Id: References: <1907@randvax.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Does anyone know a way to freeze a PC-Scheme session? I've found SoftwareCarousel by SoftLogic Solutions to be very useful with PCS. It allows you to switch, with a hot key, between PCS and other applications, such as an editor. (Epsilon is my favorite editor, since it can be customized to bounce parens and do nice Scheme indentation.) When PCS is swapped out, I it is saved in a file. It should be possible to kept this file somewhere permanent with a DOS copy, thus saving the frozen the session. Doubtless similar things can be done with other DOS swapping utilities. DoubleDos is another candidate, since like SoftwareCarousel, and unlike some others, it's resident memory requirments are modest enough to allow PCS to run moderate sized Scheme programs.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 12 Mar 89 11:41:10 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sun, 12 Mar 89 11:38:30 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 11 Mar 89 16:53:36 GMT From: leverich@rand-unix.arpa (Brian Leverich) Organization: RAND Corp., Santa Monica, CA Subject: HOW DO YOU FREEZE A TI PC-SCHEME SESSION? Message-Id: <1907@randvax.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Does anyone know a way to freeze a PC-Scheme session? I know dos-call can be used to return to dos briefly. Since the session is lost if the machine is rebooted (because part of the session stays memory resident), though, this isn't satisfactory for doing a long-term freeze. Suggestions? Tnx! -B -- "Simulate it in ROSS" Brian Leverich | U.S. Snail: 1700 Main St. ARPAnet: leverich@rand-unix | Santa Monica, CA 90406 UUCP/usenet: decvax!randvax!leverich | Ma Bell: (213) 393-0411 X7769  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 10 Mar 89 05:28:07 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 10 Mar 89 05:26:18 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 8 Mar 89 16:09:24 GMT From: leverich@rand-unix.arpa (Brian Leverich) Organization: RAND Corp., Santa Monica, CA Subject: Windows Coming Unstuck in TI's PC-Scheme Message-Id: <1899@randvax.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I'm running TI's PC-Scheme on a 12 mHz AT clone, and when I write "too fast" to the 'console window the pcs-status-window comes unstuck and scrolls through the 'console window (and other fascinating things appear on the screen). All this seems to have no impact on the operation of the underlying Scheme program. Must be some interesting hardware/software interaction, since the problem doesn't show up when I run the same software on Compaq 12 mHz ATs and PC-Scheme is the only package that scrambles my rice rocket's display. Does anyone else have this problem? More importantly, does anyone know of a cure? -B -- "Simulate it in ROSS" Brian Leverich | U.S. Snail: 1700 Main St. ARPAnet: leverich@rand-unix | Santa Monica, CA 90406 UUCP/usenet: decvax!randvax!leverich | Ma Bell: (213) 393-0411 X7769  Received: from iuvax.cs.indiana.edu (TCP 20123777300) by MC.LCS.MIT.EDU 9 Mar 89 17:12:11 EST Received: by iuvax.cs.indiana.edu To: scheme@mc.lcs.mit.edu From: chaynes@iuvax.cs.indiana.edu (Chris Haynes) Sender: chaynes@iuvax.cs.indiana.edu Newsgroups: comp.lang.scheme Subject: Re: Unknown book reference Date: 9 Mar 89 22:06:10 GMT Organization: Indiana University In-Reply-To: kjell@saturn.ucsc.edu's message of 9 Mar 89 08:21:29 GMT In article <6640@saturn.ucsc.edu> kjell@saturn.ucsc.edu (Kjell Post) writes: In the bibliography in TI-Scheme Language Reference Manual they mention [6] Friedman, Haynes, Kohlbecker, and Wand. "Fundamental Abstractions of Programming Languages and Their Implementation." Programming Language: Abstractions and Their Implementations. To appear. Is this a book? When is it available? The new title is "Programming Languages: Abstraction, Representation, and Implementation." It will be published by MIT Press/McGraw Hill and should appear before the end of this year.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 9 Mar 89 15:40:01 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 3 Mar 89 08:44:29 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 3 Mar 89 05:54:53 GMT From: mailrus!jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!oz@ohio-state.arpa (Ozan Yigit) Organization: York U. Computing Services - Magic Group Subject: Re: vanilla Scheme code now or in future? Message-Id: <1170@yunexus.UUCP> References: <7336@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <7336@polya.Stanford.EDU> wilson@carcoar.Stanford.EDU writes: >... Other than the Gabriel benchmarks (translated by Will >Clinger) and the examples from Abelson and Sussman (with Sussman), >I only got one other program. > Would "scoops" fit your bill ?? It looks fairly clean (R3RS) and would probably give your gc a good run. Would be ftp-available from various places I am sure, or somebody can mail it to you. happy scheming.. oz -- ... and I say to them, Usenet: oz@nexus.yorku.ca `Where the hell were you ......!uunet!utai!yunexus!oz when the page was blank?' Bitnet: oz@[yulibra|yuyetti] Harlan Ellison Phonet: +1 416 736-5257x3976  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 9 Mar 89 15:38:12 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 3 Mar 89 10:11:09 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 3 Mar 89 15:05:02 GMT From: mit-vax!jouvelot@bloom-beacon.mit.edu (Pierre Jouvelot) Organization: MIT Laboratory for Computer Science, Cambridge Subject: Re: vanilla Scheme code now or in future? Message-Id: <5721@mit-vax.LCS.MIT.EDU> References: <7336@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <7336@polya.Stanford.EDU> wilson@carcoar.Stanford.EDU (Paul Wilson) writes: >Does anybody have any serious programs written in something *close* >to vanilla Scheme? I might write some compatibilty macros, etc., >and try to run some PC/Mac/Chez Scheme or T code, but I wouldn't >want to work too hard at that. (If it's too hairy, I'll just use >a different language/processor.) You might want to have a look to the FX-87 Interpreter, which implements the FX-87 programming language designed by the Programming Systems Research Group at MIT. It is mostly written in Scheme (> 95%) with some additional support written in CommonLISP (mainly for packages and hashtables); it runs on top of Jonathan Rees's Pseudoscheme that macroexpands/compiles R3RS Scheme to CommonLISP. We made prototype portings to T and C-Scheme without major problems but we don't make them publicly available (too tentative). The FX-87 Interpreter is available by anonymous ftp (pub/fx/impl) on brokaw.lcs.mit.edu. Hope this helps, Pierre -- Pierre Jouvelot . CAI, Ecole des Mines de Paris, France (JOUVELOT@FREMP11.bitnet) . PSRG, LCS, MIT, Cambridge (JOUVELOT@BROKAW.LCS.MIT.EDU)  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 9 Mar 89 06:27:41 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 9 Mar 89 06:25:53 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 9 Mar 89 08:21:29 GMT From: pasteur!agate!saturn!saturn.ucsc.edu!kjell@ames.arpa (Kjell Post) Organization: University of California, Santa Cruz; CIS/CE Subject: Unknown book reference Message-Id: <6640@saturn.ucsc.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In the bibliography in TI-Scheme Language Reference Manual they mention [6] Friedman, Haynes, Kohlbecker, and Wand. "Fundamental Abstractions of Programming Languages and Their Implementation." Programming Language: Abstractions and Their Implementations. To appear. Is this a book? When is it available?  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 8 Mar 89 18:42:19 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 8 Mar 89 17:57:07 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 8 Mar 89 22:41:14 GMT From: ccncsu!olender@boulder.colorado.edu (Kurt Olender) Organization: Colorado State University, Fort Collins, CO 80525 Subject: Relative Merits of Common Lisp and Scheme? Message-Id: Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Can someone briefly summarize the difference between Common Lisp and Scheme? If I were going to implement a fairly large scale system in one or the other, what factors would I have to consider to choose between them. -- ================================================================================ || Kurt Olender | Internet: olender@cs.colostate.edu || || Phone: (303) 491-7015 | UUCP: hao!handel!olender || ================================================================================  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 7 Mar 89 22:01:46 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 7 Mar 89 21:43:02 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 7 Mar 89 03:06:00 GMT From: uxg.cso.uiuc.edu!uicsrd.csrd.uiuc.edu!kwang@uxc.cso.uiuc.edu Subject: Re: Request for Addition to SCHEME Mail Message-Id: <16800017@uicsrd.csrd.uiuc.edu> References: <324594@<890225161858> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Please add me to the scheme mailing list also. kwang@uicsrd.uiuc.edu thankyou.  Received: from sesame.Stanford.EDU (TCP 4405400251) by MC.LCS.MIT.EDU 7 Mar 89 16:42:48 EST Received: by sesame.Stanford.EDU (5.57/Ultrix2.4-C) id AA06887; Tue, 7 Mar 89 13:41:43 PST Date: Tue, 7 Mar 89 13:41:43 PST From: shaff@sesame.stanford.edu (Mike Shaff) Message-Id: <8903072141.AA06887@sesame.Stanford.EDU> To: Scheme@mc.lcs.mit.edu Subject: dynamic-wind ciao, I am looking for a portable version of 'dynamic-wind' (as documented in MIT C Scheme), I know that Christopher Haynes reported on an implementation in a paper entitled 'Constraining Control,' but I have not been able to find the publication, so I would like to try and find a machine readable version. As a side question are the issues that are preventing this from being part of standard Scheme? (peace chance) mas  Received: from void.ai.mit.edu (TCP 2206400236) by MC.LCS.MIT.EDU 3 Mar 89 15:27:10 EST Received: by void.ai.mit.edu (5.59/1.5) id AA07322; Fri, 3 Mar 89 12:34:24 EST Date: Fri, 3 Mar 89 12:34:24 EST From: jar@void.ai.mit.edu (Jonathan Rees) Message-Id: <8903031734.AA07322@void.ai.mit.edu> To: Scheme@mc.lcs.mit.edu In-Reply-To: (David W Crabb's message of 2 Mar 89 14:42:04 GMT <6774@phoenix.Princeton.EDU> Subject: Stop sending addition/removal requests to the list! Reply-To: jar@zurich.ai.mit.edu Attention usenet readers: the Internet Scheme mailing list is identical to the comp.lang.scheme newsgroup, so if you're already reading comp.lang.scheme, you don't need to be on the Internet list. Anyone who wants to be added to or removed from the Internet list should send mail to Scheme-Request@mc.lcs.mit.edu, NOT to the list itself. This principle holds generally for all Internet mailing lists: send to foo-request@hostname, not foo@hostname. Tell all your friends. Help minimize junk mail traffic. - Moderator.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 2 Mar 89 22:43:39 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 2 Mar 89 22:38:21 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 3 Mar 89 00:12:32 GMT From: nic.MR.NET!srcsip!rd-atlas!nathani@csd4.milw.wisc.edu (Jayesh Naithani) Organization: Honeywell Residential, MN 55422 Subject: Re: Request for Addition to SCHEME Mailing List Message-Id: <431@rd-atlas.UUCP> References: <890225161858.324594@DOCKMASTER.ARPA>, <7069@boulder.Colorado.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Please add me to the SCHEME Mailing list. - Jayesh Naithani ========================================================================== == Jayesh Naithani == == --------------- == == INTERNET: nathani%rd-atlas@src.honeywell.com == == UUCP : {rutgers,ucbvax,...}!srcsip!rd-atlas!nathani == ==========================================================================  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 2 Mar 89 15:36:12 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 2 Mar 89 15:25:43 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 2 Mar 89 20:04:45 GMT From: spot!daniel@boulder.colorado.edu (DANIEL KEN) Organization: University of Colorado, Boulder Subject: Re: Request for Addition to SCHEME Mailing List Message-Id: <7069@boulder.Colorado.EDU> References: <890225161858.324594@DOCKMASTER.ARPA> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Please add me to the scheme mailing list also. ##################################################################### # daniel@spot.colorado.edu | I am Elmer J Fudd, millionare, I # # own a mansion and a yacht # #####################################################################  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 2 Mar 89 14:06:04 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 2 Mar 89 13:52:58 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 2 Mar 89 18:28:26 GMT From: shelby!polya!carcoar.Stanford.EDU!wilson@decwrl.dec.com (Paul Wilson) Organization: Stanford University Subject: vanilla Scheme code now or in future? Message-Id: <7336@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu The response to my request for vanilla Scheme code was less than overwhelming. Other than the Gabriel benchmarks (translated by Will Clinger) and the examples from Abelson and Sussman (with Sussman), I only got one other program. (By the way, thanks to the several people who offered to send me the SICP & Gabriel code. I responded to everybody by mail, but some of the mail seems to have bounced.) There doesn't seem to be much vanilla (e.g., unextended R3RS) Scheme code out there, so now I need to assess my options for gathering statistics. I can port code from other Schemes, wait for more vanilla code to become available, or stick my gc into another language processor such as Kyoto CL or T. Naturally, I'd rather just wait for code to pop up if it won't be too long. Is anybody working on large programs that will be available within the next year or so? Are there projects to produce important pieces of code in portable Scheme, the way there are for Common Lisp (e.g., REDUCE, OPS5)? Does anybody have any serious programs written in something *close* to vanilla Scheme? I might write some compatibilty macros, etc., and try to run some PC/Mac/Chez Scheme or T code, but I wouldn't want to work too hard at that. (If it's too hairy, I'll just use a different language/processor.) Any comments or advice on this? Thanks, Paul Paul R. Wilson Human-Computer Interaction Laboratory lab ph.: (312) 413-0042 U. of Ill. at Chi. EECS Dept. (M/C 154) Box 4348 Chicago,IL 60680 wilson@carcoar.stanford.edu Paul R. Wilson Human-Computer Interaction Laboratory lab ph.: (312) 413-0042 U. of Ill. at Chi. EECS Dept. (M/C 154) Box 4348 Chicago,IL 60680 wilson@carcoar.stanford.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 2 Mar 89 13:05:45 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 2 Mar 89 12:57:47 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 2 Mar 89 14:42:04 GMT From: phoenix!crabb@princeton.edu (David W Crabb) Organization: Princeton University, NJ Subject: Re: Request for Addition to SCHEME Mailing List Message-Id: <6774@phoenix.Princeton.EDU> References: <890225161858.324594@DOCKMASTER.ARPA> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <890225161858.324594@DOCKMASTER.ARPA> POlsen@DOCKMASTER.ARPA writes: >Please add me to the SCHEME information mailing list. Thank you. Me, too . David Crabb crabb@phoenix.princeton.edu  Received: from REAGAN.AI.MIT.EDU (CHAOS 13065) by MC.LCS.MIT.EDU 2 Mar 89 11:30:27 EST Received: from PIGPEN.AI.MIT.EDU by REAGAN.AI.MIT.EDU via CHAOS with CHAOS-MAIL id 177962; Thu 2-Mar-89 11:27:43 EST Date: Thu, 2 Mar 89 11:27 EST From: Alan Bawden Subject: LETREC + CALL/CC = SET! even in a limited setting To: Scheme@MC.LCS.MIT.EDU Message-ID: <19890302162742.4.ALAN@PIGPEN.AI.MIT.EDU> The following function, which I mailed out to this last last February, was intended to demonstrate how CALL-WITH-CURRENT-CONTINUATION could be used to expose the SET! hidden in the definition of LETREC: (define (make-cell) (call-with-current-continuation (lambda (return-from-make-cell) (letrec ((state (call-with-current-continuation (lambda (return-new-state) (return-from-make-cell (lambda (op) (case op ((set) (lambda (value) (call-with-current-continuation (lambda (return-from-access) (return-new-state (list value return-from-access)))))) ((get) (car state))))))))) ((cadr state) 'done))))) Here is another way to do it that has an additional interesting property: (define (make-cell initial-value) (letrec ((state (call-with-current-continuation (lambda (return-new-state) (list initial-value return-new-state #F))))) (if (caddr state) ((caddr state) 'done) (lambda (op) (case op ((get) (car state)) ((set) (lambda (new-value) (call-with-current-continuation (lambda (return-from-set) ((cadr state) (list new-value (cadr state) return-from-set))))))))))) Notice that the variable STATE does not occur anywhere in the right hand side of its own definition in the LETREC. Thus you might think that you could optimize this into an instance of LET. But that optimization would be incorrect (assuming that the expansion of LETREC given in R^3RS really -is- its definition), because then this code will stop producing side-effectable cells. A simpler case of this peculiarity of LETREC: (define (test) (letrec ((x (call-with-current-continuation (lambda (c) (list #T c))))) (if (car x) ((cadr x) (list #F (lambda () x))) (eq? x ((cadr x)))))) (TEST) should return #T. If you replace the LETREC with LET (you might be tempted because X does not appear anywhere in the right hand side of the definition!), then (TEST) will return #F. I wonder if any real compilers make this mistaken optimization?  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 1 Mar 89 21:05:14 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 1 Mar 89 20:58:29 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 1 Mar 89 17:19:48 GMT From: mcdchg!n8ino!craig@rutgers.edu (R. Craig Peterson ) Organization: Mainstream, Schaumburg, IL Subject: Removal from Mailing List Message-Id: <178@n8ino.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Please remove my old account (craig@ncrcpx) from the scheme digest mailing list. I've tried to send mail to the -request mailbox, but haven't been successful! Thanks. -- R. Craig Peterson (N8INO) mcdchg!n8ino!craig craig@n8ino.UUCP  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 27 Feb 89 15:04:29 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 27 Feb 89 14:57:01 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 27 Feb 89 19:13:40 GMT From: titan!dorai@rice.edu (Dorai Sitaram) Organization: Rice University, Houston Subject: Re: Request for Addition to SCHEME Mailing List Message-Id: <2701@kalliope.rice.edu> References: <890225161858.324594@DOCKMASTER.ARPA> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <890225161858.324594@DOCKMASTER.ARPA> POlsen@DOCKMASTER.ARPA writes: >Please add me to the SCHEME information mailing list. Thank you. Me too. Thanks. --dorai  Received: from DOCKMASTER.ARPA (TCP 3200000071) by MC.LCS.MIT.EDU 27 Feb 89 08:41:28 EST Date: Sat, 25 Feb 89 11:18 EST From: POlsen@DOCKMASTER.ARPA Subject: Request for Addition to SCHEME Mailing List To: scheme@MC.LCS.MIT.EDU Message-ID: <890225161858.324594@DOCKMASTER.ARPA> Please add me to the SCHEME information mailing list. Thank you.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 26 Feb 89 18:04:37 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sun, 26 Feb 89 17:53:28 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 26 Feb 89 19:49:06 GMT From: phoenix!crabb@princeton.edu (David W Crabb) Organization: Princeton University, NJ Subject: macros in XSCHEME Message-Id: <6661@phoenix.Princeton.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Below is a commented version of the MACROS.S file which is part of the xscheme package. Please let me have comments on the comments (meta-comments ??) . ------------------------------------------------------------------------ ; comments by DWC ; this will become the universal argument to COMPILE (define (%expand-macros expr) (if (pair? expr) (if (symbol? (car expr)) (let ((expander (get (car expr) '%syntax))) ; prop is put below (2) (if expander (expander expr) ; <-- THEN clause for defined macros (let ((expander (get (car expr) '%macro))) ; prop is put at (1) (if expander (%expand-macros (expander expr)) ; <-- THEN clause for "macro" (cons (car expr) (%expand-list (cdr expr))))))) ; default (%expand-list expr)) ; compound arguments like COND and LET expr)) ; evaluate the atom (define (%expand-list lyst) ; a helper function for the universal arg (if (pair? lyst) (cons (%expand-macros (car lyst)) (%expand-list (cdr lyst))) lyst)) (define %compile compile) ; was at the top ; Note the destructive re-define following : (define (compile expr #!optional env) (if (default-object? env) (%compile (%expand-macros expr)) ; action of the old compile (%compile (%expand-macros expr) env))) ; ** as of now, everything passed to COMPILE will be of the new form. (put 'macro '%macro (lambda (form) (list 'put (list 'quote (cadr form)) (list 'quote '%macro) ; (1) (caddr form)))) (macro compiler-syntax (lambda (form) (list 'put (list 'quote (cadr form)) (list 'quote '%syntax) ; (2) (caddr form)))) (macro syntax (lambda (form) #f)) ; i.e., not implemented ; ******* This completes the re-integration of COMPILE into ; MACRO or COMPILER-SYNTAX or default. Implementation begins here: (compiler-syntax quote (lambda (form) form)) (compiler-syntax lambda (lambda (form) (cons 'lambda (cons (cadr form) (%expand-list (cddr form)))))) (compiler-syntax define (lambda (form) (cons 'define (cons (cadr form) (%expand-list (cddr form)))))) (compiler-syntax set! (lambda (form) (cons 'set! (cons (cadr form) (%expand-list (cddr form)))))) (define (%cond-expander lyst) ; a helper function for what follows immediately (cond ; coincidentally the unexpanded COND ((pair? lyst) (cons (if (pair? (car lyst)) (%expand-list (car lyst)) (car lyst)) (%cond-expander (cdr lyst)))) (else lyst))) (compiler-syntax cond (lambda (form) (cons 'cond (%cond-expander (cdr form))))) ;; the folowing comment block is in the original: ; The following code for expanding let/let*/letrec was donated by: ; ; Harald Hanche-Olsen ; The University of Trondheim ; The Norwegian Institute of Technology ; Division of Mathematics ; N-7034 Trondheim NTH ; Norway (define (%expand-let-assignment pair) ; a mapper in what follows immediately (if (pair? pair) (cons (car pair) (%expand-macros (cdr pair))) pair)) (define (%expand-let-form form) ; (cons (car form) ; let/let*/letrec (cons (let ((lyst (cadr form))) ; coincidentally the unexpanded LET (if (pair? lyst) (map %expand-let-assignment lyst) lyst)) (%expand-list (cddr form))))) (compiler-syntax let %expand-let-form) (compiler-syntax let* %expand-let-form) (compiler-syntax letrec %expand-let-form) (macro define-integrable (lambda (form) (cons 'define (cdr form)))) (macro declare (lambda (form) #f)) ; i.e., not implemented ------------------------------------------------------------------------- David Crabb crabb@phoenix.princeton.edu  Received: from MITVMA.MIT.EDU (TCP 2227000003) by MC.LCS.MIT.EDU 26 Feb 89 16:38:58 EST Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (IBM VM SMTP R1.1) with BSMTP id 5032; Sun, 26 Feb 89 16:39:22 EST Received: from URVAX.BITNET (LUNDIN) by MITVMA.MIT.EDU (Mailer X1.25) with BSMTP id 5207; Sun, 26 Feb 89 16:39:21 EST Date: Sun, 26 Feb 89 16:43 EST From: John Lundin Jr Subject: looking for pub domain OPS To: Scheme@mc.lcs.mit.edu X-VMS-To: IN%"Scheme@mc.lcs.mit.edu" (Yes, there is some tie-in to the list :-) For the last five years or so, off and on, I've been hearing about a public domain OPS-5. Does anyone know where to find this mythical release? The original was said to have been in a MacLisp dialect, but rumor has claimed that other PD translations existed, Scheme among them. So... Does anyone know of a version in any or all of: -Scheme -Common Lisp -MacLisp dialect -Other high level language -VAX/VMS whatever -MS-Dos whatever (ugh) or at least of a PD, HLL version of the resolution mechanism? Documentation? Since this isn't properly a Scheme topic, please post responses to me and I will summarize to interested parties (or to the list if enough interest). Thank you all, -john - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - John Lundin, Jr. lundin@urvax.bitnet "Immature programmers imitate, University of Richmond lundin@urvax.urich.edu mature programmers steal"  Received: from zohar (TCP 2212600256) by MC.LCS.MIT.EDU 24 Feb 89 15:34:00 EST Received: by ZOHAR.AI.MIT.EDU; Fri, 24 Feb 89 15:36:59 est Date: Fri, 24 Feb 89 15:36:59 est From: jems@ZOHAR.AI.MIT.EDU (Julie Sussman) Message-Id: <8902242036.AA06702@zohar> To: polya!carcoar.Stanford.EDU!wilson@labrea.stanford.edu Cc: Scheme@mc.lcs.mit.edu In-Reply-To: (Paul Wilson's message of 23 Feb 89 23:42:18 GMT <7140@polya.Stanford.EDU> Subject: need R3RS code to test my new generational gc I don't know if someone has put the SICP code in a place you can get it with ftp, but I can send it to you in messages, if you like. Let me know if you want that. Julie Sussman  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 24 Feb 89 05:34:54 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 24 Feb 89 04:50:05 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 24 Feb 89 05:39:52 GMT From: polya!carcoar.Stanford.EDU!wilson@labrea.stanford.edu (Paul Wilson) Organization: Stanford University Subject: got SICP code (don't send more) ... still need other R3RS code Message-Id: <7159@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I've already got the Abelson & Sussman code. (And now I know it's part of the MIT Scheme distribution.) I'm still looking for more R3RS programs to test my system. thanks, Paul Paul R. Wilson Human-Computer Interaction Laboratory lab ph.: (312) 413-0042 U. of Ill. at Chi. EECS Dept. (M/C 154) Box 4348 Chicago,IL 60680 wilson@carcoar.stanford.edu  Received: from kleph.ai.mit.edu (TCP 2212600254) by MC.LCS.MIT.EDU 24 Feb 89 00:58:45 EST Received: by kleph.ai.mit.edu (5.59/1.5) id AA08130; Fri, 24 Feb 89 01:00:50 EST Date: Fri, 24 Feb 89 01:00:50 EST From: cph@kleph.ai.mit.edu (Chris Hanson) Message-Id: <8902240600.AA08130@kleph.ai.mit.edu> To: polya!carcoar.Stanford.EDU!wilson@labrea.stanford.edu (Paul Wilson) Cc: Scheme@mc.lcs.mit.edu In-Reply-To: Automatic Scheme Digestifier's message of 24 FEB 89 00:12:42 EST Subject: need R3RS code to test my new generational gc Reply-To: cph@zurich.ai.mit.edu Date: 23 Feb 89 23:42:18 GMT From: polya!carcoar.Stanford.EDU!wilson@labrea.stanford.edu (Paul Wilson) I believe I heard somewhere that the programs from Abelson & Sussman's _Structure_and_Interpretation_of_Computer_Programs_ are available in machine-readable format via ftp. Could anybody tell me how to get them? And maybe the Scheme versions of the Gabriel benchmarks? All of these programs are available via anonymous ftp from "zurich.ai.mit.edu". Get the following files: pub/6.001/examples.tar pub/gabriel.bench/gabriel.1 pub/gabriel.bench/gabriel.2 pub/gabriel.bench/gabriel.3 pub/gabriel.bench/gabriel.4  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 23 Feb 89 19:34:40 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 23 Feb 89 19:25:48 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 23 Feb 89 23:42:18 GMT From: polya!carcoar.Stanford.EDU!wilson@labrea.stanford.edu (Paul Wilson) Organization: Stanford University Subject: need R3RS code to test my new generational gc Message-Id: <7140@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I'm looking for a few good programs to test my new generational gc on. The gc is for Scheme-48, which is pretty much bare-bones R3RS. At the moment, I'm looking for programs that won't take much porting, preferably none. (The debugging cycle is abysmally long at the moment, and there are no debugging tools.) I believe I heard somewhere that the programs from Abelson & Sussman's _Structure_and_Interpretation_of_Computer_Programs_ are available in machine-readable format via ftp. Could anybody tell me how to get them? And maybe the Scheme versions of the Gabriel benchmarks? I'm looking for all sizes and kinds of programs. (At the moment, even little ones will help me test the system; later I'll want large ones for gathering serious gc statistics.) Assuming I get the SICP code, I shouldn't need any more of the ubiquitous Scheme-in-Scheme programs. (I've already run one.) Other than that, though, the field is wide open. The more "real" the program, the better. Thanks prematurely, Paul Paul R. Wilson Human-Computer Interaction Laboratory lab ph.: (312) 413-0042 U. of Illin. at C. EECS Dept. (M/C 154) wilson@carcoar.stanford.edu Box 4348 Chicago,IL 60680 Paul R. Wilson Human-Computer Interaction Laboratory lab ph.: (312) 413-0042 U. of Ill. at Chi. EECS Dept. (M/C 154) Box 4348 Chicago,IL 60680 wilson@carcoar.stanford.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 21 Feb 89 23:47:38 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 21 Feb 89 23:34:08 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 20 Feb 89 22:59:05 GMT From: hefley@rand-unix.arpa (Charlene Hefley) Organization: Rand Corp., Santa Monica, Ca. Subject: pattern matching and read tables question Message-Id: <1889@randvax.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Hi, I have a pattern matcher (written in Scheme) that I would like to give the capability of stripping prefix characters from words. For example, I would like to pass the pattern matcher something like: +variable and change it to be: + variable The "+", of course, will not be present on all words in the pattern. The most obvious solution is to use explode and implode, but I'm looking for something much more efficient. I would guess that altering the read table would be the way to go. Then I wouldn't have to do the "explosion" inside the pattern matcher at all. At least, I think that's possible; I really don't know much about read tables. Any advice on how to solve this problem (with read tables or otherwise) would be most appreciated. You may reply directly to me. Thanks in advance, Charlene Hefley inet: rand-unix.arpa uucp: ...!randvax!hefley  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 21 Feb 89 20:18:08 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 21 Feb 89 19:11:17 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 21 Feb 89 22:36:42 GMT From: uoregon!will@beaver.cs.washington.edu (William Clinger) Organization: University of Oregon, Computer Science, Eugene OR Subject: Re: R^4 Report? Message-Id: <3906@uoregon.uoregon.edu> References: <2065@star.cs.vu.nl> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu >Does anyone know whether there is a R^4 Report on Scheme in preparation >or currently available? I am editing the R4RS. A draft labelled R^3.9RS was distributed for the recent IEEE/MSC/P1178 meeting. A draft labelled R^3.95RS will be available via ftp for proof-reading in about a week. The R4RS should be essentially the same as that draft, except for typos and oversights. William Clinger  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 20 Feb 89 22:47:10 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 20 Feb 89 22:37:19 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 20 Feb 89 14:36:10 GMT From: mcvax!hp4nl!botter!star.cs.vu.nl!roelw%cs.vu.nl@uunet.uu.net Organization: VU Informatica, Amsterdam Subject: R^4 Report? Message-Id: <2065@star.cs.vu.nl> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Does anyone know whether there is a R^4 Report on Scheme in preparation or currently available? Roel Wieringa  Received: from ZERMATT.LCS.MIT.EDU (CHAOS 17316) by MC.LCS.MIT.EDU 18 Feb 89 17:46:20 EST Received: from MICKEY-MOUSE.LCS.MIT.EDU by ZERMATT.LCS.MIT.EDU via CHAOS with CHAOS-MAIL id 231769; Sat 18-Feb-89 17:47:35 EST Date: Sat, 18 Feb 89 17:47 EST From: Edmund Lai Sender: SCHREQ@MC.LCS.MIT.EDU Subject: Binary files To: scheme@MC.LCS.MIT.EDU Message-ID: <19890218224724.0.SCHREQ@MICKEY-MOUSE.LCS.MIT.EDU> From: Edmund Lai To: Scheme-Request@mc.lcs.mit.edu Date: Tue, 7 Feb 89 15:39:33 WST Subject: Binary files I am using TI's PC-Scheme v.3 and have come across one problem recently which I hope someone would be able to help. I have some binary data files -- in fact they are 12-bit binary digitized speech sample data -- I need to read. Is there any way of doing this with scheme? Seems to me that it can only read ASCII files. Edmund Lai Department of Electrical & Electronic Engineering University of Western Australia Nedlands Western Australia 6009  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 18 Feb 89 16:16:21 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 18 Feb 89 16:01:50 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 18 Feb 89 06:31:26 GMT From: portal!cup.portal.com!HyperDriven@uunet.uu.net (Joseph C McDonald) Organization: The Portal System (TM) Subject: Re: Scheme mailing list Message-Id: <14776@cup.portal.com> References: <680@cs-spool.calgary.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I have an idea, how about if the holder of the source to XSCHEME post it on ****.sources and then post to tell everyone where it is postedOr if the source is not available how about if they just post it in ****.binaries. Even if the Docs are very limited I am sure that with enough people playing around with this thing a lot of information will be posting on the net. This is just an idea, and maybe a poor one, I don't know. I don't even know what SCHEME is! I sure would like to find out though. Would anyone like to give me a brief synopsis on this thing? Thanks -=Joseph=- HyperDriven@cup.portal.com I think sometimes I think I think sometimes..... - Ron Greeny  Received: from CENTRO.SOAR.CS.CMU.EDU (TCP 20000557276) by MC.LCS.MIT.EDU 17 Feb 89 00:50:57 EST Date: Fri, 17 Feb 89 00:50:44 EST From: Olin.Shivers@CENTRO.SOAR.CS.CMU.EDU To: Scheme@mc.lcs.mit.edu, t-users@YALE.ARPA Subject: Process modes for gnu emacs --- I have some new process modes for interacting with T and Scheme (and shell, TeX, and Lisp) processes in gnu emacs. A description of these modes is appended to this msg. The package itself is too large to be shipped out with this msg -- the compressed shar file is 50kb. If you would like to try the modes out, you may retrieve the file by anonymous ftp from zurich.ai.mit.edu (18.26.0.176): - log in with user id "anonymous" - Set the transfer type to image or binary (command "binary" or somesuch). - get pub/cmu/cmuproc.shar.Z - leave ftp, uncompress & de-shar the file. MIT CScheme users may prefer to remain with xscheme.el mode. See the discussion about this is the notes below. -Olin ------ Notes follow ------ I have written new gnu-emacs packages that provide shell, inferior lisp, inferior scheme, and inferior T modes. These packages have the following advantages over the standard released gnu packages: - Input history is kept in all modes, traversed with M-p and M-n, just like on LispM's and various fancy shells. - Filename completion and query is available in all modes. - Keybindings are cross-compatible among all modes. - Keybindings are compatible with Zwei and Hemlock. - Directory tracking is more robust in shell mode, and is *only* active in shell mode. (Try entering "cd /" to an inferior lisp in the old package: Lisp barfs, but the inferior lisp mode goes ahead and changes the buffer's directory.) - Non-echoed text entry (for entering passwords) is available in all modes. - Shell and inferior Lisp modes are backwards compatible with the standard gnu modes. - One source for the inferior Lisp mode works in both emacs releases 18.4x and 18.5x. This has been the cause of confusing bugs for users who unwittingly tried to use an 18.4x version inferior Lisp mode in an 18.5x version emacs, and vice-versa. - A full set of eval/compile-region/defun commands for the inferior Lisp, Scheme, and T modes. - New modes are easily created for new types of processes. =============================================================================== THE BAD NEWS: It would be nice if the shell & inferior lisp package, cmushell.el, was completely plug-compatible with the old package in shell.el -- if you could just name the new version shell.el, and have it transparently replace the old one. But you can't. Several other packages (tex-mode, background, dbx, gdb, kermit, monkey, prolog, telnet) are also clients of shell mode. These packages assume detailed knowledge of shell mode internals in ways that are incompatible with the new mode (mostly because of the new mode's greater functionality). So, unless we are willing to port all of these packages, we can't have the new shell package be a complete replacement for shell.el -- that is, we can't name the file shell.el, and its main entry point (shell), because dbx.el will break when it loads it in and tries to use it. There are two ways to fix this. One: rewrite these other modes to use the new package. This is a win, but can't be assumed. The other, backwards compatible route, is to make this package non-conflict with shell.el, so both files can be loaded in at the same time. This is what I have done. So the mode names and major functions have different names, e.g: shell.el cmushell.el -------- ---------- M-x shell M-x cmushell -- Fire up a shell M-x run-lisp M-x cmulisp -- Fire up a lisp shell-mode-map cmushell-mode-map -- Keybindings for [cmu]shell mode All the names have been carefully chosen so that shell.el and cmushell.el won't tromp on each other -- that way dbx.el and friends can happily load in shell.el without breaking the cmushell.el package, and vice versa. With the exception of M-x cmushell and M-x cmulisp, however, most of the name changes are invisible to the user. Further, most of the customising variables that are common in functionality have the same name: inferior-lisp-program, explicit-shell-file-name, et al. Hook variables are different, so you can customise shell-mode and cmushell-mode differently, for instance. By the way, it is rather easy to port the shell.el-dependent packages to use the new stuff. There are fairly complete comments in the relevant source files showing how to do this. Note that this backwards-compatibility hassle *only* affects shell and inferior lisp mode; the other process-in-a-buffer modes (Scheme, T, etc.) do not have this problem. =============================================================================== GENERALIA: The implementation strategy was to factor common process functionality into a general command interpreter mode -- comint mode -- and then to build all the specific modes on top. This provides uniform, integrated functionality and interface across all the derived modes. Comint mode provides the input history, filename completion and query, non-echoed text entry, input editing, and process signalling (e.g., ^z, ^c, ...) commands. *Any* mode built on comint mode gets all this stuff automatically. Additionally, comint mode has general hooks for customising it to specific command interpreters, such as Lisp, Scheme, csh, ML, etc.. This release includes the following files: - comint.el comint mode - cmushell.el cmushell and cmulisp modes, built on comint mode. - cmuscheme.el inferior Scheme mode, built on comint mode. - tea.el inferior T mode, built on comint mode. - tea2.el Variant of tea.el - cmutex.el tex-mode.el with rewritten process interaction code. Some bugs also fixed. These packages have been in daily use by a user community of about 10-20 at CMU since August; most bugs have been shaken out. cmutex.el is less tested. Please notify me of bugs. The files are *extensively* commented; this should serve as sufficient documentation. Each file includes suggestions for your .emacs file in comments at the top. On-line documentation (C-h C-m, C-h C-f, C-h C-v) is available for modes, commands, and variables. This source is available on an FSF-style basis: use it any way you like as long as you don't charge money for it or change the basis of its availability; I assume no liability for its use. =============================================================================== INPUT HISTORY: There are actually two different ways to retrieve old commands for resubmission to a process. The standard way is to use the input history mechanism. An internal list is kept in each process buffer of the last n inputs (default: 30). The commands M-p and M-n move through this list. This is similar in functionality to the input history mechanisms provided by the LispM, Hemlock, and various fancy shells (tcsh, cmucsh, ksh,...). There is also a command, bound to C-c r, which searches backwards through the input history looking for a substring match. RMS doesn't like this mechanism. He has suggested an input history mechanism that operates by searching backwards (and forwards) through the buffer for occurrences of the prompt. The user can then resubmit the input by hitting return. I do not like this mechanism. If the prompt changes dynamically, you can miss a command. False positives are also annoying. The screen jumps around a lot as you scroll through your history. If you run a subprogram that has a null prompt (like dc), prompt search will miss all its inputs. Etc. However, you may try either of these mechanisms, and go with the style you prefer. The RMS-style prompt-search stuff is available on M-N and M-P (meta-shift-n and meta-shift-P); C-c R is bound to a command that searches for specific commands (analogous to C-c r). If you use this stuff, you will probably want to sharpen up the regular expression used to match the prompt in each mode to match your particular prompt -- the default, general regexp used in shell mode generates too many annoying false positives. (It's local variable comint-prompt-regexp -- you should set it in a hook). =============================================================================== MIT CSCHEME, XSCHEME.EL AND CMUSCHEME.EL: MIT Cscheme, when invoked with the -emacs flag, has a special user interface that communicates process state back to the superior emacs by outputting special control sequences. The gnumacs package, xscheme.el, has lots and lots of special purpose code to read these control sequences, and so is very tightly integrated with the cscheme process. The cscheme interrupt handler and debugger read single character commands in cbreak mode; when this happens, xscheme.el switches to special keymaps that bind the single letter command keys to emacs functions that directly send the character to the scheme process. Cmuscheme mode does *not* provide this functionality. If you are a cscheme user, you may prefer to use the xscheme.el/cscheme -emacs interaction. Here's a summary of the pros and cons, as I see them. xscheme: Tightly integrated with inferior cscheme process! A few commands not in cmuscheme. But. Integration is a bit of a hack. Input history only keeps the immediately prior input. Bizarre keybindings. cmuscheme: Not tightly integrated with inferior cscheme process. But. Carefully integrated functionality with the entire suite of comint-derived CMU process modes. Keybindings reminiscent of Zwei and Hemlock. Good input history. A few commands not in xscheme. It's a tradeoff. Pay your money; take your choice. If you use a Scheme that isn't Cscheme, of course, there isn't a choice. Xscheme.el is *very* Cscheme-specific; you must use cmuscheme.el. It would definitely be possible to stick the winning bits of cmuscheme.el into xscheme.el, or vice-versa. The friendly folks at Cscheme Central may be moved to do the former (I haven't discussed it with them). Interested parties are invited to do the latter. I am not a Cscheme user, so I won't be doing it myself. -Olin  Received: from andromeda.rutgers.edu (TCP 20001405004) by MC.LCS.MIT.EDU 14 Feb 89 17:08:35 EST Received: by andromeda.rutgers.edu (5.59/SMI4.0/RU1.0/3.01) id AA21833; Tue, 14 Feb 89 17:10:06 EST Date: Tue, 14 Feb 89 17:10:06 EST From: yadav@andromeda.rutgers.edu (Ashish Yadav) Message-Id: <8902142210.AA21833@andromeda.rutgers.edu> To: scheme@mc.lcs.mit.edu Subject: CLISP Hi, I'd like to download CLISP for our pyramid machine. Could you let me know which file I should download from /scheme. Also if you could put me onto the mailing lists. Hope to hear from you soon. Ash.  Received: from Xerox.COM (TCP 1500006350) by MC.LCS.MIT.EDU 14 Feb 89 01:09:57 EST Received: from Burger.ms by ArpaGateway.ms ; 13 FEB 89 22:11:04 PST Sender: "Adolfo_G._Pacheco.ESXC15"@Xerox.COM Date: 13 Feb 89 22:10:40 PST (Monday) Subject: Please delete me. From: "Adolfo_G._Pacheco.ESXC15"@Xerox.COM To: Scheme@mc.lcs.mit.EDU In-Reply-to: Scheme-Request%mc.lcs.mit:EDU:Xerox's message of 4-February-89 (Saturday) 21:15:52 PST Message-ID: <890213-221104-8579@Xerox> Please delete me from your list thanks,agp I am leaving Xerox  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 13 Feb 89 11:59:52 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 13 Feb 89 11:53:29 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 13 Feb 89 16:09:03 GMT From: a.gp.cs.cmu.edu!koopman@pt.cs.cmu.edu (Philip Koopman) Organization: Carnegie-Mellon University, CS/RI Subject: Combinator reduction applications? Message-Id: <4263@pt.cs.cmu.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I am studying combinator graph reduction techniques for implementing functional programming languages. My question is, if very fast implementations became available, what applications would they find? Specifically: -- What applications for functional programming languages -- What applications for combinator graph reduction in general If possible, estimate the performance level on a workstation platform required to make your favorite application run reasonably fast to the nearest order of magnitude: -- 10,000 reduction applications per second (MIRANDA speed) -- 100,000 reduction applications per second (SKIM, NORMA, special-purpose hardware type speeds) -- 1,000,000 reduction applications per second ... etc ... If I get a reasonable response, I will summarize results. By the way, yes I have read about TIM, so any input on closure reducer applications as well as graph reducer applications is appreciated. Thanks, Phil Koopman koopman@maxwell.ece.cmu.edu Arpanet 5551 Beacon St. Pittsburgh, PA 15217 PhD student at CMU. --  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 11 Feb 89 06:40:48 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 11 Feb 89 06:36:44 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 10 Feb 89 21:51:30 GMT From: att!alberta!calgary!cpsc!jameson@bloom-beacon.mit.edu (Kevin Jameson) Subject: Re: xscheme Message-Id: <692@cs-spool.calgary.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu If anyone was considering mailing me a copy of xscheme, please save your effort. The disk which I had sent to Dave Betz showed up today (without postage, torn somewhat, but with readable goods inside). Thank you David Betz.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 10 Feb 89 07:10:27 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 10 Feb 89 06:48:54 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 9 Feb 89 15:56:08 GMT From: att!alberta!calgary!cpsc!jameson@bloom-beacon.mit.edu (Kevin Jameson) Subject: Re: Scheme mailing list Message-Id: <680@cs-spool.calgary.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Would someone please be kind enough to post (or email to jameson@cpsc.UCalgary.CA) the sources and documentation for David Betz's XSCHEME? I have been trying for months to obtain a copy, and have been unsuccessful in all attempts, including -mailing a disk to Dave Betz -asking for mailings from two others on the net who had it. Here in Canada we can't ftp it off the internet, but we can reach SIMTEL20 if someone can get it to Keith Peterson. Please help if you can. Thank you. Kevin  Received: from LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 8 Feb 89 22:24:53 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Wed 8 Feb 89 21:28:45-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 8 Feb 89 20:54:22 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 9 Feb 89 00:36:48 GMT From: polya!caron@labrea.stanford.edu (Ilan G. Caron) Organization: Stanford University Subject: xscheme Message-Id: <6738@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I've had lots of requests for xscheme, which I've attempted to answer promptly etc. etc. Unfortunately I stepped on my mail file so I've (possibly) lost some of those requests. If you've asked for xscheme and you don't get anything say by next Monday (13/2) - please ask again. BTW, maybe we should setup a comp.lang.scheme.x newsgroup... anyone know what the canonic way of doing that is? --ilan caron@polya.stanford.edu  Received: from LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 8 Feb 89 22:24:33 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Wed 8 Feb 89 21:18:38-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 8 Feb 89 21:09:08 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 7 Feb 89 18:30:46 GMT From: mailrus!jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!ists!mike@csd4.milw.wisc.edu (Mike Clarkson) Organization: Institute for Space and Terrestrial Science Subject: C-Scheme name completion for GNU Emacs Message-Id: <363@ists.ists.ca> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Loading this file gives C-Scheme command completion, so that M-TAB completes the word before the cursor to a Scheme command. I usually have this set for any Scheme-mode window, and I define the interactive command scheme to set up the shell buffer ready for scheme. It also sets up the tags-file-name to the TAGS file in my Scheme source directory, so I can do M-. tags searches. You will have to change the values of tags-file-name and shell-prompt-pattern to suit you site. ;;; scheme-complete.el ;; Mike Clarkson (mike@ists.ists.ca) - January 1989 ;; ;; I put something like ; ;; (autoload 'process-send-ca "scheme-complete" "Send a ^C^A in shell mode" t) ;; (autoload 'process-send-cg "scheme-complete" "Send a ^C^G in shell mode" t) ;; (autoload 'scheme-complete-symbol "scheme-complete" ;; "Complete a Scheme command in shell mode" t) ;; ;; (defun scheme () ;; (interactive) ;; (setq tags-file-name "/usr1/ai/scheme/mit/TAGS") ;; (setq shell-prompt-pattern "^[0-9]+ .*%[=---]+> ") ;; (shell) ;; (define-key shell-mode-map "\C-c\C-a" 'process-send-ca) ;; (define-key shell-mode-map "\C-c\C-g" 'process-send-cg) ;; (define-key shell-mode-map "\e\C-i" 'scheme-complete-symbol) ;; ) ;; ;; (setq scheme-mode-hook ;; '(lambda () ;; (define-key scheme-mode-map "\e\C-i" 'scheme-complete-symbol)) ;; ) ;; ;; in my ~/.emacs and say M-x scheme when I want to program ; ; in the shell buffer in scheme. This gives me scheme command completion, ;;;; and the ability to send ^A or ^G in the shell mode (using ^C^A and ^C^G). ;; It also adds scheme command completion to Scheme mode. (defun process-send-ca () (interactive) (process-send-string (get-buffer-process (current-buffer)) "\C-a")) (defun process-send-cg () (interactive) (process-send-string (get-buffer-process (current-buffer)) "\C-g")) (defun scheme-complete-symbol () "Perform completion on the Scheme symbol preceding point. That symbol is compared against the symbols that exist in the Scheme obarray, and any additional characters determined by what is there are inserted. All symbols with function definitions, values or properties are considered." (interactive) (let* ((end (point)) (beg (save-excursion (backward-sexp 1) (while (= (char-syntax (following-char)) ?\') (forward-char 1)) (point))) (pattern (buffer-substring beg end)) (completion (try-completion pattern *scheme-obarray*))) (cond ((eq completion t)) ((null completion) (message "Can't find completion for \"%s\"" pattern) (ding)) ((not (string= pattern completion)) (delete-region beg end) (insert completion)) (t (message "Making completion list...") (let ((list (all-completions pattern *scheme-obarray*))) (with-output-to-temp-buffer "*Help*" (display-completion-list list))) (message "Making completion list...%s" "done"))))) (setq *scheme-obarray* (mapcar 'list '( "%cd" "%exit" "%ge" "%gst" "%in" "%out" "%pwd" "%ve" "%ve-prompt" "%vst" "&list-to-vector" "&pair-car" "&pair-cdr" "&pair-set-car!" "&pair-set-cdr!" "&singleton-element" "&singleton-set-element!" "&subvector-to-list" "&triple-first" "&triple-second" "&triple-set-first!" "&triple-set-second!" "&triple-set-third!" "&triple-third" "&typed-pair-cons" "&typed-singleton-cons" "&typed-triple-cons" "&typed-vector-cons" "&vector-ref" "&vector-size" "&vector-to-list" "*" "*args*" "*current-input-port*" "*current-output-port*" "*fluid-let-type*" "*parser-radix*" "*parser-table*" "*proc*" "*rep-base-environment*" "*rep-base-input-port*" "*rep-base-output-port*" "*rep-base-prompt*" "*rep-base-syntax-table*" "*rep-current-environment*" "*rep-current-input-port*" "*rep-current-output-port*" "*rep-current-prompt*" "*rep-current-syntax-table*" "*rep-error-hook*" "*rep-keyboard-map*" "*result*" "*the-non-printing-object*" "*unparser-list-breadth-limit*" "*unparser-list-depth-limit*" "*unparser-radix*" "+" "-" "-1+" "->pathname" "/" "1+" "2d-get" "2d-get-alist-x" "2d-get-alist-y" "2d-put!" "2d-remove!" "<" "<=" "=" ">" ">=" "abort->nearest" "abort->previous" "abort->top-level" "abort-to-nearest-driver" "abort-to-previous-driver" "abort-to-top-level-driver" "abs" "access" "access-components" "access-environment" "access-name" "access-type" "access\?" "acos" "add-event-receiver!" "add-gc-daemon!" "add-secondary-gc-daemon!" "add-system!" "add-to-population!" "advice" "advice-package" "advise-entry" "advise-exit" "and" "angle" "append!" "append" "apply" "ascii->char" "asin" "assignment-components" "assignment-components-with-variable" "assignment-name" "assignment-type" "assignment-value" "assignment-variable" "assignment\?" "assoc" "association-procedure" "assq" "assv" "atan" "beep" "begin" "bit-string->signed-integer" "bit-string->unsigned-integer" "bit-string-allocate" "bit-string-and!" "bit-string-andc!" "bit-string-append" "bit-string-append-reversed" "bit-string-clear!" "bit-string-fill!" "bit-string-length" "bit-string-move!" "bit-string-movec!" "bit-string-or!" "bit-string-ref" "bit-string-set!" "bit-string-xor!" "bit-string-zero\?" "bit-string=\?" "bit-string\?" "bit-substring" "bit-substring-find-next-set-bit" "bit-substring-move-right!" "bkpt" "block-declaration-text" "block-declaration\?" "boolean\?" "break" "break-both" "break-entry" "break-exit" "breakpoint" "breakpoint-procedure" "breakpoint-prompt" "caaaar" "caaadr" "caaar" "caadar" "caaddr" "caadr" "caar" "cadaar" "cadadr" "cadar" "caddar" "cadddr" "caddr" "cadr" "call-with-current-continuation" "call-with-input-file" "call-with-output-file" "canonicalize-input-filename" "canonicalize-output-filename" "car" "case" "cdaaar" "cdaadr" "cdaar" "cdadar" "cdaddr" "cdadr" "cdar" "cddaar" "cddadr" "cddar" "cdddar" "cddddr" "cdddr" "cddr" "cdr" "ceiling" "cell-contents" "cell-type" "cell\?" "char->ascii" "char->digit" "char->integer" "char->name" "char->string" "char-alphabetic\?" "char-alphanumeric\?" "char-ascii\?" "char-bits" "char-bits-limit" "char-ci->integer" "char-ci<=\?" "char-ci<\?" "char-ci=\?" "char-ci>=\?" "char-ci>\?" "char-code" "char-code-limit" "char-downcase" "char-graphic\?" "char-integer-limit" "char-lower-case\?" "char-numeric\?" "char-ready\?" "char-set" "char-set-difference" "char-set-intersection" "char-set-invert" "char-set-member\?" "char-set-members" "char-set-predicate" "char-set-union" "char-set:alphabetic" "char-set:alphanumeric" "char-set:graphic" "char-set:lower-case" "char-set:not-whitespace" "char-set:numeric" "char-set:standard" "char-set:upper-case" "char-set:whitespace" "char-set\?" "char-standard\?" "char-upcase" "char-upper-case\?" "char-whitespace\?" "char:newline" "char<=\?" "char<\?" "char=\?" "char>=\?" "char>\?" "char\?" "chars->ascii" "circular-list" "close-all-open-files" "close-input-port" "close-output-port" "code->char" "coerce-to-environment" "combination-components" "combination-operands" "combination-operator" "combination-size" "combination-type" "combination\?" "comment-components" "comment-expression" "comment-text" "comment-type" "comment\?" "common-lisp-fluid-let!" "compiled-code-address->block" "compiled-code-address\?" "compiled-code-block/environment" "compiled-procedure-entry" "compiled-procedure-environment" "compiled-procedure-type" "compiled-procedure\?" "complex\?" "compound-procedure-type" "compound-procedure\?" "cond" "conditional-alternative" "conditional-components" "conditional-consequent" "conditional-predicate" "conditional-type" "conditional\?" "cons" "cons*" "cons-stream" "console-input-port" "console-output-port" "continuation-annotation" "continuation-dynamic-state" "continuation-environment" "continuation-evaluated-object-value" "continuation-evaluated-object\?" "continuation-expression" "continuation-fluid-bindings" "continuation-next-continuation" "continuation-package" "continuation-reductions" "continuation-return-code" "continuation-type" "continuation-undefined-environment\?" "continuation-undefined-expression\?" "continuation\?" "continue-rep" "copy-file" "copy-pathname" "copy-syntax-table" "cos" "current-dynamic-state" "current-input-port" "current-output-port" "current-unsyntax-table" "date" "date->string" "debug" "debugger-package" "declaration-components" "declaration-expression" "declaration-text" "declaration-type" "declaration\?" "declare" "deep-fluid-let!" "define" "define-macro" "define-syntax" "definition-components" "definition-name" "definition-type" "definition-value" "definition\?" "defstruct-package" "del-assoc!" "del-assoc" "del-assq!" "del-assq" "del-assv!" "del-assv" "delay" "delay-components" "delay-expression" "delay-type" "delay\?" "delayed-evaluation-environment" "delayed-evaluation-expression" "delayed-evaluation-forced\?" "delayed-evaluation-value" "delayed\?" "delete!" "delete" "delete-association-procedure" "delete-file" "delete-member-procedure" "delq!" "delq" "delv!" "delv" "digit->char" "disable-scan-defines!" "disjunction-alternative" "disjunction-components" "disjunction-predicate" "disjunction-type" "disjunction\?" "disk-restore" "disk-save" "display" "do" "dump-world" "dynamic-wind" "eighth" "emacs-interface-package" "empty-stream\?" "enable-scan-defines!" "entry-advice" "environment-arguments" "environment-bindings" "environment-extension-aux-list" "environment-extension-procedure" "environment-extension\?" "environment-has-parent\?" "environment-package" "environment-parent" "environment-procedure" "environment-type" "environment-warning-hook" "environment\?" "eof-object" "eof-object\?" "eq\?" "equal\?" "eqv\?" "error" "error-combination-type" "error-from-compiled-code" "error-irritant" "error-message" "error-procedure" "error-prompt" "error-system" "eval" "even\?" "event-distributor\?" "event:after-restart" "event:after-restore" "exact->inexact" "exact\?" "except-last-pair!" "except-last-pair" "execute-at-new-state-point" "exists-an-inhabitant\?" "exit-advice" "exp" "expt" "extend-syntax-table" "false" "false-procedure" "false-type" "false\?" "fasdump" "fasload" "fifth" "file-exists\?" "final-segment" "first" "fix:*" "fix:+" "fix:-" "fix:-1+" "fix:1+" "fix:<" "fix:=" "fix:>" "fix:divide" "fix:gcd" "fix:negative\?" "fix:positive\?" "fix:quotient" "fix:remainder" "fix:zero\?" "fixed-objects-vector-slot" "floor" "fluid-let" "for-all-inhabitants\?" "for-all\?" "for-each" "force" "format" "fourth" "full-quit" "future\?" "garbage-collector-package" "gc-flip" "gc-history-mode" "gc-statistics" "gc-statistics-package" "gcd" "gctime" "general-car-cdr" "generate-uninterned-symbol" "get-fixed-objects-vector" "hash" "head" "history-package" "home-directory-pathname" "identify-system" "identify-world" "identity-procedure" "if" "imag-part" "implementation-dependencies" "implemented-primitive-procedure\?" "impurify" "in-package" "in-package-components" "in-package-environment" "in-package-expression" "in-package-type" "in-package\?" "inexact->exact" "inexact\?" "init-file-pathname" "initial-segment" "input-port-tag" "input-port\?" "integer->char" "integer-divide" "integer-divide-quotient" "integer-divide-remainder" "integer-expt" "integer\?" "interrupt-mask-all" "interrupt-mask-gc-ok" "interrupt-mask-none" "interrupt-system" "keyboard-interrupt-dispatch-table" "lambda" "lambda-body" "lambda-bound" "lambda-components" "lambda-components*" "lambda-components**" "lambda-package" "lambda-pattern/name" "lambda-pattern/optional" "lambda-pattern/required" "lambda-pattern/rest" "lambda-tag:common-lisp-fluid-let" "lambda-tag:deep-fluid-let" "lambda-tag:let" "lambda-tag:make-environment" "lambda-tag:shallow-fluid-let" "lambda-tag:unnamed" "lambda-type" "lambda\?" "last-pair" "lcm" "length" "let" "let*" "let-syntax" "letrec" "lexical-assignment" "lexical-reference" "lexical-unassigned\?" "lexical-unbound\?" "lexical-unreferenceable\?" "list" "list->string" "list->vector" "list-copy" "list-deletor!" "list-deletor" "list-ref" "list-search-negative" "list-search-positive" "list-tail" "list-transform-negative" "list-transform-positive" "list\?" "load" "load-noisily" "load-noisily\?" "load-system!" "local-assignment" "local-declare" "log" "macro" "macro-spreader" "magnitude" "make-access" "make-assignment" "make-assignment-from-variable" "make-bit-string" "make-block-declaration" "make-cell" "make-char" "make-combination" "make-command-loop" "make-comment" "make-conditional" "make-declaration" "make-definition" "make-delay" "make-disjunction" "make-environment" "make-event-distributor" "make-false" "make-in-package" "make-initialized-vector" "make-interned-symbol" "make-keyboard-interrupt-dispatch-table" "make-lambda" "make-lambda*" "make-lambda**" "make-list" "make-name-generator" "make-named-tag" "make-non-pointer-object" "make-null" "make-open-block" "make-pathname" "make-polar" "make-population" "make-primitive-procedure" "make-quotation" "make-rectangular" "make-rep" "make-return-address" "make-sequence" "make-state-space" "make-string" "make-sub-type" "make-symbol" "make-syntax-table" "make-the-environment" "make-true" "make-type-dispatcher" "make-unassigned-object" "make-unassigned\?" "make-unbound-object" "make-unbound\?" "make-union-type" "make-unsyntax-table" "make-variable" "make-vector" "map" "map*" "map-over-population!" "map-over-population" "map-reference-trap" "mapc" "mapcan" "mapcan*" "mapcar" "mapcar*" "max" "max-reductions" "max-subproblems" "measure-interval" "member" "member-procedure" "memq" "memv" "merge-pathnames" "microcode-error" "microcode-identification-item" "microcode-return" "microcode-system" "microcode-termination" "microcode-termination-name" "microcode-type" "microcode-type-name" "microcode-type-object" "microcode-type-predicate" "min" "modulo" "name->char" "named-lambda" "negative-list-searcher" "negative-list-transformer" "negative\?" "newline" "non-printing-object\?" "non-reentrant-call-with-current-continuation" "not" "null-continuation\?" "null-procedure" "null-type" "null\?" "number->string" "number-of-external-primitive-procedures" "number-of-internal-primitive-procedures" "number-of-microcode-errors" "number-of-microcode-returns" "number-of-microcode-terminations" "number-of-microcode-types" "number-parser-package" "number-type" "number-unparser-package" "number\?" "object-hash" "object-type" "object-unhash" "odd\?" "open-block-components" "open-block-type" "open-block\?" "open-input-file" "open-output-file" "or" "output-port-tag" "output-port\?" "pa" "package/scode-optimizer" "pair\?" "parse-pathname" "parser-package" "parser-table-copy" "parser-table-entry" "pathname->absolute-pathname" "pathname->input-truename" "pathname->output-truename" "pathname->string" "pathname-absolute\?" "pathname-as-directory" "pathname-components" "pathname-device" "pathname-directory" "pathname-directory-path" "pathname-directory-string" "pathname-extract" "pathname-extract-string" "pathname-name" "pathname-name-path" "pathname-name-string" "pathname-new-device" "pathname-new-directory" "pathname-new-name" "pathname-new-type" "pathname-new-version" "pathname-newest" "pathname-type" "pathname-unparse" "pathname-unparse-name" "pathname-version" "pathname\?" "peek-char" "population\?" "positive-list-searcher" "positive-list-transformer" "positive\?" "pp" "predicate->char-set" "primitive-datum" "primitive-io" "primitive-procedure-arity" "primitive-procedure-name" "primitive-procedure-type" "primitive-procedure\?" "primitive-set-type" "primitive-type" "primitive-type\?" "print-gc-statistics" "printer-history" "procedure-components" "procedure-environment" "procedure-lambda" "procedure-package" "procedure-type" "procedure\?" "proceed" "promise-type" "purify" "push-command-hook" "push-command-loop" "push-rep" "quasiquote" "quit" "quotation-expression" "quotation-type" "quotation\?" "quote" "quotient" "random" "randomize" "rational\?" "raw-continuation->continuation" "raw-continuation\?" "read" "read-bits!" "read-char" "read-char-no-hang" "read-eval-print" "read-file" "read-string" "reader-history" "real-part" "real\?" "reference-trap-kind" "reference-trap-kind-name" "reference-trap\?" "remainder" "remove-event-receiver!" "remove-from-population!" "rename-file" "rep-base-environment" "rep-base-prompt" "rep-base-syntax-table" "rep-continuation" "rep-environment" "rep-input-port" "rep-level" "rep-message-hook" "rep-output-port" "rep-prompt" "rep-prompt-hook" "rep-state" "rep-syntax-table" "rep-value-hook" "replace-rep!" "reset-keyboard-interrupt-dispatch-table!" "return-address-code" "return-address-name" "return-address\?" "reverse!" "reverse" "round" "runtime" "runtime-system" "save-world" "scan-defines" "scheme-pretty-printer" "scode-constant\?" "scode-eval" "scode-quote" "screen-clear" "second" "sequence" "sequence-actions" "sequence-components" "sequence-type" "sequence\?" "set!" "set-assignment-value!" "set-assignment-variable!" "set-car!" "set-cdr!" "set-cell-contents!" "set-comment-expression!" "set-comment-text!" "set-current-dynamic-state!" "set-current-unsyntax-table!" "set-declaration-expression!" "set-declaration-text!" "set-default-gc-safety-margin!" "set-definition-name!" "set-definition-value!" "set-environment-extension-parent!" "set-interrupt-enables!" "set-keyboard-interrupt-dispatch-table!" "set-lambda-body!" "set-parser-table-entry!" "set-rep-base-environment!" "set-rep-base-prompt!" "set-rep-base-syntax-table!" "set-rep-environment!" "set-rep-prompt!" "set-rep-syntax-table!" "set-string-length!" "set-symbol-global-value!" "set-working-directory-pathname!" "seventh" "sf" "sf/add-file-declarations!" "sf/set-file-syntax-table!" "sfu\?" "shallow-fluid-let!" "signed-integer->bit-string" "simplify-directory" "sin" "sixth" "sort" "special-name\?" "sqrt" "standard-rep-message" "standard-rep-prompt" "stickify-input-filenames" "string->input-port" "string->list" "string->number" "string->pathname" "string->symbol" "string->uninterned-symbol" "string-allocate" "string-append" "string-capitalize!" "string-capitalize" "string-capitalized\?" "string-ci<=\?" "string-ci<\?" "string-ci=\?" "string-ci>=\?" "string-ci>\?" "string-compare" "string-compare-ci" "string-copy" "string-downcase!" "string-downcase" "string-fill!" "string-find-next-char" "string-find-next-char-ci" "string-find-next-char-in-set" "string-find-previous-char" "string-find-previous-char-ci" "string-find-previous-char-in-set" "string-hash" "string-length" "string-lower-case\?" "string-match-backward" "string-match-backward-ci" "string-match-forward" "string-match-forward-ci" "string-maximum-length" "string-null\?" "string-output-port" "string-pad-left" "string-pad-right" "string-prefix-ci\?" "string-prefix\?" "string-ref" "string-replace!" "string-replace" "string-set!" "string-trim" "string-trim-left" "string-trim-right" "string-upcase!" "string-upcase" "string-upper-case\?" "string<=\?" "string<\?" "string=\?" "string>=\?" "string>\?" "string\?" "substring" "substring->list" "substring-capitalized\?" "substring-ci<\?" "substring-ci=\?" "substring-downcase!" "substring-fill!" "substring-find-next-char" "substring-find-next-char-ci" "substring-find-next-char-in-set" "substring-find-previous-char" "substring-find-previous-char-ci" "substring-find-previous-char-in-set" "substring-lower-case\?" "substring-match-backward" "substring-match-backward-ci" "substring-match-forward" "substring-match-forward-ci" "substring-move-left!" "substring-move-right!" "substring-prefix-ci\?" "substring-prefix\?" "substring-replace!" "substring-replace" "substring-upcase!" "substring-upper-case\?" "substring<\?" "substring=\?" "subvector->list" "subvector-fill!" "subvector-move-left!" "subvector-move-right!" "suspend-world" "symbol->pathname" "symbol->string" "symbol-append" "symbol-global-value" "symbol-hash" "symbol-print-name" "symbol-type" "symbol\?" "syntax" "syntax*" "syntax-table-define" "syntax-table-ref" "syntax-table-shadow" "syntax-table-undefine" "syntax-table\?" "syntaxer-package" "system-clock" "system-global-environment" "system-global-syntax-table" "system-hunk3-cons" "system-hunk3-cxr0" "system-hunk3-cxr1" "system-hunk3-cxr2" "system-hunk3-set-cxr0!" "system-hunk3-set-cxr1!" "system-hunk3-set-cxr2!" "system-list-to-vector" "system-pair-car" "system-pair-cdr" "system-pair-cons" "system-pair-set-car!" "system-pair-set-cdr!" "system-pair\?" "system-state-space" "system-subvector-to-list" "system-vector-ref" "system-vector-set!" "system-vector-size" "system-vector\?" "tail" "tan" "the-empty-stream" "the-environment" "the-environment-type" "the-environment\?" "there-exists\?" "third" "time" "time->string" "timer-interrupt" "toggle-gc-notification!" "trace" "trace-both" "trace-entry" "trace-exit" "transcript-off" "transcript-on" "transform-type-dispatcher" "translate-to-state-point" "true" "true-procedure" "true-type" "truncate" "type-object-name" "type-object-predicate" "type-object-type" "type-object\?" "type-system" "unadvise" "unadvise-entry" "unadvise-exit" "unassigned-object\?" "unassigned-type" "unassigned\?" "unassigned\?-components" "unassigned\?-name" "unassigned\?-type" "unassigned\?\?" "unbound-object\?" "unbound-reference-trap\?" "unbound-type" "unbound?" "unbound\?-components" "unbound\?-name" "unbound\?-type" "unbound\?\?" "unbreak" "unbreak-entry" "unbreak-exit" "undefined-conditional-branch" "unhash" "unparse-with-brackets" "unparser-package" "unparser-special-object-type" "unscan-defines" "unsigned-integer->bit-string" "unsyntax" "unsyntax-lambda-list" "unsyntax-table\?" "unsyntaxer-package" "untrace" "untrace-entry" "untrace-exit" "user-initial-environment" "user-initial-prompt" "user-initial-prompt-string" "user-initial-syntax-table" "using-syntax" "valid-hash-number\?" "variable-components" "variable-name" "variable-type" "variable\?" "vector" "vector-8b-fill!" "vector-8b-find-next-char" "vector-8b-find-next-char-ci" "vector-8b-find-previous-char" "vector-8b-find-previous-char-ci" "vector-8b-ref" "vector-8b-set!" "vector->list" "vector-cons" "vector-copy" "vector-eighth" "vector-fifth" "vector-fill!" "vector-first" "vector-fourth" "vector-grow" "vector-length" "vector-map" "vector-ref" "vector-second" "vector-set!" "vector-seventh" "vector-sixth" "vector-third" "vector\?" "wait-interval" "where" "with-external-interrupts-handler" "with-history-disabled" "with-input-from-file" "with-input-from-port" "with-input-from-string" "with-interrupt-mask" "with-interrupts-reduced" "with-keyboard-interrupt-dispatch-table" "with-new-history" "with-output-to-file" "with-output-to-port" "with-output-to-string" "with-output-to-truncated-string" "with-proceed-point" "with-rep-continuation" "with-scan-defines-disabled" "with-scan-defines-enabled" "with-standard-proceed-point" "with-threaded-continuation" "with-unsyntax-table" "within-continuation" "without-interrupts" "working-directory-package" "working-directory-pathname" "write" "write-bits!" "write-char" "write-line" "write-string" "write-to-string" "zero\?" ))) -- Mike Clarkson mike@ists.UUCP Institute for Space and Terrestrial Science mike@ists.ists.ca York University, North York, Ontario, uunet!mnetor!yunexus!ists!mike CANADA M3J 1P3 +1 (416) 736-5611  Received: from ATHENA (TCP 2222000047) by MC.LCS.MIT.EDU 8 Feb 89 18:50:40 EST Received: by ATHENA.MIT.EDU (5.45/4.7) id AA27646; Wed, 8 Feb 89 13:50:02 EST From: Received: by M11-113-3.MIT.EDU (5.45/4.7) id AA00808; Wed, 8 Feb 89 13:49:36 EST Message-Id: <8902081849.AA00808@M11-113-3.MIT.EDU> To: Scheme@mc.lcs.mit.edu Cc: gabriel@mit.edu Subject: Scheme mailing list Date: Wed, 08 Feb 89 13:49:34 EST I have been receiving mail from a scheme mailing list directed to your name. Would you be able to remove me from this mailing list (I'm not sure how I got on it). Thanks, Rob Grace  Received: from decwrl.dec.com (TCP 20013204401) by MC.LCS.MIT.EDU 8 Feb 89 03:55:32 EST Received: from saturn.pa.dec.com by decwrl.dec.com (5.54.5/4.7.34) for scheme@mc.lcs.mit.edu; id AA14378; Tue, 7 Feb 89 13:36:30 PST Received: from localhost by saturn.pa.dec.com (5.54.5/4.7.34) id AA05739; Tue, 7 Feb 89 13:37:38 PST Message-Id: <8902072137.AA05739@saturn.pa.dec.com> To: Scheme@mc.lcs.mit.edu Cc: bartlett@decwrl.dec.com Subject: Scheme->C compiler tech report Date: Tue, 07 Feb 89 13:37:35 -0800 From: bartlett@decwrl.dec.com A tech report describing a Scheme-to-C compiler done at Digitial's Western Research Laboratory is now available. To inspect the abstract or order a copy, send a mail message to: Digital E-net: DECWRL::WRL-TECHREPORTS DARPA Internet: wrl-techreports@decwrl.dec.com CSnet: wrl-techreports@decwrl.dec.com UUCP: decwrl!wrl-techreports Include the word "help" in the subject line and the server will return instructions. jfb  Received: from LCS.MIT.EDU by MC.LCS.MIT.EDU via Chaosnet; 7 FEB 89 14:53:50 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Mon 6 Feb 89 03:39:49-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 6 Feb 89 03:33:19 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 5 Feb 89 14:45:49 GMT From: mailrus!pan!jal@ohio-state.arpa (Jason Leigh) Organization: Computer Science Department, Wayne State University Subject: Scheme object oriented support Message-Id: <502@pan> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Is there an object oriented support package (like CLOS) for Scheme that is readily ftp-able? Also the R^3 MIT-Scheme manual does not seem to want to reveal the use of macros on their system (for obvious reasons), does anyone have any information on how to use them? Thanks. Jason Leigh  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 4 Feb 89 15:37:01 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 4 Feb 89 15:26:35 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 4 Feb 89 06:20:50 GMT From: mailrus!jarvis.csri.toronto.edu!utgpu!utzoo!yunexus!ists!mike@ohio-state.arpa (Mike Clarkson) Organization: Institute for Space and Terrestrial Science Subject: X11R3 for MIT C-Scheme 6.1? Message-Id: <362@ists.ists.ca> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Does anyone have the patches for MIT C-Scheme to make it run with X11 R3? If so, I'd appreciate getting a copy. Many thanks in advance, Mike. -- Mike Clarkson mike@ists.UUCP Institute for Space and Terrestrial Science mike@ists.ists.ca York University, North York, Ontario, uunet!mnetor!yunexus!ists!mike CANADA M3J 1P3 +1 (416) 736-5611  Received: from chamartin.ai.mit.edu (TCP 2212600253) by MC.LCS.MIT.EDU 4 Feb 89 00:25:11 EST Received: by chamartin.ai.mit.edu (5.59/1.5) id AA07309; Sat, 4 Feb 89 00:24:53 EST Date: Sat, 4 Feb 89 00:24:53 EST From: jinx@chamartin.ai.mit.edu (Guillermo J. Rozas) Message-Id: <8902040524.AA07309@chamartin.ai.mit.edu> To: polya!caron@labrea.stanford.edu Cc: Scheme@mc.lcs.mit.edu In-Reply-To: Automatic Scheme Digestifier's message of 3 FEB 89 00:04:23 EST Subject: emacs and xscheme Reply-To: jinx@zurich.ai.mit.edu M-x run-scheme in fact runs an xscheme subprocess - but fails to send anything to it. My emacs has no such problem with Cscheme - hence I suspect xscheme. If you are using GNU Emacs and a reasonably recent version of MIT CScheme, the interface code in your Emacs may not work with anything else but your version of CScheme. There is some form of handshake between GNU Emacs and CScheme, which presumably is not implemented by xscheme. This would probably prevent them from working together.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 2 Feb 89 17:36:21 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 2 Feb 89 17:19:20 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 2 Feb 89 14:53:38 GMT From: mailrus!pan!jal@ohio-state.arpa (Jason Leigh) Organization: Computer Science Department, Wayne State University Subject: vgrind vgrindef and Scheme Message-Id: <495@pan> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Does anyone know what all the weird symbols in the vgrindef file mean? I want to write a definition for vgrind to process Scheme source code. Any hints? Also is there a Scheme pretty-printer that will maintain cases; the pp on MIT-Scheme puts everything in Uppercase. Thanks.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 2 Feb 89 07:51:12 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 2 Feb 89 05:25:56 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 2 Feb 89 04:56:00 GMT From: polya!caron@labrea.stanford.edu (Ilan G. Caron) Organization: Stanford University Subject: xscheme documentation Message-Id: <6577@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu David MacKenzie mailed me the canonic xscheme documentation, I've bundled it up with xscheme.tar.Z on labrea. A NOTE FROM THE AUTHOR If you have any problems with XScheme, feel free to contact me for help or advice. Please remember that since XScheme is available in source form in a high level language, many users have been making versions available on a variety of machines. If you call to report a problem with a specific version, I may not be able to help you if that version runs on a machine to which I don't have access. Please have the version number of the version that you are running readily accessible before calling me. If you find a bug in XScheme, first try to fix the bug yourself using the source code provided. If you are successful in fixing the bug, send the bug report along with the fix to me. If you don't have access to a C compiler or are unable to fix a bug, please send the bug report to me and I'll try to fix it. Any suggestions for improvements will be welcomed. Feel free to extend the language in whatever way suits your needs. However, PLEASE DO NOT RELEASE ENHANCED VERSIONS WITHOUT CHECKING WITH ME FIRST!! I would like to be the clearing house for new features added to XScheme. If you want to add features for your own personal use, go ahead. But, if you want to distribute your enhanced version, contact me first. I'm also posting Dave Betz's email address here under the assumption that he really means it when he says: "...please send the bug report to me and I'll try to fix it". It's: zinn!mipsmag!dbetz@decvax.dec.com (If that's a faux pas then my hand is available for slapping). --ilan  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 2 Feb 89 00:06:21 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 2 Feb 89 00:01:31 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 2 Feb 89 03:49:19 GMT From: polya!caron@labrea.stanford.edu (Ilan G. Caron) Organization: Stanford University Subject: emacs and xscheme Message-Id: <6576@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Well, xscheme compiles and runs at least on Ultrix and System V so far. Now if someone could explain the mysteries of emacs inferior processes and tell us how to get emacs to interact with xscheme. M-x run-scheme in fact runs an xscheme subprocess - but fails to send anything to it. My emacs has no such problem with Cscheme - hence I suspect xscheme. Any guesses? --ilan  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 1 Feb 89 22:06:24 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 1 Feb 89 21:21:24 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 2 Feb 89 00:25:37 GMT From: polya!caron@labrea.stanford.edu (Ilan G. Caron) Organization: Stanford University Subject: unix xscheme Message-Id: <6573@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I've created a new xscheme.tar.Z for anonymous ftp on labrea.stanford.edu. This one includes unix compatibility files that originate with Dave Betz. Many thanks to David MacKenzie for sending them to me. I haven't tried them out yet - but he says they seem to work fine on vanilla System V. As to documentation, if someone wants to come up with at least a brief functional description plus a list of procedure names, that would be a Good Thing. --ilan P.S. I suppose I should say the MIT Cscheme is also available from various locations, not least from MIT itself. I use it on machines that already have it, but downloading a uuencoded version of it over a slow phone line to my home box is not a viable proposition. (uucp is a dirty word around here apparently).  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 1 Feb 89 18:21:17 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 1 Feb 89 16:42:56 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 1 Feb 89 19:58:03 GMT From: polya!caron@labrea.stanford.edu (Ilan G. Caron) Organization: Stanford University Subject: xscheme again... Message-Id: <6555@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I've had a numerous requests for documentation, explanation etc. re xscheme. I suppose I should have included all standard disclaimers in my original posting... well, here goes: I am in no way involved in the development or support of xscheme. I'm simply making it ftp available so that some kind soul will do the unix port so that I can use it on my unix machine. As far as I know, Dave Betz is the person responsible - he's accessible via BYTE magazine or on BIX. As to documentation, there seems to be nothing around. A couple of people have already mailed me a unix compatibility source file - I'll take a look and either bundle one of them with xscheme.tar.Z or just include them all and let you decide. --ilan  Received: from bu-it.BU.EDU (TCP 20061201050) by MC.LCS.MIT.EDU 1 Feb 89 16:01:41 EST Received: from BUCSF.BU.EDU by bu-it.BU.EDU (5.58/4.7) id AA26275; Wed, 1 Feb 89 15:54:38 EST Received: by bucsf (4.12/4.7) id AA11642; Wed, 1 Feb 89 15:55:10 est Date: Wed, 1 Feb 89 15:55:10 est From: gjc%bucsf.BU.EDU@bu-it.bu.edu (George J. Carrette) Message-Id: <8902012055.AA11642@bucsf> To: Scheme@mc.lcs.mit.edu Subject: Scheme pretty printer Pace Willison actually did quite a nice scheme pretty printer while at the now-defunct LispMachineInc. He was modeling the thing after the famous ITS @ATSIGN program listing generator, and had it generating cross references and bold fonts and everything. I think the code produced a DVI file directly, and was written in lispmachine lisp. The purpose was to generate listings of the compiler from the Yale T system, suitable for reading while in the head. It did a good job at that. Maybe somebody can reach him at BBN and find out if he has a copy. -gjc  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 31 Jan 89 19:37:31 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 31 Jan 89 16:42:10 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 31 Jan 89 20:36:48 GMT From: polya!caron@labrea.stanford.edu (Ilan G. Caron) Organization: Stanford University Subject: xscheme distribution available Message-Id: <6510@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Well, the xscheme distribution is now available for anonymous ftp from labrea.stanford.edu (I'm not sure what its numerical address is - if someone needs to know, I can find out). Login as anonymous, any password, cd pub and get xscheme.tar.Z in binary mode. If anyone manages to get a unix port working, please let the rest of us know. --ilan caron@polya.stanford.edu P.S. if you don't have ftp access, I don't mind mailing out a uuencoded version.  Received: from LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 31 Jan 89 09:13:04 EST Received: from void.ai.mit.edu by XX.LCS.MIT.EDU with TCP/SMTP; Sat 28 Jan 89 16:36:05-EST Received: by void.ai.mit.edu (5.59/1.5) id AA10503; Sat, 28 Jan 89 16:40:18 EST Date: Sat, 28 Jan 89 16:40:18 EST From: jar@void.ai.mit.edu (Jonathan Rees) Message-Id: <8901282140.AA10503@void.ai.mit.edu> To: schaefer!uhura!quale%csd4.milw.wisc.edu@lcs.mit.edu Cc: Scheme@mc.lcs.mit.edu In-Reply-To: (Douglas E. Quale's message of 26 Jan 89 21:18:32 GMT <143@uhura.cs.wisc.edu> Subject: Scheme semantics Reply-To: jar@zurich.ai.mit.edu Date: 26 Jan 89 21:18:32 GMT From: schaefer!uhura!quale@csd4.milw.wisc.edu (Douglas E. Quale) The R3RS section on formal semantics states that the semantic description was machine generated from an executable specification in Scheme. Are either of these programs still around? Both Scheme semantic description and the translator might be of interest. For the semantics, send a request to scheme-librarian@zurich.ai.mit.edu. I think it's part of the MIT Scheme distribution, if you have that. I wrote that fabled Scheme-to-TeX "uglyprinter", and it was far from perfect. It didn't do a very good job of figuring out line breaks or indentation, for example; I ended up doing almost all of that by hand (took me several days). I think I let the program slip into oblivion when the MIT AI lab's TOPS-20 system went away. You could probably write a transliterator at least as good in an hour or two.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 30 Jan 89 05:50:00 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 30 Jan 89 02:46:43 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 30 Jan 89 04:12:04 GMT From: polya!caron@labrea.stanford.edu (Ilan G. Caron) Organization: Stanford University Subject: actually about Xscheme Message-Id: <6446@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu [This is cross-posted as Xlisp and Xscheme are genetically related]. I've got my hands on the xscheme distribution for what looks like ms-dos machines. I'd like to get it up on a Unix System V machine. I'm not much of a C or Unix hacker - has anyone done this or can point me in the right direction? (As far as I can see, it comes down to straightforward I/O stuff - but when I see too many &'s and *'s on the same line I freak out...) thanks, --ilan caron@polya.stanford.edu  Received: from LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 27 Jan 89 16:20:09 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Thu 26 Jan 89 23:50:29-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 26 Jan 89 23:33:38 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 26 Jan 89 21:18:32 GMT From: schaefer!uhura!quale@csd4.milw.wisc.edu (Douglas E. Quale) Organization: Undergraduate Projects Laboratory, University of Wisc. - Madison Subject: Scheme semantics Message-Id: <143@uhura.cs.wisc.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu The R3RS section on formal semantics states that the semantic description was machine generated from an executable specification in Scheme. Are either of these programs still around? Both Scheme semantic description and the translator might be of interest. -- Doug Quale quale@uhura.cs.wisc.edu  Received: from zurich (TCP 2206400260) by MC.LCS.MIT.EDU 27 Jan 89 14:38:48 EST Return-Path: Received: from sesame.Stanford.EDU ([36.22.0.169]) by ZURICH.AI.MIT.EDU; Fri, 27 Jan 89 14:39:03 est Received: by sesame.Stanford.EDU (5.57/Ultrix2.4-C) id AA10448; Fri, 27 Jan 89 11:38:01 PST Date: Fri, 27 Jan 89 11:38:01 PST From: mkatz@sesame.stanford.edu (Morris Katz) Message-Id: <8901271938.AA10448@sesame.Stanford.EDU> To: scheme@zurich.ai.mit.edu Subject: Request for scheme code Before I got to the trouble of writing Scheme code for regular expression matching, I thought I would send out a quick message to see if anyone already has this code and would be willing to give it to me. Any volunteers? Morry Katz katz@polya.stanford.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 24 Jan 89 20:33:49 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 24 Jan 89 20:27:39 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 23 Jan 89 20:57:37 GMT From: mcvax!unido!pcsbst!jkh@uunet.uu.net (Jordan K. Hubbard) Organization: PCS GmbH, Pfaelzer-Wald-Str. 36, 8000 Muenchen; West-Germany Subject: Scheme news? Message-Id: <748@pcsbst.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I'm running C-Scheme Vers 6.1 and would be very interested in staying up-to-date with what's going on with it. In particular, a compiler (called LIAR?) and X interface are mentioned in one of the release documents, but I don't know what stage of development they're in. I guess I have two questions. In particular, what's going on with the compiler and the X (Version 11?) interface? In general, how do I stay up to date? Jordan Hubbard uunet!pyramid!pcsbst!jkh  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 24 Jan 89 13:19:09 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 24 Jan 89 13:15:22 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 23 Jan 89 14:30:16 GMT From: mcvax!cernvax!ethz!mfranz@uunet.uu.net (Michael Franz) Organization: ETH Zuerich, Switzerland Subject: Implementors of Scheme: Please read! Message-Id: <749@ethz.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I have just completed an interpreter for R3 Scheme, as part of a thesis project, with which I am fulfilling the requirements for the degree of "Engineer in Computer Science" from ETH, the Swiss Federal Institute of Technology in Zurich. ETH's Engineer's degree is similar to a U.S. Master's degree in Computer Science. My interpreter is written in the programming language Oberon and is designed to run on the Ceres workstation under the Oberon Operating System. The Ceres workstation, Oberon operating system and the Oberon language (the successor to Modula-2) were all developed here at ETH by Professor Niklaus Wirth, who also oversees my thesis. The Ceres line of computers is based on NS32000 series microprocessors. Oberon is similar to Modula-2, but offers the concept of "type extensions". [N. Wirth, "Type Extensions", ACM TOPLAS V10 N2 Apr88, pp204-214] [N. Wirth, "The Programming Language Oberon", Software, Practice and Experience, V18 N7 Jul88, pp671-690] The main goal of my thesis was less to develop an efficient implementation of Scheme than to evaluate different strategies for implementing a functional language **in a Modula-like-language and without using any machine-specific tricks**. There is very little experience with functional language programming at ETH, being the original source of languages such as Pascal and Modula. The result of my programming project is an interpreter entirely written in Oberon (which by the way does not offer a GOTO, so the program needs a very ugly dispatch function), which should be easily portable to any other machine on which a compiler for either Oberon or Modula is available. (Actually, I implemented Scheme three times, using different approaches.) As part of my thesis, I would like to include a small survey about existing Scheme **interpreter** implementations on microprocessors and would like to ask you to send me a short reply to the following questions. (I do realize, that most implementations of Scheme are compilers that either generate native code or some kind of interpre- ted intermediate code, but these are not really comparable to my work, which is a true interpreter and does not process instructions prior to execution (apart from lexical conversion). Please only answer if you can comment on an existing **interpreter**. Questions: 1.1. Name of Project/Program 1.2. Based On or New Work 1.3. Implementation Language 1.4. Destination Processor / Word Length 1.5. Are any parts of the program coded in assembly language? 1.6. Amount of memory available to the interpreter for data storage 1.7. Garbage collection strategy used 1.8. Source Code / Object Size (lines/bytes) of Scheme Interpreter 2.1. Time to execute (fib 20) with body of fib defined as (cond ((< n 2) n) (else (+ (fib (- n 2)) (fib (- n 1))))) 2.2. Time to execute (fib 20) using IF instead of COND 2.3. Time to execute (tak 18 12 6) with (tak x y z) defined as (cond ((<= x y) z) (else (tak (tak (- x 1) y z) (tak (- y 1) z x) (tak (- z 1) x y)))) Also, if you have any Scheme programs that I could use for testing my interpreter, I would also be grateful if you could send them to me. Thank you very much. I greatly appreciate your help. Michael Franz mfranz@czheth5a.bitnet mfranz@ifi.ethz.ch and mfranz@rzeth.ethz.ch ..uunet!mcvax!cernvax!ethz!mfranz P.S.: I have been trying to get a copy of R. Kent Dybvigs Ph.D. dissertation (unfortunately, I only saw the reference to it way after I had started on my own set of implementation models), but no library that I have access to seems to have it. If anyone could make a copy and send it to me, please notify me by E-mail; I will send you a my complete postal address and a check to cover copying and postage. Please send me a mail before you copy anything, because there may be more than one person who can help me with this one (who knows, even R.K.D. himself...)  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 22 Jan 89 06:17:59 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sun, 22 Jan 89 06:14:49 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 21 Jan 89 18:46:52 GMT From: attcan!utzoo!yunexus!oz@uunet.uu.net (Ozan Yigit) Organization: York U. Computing Services - Magic Group Subject: Re: scheme implementation. Message-Id: <956@yunexus.UUCP> References: <8901201511.AA05969@bucsf> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8901201511.AA05969@bucsf> gjc@BUCSF.BU.EDU (George J. Carrette) writes: >In the 1988 USENIX C++ Conference there was a paper titled >"A C++ Interpreter for Scheme" Could you please send|post exact ref details so that I can include it in my scheme bibliography ?? Many thnx... oz -- ... and I say to them, Usenet: oz@nexus.yorku.ca `Where the hell were you ......!uunet!utai!yunexus!oz when the page was blank?' Bitnet: oz@[yulibra|yuyetti] Harlan Ellison Phonet: +1 416 736-5257x3976  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 20 Jan 89 14:02:42 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 20 Jan 89 13:48:02 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 20 Jan 89 18:11:59 GMT From: uoregon!akm@beaver.cs.washington.edu (Anant Kartik Mithal) Organization: University of Oregon, Computer Science, Eugene OR Subject: Macros in TI Scheme and Mac Scheme Message-Id: <3566@uoregon.uoregon.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Are there any compatibility problems between the macros for TI Scheme and the macros for Mac Scheme? We have a large system written in Mac Scheme, and would like to run it under TI Scheme. In the past, we've had major problems between Mac Scheme and MIT Scheme, mostly in the area of macros.  Received: from rutgers.edu (TCP 20001412411) by MC.LCS.MIT.EDU 20 Jan 89 11:06:54 EST Received: from mimsy.UUCP by rutgers.edu (5.59/SMI4.0/RU1.0/3.03) with UUCP id AA19170; Fri, 20 Jan 89 11:07:02 EST Received: by mimsy.UMD.EDU (smail2.5) id AA11571; 20 Jan 89 10:15:51 EST (Fri) Received: from daitc.UUCP by uunet.UU.NET (5.59/1.14) with UUCP id AA19645; Fri, 20 Jan 89 10:13:11 EST Received: by daitc.mil (5.59++/24-Aug-88) id AA19896; Fri, 20 Jan 89 10:02:22 EST Received: by dsacg1.UUCP (5.52/5.17) id AA03869; Fri, 20 Jan 89 09:02:22 EST Received: by dsacg3.UUCP (5.54/5.17) id AA26374; Fri, 20 Jan 89 08:19:10 EST Date: Fri, 20 Jan 89 08:19:10 EST From: Mott Given Message-Id: <8901201319.AA26374@dsacg3.UUCP> To: scheme@mc.lcs.mit.edu Subject: Subscribe to SCHEME list Cc: dsacg1!dsacg3!mgiven@tis.llnl.gov Mott Given @ Defense Logistics Agency ,DSAC-TMP, P.O. Box 1605, Bldg. 27 Section 1, Systems Automation Center, Columbus, OH 43216-5002 INTERNET: mgiven%dsacg1.uucp@daitc.arpa I speak for myself Phone: 614-238-9431 AUTOVON: 850-9431  Received: from bu-it.BU.EDU (TCP 20061201050) by MC.LCS.MIT.EDU 20 Jan 89 10:11:56 EST Received: from BUCSF.BU.EDU by bu-it.BU.EDU (5.58/4.7) id AA08286; Fri, 20 Jan 89 10:09:03 EST Received: by bucsf (4.12/4.7) id AA05969; Fri, 20 Jan 89 10:11:17 est Date: Fri, 20 Jan 89 10:11:17 est From: gjc%bucsf.BU.EDU@bu-it.bu.edu (George J. Carrette) Message-Id: <8901201511.AA05969@bucsf> To: Scheme@mc.lcs.mit.edu Subject: scheme implementation. In the 1988 USENIX C++ Conference there was a paper titled "A C++ Interpreter for Scheme"  Received: from kleph.ai.mit.edu (TCP 2212600254) by MC.LCS.MIT.EDU 19 Jan 89 21:03:39 EST Received: by kleph.ai.mit.edu (5.59/1.5) id AA02338; Thu, 19 Jan 89 21:03:26 EST Date: Thu, 19 Jan 89 21:03:26 EST From: cph@kleph.ai.mit.edu (Chris Hanson) Message-Id: <8901200203.AA02338@kleph.ai.mit.edu> To: gyro@kestrel.arpa (Scott B. Layson) Cc: Scheme@mc.lcs.mit.edu In-Reply-To: Automatic Scheme Digestifier's message of 19 JAN 89 00:10:32 EST Subject: EDWIN status check Reply-To: cph@zurich.ai.mit.edu Date: Wed, 18 Jan 89 08:47:25 PDT From: gyro@kestrel.arpa (Scott B. Layson) Last I heard, EDWIN (a text editor written in Scheme, by Chris Hanson if I remember correctly) was yet to be released. What's the latest on this? It's conceivable that it will be released this year, but that depends on what kind of time I have available. Right now we're busy getting our compiler ready for release; after that I'll see. I would be willing, but reluctant, to give you a "current" copy: one that runs on the 6.001 Chipmunks, under an older non-R3RS version of Scheme, taking advantage of the screen hardware to avoid doing the hairy redisplay computation. But if you're willing to wait a while the released version should work with X (and perhaps with terminals in general), and many of the user-visible differences between Edwin and GNU Emacs will have been eliminated.  Received: from kestrel.arpa (TCP 1200600040) by MC.LCS.MIT.EDU 18 Jan 89 11:48:13 EST Received: by kestrel.arpa (5.58/SMI-DDN) id AA23695; Wed, 18 Jan 89 08:47:25 PDT Date: Wed, 18 Jan 89 08:47:25 PDT From: gyro@kestrel.arpa (Scott B. Layson) Message-Id: <8901181647.AA23695@kestrel.arpa> To: Scheme@MC.LCS.MIT.EDU Subject: EDWIN status check Last I heard, EDWIN (a text editor written in Scheme, by Chris Hanson if I remember correctly) was yet to be released. What's the latest on this? My plan is to try to bring it up under T. Has anyone done this, or tried and given up for some reason? -- Scott  Received: from XX.LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 15 Jan 89 17:01:45 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Sun 15 Jan 89 13:27:56-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sun, 15 Jan 89 13:18:24 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 15 Jan 89 14:49:29 GMT From: decvax!zinn!mipsmag!dbetz@bloom-beacon.mit.edu (David Betz) Organization: MIPS Publishing, Inc., Nashua, NH Subject: Re: Scheme on a PC Message-Id: <575@mipsmag.UUCP> References: <8953@cit-vax.Caltech.Edu>, <887@io.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu PC Scheme by TI is a *very* nice product and well worth the money. I'd say it is the best implementation of Scheme for the IBM-PC.  Received: from decwrl.dec.com (TCP 20013204401) by MC.LCS.MIT.EDU 13 Jan 89 19:25:04 EST Received: from saturn.pa.dec.com by decwrl.dec.com (5.54.5/4.7.34) for scheme@mc.lcs.mit.edu; id AA10507; Fri, 13 Jan 89 16:23:08 PST Received: from localhost by saturn.pa.dec.com (5.54.5/4.7.34) id AA29380; Fri, 13 Jan 89 16:23:40 PST Message-Id: <8901140023.AA29380@saturn.pa.dec.com> To: Scheme@mc.lcs.mit.edu Cc: bartlett@decwrl.dec.com Subject: Scheme->C compiler: questions and answers Date: Fri, 13 Jan 89 16:23:38 -0800 From: bartlett@decwrl.dec.com I got a number of questions from people who saw my announcement (thank you for your interest) which suggests that I should supply a little more information about the Scheme->C compiler. Licensing mechanics. License and software distribution is via paper mail so I will need your postal address. I'm going to have to defer replying to requests from outside U.S.A. and Canada for a couple of weeks until we figure out U.S. export restrictions. There is a distribution fee of $100 (U.S.) for the software. Software is distributed on a tar tape in source form. Like any other research software, it's on an "as is" basis. If your organization is unwilling to sign the license and you still want the software, we'll have to discuss it. Computer systems licensed. Currently the system runs on top of ULTRIX. It has also been run on 4.2 BSD UNIX. A VMS version has not been made, but it can probably run under Eunice. While the software was designed to be portable and has been ported to three different processors, the terms of the license restrict the software to Digital VAX and DECstation 3100 computers. Is it really Scheme? The system supports the essentials of Revised**3 and many of the optionals. Extensions include "expansion passing style" macros and a foreign function call capability. The system does provide call-with-current-continuation. Numbers are represented internally as 29-bit integers, or 64-bit floating point values. Sorry, no X window support. The system is oriented towards block compilation to generate code which can run in standalone programs which may include code from other languages. While debugging is typically done using the interpreter, it will never be considered a "Scheme environment". The one "wart" in the system is that the compiler cannot compile all tail calls correctly. This follows from some of the design tradeoffs made when mapping Scheme to C. A forthcoming technical report discusses this in some detail, please defer flames until then. Greatest strength --> Scheme->C is not a <-- Greatest weakness Scheme environment. Misc. Technical details The compiler is written in Scheme. Most of the runtime system (including an interpreter) is written in Scheme. The garbage collector and a few other things are written in C. There is a small (< 100) amount of assembly code. A technical report (I'll post a msg on the Scheme list when it's available) will provide details about the design. It will include some sample code, benchmark data etc. Keep on schemeing, jfb  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 13 Jan 89 05:15:46 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 13 Jan 89 04:13:09 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 11 Jan 89 15:42:20 GMT From: leverich@rand-unix.arpa (Brian Leverich) Organization: RAND Corp., Santa Monica, CA Subject: Re: Scheme on a PC Message-Id: <1855@randvax.UUCP> References: <8953@cit-vax.Caltech.Edu>, <887@io.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Of the dozen or so PC Scheme or LISP dialects that I'm familiar with, TI's PC Scheme clearly has the best performance for its price. The implementation really is remarkably well done. The only "limitations" that have caused me pain are that: (1) the extended memory version doesn't know about protected mode, and consequently runs much slower than the 640k version; and (2) there is no built-in way to freeze a session at some point and then restart the session some other day (although there is a slick mechanism for bouncing from Scheme to DOS and back). -B -- "Simulate it in ROSS" Brian Leverich | U.S. Snail: 1700 Main St. ARPAnet: leverich@rand-unix | Santa Monica, CA 90406 UUCP/usenet: decvax!randvax!leverich | Ma Bell: (213) 393-0411 X7769  Received: from void.ai.mit.edu (TCP 2206400236) by MC.LCS.MIT.EDU 12 Jan 89 10:56:07 EST Received: by void.ai.mit.edu (5.59/1.5) id AA03396; Thu, 12 Jan 89 10:58:34 EST Date: Thu, 12 Jan 89 10:58:34 EST From: jar@void.ai.mit.edu (Jonathan Rees) Message-Id: <8901121558.AA03396@void.ai.mit.edu> To: shaff@sesame.stanford.edu Cc: Scheme@mc.lcs.mit.edu In-Reply-To: Mike Shaff's message of Wed, 11 Jan 89 08:26:22 PST <8901111626.AA12201@sesame.Stanford.EDU> Subject: Past postings available Reply-To: jar@zurich.ai.mit.edu Date: Wed, 11 Jan 89 08:26:22 PST From: shaff@sesame.stanford.edu (Mike Shaff) Something went wrong with the net at Stanford for a period of time and I now find myself with the Scheme digest #40-45. If anyone saved these, I would appreciate a copy! (Also, if anyone has #1-6 I would like a copy) Since you're on the Internet, you can anonymously FTP the archives from mc.lcs.mit.edu. The relevant file is LSPMAI; SCHEME MAIL. (Note spaces in file name. You may have to use double quotes, depending on the details of your FTP program.) It's just a concatenation of all messages since 16 Nov 1988, not divided into digests. Messages prior to that are on ai.ai.mit.edu in LSPMAI; SCHEME MAILxx for xx from 1 on up.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 12 Jan 89 03:44:43 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 12 Jan 89 03:05:55 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 11 Jan 89 04:05:25 GMT From: att!alberta!ubc-cs!grads.cs.ubc.ca!manis@bloom-beacon.mit.edu (Vincent Manis) Organization: UBC Department of Computer Science, Vancouver, B.C., Canada Subject: Re: TI-Scheme and Extended Memory Message-Id: <345@ubc-cs.UUCP> References: <1854@randvax.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I've long since come to the conclusion that the PC Scheme used by TI is very much more powerful than the one they sell. For one thing, it can produce standalone programs. Let me say here, in the hope that TI people are listening, that a protected mode or OS/2 Scheme would be looked at with great favour, at least by me. ____________ Vincent Manis | manis@cs.ubc.ca ___ \ _____ The Invisible City of Kitezh | manis@cs.ubc.cdn ____ \ ____ Department of Computer Science | manis%cs.ubc@relay.cs.net ___ /\ ___ University of British Columbia | uunet!ubc-cs!manis __ / \ __ Vancouver, BC, Canada V6T 1W5 | (604) 228-2394 _ / __ \ _ "Had George III been a Scheme programmer, he might have responded ____________ to Patrick Henry by freeing him and then killing him." -- Michael Eisenberg  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 11 Jan 89 20:14:22 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 11 Jan 89 20:09:37 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 11 Jan 89 21:17:53 GMT From: bgsuvax!maner@ohio-state.arpa (Walter Maner) Organization: Bowling Green State University B.G., Oh. Subject: Re: Scheme on a PC Message-Id: <3394@bgsuvax.UUCP> References: <887@io.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu From article <887@io.UUCP>, by chuck@io.UUCP (Chuck Cullen x4423): > Does anybody disagree that the TI implementation is currently the best > solution available for Scheme on a pc? > Until Betz puts his shareware XScheme in general release (Any Day Now), TI Scheme is your best bet on a PC *IF* you have at least a 286 machine *AND* at least 1 meg of RAM. I use TI Scheme on just such a machine and am well satisfied with it. -- CSNet : maner@research1.bgsu.edu | (419) 372-2337 InterNet: maner@research1.bgsu.edu (129.1.1.2) | Computer Science Dept. UUCP : ... !osu-cis!bgsuvax!maner | BGSU Generic : maner%research1.bgsu.edu@relay.cs.net | Bowling Green, OH 43403  Received: from decwrl.dec.com (TCP 20013204401) by MC.LCS.MIT.EDU 11 Jan 89 13:20:59 EST Received: from saturn.pa.dec.com by decwrl.dec.com (5.54.5/4.7.34) for scheme@mc.lcs.mit.edu; id AA14857; Wed, 11 Jan 89 10:19:16 PST Received: from localhost by saturn.pa.dec.com (5.54.5/4.7.34) id AA06187; Wed, 11 Jan 89 10:19:44 PST Message-Id: <8901111819.AA06187@saturn.pa.dec.com> To: Scheme@mc.lcs.mit.edu Cc: bartlett@decwrl.dec.com Subject: Scheme->C a portable Scheme-to-C compiler Date: Wed, 11 Jan 89 10:19:42 -0800 From: bartlett@decwrl.dec.com The Western Research Laboratory of Digital Equipment Corporation is pleased to announce the availability of a new, experimental Scheme compiler for research use on the VAX and DECstation 3100 (MIPS R2000 processor) computers. The compiler compiles Revised**3 Scheme to C that is then compiled by the native C compiler for the target machine. This design results in a portable system that allows either stand-alone Scheme programs or programs written in both compiled and interpreted Scheme and other languages. An experiment run on a microVAX II suggests that this approach does not adversely effect performance. There, the system was able to execute the Gabriel benchmarks with performance similar to that of a native Common LISP implementation. If you are a member of a research organization interested in this software, please contact me for licensing information. Joel Bartlett bartlett@decwrl.dec.com  Received: from sesame.Stanford.EDU (TCP 4405400251) by MC.LCS.MIT.EDU 11 Jan 89 11:33:23 EST Received: by sesame.Stanford.EDU (5.57/Ultrix2.4-C) id AA12201; Wed, 11 Jan 89 08:26:22 PST Date: Wed, 11 Jan 89 08:26:22 PST From: shaff@sesame.stanford.edu (Mike Shaff) Message-Id: <8901111626.AA12201@sesame.Stanford.EDU> To: Scheme@mc.lcs.mit.edu Subject: Past postings ciao, Something went wrong with the net at Stanford for a period of time and I now find myself with the Scheme digest #40-45. If anyone saved these, I would appreciate a copy! (Also, if anyone has #1-6 I would like a copy) (peace chance) mas shaff@sesame.stanford.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 11 Jan 89 11:29:01 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 11 Jan 89 11:25:12 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 10 Jan 89 21:50:47 GMT From: att!alberta!ubc-cs!grads.cs.ubc.ca!manis@bloom-beacon.mit.edu (Vincent Manis) Organization: UBC Department of Computer Science, Vancouver, B.C., Canada Subject: Re: Scheme on a PC Message-Id: <336@ubc-cs.UUCP> References: <8953@cit-vax.Caltech.Edu>, <887@io.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <887@io.UUCP> chuck@io.UUCP (Chuck Cullen x4423) writes: >Does anybody disagree that the TI implementation is currently the best >solution available for Scheme on a pc? I certainly don't. I've used it quite extensively (though not for massive programs), and it satisfies my requirements quite well. V3.0 is pretty compatible with R^3S, and supports a fair number of extensions (most of the worthwhile extensions are PC-specific). In particular, it supports an external language interface which permits you to invoke primitive procedures in any compilable language (I use Turbo C). The package includes the interpreter/compiler, a debugger, and an Emacs-compatible editor. There are only two downsides to PC Scheme: (1) it's a bit sluggish on my PC XT compatible (on an AT it's quite pleasant), and (2) it doesn't produce standalone programs (therefore anyone who uses a PC Scheme program has to have a licence for the interpreter). Still, for US$100, it's very hard to beat. TI's phone number (US only--us foreigners don't count) is 1-800-TI-PARTS. ____________ Vincent Manis | manis@cs.ubc.ca ___ \ _____ The Invisible City of Kitezh | manis@cs.ubc.cdn ____ \ ____ Department of Computer Science | manis%cs.ubc@relay.cs.net ___ /\ ___ University of British Columbia | uunet!ubc-cs!manis __ / \ __ Vancouver, BC, Canada V6T 1W5 | (604) 228-2394 _ / __ \ _ "Had George III been a Scheme programmer, he might have responded ____________ to Patrick Henry by freeing him and then killing him." -- Michael Eisenberg  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 10 Jan 89 21:29:50 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 10 Jan 89 21:22:11 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 10 Jan 89 16:49:04 GMT From: imagine!pawl20.pawl.rpi.edu!jefu@itsgw.rpi.edu (Jeffrey Putnam) Organization: RPI Public Access Workstation Lab - Troy, NY Subject: Re: Scheme on a PC Message-Id: <2278@imagine.PAWL.RPI.EDU> References: <8953@cit-vax.Caltech.Edu>, <887@io.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <887@io.UUCP> chuck@io.UUCP (Chuck Cullen x4423) writes: >I have been planning on getting Scheme from Texas Instruments for use >on a pc project I told somebody I would do. >Does anybody disagree that the TI implementation is currently the best >solution available for Scheme on a pc? I have PC Scheme and its not bad. I do have a couple problems with it - it doesnt support Hercules graphics, and every so often it goes away with a "VM error" and just dies. This happens completely unpredictably and i cant get it to repeat at will. Other than that PC Scheme is good. The documentation is huge and quite well done. Its even fairly fast. jeff putnam -- "Sometimes one must attempt the impossible if only to jefu@pawl.rpi.edu -- show it is merely inadvisable."  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 10 Jan 89 20:29:22 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 10 Jan 89 20:21:28 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 9 Jan 89 23:22:44 GMT From: leverich@rand-unix.arpa (Brian Leverich) Organization: RAND Corp., Santa Monica, CA Subject: TI-Scheme and Extended Memory Message-Id: <1854@randvax.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I see that TI's Personal Consultant package now runs on 286/386 machines in protected mode and can address 4 megs (instead of 2 megs) of extended memory. Does anybody know if this implies a new version of TI-Scheme is coming out that will run in protected mode and address the larger memory space? We have an application that sure could take advantage of that... -B -- "Simulate it in ROSS" Brian Leverich | U.S. Snail: 1700 Main St. ARPAnet: leverich@rand-unix | Santa Monica, CA 90406 UUCP/usenet: decvax!randvax!leverich | Ma Bell: (213) 393-0411 X7769  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 10 Jan 89 19:43:51 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 10 Jan 89 19:30:38 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 11 Jan 89 00:10:08 GMT From: apple!kentb@bloom-beacon.mit.edu (Kent Beck) Organization: Apple Computer Inc, Cupertino, CA Subject: OOPSLA '89 Call in news.announce.conferences Message-Id: <23693@apple.Apple.COM> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Please look in news.announce.conferences for all the particulars about OOPSLA '89. The conference will be held 2-6 October in New Orleans, and papers are due to me by 17 March. Kent Beck Apple Computer, Inc. 20525 Mariani, MS 42C Cupertino, CA 95014 USA 408/974-6027  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 10 Jan 89 06:13:42 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 10 Jan 89 06:06:13 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 10 Jan 89 04:51:17 GMT From: contact!ileaf!io!chuck@husc6.harvard.edu (Chuck Cullen x4423) Organization: Interleaf Inc, Cambridge, MA Subject: Re: Scheme on a PC Message-Id: <887@io.UUCP> References: <8953@cit-vax.Caltech.Edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8953@cit-vax.Caltech.Edu>, kevin@cit-vax.Caltech.Edu (Kevin S. Van Horn) writes: > Does anyone know where I can get an implementation of Scheme on a > PC-compatible? I have been planning on getting Scheme from Texas Instruments for use on a pc project I told somebody I would do. Does anybody disagree that the TI implementation is currently the best solution available for Scheme on a pc? Chuck Cullen Interleaf, Inc. 10 Canal Park Cambridge, MA 02141 (617) 577-9800 x4423 UUCP: {mit-eddie,bbn,sun!sunne}!ileaf!chuck  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 9 Jan 89 03:28:16 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 9 Jan 89 03:25:24 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 9 Jan 89 04:37:50 GMT From: pikes!udenva!isis!scicom!craig@boulder.colorado.edu (Craig Anderson) Organization: Alpha Science Computer Networks, Denver, Co. Subject: help with CScheme on 386ix Message-Id: <1234@scicom.alphacdc.com> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I would like to build cscheme on a 386ix system. Any one out there done it? Any help will be much appreciated. Craig H. Anderson UUCP (ncar,isis,boulder,nbires)!scicom!craig DOMAIN craig@scicom.alphacdc.com  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 6 Jan 89 14:57:39 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 6 Jan 89 14:42:23 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 6 Jan 89 18:14:58 GMT From: Krulwich-Bruce@yale-zoo.arpa (Bruce Krulwich) Organization: Computer Science, Yale University, New Haven, CT 06520-2158 Subject: top-level vs internal DEFINE's Message-Id: <47045@yale-celray.yale.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu What is the reason for Scheme's handling DEFINE differently at top level and non-top-level?? According to R3RS, they are specifically different things: top level DEFINEs are equivalent to SET! (with a binding if needed) and internal DEFINEs are local to the body they're in. I have a few objections to this: (1) Internal DEFINE's add no power to the language: according to R3RS "A containing internal definitions can always be converted to a completely equivalent LETREC expression." (2) It is very useful to be able to DEFINE global functions that are within the scope of a LET (or another function I suppose). (3) It makes the semantics of the DEFINE expression vary by its position in the code, which seems inherently wrong. I'm sure this has been discussed before and there must be reasons for the decision made in R3RS. What are the advantages of the R3RS decision?? If people send me mail I'll summarize to the net. That may keep down redundant messages. Bruce Krulwich  Received: from MITVMA.MIT.EDU (TCP 2227000003) by MC.LCS.MIT.EDU 6 Jan 89 10:33:13 EST Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (IBM VM SMTP R1.1) with BSMTP id 7193; Fri, 06 Jan 89 10:31:38 EST Received: from DB0TUI6.BITNET (NET) by MITVMA.MIT.EDU (Mailer X1.25) with BSMTP id 7192; Fri, 06 Jan 89 10:31:36 EST Received: by tub.UUCP; Fri, 6 Jan 89 16:29:40 +0100; AA12071 Date: Fri, 6 Jan 89 16:29:40 +0100 From: Oliver Laumann Message-Id: <8901061529.AA12071@tub.UUCP> To: scheme@mc.lcs.mit.edu Subject: Re: Scheme on a PC > I would like to find a R3RS compliant scheme that is free (or near to it) > that i can provide for student use in a course ill be teaching. Scheme > will not be required, but id like to provide an alternative to Fortran I'm soon going to publish the sources of a R3RS compliant Scheme interpreter written in C; it should be easily portable to Atari- or Amiga-type machines. The distribution contains an interface to both the Xlib and the X toolkit (Xt) which allows Scheme programmers to make use of Xt widgets. The functionality of the Xlib interface is similar to that of CLX. However, the interface to the X Window System is a prototype and currently undocumented (if you don't count demonstration programs as documentation). Regards, -- Oliver Laumann net@TUB.BITNET net@tub.UUCP  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 4 Jan 89 10:11:53 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 4 Jan 89 09:56:19 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 4 Jan 89 14:56:16 GMT From: mit-vax!josh@bloom-beacon.mit.edu (Joshua Marantz) Organization: MIT LCS, Cambridge, MA Subject: Scheme environments Message-Id: <5405@mit-vax.LCS.MIT.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I haven't used scheme for a while, but I just read the Revised(3.5) Report on the Algorithmic Language Scheme. Some interesting things have been added (or at least documented) since I last worked with scheme in 1983. But one function that appears to be missing from the spec is (eval expression environment). In particular, environments are not explicitly discussed, though they are lurking in the background of section 3.1. I wanted to use environments to implement namespace hierarchies. I faintly remember that scheme used to support the notion of a "package", but I could not find it in any of my old documentation. Has this been removed? Or have these things been left out of the spec to allow different scheme implementations to define their own way of dealing with these concepts? MIT C-Scheme has an eval function that takes the expected arguments, but I couldn't find any relevant documentation beyond the revised report. -Joshua Marantz Viewlogic Systems, Inc.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 3 Jan 89 10:11:21 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 3 Jan 89 09:55:37 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 2 Jan 89 13:25:47 GMT From: mcvax!inria!geocub!casteran@uunet.uu.net (Pierre Casteran) Subject: semantics of unwind-protect Message-Id: <489@geocub.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I am looking for a precise definition of constructs like UNWIND-PROTECT, or DYNAMIC-WIND, and so-on. the best form would be : a denotational definition (like in R3RS) or an equivalent written in terms of CALL/CC or the Felleisen & Friedman's "F" construct, or a CPS translator. Pierre Cast\'eran. Universit\'e Bordeaux I (*) Unit\'e de Recherche Associ\'ee au Centre National de la Recherche Scientifique n. 726 (labri) (*) Bordeaux is a city where you can find wines and Schemists  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 1 Jan 89 19:10:55 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sun, 1 Jan 89 18:51:54 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 1 Jan 89 19:14:12 GMT From: decvax!zinn!mipsmag!dbetz@bloom-beacon.mit.edu (David Betz) Organization: MIPS Publishing, Inc., Nashua, NH Subject: Re: Scheme on a PC Message-Id: <573@mipsmag.UUCP> References: <8953@cit-vax.Caltech.Edu>, <572@mipsmag.UUCP>, <2215@imagine.PAWL.RPI.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Right now, the way to get XScheme (for IBM-PC compatibles and the Macintosh) is to send me a formatted disk (5.25 for the IBM-PC, 800K for the Macintosh) and a STAMPED, self-addressed return mailer. My address is: David Betz 127 Taylor Road Peterborough, NH 03458 I'm working on making XScheme available through ftp from a machine at MIT. I'll post a note here once that is setup. David Betz  Received: from F.GP.CS.CMU.EDU (TCP 20000575244) by MC.LCS.MIT.EDU 1 Jan 89 14:38:15 EST Date: 1 Jan 1989 14:30-EST From: Barak.Pearlmutter@F.GP.CS.CMU.EDU To: scheme@mc.lcs.mit.edu Subject: Oaklisp release problem Message-Id: Some source files were inadvertently omitted from the Oaklisp distribution tar file. These problems should be corrected as of noon on Monday Jan 2. I apologize to those who were inconvenienced by this problem. If you FTPed the distribution already and just want some particular files, you should be able to find them in oak/src/release/mac/, which is publically accessible. Below I repeat the original announcement, for your FTP convenience. Oh, and watch the symbolic links. "CD ~" will get you back to the ftp guest home directory. ------ A new release of Oaklisp is available. There are some tiny bug fixes, the emulator should compile properly on machines with 16 bit int C compilers, and bignums, complexes and rationals are fully supported. No flonums, but you can fake them with rationals. The bignums are surprisingly fast, about a factor of 6 slower than T 3.1 at naive factorial of 100. An O((log n)^1.59) algorithm is used for multiplying pairs of really large integers. Not O(log n) Schonhage-Strassen, but at least it's not O((log n)^2). The distribution can be FTPed from host DOGHEN.BOLTZ.CS.CMU.EDU (aka 128.2.222.37), user "anonymous", file "oak/release.tar.Z". Be sure to use binary mode. Bug fixes and reports are appreciated, particularly with regard to portability to odd architectures. A 36 or 48 bit word port would be nice. Requests for tapes from people without FTP will be denied. Oaklisp is unsupported, but Kevin and I will consult.  Received: from F.GP.CS.CMU.EDU (TCP 20000575244) by MC.LCS.MIT.EDU 30 Dec 88 15:12:53 EST Date: 30 Dec 1988 14:52-EST From: Barak.Pearlmutter@F.GP.CS.CMU.EDU To: scheme@mc.lcs.mit.edu Subject: Oaklisp Release Message-Id: A new release of Oaklisp is available. There are some tiny bug fixes, the emulator should compile properly on machines with 16 bit int C compilers, and bignums, complexes and rationals are fully supported. No flonums, but you can fake them with rationals. The bignums are surprisingly fast, about a factor of 6 slower than T 3.1 at naive factorial of 100. An O((log n)^1.59) algorithm is used for multiplying pairs of really large integers. Not O(log n) Schonhage-Strassen, but at least it's not O((log n)^2). The distribution can be FTPed from host DOGHEN.BOLTZ.CS.CMU.EDU (aka 128.2.222.37), user "anonymous", file "oak/release.tar.Z". Be sure to use binary mode. Bug fixes and reports are appreciated, particularly with regard to portability to odd architectures. A 36 or 48 bit word port would be nice. Requests for tapes from people without FTP will be denied. Oaklisp is unsupported, but we do consult.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 30 Dec 88 08:55:10 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 30 Dec 88 08:41:00 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 30 Dec 88 13:23:51 GMT From: imagine!pawl3.pawl.rpi.edu!jefu@itsgw.rpi.edu (Jeffrey Putnam) Organization: RPI Public Access Workstation Lab - Troy, NY Subject: Re: Scheme on a PC Message-Id: <2215@imagine.PAWL.RPI.EDU> References: <8953@cit-vax.Caltech.Edu>, <572@mipsmag.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <572@mipsmag.UUCP> dbetz@mipsmag.UUCP (David Betz) writes: >If you're looking for a simple implementation of Scheme for the IBM-PC >(or the Mac or the Atari-ST or the Amiga ...), you could try XScheme. >It is an implementation of Scheme written in C. It consists of a bytecode >compiler and a virtual machine to execute the bytecodes. > David Betz Ok, ill bite. Where can i find XScheme? Preferably by anonymous ftp? Any graphics support? Can i end another sentence in a question mark? I would like to find a R3RS compliant scheme that is free (or near to it) that i can provide for student use in a course ill be teaching. Scheme will not be required, but id like to provide an alternative to Fortran (ick). jeff putnam -- "Sometimes one must attempt the impossible if only to jefu@pawl.rpi.edu -- show it is merely inadvisable."  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 30 Dec 88 00:10:03 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 29 Dec 88 23:52:09 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 29 Dec 88 21:28:16 GMT From: decvax!zinn!mipsmag!dbetz@bloom-beacon.mit.edu (David Betz) Organization: MIPS Publishing, Inc., Nashua, NH Subject: Re: Scheme on a PC Message-Id: <572@mipsmag.UUCP> References: <8953@cit-vax.Caltech.Edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu If you're looking for a simple implementation of Scheme for the IBM-PC (or the Mac or the Atari-ST or the Amiga ...), you could try XScheme. It is an implementation of Scheme written in C. It consists of a bytecode compiler and a virtual machine to execute the bytecodes. David Betz MIPS Magazine (603) 882-1232  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 24 Dec 88 04:37:38 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 24 Dec 88 04:31:03 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 24 Dec 88 05:50:25 GMT From: oliveb!olivej!frankc@ames.arpa (Frank Crowell) Subject: Help with Cscheme Message-Id: <34873@oliveb.olivetti.com> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I need help invoking emacs for Cscheme 6.1.1 and 6.1.2; I have built the runtime and microcode, but I can't seem to be able to access emacs although emacs.bin was loaded into the runtime. What is going on?  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 22 Dec 88 21:52:22 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 22 Dec 88 21:39:09 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 23 Dec 88 00:39:48 GMT From: uoregon!will@beaver.cs.washington.edu (William Clinger) Organization: University of Oregon, Computer Science, Eugene OR Subject: Re: Why is (eq? car car) false in MacScheme Message-Id: <3422@uoregon.uoregon.edu> References: <10702@eddie.MIT.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <10702@eddie.MIT.EDU> jbs@fenchurch.MIT.EDU (Jeff Siegal) writes: >Does anyone know the real answer? In MacScheme a reference to CAR that is not in operator position will be compiled as though it were (LAMBDA (X) (CAR X)). This is true of certain other integrable procedures as well. Several years ago, before EQ? was specified to do anything in particular with procedures as arguments, and before you could buy a Macintosh with more than 128K of RAM, a measurement and calculation showed that creating full-fledged procedures for these integrable procedures only when needed would tend to save a few bytes of space. Fixing this bug has not been a high priority. If it were the most serious bug in MacScheme I would be extremely happy. Peace, William Clinger  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 22 Dec 88 05:37:05 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 22 Dec 88 05:24:10 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 22 Dec 88 00:45:34 GMT From: kevin@csvax.caltech.edu (Kevin S. Van Horn) Organization: California Institute of Technology Subject: Scheme on a PC Message-Id: <8953@cit-vax.Caltech.Edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Does anyone know where I can get an implementation of Scheme on a PC-compatible? Please send e-mail. Kevin S. Van Horn kevin@cit-adel.caltech.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 19 Dec 88 12:51:07 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 19 Dec 88 12:46:08 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 19 Dec 88 16:51:11 GMT From: dor@lanl.gov (David Rich) Organization: Los Alamos National Laboratory Subject: Re: Compiler analysis Message-Id: <7315@lanl.gov> References: <8812162238.AA27888@sesame.stanford.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8812162238.AA27888@sesame.stanford.edu>, mkatz@SESAME.STANFORD.EDU (Morris Katz) writes: > In order to yield better performance for my parallelization system, I am trying > to derive an algorithm for ddetermining which calls to cons, make-vector, etc. > generate objects which are guaranteed not to be mutated anywhere in a program. > Any ideas on this subject or references to related literature would be greatly > appreciated... Well, here's a start: %A Adrienne Bloss %A Paul Hudak %A Jonathan Young %T Code Optimizations For Lazy Evaluation %R Draft %I CSD, Yale UNIV %C New Haven, CT %D 1988 Also, Adrienne's PhD dissertation is a good reference (it predates this one I believe) -- most likely available as a technical report from Yale. She uses a technique called "Path Analysis" (a form of abstract interpretation) to determine when destructive updates are possible. However, if I remember correctly, her work deals mainly with first order languages and serial evaluation. Hope this helps! --Dave  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 17 Dec 88 02:41:21 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 17 Dec 88 00:28:07 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 16 Dec 88 20:33:04 GMT From: texbell!killer!pollux!ti-csl!m2!gateley@bellcore.bellcore.com (John Gateley) Organization: TI Computer Science Center, Dallas Subject: Re: Y, again (long) Message-Id: <65837@ti-csl.CSNET> References: <8812151447.AA06672@chamartin.ai.mit.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8812151447.AA06672@chamartin.ai.mit.edu> jinx@zurich.ai.mit.edu writes: <[Lots of stuff about Y] <;; version 3, "standard" normal order < <(define fact < ((lambda (f) < ((lambda (g) (f (g g))) < (lambda (g) (f (g g))))) < (lambda (fact) < (lambda (n) < (if (= n 0) < 1 < (* n (fact (- n 1)))))))) < ; Fri, 16 Dec 88 19:21:56 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 16 Dec 88 22:38:34 GMT From: SESAME.STANFORD.EDU!mkatz@bloom-beacon.mit.edu (Morris Katz) Organization: The Internet Subject: Compiler analysis Message-Id: <8812162238.AA27888@sesame.stanford.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In order to yield better performance for my parallelization system, I am trying to derive an algorithm for ddetermining which calls to cons, make-vector, etc. generate objects which are guaranteed not to be mutated anywhere in a program. Any ideas on this subject or references to related literature would be greatly appreciated. It seems that this poroblem is much more difficult than one might suspect. It gets even worse if one wants to do things like determine that the objects returned by recursive calls of a procedure are immutable, but those returned to the original call are mutable. This form of analysis seems necessary if one wants to actually identify a significant number of sites where immutable objects are created. Thanks in advance for the help, Morry Katz katz@polya.stanford.edu  Received: from zurich (TCP 2206400260) by MC.LCS.MIT.EDU 16 Dec 88 17:43:00 EST Return-Path: Received: from sesame.stanford.edu ([36.22.0.169]) by ZURICH.AI.MIT.EDU; Fri, 16 Dec 88 17:40:03 est Received: by sesame.stanford.edu (5.57/Ultrix2.4-C) id AA27888; Fri, 16 Dec 88 14:38:34 PST Date: Fri, 16 Dec 88 14:38:34 PST From: mkatz@sesame.stanford.edu (Morris Katz) Message-Id: <8812162238.AA27888@sesame.stanford.edu> To: scheme@zurich.ai.mit.edu Subject: Compiler analysis In order to yield better performance for my parallelization system, I am trying to derive an algorithm for ddetermining which calls to cons, make-vector, etc. generate objects which are guaranteed not to be mutated anywhere in a program. Any ideas on this subject or references to related literature would be greatly appreciated. It seems that this poroblem is much more difficult than one might suspect. It gets even worse if one wants to do things like determine that the objects returned by recursive calls of a procedure are immutable, but those returned to the original call are mutable. This form of analysis seems necessary if one wants to actually identify a significant number of sites where immutable objects are created. Thanks in advance for the help, Morry Katz katz@polya.stanford.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 16 Dec 88 14:54:43 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 16 Dec 88 14:38:46 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 16 Dec 88 18:27:47 GMT From: leto!matthias@rice.edu (Matthias Felleisen) Organization: Rice University, Houston Subject: Re: Y, again (long) Message-Id: <2356@kalliope.rice.edu> References: <8812151447.AA06672@chamartin.ai.mit.edu>, <5684@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <5684@polya.Stanford.EDU> mxh@sumex-aim.Stanford.EDU (Max Hailperin) writes: >2) I wasn't weighing the possibility of a compiler defining letrec in > terms of Y, I was weighing the possibility of the language standard > defining letrec in terms of Y. While users of Rozas's compiler > would notice no difference if he were to do so, users of other less > optimizing compilers would notice a difference, namely in > "self"-eqvness. The issue isn't excess eqvnes, either, as Rozas > seems to think, but rather insufficient eqvness. As long as scheme > supports procedural objects with identities, letrec will have to > remain defined in terms of set! rather than Y. It is not the R^nRS-specification of eqv? [pp13-14] that requires (letrec ([f (lambda (x) (eqv? f f))]) (f 0)) to yield #t but the expansion-specification of letrec [p35]. If we changed the letrec-specification, the compiler could return any arbitrary value [recall: eqv? is an approximation of operational equivalence]. But efficiency is not really the important issue. The assignability of function variables, in particular for recursive functions, requires the current letrec-specification. The importance of this cannot be overemphasized. Dan Friedman and I have shown how to use this trick for define-by-need and import-by-need in a module environment, and Dan and John Franco have recently written up a tech rpt on stream techniques that use this trick. -- Matthias  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 15 Dec 88 17:19:49 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 15 Dec 88 17:05:06 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 15 Dec 88 20:16:05 GMT From: polya!max@labrea.stanford.edu (Max Hailperin) Organization: Stanford University Subject: Re: Y, again (long) Message-Id: <5684@polya.Stanford.EDU> References: <8812151447.AA06672@chamartin.ai.mit.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I think I may have just been tarred as a philospher or as pedantic -- ouch! So let me try to clarify what I see to be some of the more substantive issues: 1) I didn't mean to imply that Rozas's compiler actually has a Y recognizer; my point was merely that it wasn't surprising that it could do those things a Y recognizer could. The question is, how does it hold up in more difficult cases? One case I'd very much like Rozas to compare the generated code for is Y itself, *not applied to anything*. E.g., how similar/different is the code for these two procedures: (define (Y1 f) (let ((g (lambda (g) (f (lambda (x) ((g g) x)))))) (g g))) (define (Y2 f) (letrec ((y-of-f (f (lambda (x) (y-of-f x))))) y-of-f)) 2) I wasn't weighing the possibility of a compiler defining letrec in terms of Y, I was weighing the possibility of the language standard defining letrec in terms of Y. While users of Rozas's compiler would notice no difference if he were to do so, users of other less optimizing compilers would notice a difference, namely in "self"-eqvness. The issue isn't excess eqvnes, either, as Rozas seems to think, but rather insufficient eqvness. As long as scheme supports procedural objects with identities, letrec will have to remain defined in terms of set! rather than Y.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 15 Dec 88 10:04:37 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 15 Dec 88 10:01:30 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 14 Dec 88 14:27:02 GMT From: attcan!utzoo!yunexus!oz@uunet.uu.net (Ozan Yigit) Organization: York U. Computing Services - Magic Group Subject: Re: Lisp Pointers Message-Id: <937@yunexus.UUCP> References: <8812121639.AA24087@sesame.stanford.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8812121639.AA24087@sesame.stanford.edu> mkatz@SESAME.STANFORD.EDU (Morris Katz) writes: >Can someone tell me how to get on the Lisp Pointers mailing list? Send mail to maida@ibm.com (Mary Van Deusen). Alternatively, send surface mail to Mary S. Van Deusen IBM Watson Research Center PO Box 704 Yorktown Heights, NY 10598 Phone: IBM: (914) 789 7845 oz  Received: from chamartin.ai.mit.edu (TCP 2206400253) by MC.LCS.MIT.EDU 15 Dec 88 09:42:09 EST Received: by chamartin.ai.mit.edu (5.59/1.5) id AA06672; Thu, 15 Dec 88 09:47:30 EST Date: Thu, 15 Dec 88 09:47:30 EST From: jinx@chamartin.ai.mit.edu (Guillermo J. Rozas) Message-Id: <8812151447.AA06672@chamartin.ai.mit.edu> To: scheme@mc.lcs.mit.edu Subject: Y, again (long) Reply-To: jinx@zurich.ai.mit.edu The recent flurry of messages about the Y operator has prompted me to spend yet a little more time on the MIT Scheme compiler. The most recent version (4.33) does a good job on some versions of the Y operator, but not on all. This message should clarify what it can currently do and what it cannot. I should point out that there is no explicit "Y-recognizer" in the compiler, but rather the results are a consequence of various of its parts: - value analysis (which values can reach what variables). In particular, a variable's value is "known" if only one value can reach it. - closure analysis (which lambda expressions need to be represented by actual objects at run time, instead of having an implicit representation in the code stream) - a limited side effect analysis which allows the compiler to "punt" some calls when the callee has no side effects and the value returned is unused or known and available at the call point. This is the piece of code that I've written recently to make the examples below "work". Some of my thoughts about the points raised in recent messages: As far as using some version of Y to implement LETREC, we could probably start doing it and users would hardly ever notice the difference, but aside from conceptual elegance nothing would be gained, so it's not really worth it in a "real" compiler. Why have I spent any energy getting the Y operator to "work"? From a compiler writer's point of view, I'm not interested in the Y operator per-se, except as a "cute" hack. It just happens to be a very good test case for value and closure analysis, and if the compiler can do a good job on code that uses it, it will hopefully also do a good job on the "simpler" cases that occur in practice. About eq?/eqv?-ness of procedures, I should say that the only time we may need to distinguish multiple procedures whose "code" is the same lambda expression is when they can coexist in time, and free variables can cause the different instances to behave differently (return different values and/or perform different effects). Clearly, any correct compiler cannot "merge" two such instances. The rest of the cases are for philosophers to argue about. To make them happy, compiler writers may have to provide a "pedantic" switch in the compiler to prevent merging of otherwise identical procedures. I'm not saying that determining when two procedures "act the same way" is feasible (we all know about the halting theorem), but if we are able to determine in some instance that the only thing that could discriminate between two procedures is eq?/eqv?, there is really no reason not to merge. Here are some examples of what the MIT Scheme compiler can currently do: The following versions of factorial turn into identical (bitwise) code: ;; version 1, using letrec. reference version (define fact (letrec ((fact (lambda (n) (if (= n 0) 1 (* n (fact (- n 1))))))) fact)) ;; version 2, "subroutinized" "standard" applicative order (define fact ((lambda (f) (let ((g (lambda (g) (f (lambda () (g g)))))) (g g))) (lambda (fg) (lambda (n) (if (= n 0) 1 (* n ((fg) (- n 1)))))))) ;; version 3, "standard" normal order (define fact ((lambda (f) ((lambda (g) (f (g g))) (lambda (g) (f (g g))))) (lambda (fact) (lambda (n) (if (= n 0) 1 (* n (fact (- n 1)))))))) Note that version 3 "has no right to work" in Scheme, but I've never found anything wrong with compilers that "fix" users' code. The following two versions turn into code essentially identical to the code generated for the versions above, with the differences described below. ;; version 4, another "subroutinized" "standard" applicative order (define fact ((lambda (f) (let ((g (lambda (g) (f (lambda (x) ((g g) x)))))) (g g))) (lambda (fact) (lambda (n) (if (= n 0) 1 (* n (fact (- n 1)))))))) ;; version 5, "inline coded" Y (define fact (let ((kernel (lambda (p n) (if (= n 0) 1 (* n (p p (- n 1))))))) (lambda (n) (kernel kernel n)))) The code generated for version 4 differs from the code in versions 1-3 only in the order in which the basic blocks appear in the linearized output. The code for version 5 differs because the compiler is currently not smart enough to eta convert (lambda (n) ...) into (lambda (p n) ...) after it determines that p in (lambda (p n) ...) is used for "self reference" and unneeded (and dropped). Thus there is an initial call (branch instruction) from the code generated for (lambda (n) ...) to the code generated for (lambda (p n) ...), but the actual "recursive" procedure is coded identically to the other cases above. As an example of a hairier case where the compiler "wins", it generates identical code for (define (delq! item items) (letrec ((trim-initial-segment (lambda (items) (if (pair? items) (if (eq? item (car items)) (trim-initial-segment (cdr items)) (begin (locate-initial-segment items (cdr items)) items)) items))) (locate-initial-segment (lambda (last this) (if (pair? this) (if (eq? item (car this)) (set-cdr! last (trim-initial-segment (cdr this))) (locate-initial-segment this (cdr this))) this)))) (trim-initial-segment items))) and (define delq! (lambda (item items) (((lambda (b f g) ((lambda (k1 k2) (b (lambda () (k1 k1 k2)) (lambda () (k2 k1 k2)))) (lambda (k1 k2) (f (lambda () (k1 k1 k2)) (lambda () (k2 k1 k2)))) (lambda (k1 k2) (g (lambda () (k1 k1 k2)) (lambda () (k2 k1 k2)))))) (lambda (p1g p2g) (lambda () ((p1g) items))) (lambda (p11g p12g) (lambda (items) (if (pair? items) (if (eq? item (car items)) ((p11g) (cdr items)) (begin ((p12g) items (cdr items)) items)) items))) (lambda (p21g p22g) (lambda (last this) (if (pair? this) (if (eq? item (car this)) (set-cdr! last ((p21g) (cdr this))) ((p22g) this (cdr this))) this))))))) Examples where the compiler "loses": ;; version 6 "non-subroutinized" "standard" applicative order (define fact ((lambda (f) ((lambda (g) (f (lambda () (g g)))) (lambda (g) (f (lambda () (g g)))))) (lambda (fg) (lambda (n) (if (= n 0) 1 (* n ((fg) (- n 1)))))))) ;; version 7 another "non-subroutinized" "standard" applicative order (define fact ((lambda (f) ((lambda (g) (f (lambda (x) ((g g) x)))) (lambda (g) (f (lambda (x) ((g g) x)))))) (lambda (fact) (lambda (n) (if (= n 0) 1 (* n (fact (- n 1)))))))) Version 6 does not win because the compiler is not smart enough to realize that both copies of (lambda () (g g)) are indistinguishable. This causes (lambda (n) ...) to be represented as a closure (with one free variable, namely fg), and even though the compiler realizes that the call (fg) always returns a version of (lambda (n) ...) and therefore codes the call as a direct branch, there is still overhead associated with the closure and computing its "next" version (which will be unused). Version 7 does not win for a similar reason. Again, the compiler does not realize that both copies of (lambda (x) ...) are identical and therefore causes (lambda (n) ...) to be closed over fact. Both calls ((g g) x) are known to be calls to (lambda (n) ...), and are translated as direct branches after computing the "next" (useless) closure for (lambda (n) ...) There are many other cases where it will lose due to the "non-uniqueness" of the values which may reach individual variables. An altogether different reason why it may lose is the fact that once a closure is detected, a "pessimistic" code generation strategy is used which forces some of the "useless" procedures and overhead to reappear.  Received: from zurich (TCP 2206400260) by MC.LCS.MIT.EDU 14 Dec 88 12:21:23 EST Return-Path: Received: from sesame.stanford.edu ([36.22.0.169]) by ZURICH.AI.MIT.EDU; Wed, 14 Dec 88 12:18:43 est Received: by sesame.stanford.edu (5.57/Ultrix2.4-C) id AA25855; Wed, 14 Dec 88 09:17:33 PST Date: Wed, 14 Dec 88 09:17:33 PST From: mkatz@sesame.stanford.edu (Morris Katz) Message-Id: <8812141717.AA25855@sesame.stanford.edu> To: scheme@zurich.ai.mit.edu Subject: Re: Lisp Pointers The best information I got on Lisp Pointers is as follows: | The latest issue of Lisp Pointers says the following: || Free Subscription to Lisp Pointers (postal mail only) || || LISP POINTERS || Mary S. Van Deusen, Editor || IBM Watson Research || PO Box 704 || Yorktown Heights, NY 10598 | Alternatively, you can mail Mary Van Deusen direct at maida@ibm.com Morry Katz katz@polya.stanford.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 14 Dec 88 05:50:17 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 14 Dec 88 05:38:30 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 12 Dec 88 20:38:00 GMT From: uxg.cso.uiuc.edu!uicbert.eecs.uic.edu!wilson@uxc.cso.uiuc.edu Subject: Re: R4RS changes? Code? Message-Id: <82000006@uicbert.eecs.uic.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu On the subject of the portable code I'm looking for: I don't know about others who are looking, but I'm looking for programs that allocate at least one megabyte of memory during a run, and preferably ten or more. I'd really like programs that actually have a megabyte or more of data that is *live* at one time. I'm especially interested in programs that run for several minutes or more on a serious workstation (compiled). This is for gathering locality statistics and data survival curves. Bob Shaw's recentPh.D. dissertation at stanford reported some similar statistics for four large Common Lisp programs. His programs were the Reduce symbolic math package, a natural language understanding program, a Common Lisp compiler (Hewlett-Packard's) compiling itself, and the RSIM circuit simulator. I would be very interested in similar programs written in portable Scheme. Eventually I may take on porting some programs if they don't use too many incompatible extensions, but I'd rather not have to. I am interested in getting a variety of programs that are large and/or long-running, with a preference for things that people could actually use, rather than throwaway prototypes. For example, an implementation of OPS5 that actually uses the RETE matching algorithm would be excellent. Non-AI "plain old programs" that do something useful would be particularly good, since I'm looking for data that generalize beyond AI applications. Interactive programs would be particularly nice, if they use ASCII- only interactions (so that I can hack up a script facility to repeatedly run them offline). (The reason for all this is to gather statistics that will guide the design of generation-based garbage collectors, virtual memories, and copy-on-write virtual copy mechanisms for checkpointing and side-effect isolation. I'm implementing a generational garbage collector for Scheme-48, and it will be instrumented to gather the relevant statistics. Of course, we'll have to scale our results to compensate for the slowness of the bytecoded Scheme-48 interpreter. A bigger problem is the availability of reasonable test programs -- that may require more work in porting than is involved in implementing the gc itself. I may have to implement the instrumented gc for something hairier, like Kyoto Common Lisp or T, to gather data on larger programs. The Scheme-48 version should still be valuable, because it could be more easily extended for simulating parallel systems, etc.) -- Paul Paul R. Wilson Human-Computer Interaction Laboratory U. of Illin. at C. EECS Dept. (M/C 154) wilson%uicbert@uxc.cso.uiuc.edu Box 4348 Chicago,IL 60680  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 14 Dec 88 05:49:38 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 14 Dec 88 05:37:25 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 12 Dec 88 20:31:00 GMT From: uxg.cso.uiuc.edu!uicbert.eecs.uic.edu!wilson@uxc.cso.uiuc.edu Subject: Re: R4RS changes? Code? Message-Id: <82000005@uicbert.eecs.uic.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu With regard to standardization, I would think it would be possible to standardize a rather underspecified version of a macro facility, without specifying things like scope rules. In that way, careful programmers could use basic macros in a portable way, so that their programs could run in varying Schemes, and be compatible with an eventual more detailed specification; e.g., if all of your macros have unique names, you don't have to worry about name collision resolution details. (This would be akin to programmers who write programs that don't rely on dynamic or static scoping, so that they run the same way with a dynamically-scoped interpreter and a lexically-scoped compiler. While it's not the best situation, it's better than not being able to use a macros (or a compiler).) Or is this considered a path to perdition, with people writing code that they think is portable but isn't, because of accidental implementation dependencies? Standardization of noncontroversial aspects of features is just one step down the slippery slope from fully specified standard features, but it seems a particularly attractive step to me. A small commitment to a core functionality of macros and dynamic/fluid variables could come in very handy in the short run, and still allow a fuller, more righteous specification the next time around. -- Paul Paul R. Wilson Electronic Mind Control* Laboratory U. of Illin. at C. EECS Dept. (M/C 154) wilson%uicbert@uxc.cso.uiuc.edu Box 4348 Chicago,IL 60680 *a.k.a. Human-Computer Interaction  Received: from kleph.ai.mit.edu (TCP 2212600254) by MC.LCS.MIT.EDU 14 Dec 88 04:50:37 EST Received: by kleph.ai.mit.edu (5.59/1.5) id AA09489; Wed, 14 Dec 88 04:56:16 EST Date: Wed, 14 Dec 88 04:56:16 EST From: cph@kleph.ai.mit.edu (Chris Hanson) Message-Id: <8812140956.AA09489@kleph.ai.mit.edu> To: dartvax!griggs.dartmouth.edu!hugo@bu-cs.bu.edu Cc: scheme@mc.lcs.mit.edu Subject: Scheme's emacs interface vs. SunOS 4.0 Reply-To: cph@zurich.ai.mit.edu [Please let me remind everyone that the correct place to send bug reports for MIT C Scheme is "bug-cscheme@zurich.ai.mit.edu", NOT this mailing list. If you are getting this via usenet news, there is now a C Scheme newsgroup (I believe it's called "net.lang.scheme.c") which should be used for topics specific to the MIT implementation.] Date: 13 Dec 88 19:13:47 GMT From: dartvax!griggs.dartmouth.edu!hugo@bu-cs.bu.edu I just picked up C scheme and got it running, and have been fooling with the Emacs interface. I'm running on a Sun/3 with SunOS4.0 and it all seems to work except that the scheme process ignores all the interrupt characters that I send it. Does anyone have this working? This has been fixed, but not yet distributed (we've been running full bore getting the compiler up to scratch). Anyone who would like the changes should send mail to "bug-cscheme@zurich.ai.mit.edu" requesting to get them. Along with the request, please send the release number of your copy of Scheme, as the specifics of the changes depend on it; e.g. the number "7.1.1" in the following header: Scheme saved on Tuesday December 13, 1988 at 7:05:56 PM Release 7.1.1 Microcode 10.64 Runtime 14.30 SF 4.7 I'd prefer to distribute by anonymous ftp, but the changes can be mailed if needed.  Received: from iuvax.cs.indiana.edu (TCP 20123777300) by MC.LCS.MIT.EDU 13 Dec 88 17:56:19 EST Received: by iuvax.cs.indiana.edu (5.54.iu1/1.16) Date: Tue, 13 Dec 88 17:29:32 EST From: Chris Haynes To: scheme@mc.lcs.mit.edu Subject: IEEE Scheme Standard Meeting The second meeting of the IEEE Working Group on Scheme will be Friday, February 3rd, from 9am to 5pm at MIT. The primary agenda item is review of a standard draft being prepared by editors appointed at the last meeting. Those interested in attending should contact the Chair at the address below. Details of local arrangements will be provided when available to those who express interest. Christopher Haynes Mail: Lindley Hall, Indiana Universiy, Bloomington, IN 47405 Internet: chaynes@iuvax.cs.indiana.edu Telephone: 812-855-6486  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 13 Dec 88 15:10:35 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 13 Dec 88 14:56:35 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 13 Dec 88 19:13:47 GMT From: dartvax!griggs.dartmouth.edu!hugo@bu-cs.bu.edu Organization: Dartmouth College Subject: Scheme's emacs interface vs. SunOS 4.0 Message-Id: <11451@dartvax.Dartmouth.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Hi, I just picked up C scheme and got it running, and have been fooling with the Emacs interface. I'm running on a Sun/3 with SunOS4.0 and it all seems to work except that the scheme process ignores all the interrupt characters that I send it. Does anyone have this working? Thanks, Pete  Received: from zurich (TCP 2206400260) by MC.LCS.MIT.EDU 12 Dec 88 11:43:11 EST Return-Path: Received: from sesame.stanford.edu ([36.22.0.169]) by ZURICH.AI.MIT.EDU; Mon, 12 Dec 88 11:40:39 est Received: by sesame.stanford.edu (5.57/Ultrix2.4-C) id AA24087; Mon, 12 Dec 88 08:39:35 PST Date: Mon, 12 Dec 88 08:39:35 PST From: mkatz@sesame.stanford.edu (Morris Katz) Message-Id: <8812121639.AA24087@sesame.stanford.edu> To: scheme@zurich.ai.mit.edu Subject: Lisp Pointers Can someone tell me how to get on the Lisp Pointers mailing list? Please respond by email and I will post the answer to the group. Morry Katz katz@polya.stanford.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 10 Dec 88 16:24:20 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 10 Dec 88 16:23:16 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 10 Dec 88 21:23:04 GMT From: fenchurch!jbs@eddie.mit.edu (Jeff Siegal) Organization: MIT, EE/CS Computer Facilities, Cambridge, MA Subject: Re: Why does (eq? car car) ==> () in MacScheme? Message-Id: <10634@eddie.MIT.EDU> References: <1440@uw-nsr.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <1440@uw-nsr.UUCP> john@nsr.bioeng.washington.edu (John Sambrook 548-4386) writes: >[...]in MacScheme >it is the case that (eq? car car) ==> (). [...] >Could someone please explain what's going on here? I can guess at the following explanation: In MacScheme, Scheme primitives are not really procedures, but when you reference them, the compiler generates a procedure "wrapper" (i.e. "car" becomes "(lambda (l) (car l))" It does this each time the primitive is used as a value (so each "car" refers to a different wrapper procedure). This behavior is wrong according to R3RS (3/4 of the way into Sect 6.2) Jeff Siegal  Received: from bu-it.BU.EDU (TCP 20061201050) by MC.LCS.MIT.EDU 10 Dec 88 09:32:58 EST Received: from BUCSF.BU.EDU by bu-it.BU.EDU (5.58/4.7) id AA15941; Sat, 10 Dec 88 09:32:12 EST Received: by bucsf (4.12/4.7) id AA18366; Sat, 10 Dec 88 09:32:43 est Date: Sat, 10 Dec 88 09:32:43 est From: gjc%bucsf.BU.EDU@bu-it.bu.edu (George J. Carrette) Message-Id: <8812101432.AA18366@bucsf> To: Scheme@mc.lcs.mit.edu Subject: Scheme bibliography I'm told there is something about a Scheme implementation in the latest Usenix C++ procedings.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 10 Dec 88 08:24:13 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 10 Dec 88 08:20:30 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 10 Dec 88 08:04:19 GMT From: tikal!sigma!uw-nsr!john@beaver.cs.washington.edu (John Sambrook) Organization: UW-Bioengineering, Seattle, WA Subject: Why does (eq? car car) ==> () in MacScheme? Message-Id: <1440@uw-nsr.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu First, regarding the future of Scheme, I'd like to note that one of my friends here at the University of Washington will be teaching a small class of mechanical engineers (something) about software engineering. He will be using Scheme, and not Fortran, which I guess was quite a coup on his part. At any rate, he and I were talking, and he commented that he had discovered (though it is documented in the manual) that, in MacScheme it is the case that (eq? car car) ==> (). I was suprised by this. Could someone please explain what's going on here? Thanks, -- John Sambrook Internet: john@nsr.bioeng.washington.edu University of Washington RC-05 UUCP: uw-nsr!john Seattle, Washington 98195 Dial: (206) 548-4386  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 9 Dec 88 11:09:05 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 9 Dec 88 11:05:38 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 8 Dec 88 06:44:32 GMT From: clyde!watmath!utgpu!utzoo!yunexus!oz@bellcore.bellcore.com (Ozan Yigit) Organization: York U. Computing Services - Magic Group Subject: Scheme bibliography (few additions) Message-Id: <933@yunexus.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Here are few additions to the scheme bibliography since the last posting. I will do a complete re-post at an appropriate time. See LISP POINTERS (Readings in Scheme column) for a printed version. Keep them additions coming. (Thnx Kent!) [For example, I have not yet been able to get the latest Lisp Conf. proceedings... Entries from that conference would be most welcomed.] I have also received some "abstracts", and I will post them with the biblio entries once a critical mass is reached. (Hello Indiana ?? MIT ?? zzzttt...nnn.. can't... hear... you... :-) Help save the scheme-literati: send me the biblio-details of those obscure tech reports dusting(?) on your shelf... If it exists, and has anything to do with Scheme, it ought to be in The (note the uppercase T) Bibliography... Notes: I think (this is a subjective opinion, based on actual reading, and not a commercial :-) Kent's "Three implementation models for Scheme" thesis is an excellent reading, especially for the implementor. It describes the foundations of the `Chez' implementation. I especially enjoyed the clean-and-concise exposition of the ideas and algorithms. Happy scheming... oz ---- snip ---- %A Uwe F. Pleban %T The Standard Semantics of a Subset of SCHEME, a Dialect of LISP %R Computer Science Technical Report TR-79-3 %I University of Kansas %C Lawrence, Kansas %D July 1979 %A Uwe F. Pleban %T A Denotational Approach to Flow Analysis and Optimization of SCHEME, A Dialect of LISP %R Ph.D. Dissertation %I University of Kansas %C Lawrence, Kansas %D 1980 %A Rex A. Dwyer %A R. Kent Dybvig %T A SCHEME for Distributed Processes %R Computer Science Department Technical Report #107 %I Indiana University %C Bloomington, Indiana %D April 1981 %A R. Kent Dybvig %T C-Scheme %R Computer Science Department Technical Report #149 (MS Thesis) %I Indiana University %C Bloomington, Indiana %D 1983 %A Richard Schooler %A James W. Stamos %T Proposal For a Small Scheme Implementation %R MIT Lab for Computer Science Memo TM-267 %C Cambridge, Mass. %D October 1984 %A R. Kent Dybvig %A Bruce T. Smith %T Chez Scheme Reference Manual Version 1.0 %I Cadence Research Systems %C Bloomington, Indiana %D May 1985 %A R. Kent Dybvig %T Three Implementation Models for Scheme %R Department of Computer Science Technical Report #87-011 (PhD Dissertation) %I University of North Carolina at Chapel Hill %C Chapel Hill, North Carolina %D April 1987 %A R. Kent Dybvig %A Robert Hieb %T A Variable-Arity Procedural Interface %J Proceedings of the 1988 ACM Symposium on LISP and Functional Programming %C Salt Lake City, Utah %D July 1988 %P 106-115 %O Also Indiana University Computer Science Department Technical Report #247 %A R. Kent Dybvig %A Robert Hieb %T Engines from Continuations %R Computer Science Department Technical Report #254 %I Indiana University %C Bloomington, Indiana %D July 1988 %O Also to appear in Journal of Computer Languages %A R. Kent Dybvig %A Robert Hieb %T Continuations and Concurrency %R Computer Science Department Technical Report #256 %I Indiana University %C Bloomington, Indiana %D July 1988 %A R. Kent Dybvig %A Daniel P. Friedman %A Christopher T. Haynes %T Expansion-Passing Style: A General Macro Mechanism %J Lisp and Symbolic Computation: An International Journal %V 1 %N 1 %I Kluwer Academic Publishers %P 53-76 %D June 1988 %A Olin Shivers %T Control Flow Analysis in Scheme %J Proceedings of the Sigplan 1988 Conference on Programming Language Design and Implementation %P 164-174 %C Atlanta, Georgia %D June 1988 %K schflow -------------------- -- You see things, and you say "WHY?" Usenet: oz@nexus.yorku.ca But I dream things that never were; ......!uunet!utai!yunexus!oz and say "WHY NOT?" Bitnet: oz@[yulibra|yuyetti] [Back To Methuselah] Bernard Shaw Phonet: +1 416 736-5257x3976  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 8 Dec 88 18:39:04 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 8 Dec 88 18:23:19 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 8 Dec 88 21:34:16 GMT From: mailrus!uflorida!haven!uvaarpa!hudson!vivaldi!pmy@ohio-state.arpa (Pete Yadlowsky) Organization: University of Virginia, Charlottesville Subject: why scheme? Message-Id: <883@hudson.acc.virginia.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Hello, I was wondering if anyone would care to put in a nutshell what it is that distinguishes scheme from other lisps, say, common lisp. I understand that it's small and memory-efficient, but aside from that...? Also, is anyone doing any object-oriented stuff with scheme? I currently favor xlisp (for my Amiga), but I'm interested in looking into what scheme has to offer, too. Thanks. Peter M. Yadlowsky Academic Computing Center University of Virginia pmy@vivaldi.acc.Virginia.EDU  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 8 Dec 88 13:08:57 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 8 Dec 88 12:54:40 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 8 Dec 88 17:24:10 GMT From: fenchurch!jbs@eddie.mit.edu (Jeff Siegal) Organization: MIT, EE/CS Computer Facilities, Cambridge, MA Subject: Re: R4RS changes? Code? Message-Id: <10608@eddie.MIT.EDU> References: <8812072227.AA00515@uicbert.eecs.uic.edu>, <3348@uoregon.uoregon.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <3348@uoregon.uoregon.edu> will@fog.UUCP (William Clinger) writes: >I think you are right that relatively few of the people who use Scheme for >really serious development are writing portable Scheme code. On the >Macintosh, for example, "really serious" implies calling ROM routines >to achieve the Apple look and feel, [...] This is true in any language, but all "real" languages (Scheme included) provide ways to package up these system dependencies to allow easier retargeting of the code. However, this is quite different from the non-standardization of actual language features (e.g. dynamic bindings, macros, internal define's), which can require converting the lots of code to transport a system. I'm glad to hear there is at least a possibility of macros becoming standard; the other features I can live without. On the other hand, aren't dynamic bindings required for many of the interesting uses of call/cc (i.e. catch and throw). Jeff Siegal  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 7 Dec 88 22:38:45 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 7 Dec 88 22:24:10 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 8 Dec 88 02:58:39 GMT From: uoregon!will@beaver.cs.washington.edu (William Clinger) Organization: University of Oregon, Computer Science, Eugene OR Subject: Re: R4RS changes? Code? Message-Id: <3348@uoregon.uoregon.edu> References: <8812072227.AA00515@uicbert.eecs.uic.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8812072227.AA00515@uicbert.eecs.uic.edu> wilson@UICBERT.EECS.UIC.EDU (Paul Wilson) writes: >Several people (myself included) have posted requests for large >Scheme programs, with disappointing results. Apparently relatively few >people use Scheme for really serious development, and very few write >portable (e.g., R3RS) Scheme code. I think you are right that relatively few of the people who use Scheme for really serious development are writing portable Scheme code. On the Macintosh, for example, "really serious" implies calling ROM routines to achieve the Apple look and feel, which is hardly portable even with all the high-level support provided by MacScheme+Toolsmith. It's not portable in C, either. Some of the larger Scheme programs, like Edwin, TI's Personal Consultant for the PC family, and various programs written in T, are non-portable in part because they are rooted in systems that antedate the RRRS, let alone the R3RS. I would imagine that they also have to do a lot of inherently non-portable things with i/o. >I was wondering if this is likely to change over the next couple of >years, perhaps as a result of a more completely standardized language. I think it will. Most of Scheme's popularity has been a result of the Abelson & Sussman(s) book, which has prompted universities to use Scheme in their introductory courses, often on an experimental basis. Universities are only now beginning to accept Scheme as a language worthy of use in upper division and graduate courses, and upper level textbooks that use Scheme are only now being written. I expect the most significant publicly available Scheme programs, some of them portable, will be written in the universities. That's the way it is with other languages. >When is the R4RS likely to come out, and what is it likely to standardize? >Will a macro facility be standardized? Dynamic or fluid variables?... >...Is there a consensus growing as to how either of these should >be done, or is it too early to settle on a standard? The R4RS will come out early next year. It will not standardize dynamic or fluid variables, and I am skeptical that it will standardize macros. There seems to be a fair consensus on macros, but the details aren't yet worked out. There are technical problems concerning the interaction of dynamic variables with multitasking and I don't expect them to be resolved anytime soon. A draft of the IEEE standard will be ready in February. This is probably more important than the R4RS, on which it will be based. >Whatever the answer is, what does it imply for the future of Scheme? Will >it be a "toy" language forever, like unextended Pascal? Or will it >eventually be a medium-sized language with a lot of available libraries, >like C? I think the availability of generally useful public code will soon be better for Scheme than for unextended Pascal (if it isn't already). I doubt that Scheme will ever approach C in the volume of generally available code, but Scheme may be stronger than C in certain important areas such as numerical software. It would be a waste to duplicate some C libraries, such as X, in Scheme; better to let Scheme code call the C libraries. >Right now, I need to guess whether there will be sufficient programs >available within two years to gather performance data for some implementation >techniques. If not, I may have to go with another language for some of >the things I need to do, and that could be painful. Though we've talked, I still don't have a good idea of the kind of programs you're looking for. The main reason I haven't responded to your call for programs is that I'm inclined to interpret a call for "large" programs as a call for programs with more than 10,000 lines (at least) and I've never written a standalone program that large in any single language. Peace, Will  Received: from uicbert.eecs.uic.edu (TCP 20076123031) by MC.LCS.MIT.EDU 7 Dec 88 17:25:23 EST Received: by uicbert.eecs.uic.edu (UIUC-5.52/9.7) id AA00515; Wed, 7 Dec 88 16:27:22 CST Date: Wed, 7 Dec 88 16:27:22 CST From: wilson@uicbert.eecs.uic.edu (Paul Wilson) Message-Id: <8812072227.AA00515@uicbert.eecs.uic.edu> To: scheme-request@mc.lcs.mit.edu, scheme@mc.lcs.mit.edu Subject: R4RS changes? Code? Several people (myself included) have posted requests for large Scheme programs, with disappointing results. Apparently relatively few people use Scheme for really serious development, and very few write portable (e.g., R3RS) Scheme code. I was wondering if this is likely to change over the next couple of years, perhaps as a result of a more completely standardized language. When is the R4RS likely to come out, and what is it likely to standardize? Will a macro facility be standardized? Dynamic or fluid variables? These seem to me to be the most important Lisp features not specified by the R3RS. Is there a consensus growing as to how either of these should be done, or is it too early to settle on a standard? Whatever the answer is, what does it imply for the future of Scheme? Will it be a "toy" language forever, like unextended Pascal? Or will it eventually be a medium-sized language with a lot of available libraries, like C? (And will it be a family of incompatible languages, like Pascal, or take over the world, like C? :-). Right now, I need to guess whether there will be sufficient programs available within two years to gather performance data for some implementation techniques. If not, I may have to go with another language for some of the things I need to do, and that could be painful. -- Paul Paul R. Wilson Human-Computer Interaction Laboratory U. of Illin. at C. EECS Dept. (M/C 154) wilson%uicbert@uxc.cso.uiuc.edu Box 4348 Chicago,IL 60680  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 7 Dec 88 15:39:27 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 7 Dec 88 15:35:08 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 7 Dec 88 19:35:58 GMT From: zodiac!andy@ames.arpa (Andy Cromarty) Organization: Computer Systems Laboratory, Advanced Decision Systems Subject: Commercial/Industry use of Scheme Message-Id: <6286@zodiac.UUCP> References: Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article  Received: from kleph.ai.mit.edu (TCP 2212600254) by MC.LCS.MIT.EDU 6 Dec 88 21:49:23 EST Received: by kleph.ai.mit.edu (5.59/1.5) id AA00972; Tue, 6 Dec 88 21:55:08 EST Date: Tue, 6 Dec 88 21:55:08 EST From: cph@kleph.ai.mit.edu (Chris Hanson) Message-Id: <8812070255.AA00972@kleph.ai.mit.edu> To: uxg.cso.uiuc.edu!uicbert.eecs.uic.edu!wilson@uxc.cso.uiuc.edu Cc: scheme@mc.lcs.mit.edu In-Reply-To: Automatic Scheme Digestifier's message of 2 DEC 88 00:09:37 EST Subject: Lisp vs. Scheme Emacs Reply-To: cph@zurich.ai.mit.edu Date: 30 Nov 88 23:53:00 GMT From: uxg.cso.uiuc.edu!uicbert.eecs.uic.edu!wilson@uxc.cso.uiuc.edu On the other hand, in Stallman's paper on EMACS, he says that it exploits dynamic binding for flexibility. Is the Scheme version (Edwin) as elegant as the Lisp version? Does it fake dynamic or fluid binding explicitly? As the author of Edwin, here's my "definitive" answer: Naturally I believe that Edwin is as elegant as GNU Emacs; since half the fun I get out of writing a program is making it elegant, I did my best to accomplish this. In some ways, it is less elegant: in particular, because Edwin was about half built before I ever saw or played with GNU Emacs, many parts of it are based on the original Emacs (most of the documentation strings were snarfed directly from the TECO source code). Once I found out about GNU Emacs, the design changed direction midstream, and subsequent developments more closely mirror the GNU model. Future work is likely to close the gap with GNU Emacs even more. In other ways, I feel that it is more elegant: the programming model, unlike GNU Emacs, fosters "object manipulation" rather than "editing steps". By this, I mean the following: GNU Emacs (like Multics Emacs) encourages the extension writer to view the activity of writing extensions almost like that of writing keyboard macros; e.g. there is always a current buffer, you switch buffers to change things in other buffers, and there are a variety of things like `save-excursion' to allow you to remember where you were in various ways. In other words, many of the side effects that an extension performs are incidental rather than essential. Edwin encourages you to think like a programmer: you've got alot of objects lying around, and you manipulate the objects directly; incidental side effects are unnecessary, because there are no (or perhaps only a few) dependencies on the current state. For example, if you want to change a buffer other than the current one, you just get a pointer to it and manipulate it using the usual mechanisms, which all accept buffers as arguments. Of course, judging elegance in this way is pretty artificial. Both of these programming models are elegant in different ways. GNU Emacs' programming model is elegant because it is similar to the model of the Emacs user. Edwin's is elegant because distinguished objects play a much smaller role, and certain kinds of programming abstractions are easier to capture; also it is similar to the way that programmers think (i.e. lots of objects, and side effects on those objects). Finally: Edwin does GNU Emacs one better in the dynamic binding question, because MIT Scheme has dynamic binding. Edwin uses dynamic binding where it is appropriate, and the rest of the time it relies on lexical scoping.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 6 Dec 88 21:23:21 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 6 Dec 88 21:22:09 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 7 Dec 88 00:13:41 GMT From: lord+@andrew.cmu.edu (Tom Lord) Organization: Carnegie Mellon Subject: jobs Message-Id: Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Where can one earn a living exploring or extending Scheme? -t  Received: from Think.COM (TCP 1201000006) by MC.LCS.MIT.EDU 6 Dec 88 15:05:20 EST Received: from fafnir.think.com by Think.COM; Tue, 6 Dec 88 14:26:48 EST Return-Path: Received: from verdi.think.com by fafnir.think.com; Tue, 6 Dec 88 15:04:55 EST Received: by verdi.think.com; Tue, 6 Dec 88 15:03:27 EST Date: Tue, 6 Dec 88 15:03:27 EST From: Guy Steele Message-Id: <8812062003.AA12924@verdi.think.com> To: Scheme@mc.lcs.mit.edu In-Reply-To: Automatic Scheme Digestifier's message of 6 DEC 88 00:06:03 EST <8812060525.AA06763@Think.COM> Subject: EMACS and Lisp This is just to throw my memories and two cents' worth into the fray. The original EMACS was indeed done in TECO. The EMACS command set was an amalgam of four prototype command sets that had sprung up at MIT once RMS had given us the ability to attach command strings to keystrokes. I had observed that having four wildly different command sets was impeding us, because one person could not sit down at another's terminal to help him. I spent a few weeks running up and down the halls and stairways with a matrix chart in my hands (the columns were labelled ---, Control, Meta, and Control-Meta, and ASCII characters down the left-hand edge labelled the rows), consulting with implementors and users in Technology Square trying to get agreement on a common set of editor commands. RMS came across me while I was struggling to write the first thirty lines or so of TECO code to implement the mess, offered to "help out"--and the rest is history: he did essentially all of the implementation, as well as improving substantially on the design, inventing new commands (and the necessary TECO primitives to support them), and researching how users actually used the commands. His is a magnificent achievement, against which new editors are still sometimes measured, over ten years later. According to Bernie Greenberg's paper in the 1980 Lisp Conference ("Prose and Cons"--what a wonderful title!), Multics EMACS was written no earlier than 1978. Scheme first came out in 1975, and the Revised Report on Scheme was published in January of 1978. Nevertheless, Scheme was not available on Multics and MacLisp was. Even if Scheme had been available, it would have been sensible to use MacLisp anyway: for one thing, the Scheme implementations at MTI at that time were all embedded in MacLisp anyway! --Guy Steele  Received: from XX.LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 6 Dec 88 10:30:30 EST Received: from bu-it.BU.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Tue 6 Dec 88 10:05:10-EST Received: from BUCSF.BU.EDU by bu-it.BU.EDU (5.58/4.7) id AA20947; Tue, 6 Dec 88 09:04:06 EST Received: by bucsf (4.12/4.7) id AA14759; Tue, 6 Dec 88 09:04:31 est Date: Tue, 6 Dec 88 09:04:31 est From: gjc%bucsf.BU.EDU@bu-it.bu.edu (George J. Carrette) Message-Id: <8812061404.AA14759@bucsf> To: Scheme@mc.lcs.mit.edu Subject: lexical vs dynamic binding in editor macro languages. It is very convenient to have dynamic binding in an editor extension language because of the amount of state information and implied arguments laying around. So even when you start with a lexically scoped language, (e.g. VAX-NIL, in which the Steve editor was written) you still end up using a lot of special variables. Especially if you were influenced by multics emacs, zmacs, its emacs. Editor authors usually implement their own CLOSURE mechanism as well, and environment editing/augmenting mechanisms too. Usually terms like "editor bindings," "buffer bindings," and "mode bindings" come into play. It is usually quite interesting to see how the implementor manages all these environment issues. -gjc  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 5 Dec 88 14:07:45 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Mon, 5 Dec 88 13:55:48 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 5 Dec 88 16:39:03 GMT From: polya!max@labrea.stanford.edu (Max Hailperin) Organization: Stanford University Subject: history of emacs and lisps Message-Id: <5484@polya.Stanford.EDU> References: <8812030543.AA12348@theory.LCS.MIT.EDU>, <8812031540.AA00290@toucan.LCS.MIT.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu >> Forgive my stupidity on this answer - but wasn't EMACS originally written in >> Lisp, like way way back. (i.e. before we were scheme'ing) >EMACS was first written in TECO. While it is of course true that EMACS was originally a bunch of MIT TECO [note that MIT TECO is not the same as DEC TECO] macros (that's where the "MACS" part of the name comes from, if my memory serves me), I believe there is some grain of truth in the original posting. The second implementation of EMACS, very early on, was in Maclisp -- Multics EMACS. Unless I've got my history muddled, Multics EMACS does predate Scheme. Therefore, there is indeed a historical grounding for the use of Maclisp-family Lisps in writing EMACSes. Of course, that's far from the whole story: there's also issues like RMS's own background and tastes.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 4 Dec 88 22:52:29 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sun, 4 Dec 88 22:45:00 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 5 Dec 88 03:24:05 GMT From: pasteur!agate!e260-2b.berkeley.edu!c60a-2ce@ames.arpa (Mikey) Organization: University of California, Berkeley Subject: Where can I get XScheme? Message-Id: <17794@agate.BERKELEY.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu If anyone has Xscheme, could you PLEASE send it to comp.binaries.mac? If not, I'd love to know where I can get a copy of this. I'm taking a course that uses Abelson & Sussman's book, you see...Thanks! --------------------------------------------------------------------- Please reply via e-mail; I just don't have enough time to go thru the entire newsgroup. Thanks a lot! c60a-2ce@web.berkeley.edu.......................................Mikey *** Call Tanelorn III! (415) 540-1180. The Apple/Mac BBS of Berkeley.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 3 Dec 88 18:18:59 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 3 Dec 88 18:13:36 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 3 Dec 88 22:14:22 GMT From: pierce@locus.ucla.edu Organization: UCLA Computer Science Department Subject: named-let* ; distinct ids in binding forms Message-Id: <18529@shemp.CS.UCLA.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu A while back someone in this newsgroup asked if there were plans to add a named-let* to official Scheme. I don't recall an answer to this. I often find a named-let* useful, but really don't care if it becomes official. I just wondered what the status of this issue was. By named-let* I mean something like the following*: (described in Eugene Kohlbecker's extend-syntax): (extend-syntax (named-let*) ((named-let* loop ((x1 v1) ...) e1 e2 ...) (andmap symbol? '(loop x1 ...)) (let* ((x1 v1) ...) (let loop ((x1 x1) ...) e1 e2 ...)))) ----- *Of course, there's no reason to have a separate syntax, they should be combined as: (extend-syntax (let*) [(let* () e1 e2 ...) (begin e1 e2 ...)] [(let* ([x1 v1] [x2 v2] ...) e1 e2 ...) (andmap symbol? '(x1 x2 ...)) (let ([x1 v1]) (let* ([x2 v2] ...) e1 e2 ...))] [(let* loop ([x1 v1] ...) e1 e2 ...) (andmap symbol? '(loop x1 ...)) (let* ([x1 v1] ...) (let loop ([x1 x1] ...) e1 e2 ...))]) ----- Now this definition assumes that the identifiers bound by a named-let* are distinct, but I don't see a reasonable interpretation for the meaning of such a construction anyway. Thus the fender for named-let* might be better written as: (let ((ids '(loop x1 ...)) (distinct-symbols? (lambda (lst) {some appropriate defn}))) (and (andmap symbol? ids) (distinct-symbols? ids))) where distinct-symbols? would have the obvious definition. Either that, or multiple instances of the same identifier should be allowed. Any opinions on that? (It is required that the name of a named-let be distinct from the identifiers bound by that let, or not?) ------ I guess in addition to hearing about whether let* will be extended to include a named form, I'd also like to find out which binding forms must bind only distinct identifiers, and which need not, and the motivation for these decisions. -- Brad Pierce pierce@CS.UCLA.EDU  Received: from REAGAN.AI.MIT.EDU (CHAOS 13065) by MC.LCS.MIT.EDU 3 Dec 88 17:30:15 EST Received: from QUESTION-AUTHORITY.AI.MIT.EDU by REAGAN.AI.MIT.EDU via CHAOS with CHAOS-MAIL id 153118; Sat 3-Dec-88 17:29:01 EST Date: Sat, 3 Dec 88 17:29 EST From: Alan Bawden Subject: Re: Lisp vs. Scheme Emacs To: agate!saturn!kjell@labrea.stanford.edu, ucsbcsl!vision!nosmo@BLOOM-BEACON.MIT.EDU cc: Scheme@MC.LCS.MIT.EDU In-Reply-To: <5621@saturn.ucsc.edu>, <1020@hub.ucsb.edu> Message-ID: <19881203222902.2.ALAN@QUESTION-AUTHORITY.AI.MIT.EDU> Date: 2 Dec 88 06:42:46 GMT From: agate!saturn!kjell@labrea.stanford.edu (Kjell Post) How can a *bug* be considered flexible? The original Scheme papers by Sussman and Steele contain some good arguments for why dynamic variables are sometimes exactly what you want. Date: 3 Dec 88 01:05:58 GMT From: ucsbcsl!vision!nosmo@bloom-beacon.mit.edu (Vincent Brooke Kraemer) Forgive my stupidity on this answer - but wasn't EMACS originally written in Lisp, like way way back. (i.e. before we were scheme'ing) No, the original EMACS was written in TECO. (And in case you are wondering, TECO is dynamically scoped.)  Received: from toucan.LCS.MIT.EDU (TCP 2206400272) by MC.LCS.MIT.EDU 3 Dec 88 10:39:46 EST Received: by toucan.LCS.MIT.EDU id AA00290; Sat, 3 Dec 88 10:40:26 EST Date: Sat, 3 Dec 88 10:40:26 EST From: bard@theory.lcs.mit.edu Message-Id: <8812031540.AA00290@toucan.LCS.MIT.EDU> To: Scheme@mc.lcs.mit.edu In-Reply-To: Automatic Scheme Digestifier's message of 3 DEC 88 00:09:03 EST <8812030543.AA12348@theory.LCS.MIT.EDU> Subject: Scheme Digest #22 > > Forgive my stupidity on this answer - but wasn't EMACS originally written in > Lisp, like way way back. (i.e. before we were scheme'ing) > EMACS was first written in TECO. TECO is an editor with a powerful command language, so powerful that it is a general purpose programming language. TECO is distinguished as the language in which optimally-formatted programs look the most like line noise: the commands are mostly control-characters with arguments. Even assembly language, optimally formatted, is clearly text. -- Bard  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 2 Dec 88 23:48:23 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 2 Dec 88 23:39:16 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 3 Dec 88 01:05:58 GMT From: ucsbcsl!vision!nosmo@bloom-beacon.mit.edu (Vincent Brooke Kraemer) Organization: University of California, Santa Barbara Subject: Re: Lisp vs. Scheme Emacs Message-Id: <1020@hub.ucsb.edu> References: <237@cs-spool.calgary.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Forgive my stupidity on this answer - but wasn't EMACS originally written in Lisp, like way way back. (i.e. before we were scheme'ing) I am sure that you can write an EMACS in just about any language you want - but do you really want to ignore a considerable amount of work that has already been tried and worked. The decision was probably made more on the basis of intelligent software engineering practice than religious beliefs. Or at least I would hope so. ------------------------------------------------------------------------------- I only .sig in "soc." groups - real news doesn't need it.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 2 Dec 88 06:04:36 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 2 Dec 88 05:56:40 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 2 Dec 88 06:42:46 GMT From: agate!saturn!kjell@labrea.stanford.edu (Kjell Post) Organization: University of California, Santa Cruz Subject: Re: Lisp vs. Scheme Emacs Message-Id: <5621@saturn.ucsc.edu> References: <237@cs-spool.calgary.UUCP>, <82000004@uicbert.eecs.uic.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <82000004@uicbert.eecs.uic.edu> wilson@uicbert.eecs.uic.edu writes: > >On the other hand, in Stallman's paper on EMACS, he says that it >exploits dynamic binding for flexibility. How can a *bug* be considered flexible? (Boy, am I in trouble now...) -- For athletes and programmers, ! Kjell E. Post a woman is the end of their career. ! CIS/CE ! University of California, Santa Cruz -- A.Wickberg ! Email: kjell@saturn.ucsc.edu  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 1 Dec 88 21:18:45 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 1 Dec 88 21:08:34 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 30 Nov 88 23:53:00 GMT From: uxg.cso.uiuc.edu!uicbert.eecs.uic.edu!wilson@uxc.cso.uiuc.edu Subject: Re: Lisp vs. Scheme Emacs Message-Id: <82000004@uicbert.eecs.uic.edu> References: <237@cs-spool.calgary.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu On the other hand, in Stallman's paper on EMACS, he says that it exploits dynamic binding for flexibility. Is the Scheme version (Edwin) as elegant as the Lisp version? Does it fake dynamic or fluid binding explicitly?  Received: from cs2.wsu.edu (TCP 30007754064) by MC.LCS.MIT.EDU 1 Dec 88 18:00:06 EST Received: by cs2.wsu.edu (5.59/25-eef) id AA29544; Thu, 1 Dec 88 18:00:37 EST Message-Id: <8812012300.AA29544@cs2.wsu.edu> To: scheme@mc.lcs.mit.edu Subject: Rationals in MIT C Scheme Date: Thu, 01 Dec 88 15:00:32 -0800 From: eric@cs2.wsu.edu Can anybody give me a quick run-down of the status of rationals in MIT C Scheme. We are running 6.1.1 and the 'numerator' and 'denominator' functions don't seem to exist. Is there a newer version with these incorporated. I am doing research in continued fraction arithmetic and would like to be able to use Scheme instead of Common LISP. Thanks for any help, Eric Schneider (eric@cs2.wsu.edu)  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 1 Dec 88 00:03:54 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 30 Nov 88 23:58:13 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 1 Dec 88 03:42:38 GMT From: pasteur!sim.berkeley.edu!shuvra@ames.arpa (Shuvra S. Bhattacharyya) Organization: University of California, Berkeley Subject: Peephole optimizers using expert systems Message-Id: <7873@pasteur.Berkeley.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Does anyone know of any past work on peephole optimizers which use expert systems? Please send replies to shuvra@sim.berkeley.edu Thanks in advance, ---------- Shuvra  Received: from XX.LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 30 Nov 88 18:44:27 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Wed 30 Nov 88 12:19:11-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 30 Nov 88 12:14:26 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 29 Nov 88 11:15:49 GMT From: mcvax!enea!kth!draken!tut!pk@uunet.uu.net (Kellom{ki Pertti) Organization: Tampere University of Technology, Finland Subject: Re: Lisp vs. Scheme Emacs Message-Id: <5451@korppi.tut.fi> References: <237@cs-spool.calgary.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <237@cs-spool.calgary.UUCP> jameson@cpsc.ucalgary.ca (Kevin Jameson) writes: >Why is Lisp used in GNU Emacs (and in the rest of the Emacs family) >in preference to Scheme? As I understand it, GNU Emacs Lisp has been written solely for the purpose of writing text editors. It has some really nice features for doing that, whereas it lacks some features that more general purpose lisps have (closures among others). The primitive editing functions of GNU Emacs Lisp have been written in C, so they are pretty fast. The thing I am personally most impressed about GNU Emacs Lisp is how easy it is to manipulate buffers, windows etc. from Lisp code. -- Pertti Kellomaki (the 'a' with an umlaut) Tampere Univ. of Technology +358 31 640 550 home Internet: pk@tut.fi +358 31 162 934 work (L406) UUCP: tut!pk  Received: from XX.LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 30 Nov 88 18:44:21 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Wed 30 Nov 88 12:19:06-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 30 Nov 88 12:13:51 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 26 Nov 88 00:06:31 GMT From: mcvax!enea!kth!draken!tut!hydra!kreeta!grano@uunet.uu.net (Juhani Grano UNIX88) Organization: University of Helsinki, Finland Subject: How to obtain TI PC-Scheme? Message-Id: <609@hydra.cs.Helsinki.FI> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I guess this is the right newsgroup -- sorry if I'm wrong. I'm posting this on behalf of my friend who's been trying to obtain the Texas Instruments PC-Scheme implementation of Scheme. As things are here in the land of icebears and C hackers, it seems that he can't get it from here in Finland. He even went that far that he wrote to TI in U.S., but with no response, of course. ANY help would be greatly appreciated (maybe a software company in Europe/Scandinavia selling abroad?) as this really is frustrating... Thanks in advance! Kari Grano, student of computer sciences. Try one of these: grano@finuha grano@cc.helsinki.fi  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 29 Nov 88 15:48:02 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 29 Nov 88 15:35:44 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 29 Nov 88 16:04:28 GMT From: tub-tfs.UUCP!alti@bloom-beacon.mit.edu (Thorsten Altenkirch) Organization: The Internet Subject: eliza Message-Id: <8811291604.AA24439@tub-tfs.uucp> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Is there somebody who has a version of eliza running in TI-SCHEME ? I need it very soon ! Thanks a lot . Thorsten  Received: from MITVMA.MIT.EDU (TCP 2227000003) by MC.LCS.MIT.EDU 29 Nov 88 15:29:27 EST Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (IBM VM SMTP R1.1) with BSMTP id 1535; Tue, 29 Nov 88 15:29:02 EST Received: from DB0TUI6.BITNET (ZTUBTFAL) by MITVMA.MIT.EDU (Mailer X1.25) with BSMTP id 1533; Tue, 29 Nov 88 15:26:53 EST Received: by tub.UUCP; Tue, 29 Nov 88 17:02:18 +0100; AA19983 Received: by tub-tfs.uucp (4.0/SMI-3.0DEV3) id AA24439; Tue, 29 Nov 88 17:04:28 +0100 Date: Tue, 29 Nov 88 17:04:28 +0100 From: alti%tub-tfs.uucp%TUB.BITNET@MITVMA.MIT.EDU (Thorsten Altenkirch) Message-Id: <8811291604.AA24439@tub-tfs.uucp> To: scheme%mc.lcs.mit.edu@tub.uucp Subject: eliza Is there somebody who has a version of eliza running in TI-SCHEME ? I need it very soon ! Thanks a lot . Thorsten  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 25 Nov 88 06:41:51 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 25 Nov 88 06:37:59 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 22 Nov 88 19:30:25 GMT From: mcvax!inria!vmucnam!occam@uunet.uu.net (occam) Organization: C.N.A.M, Paris, France Subject: Xscheme for microport sys.V Message-Id: <562@vmucnam.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu So could someone wo has sources (Preferably for UNIX microport sys.V and PC) for Xscheme. R.Laurens C.N.A.M Paris (France) e-mail occam@vmucnam.UUCP  Received: from research.att.com (TCP 1201200131) by MC.LCS.MIT.EDU 24 Nov 88 08:42:16 EST From: dbm@research.att.com Date: Thu, 24 Nov 88 08:40:13 EST To: scheme@mc.lcs.mit.edu CALL FOR PAPERS Conference on Functional Programming Languages and Computer Architecture London, September 11-13, 1989 *Sponsored by IFIP WG 2.8 and ACM SIGPLAN/SIGARCH The fourth in a series of conferences on Functional Programming Languages and Computer Architectures will cover the theory, design, implementation, and application of functional or applicative programming languages, and research on new computer architectures designed to support functional programming. Architectural issues relating to implementation of functional programming languages on conventional architectures are also relevant. Papers accepted for the conference must contain material not presented previously in any formal forum. Authors should submit five copies of a {\it full\/} paper (not exceeding 20 pages), and ten additional copies of a 300-word abstract to the Chairman of the Program Committee (if copying facilities are not available one copy will do). Submissions should be double spaced or typeset 10-point on 16-point spacing. Names and affiliations of authors should appear on both paper and abstract. Papers will be judged on relevance, clarity, correctness, originality and significance. It is important to include specific results, sketches of their derivations, and comparisons with previous work. Submissions must be received by March 10, 1989, and should include a return postal address, and an electronic address wherever possible. Authors will be notified of acceptance or rejection by May 8, 1989. Full versions of the accepted papers must be received in camera-ready form by June 16, 1989, for inclusion in the proceedings. Authors of accepted papers will be expected to sign an ACM copyright release form. Proceedings will be published by ACM Press in association with Addison-Wesley and will be distributed at the symposium. Program Committee Chair Program Committee David MacQueen Doug DeGroot, Texas Instruments, USA Attn: FPCA '89 Paul Hudak, Yale University, USA Room 2C-322 John Hughes, Univeristy of Glasgow, GB AT&T Bell Laboratories Thomas Johnsson, Chalmers Univ. of Technology, S 600 Mountain Avenue Richard Kieburtz, Oregon Graduate Center, USA Murray Hill, NJ 07974 Gary Lindstrom, University of Utah, USA U.S.A. John Mitchell, Stanford University, USA Simon Peyton-Jones, University College London, GB (201) 582-7691 Ronan Sleep, University of East Anglia, GB macqueen@research.att.com Ascandar Suarez, DEC Paris Research, F Local Arrangements Chair Conference Chair Chris L. Hankin Joseph Stoy Dept. of Computer Science Programming Research Group Imperial College Oxford University Huxley Building, Queen's Gate 8-11 Keble Road London SW7 2BZ Oxford OX1 3DQ GREAT BRITAIN GREAT BRITAIN clh@doc.ic.ac.uk stoy@prg.ox.ac.uk *International Federation for Information Processing: Working Group 2.8 on Functional Programming. *Association for Computing Machinery: Special Interest Group on Programming Languages, Special Interest Group on Computer Architecture.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 23 Nov 88 12:41:20 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 23 Nov 88 12:35:06 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 23 Nov 88 16:50:21 GMT From: fenchurch!jbs@eddie.mit.edu (Jeff Siegal) Organization: MIT, EE/CS Computer Facilities, Cambridge, MA Subject: Re: Lisp vs. Scheme Emacs Message-Id: <10502@eddie.MIT.EDU> References: <237@cs-spool.calgary.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <237@cs-spool.calgary.UUCP> jameson@cpsc.ucalgary.ca (Kevin Jameson) writes: >[...] basing an editor on Scheme There is an editor called EDWIN, which is an Emacs look-alike, not only based on Scheme, but written entirely in it. Jeff Siegal  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 23 Nov 88 09:17:43 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 23 Nov 88 09:02:35 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 22 Nov 88 21:54:36 GMT From: att!alberta!calgary!cpsc!jameson@bloom-beacon.mit.edu (Kevin Jameson) Subject: Lisp vs. Scheme Emacs Message-Id: <237@cs-spool.calgary.UUCP> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Why is Lisp used in GNU Emacs (and in the rest of the Emacs family) in preference to Scheme? Or phrased another way, would there be any significant advantages/disadvantages to basing an editor on Scheme instead of Lisp? Thanks Kevin  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 22 Nov 88 20:32:51 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 22 Nov 88 20:24:13 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 21 Nov 88 21:27:00 GMT From: uxg.cso.uiuc.edu!uicbert.eecs.uic.edu!wilson@uxc.cso.uiuc.edu Subject: large or long-running T pgms? Message-Id: <82000003@uicbert.eecs.uic.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu I am trying to figure out how large and varied a body of T programs there is, for the purpose of gathering dynamic statistics. (These statistics would be useful in designing garbage collectors, among other things.) I am particularly looking for programs that are large and/or long-running, especially those that allocate more than about 5 megabytes of data over the course of a run. Real, heavily-used programs are somewhat preferable to throwaway prototypes, but all kinds would be helpful. The point of this is that I may want to implement a special garbage collector, instrumented to gather statistics on survival, locality of reference, and locality of state changes. This empirical data would be useful for designing garbage collectors, among other things. If there is not a large body of *varied* programs, that weighs against T and for a Common Lisp such as Kyoto. Anyway, if you have large programs that you would be willing to send me (hopefully with easy startup instructions), please drop me a note with a short description of what the program does, how long it runs, and (if possible) a guess at how much memory it uses. Thanks prematurely, Paul Paul R. Wilson Human-Computer Interaction Laboratory U. of Illin. at C. EECS Dept. (M/C 154) wilson%uicbert@uxc.cso.uiuc.edu Box 4348 Chicago,IL 60680  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 22 Nov 88 12:16:42 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Tue, 22 Nov 88 12:05:22 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 22 Nov 88 15:37:21 GMT From: Krulwich-Bruce@yale-zoo.arpa (Bruce Krulwich) Organization: Computer Science, Yale University, New Haven, CT 06520-2158 Subject: Re: Scheme Digest #13 Message-Id: <43797@yale-celray.yale.UUCP> References: <8811212057.AA00314@theory.LCS.MIT.EDU>, <8811212337.AA01324@toucan.LCS.MIT.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8811212337.AA01324@toucan.LCS.MIT.EDU>, bard@THEORY writes: >If the typical program structure is LISP-like, it is a long sequence of short >function declarations followed by a body: > LET x1 = m1 IN > LET x2 = m2 IN > ... > LET xk = mk IN > n >which is indeed a deeply nested term, although not quite of the form above. > >All this proves is that you should do something in a way other than the >theoretician's straightforward translation of LET. Not necessarily. A better solution (if it works) is working on optimizing nested terms. This will help efficiency in the general case, not just in the case of LET. (This is the T/Orbit approach.) Bruce Krulwich  Received: from toucan.LCS.MIT.EDU (TCP 2206400272) by MC.LCS.MIT.EDU 21 Nov 88 18:37:09 EST Received: by toucan.LCS.MIT.EDU id AA01324; Mon, 21 Nov 88 18:37:29 EST Date: Mon, 21 Nov 88 18:37:29 EST From: bard@theory.lcs.mit.edu Message-Id: <8811212337.AA01324@toucan.LCS.MIT.EDU> To: Scheme@mc.lcs.mit.edu In-Reply-To: Automatic Scheme Digestifier's message of 20 NOV 88 00:02:32 EST <8811212057.AA00314@theory.LCS.MIT.EDU> Subject: Scheme Digest #13 > Worst-case lambda-expressions for this > translation have deeply nested subexpressions and functions of many arguments > - the nesting has to be proportional to the size of the program to get > the quadratic effects, e.g. (backslash = lambda): > > \x1.\x2.\x3.\x4.\x5.(x5 ((x2 (x1 x4)) x3)) > > Does this ever happen? In more theoretical settings, at least, LET x=m IN n is identical to (\x.n)m. If the typical program structure is LISP-like, it is a long sequence of short function declarations followed by a body: LET x1 = m1 IN LET x2 = m2 IN ... LET xk = mk IN n which is indeed a deeply nested term, although not quite of the form above. All this proves is that you should do something in a way other than the theoretician's straightforward translation of LET. What methods are actually used? > > In any event, the SK compiler has a lot of work to do before it can match > > even a fairly stupid supercombinator compiler, simply because it can be > > forced to produce incredibly long code. > > Is this a particular SK compiler you're talking about? Has someone actually > implemented the naive translation into just S and K? I'm not surprised it's > no good. The naive one. As I said before, I'm a theoretician (interested in denotational semantics of lambda calculus) and woefully ignorant about compiler technology. -- Bard Bloom  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 19 Nov 88 13:15:41 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 19 Nov 88 13:03:44 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 18 Nov 88 18:27:59 GMT From: mcvax!ukc!s1!jrk@uunet.uu.net (Richard Kennaway CMP RA) Organization: UEA, Norwich, UK Subject: Re: combinator code (was Re: Scheme Digest #9) Message-Id: <191@s1.sys.uea.ac.uk> References: <8811160652.AA19419@theory.LCS.MIT.EDU>, <190@s1.sys.uea.ac.uk> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Correction: Kennaway, Inf.Proc.Letters, vol.24, 1987, should have been Kennaway&Sleep, Inf.Proc.Letters, vol.24, 1987. -- Richard Kennaway School of Information Systems, University of East Anglia, Norwich, U.K. uucp: ...mcvax!ukc!uea-sys!jrk Janet: kennaway@uk.ac.uea.sys  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 19 Nov 88 05:00:47 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Sat, 19 Nov 88 04:57:26 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 18 Nov 88 11:18:53 GMT From: mcvax!ukc!s1!jrk@uunet.uu.net (Richard Kennaway CMP RA) Organization: UEA, Norwich, UK Subject: Re: combinator code (was Re: Scheme Digest #9) Message-Id: <190@s1.sys.uea.ac.uk> References: <8811160652.AA19419@theory.LCS.MIT.EDU>, <8811161428.AA13775@toucan.LCS.MIT.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8811161428.AA13775@toucan.LCS.MIT.EDU>, bard@THEORY.LCS.MIT.EDU writes: > > I thought that the reason for using supercombinators rather than S and K is > space. Ordinary \-calculus expressions can be translated into SK-combinatory > expressions, but the combinatory version is exponentially longer than the SK > term. Some sets of supercombinators give polynomial-length expansions; I > think some give linear expansions. Here's a bunch of references for the complexity of various combinator translations. I didnt see all of this discussion, so my apologies if I'm repeating things that have already been said here. Yes, SK is exponential, which is why (as far as I know) noone has ever used it for a machine. Turner gave a translation into S, K, B, C, and I (Bxyz = x(yz), Cxyz = xzy, Ix = x), (Software P&E, vol9, 1979), which is cubic in the worst case. He then added three more combinators S'wxyz = w(xz)(yz), B'wxyz = wx(yz), and C'wxyz = wxzy, (J.Symb.Logic, vol.44, 1979) which is quadratic in the worst case. Counting arguments show that the best you can do with any fixed set of combinators is nlogn. This can be achieved (Noshita, Inf.Proc.Letters, vol.20, 1985, and - ahem - Kennaway, Inf.Proc.Letters, vol.24, 1987) though first run-length encoding the runs of identical combinators that Turner's second translation tends to give, then programming the run-lengths in combinators. The last step is purely of theoretical interest, in practice you might as well directly implement the run-length encoded version, or the closely related "director strings" (Kennaway, op.cit, and Kennaway&Sleep, ACM Toplas, October 1988), as has been done on the SKIM2 machine (Stoye, Proc. Functional Programming Workshop, Goteborg, 1985), to obtain a modest improvement in speed of evaluation of expressions, compared with Turner's second translation. (This is probably more important than getting the code size down - in practice I doubt the quadratic effects are significant.) Burton (Inf.Proc.Letters, vol.14, 1982) claims a linear translation, but this depends on a different measure of the size, and when measured on the same basis as the other references, it's also nlogn. The basic idea embodied in Turner's second translation, and in director strings, can also be found in an unpublished note which Dijkstra wrote on seeing Turner's first translation (EWD735, 1980), but which no-one, other than one anonymous referee, seems to have heard of. There's also the related BC-chain translation, which is a linear-space representation of Turner's second translation (Noshita & Hikita, 1984, RIMS Symp. on Sofware Science & Engineering, Kyoto, 1984 - I'm sure there's a more accessible reference, but I cant find it). Evaluation of BC-chain expressions takes linear time relative to evaluation of Turner (extended set) combinators. I dont know what the constant factors look like. Of course, given an nlogn translation into some fixed finite set of combinators, you immediately have an nlogn translation into any finite set capable of expressing a translation, even pure SK (compose the first translation with a translation of the first set into the second - only a linear expansion), though of course that's another purely theoretical result - a bit like producing a RISC compiler by combining a CISC compiler with a RISC emulator... Supercombinators (Hughes, thesis, Oxford, 1984, and umpteen papers by various people since then) are nlogn in the average and worst case. Their advantage is not in the size of the translation but in speed of execution, due to the fact that each supercombinator embodies a larger chunk of computation, and that the supercombinators you get are tailored to the program being compiled, providing more opportunities for clever implementation. (Or so I assume - has anyone compared the actual performance of something like SKIM2 running director strings with a supercombinator machine?) > Now, code size isn't usually much of a problem, in that we don't > usually care whether a program is 50K or 250K. :-) Unless you're running from floppies...(sorry, was thinking of comp.sys.mac) > The difference between 50K > and 2^50K is significant. I don't know if the translation has a decent > expected case or not. It's difficult to define the "expected case" - depends on the probability distribution of the programs you compile. What is a "typical" program? For the nlogn translations it doesnt matter - once your worst case is down to nlogn, the counting argument shows that must be the average case as well, but for Turner's quadratic translation, you have to look at what sort of programs produce the worst case. Worst-case lambda-expressions for this translation have deeply nested subexpressions and functions of many arguments - the nesting has to be proportional to the size of the program to get the quadratic effects, e.g. (backslash = lambda): \x1.\x2.\x3.\x4.\x5.(x5 ((x2 (x1 x4)) x3)) Does this ever happen? > In any event, the SK compiler has a lot of work to do before it can match > even a fairly stupid supercombinator compiler, simply because it can be > forced to produce incredibly long code. Is this a particular SK compiler you're talking about? Has someone actually implemented the naive translation into just S and K? I'm not surprised it's no good. > -- Bard Bloom -- Richard Kennaway School of Information Systems, University of East Anglia, Norwich, U.K. uucp: ...mcvax!ukc!uea-sys!jrk Janet: kennaway@uk.ac.uea.sys  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 18 Nov 88 17:30:31 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 18 Nov 88 17:26:34 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 18 Nov 88 20:41:59 GMT From: titan!dorai@rice.edu (Dorai Sitaram) Organization: Rice University, Houston Subject: Re: Scheme Digest #8, Efficiency of Y Message-Id: <2166@kalliope.rice.edu> References: <8811170243.AA00199@duchamps.ads.com>, <5145@polya.Stanford.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <5145@polya.Stanford.EDU> mxh@ksl.Stanford.EDU (Max Hailperin) writes: >In article <8811170243.AA00199@duchamps.ads.com> rar@DUCHAMPS.ADS.COM >(Bob Riemenschneider) writes in response to a question of why Y is useful: > >>1. Y is elegant for the same reason lambda is elegant: you can define >> and use a procedure without having to give it a name. > >If you write > (Y (lambda (f) > (lambda (x) > ... f ...))) >then you have given the procedure a name, namely f, within itself, >just not externally. The same can be accomplished with named-lambda >or with letrec. For example, (letrec ((f (lambda (x) ... f ...))) f). >So Riemenshneider's argument isn't much of an argument, if this is >all he has in mind. Last time, I didn't wait to see Hailperin's response to Riemenschneider before I posted m y own response, which turned out to be almost a clone. Sorry. Now that H has answered the 2nd half of R's claim #1, let's consider the 1st half: Using whatever metric for elegance, Y c a n n o t be elegant for the same [or similar] reason that lambda is. They are not in the same league. Lambda is a core form; Y, on the other hand, is something defined u s i n g lambda. Y can be compared to [let]rec, though. It is strictly less powerful than the latter, for [let]rec can define cyclic data objects, including self-eq recursive procedures, whereas Y can only define non-self-eq recursive procedures. Y can however claim elegance on the following point: it requires only one* core form [lambda] for its definition, whereas [let]rec require two [lambda + set!]. I have used the "elegance" of a construct to mean a combination of 2 factors, the economy of core forms needed to get it going, and the profusion of other constructs this construct itself produces. The latter, when applied to {a set of} core form(s) is better known as "expressiveness". --dorai *if you consider a p p l i c a t i o n to be a core form, add one to both contestants.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 18 Nov 88 16:00:59 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Fri, 18 Nov 88 15:50:38 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 18 Nov 88 19:43:31 GMT From: titan!dorai@rice.edu (Dorai Sitaram) Organization: Rice University, Houston Subject: Re: Re^2: Scheme Digest #8, Efficiency of Y Message-Id: <2165@kalliope.rice.edu> References: <8811172108.AA00499@duchamps.ads.com> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Bob Riemenschneider writes: $Max Hailpern writes: $ $=> There is another reason, in Scheme, not to use Y: it breaks the fact $=> that you can use procedures as objects. While the R^3R says that a $=> procedure created by a given lambda at a given time will be eqv to $=> itself (and implies eq as well, though on looking I see that isn't in $=> there -- is this a mistake?), the same does not necessarily hold for $=> the various incarnations of a procedure that Y will churn out (or $=> rather, that Y is entitled to churn out: presumably in Rozas's $=> implementation there is indeed only one procedure). $=> $=> Perhaps I'm wrong to mix together such disparate worlds as Y and $=> eqvness of procedures belong to, but I do consider this to be $=> something of an issue. Does anyone else? $ $Could you provide a specific example? I don't see how Y makes the situation $any worse than lambda. Just as you might decide to write $ $ (let ((p (lambda (n) ...n...))) $ ===p===p===) $ $rather than $ $ ===(lambda(n) ...n...)===(lambda (n) ...n...)=== $ $because Scheme doesn't guarantee that even syntactically identical lambda $terms will test equivalent---Does anyone know why 'operational equivalence' $for procedures was defined extensionally, making it uncomputable, rather $than intensionally (say, in terms of alpha-convertability)?--, you might $decide to write $ $ (let ((p (Y (lambda (q) ...q...)))) $ ===p===p===) $ $rather than $ $ ===(Y (lambda(q) ...q...))===(Y (lambda (q) ...q...))=== $ $Arguments against Y that apply equally well to lambda don't count! $ $ -- rar It is very useful that a procedure be eq to itself [and to nothing else (not even to something alpha-convertible)]. For instance, we can create abstract data objects using lambda and set!. Using the fact that procedures are self-eq, we can determine whether these data objects are self-eq. Lambda and set! give the conventional Scheme way of getting recursive functions with rec/letrec. Recursive procedures created thus a r e self-eq, like any other procedure. Eg, (let ([h (rec h (lambda (dummy) h))]) (eq? h (h 'any))) yields t r u e. However, if _h_ had been defined with _Y_, ie, (let ([h (Y (lambda (h) (lambda (dummy) h)))]) (eq? h (h 'any))) the result is f a l s e, owing of course to the different [read non-eq] procedures created for _h_ at each time it shows up. Self-eqness of ADOs is lost, and though it can retrieved with some amount of hacking [like adding a separate field in the ADO a n d redefining the eq function (see Matthias Felleisen's thesis where he describes a cons data object)] the result is anything but concise or easily extendable. --dorai  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 17 Nov 88 23:57:08 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 17 Nov 88 23:52:47 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 17 Nov 88 23:28:36 GMT From: polya!max@labrea.stanford.edu (Max Hailperin) Organization: Stanford University Subject: Re: Scheme Digest #8, Efficiency of Y Message-Id: <5145@polya.Stanford.EDU> References: <8811170243.AA00199@duchamps.ads.com> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8811170243.AA00199@duchamps.ads.com> rar@DUCHAMPS.ADS.COM (Bob Riemenschneider) writes in response to a question of why Y is useful: >1. Y is elegant for the same reason lambda is elegant: you can define > and use a procedure without having to give it a name. If you write (Y (lambda (f) (lambda (x) ... f ...))) then you have given the procedure a name, namely f, within itself, just not externally. The same can be accomplished with named-lambda or with letrec. For example, (letrec ((f (lambda (x) ... f ...))) f). So Riemenshneider's argument isn't much of an argument, if this is all he has in mind. What you can do with Y and not easily with letrec or some such is write something like (Y f) or (Y (f x)). Of course, Rozas's optimized implementation may not be quite as much help here. Does anyone have a good use for Y in any context other than surrounding a lambda expression? >2. The treatment of procedures in Scheme, while better than Lisp, is still > not entirely first-class. Here's an example > > Suppose n ==> 2. After > > (define n (* n n)) > > n ==> 4: (* n n) gets evaluated, and the result gets stored in the > location n is bound to. Now suppose f computes the successor function. > If procedure values were treated like numeric values, after > > (define f > (lambda (n) > (if (= n 0) > 1 > (+ n (f (- n 1)))))) > > f would compute the function that returns 1 when applied to 0, > and 2n when applied to any n > 0: the lambda would be evaluated in > an environment where f computes successor and the resulting procedure > would be stored in the location f is bound to. Of course, that's > not what happens in Scheme. Riemenshneider seems to be confused here about the store vs. the environment. This has nothing to do with the firstclassness of procedures. Incidentally, the numeric definition he gives only works as he states at the top level: as an internal definition it is an error.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 17 Nov 88 17:57:15 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 17 Nov 88 17:45:02 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 17 Nov 88 21:50:17 GMT From: zodiac!SUMEX-AIM.STANFORD.EDU!mxh@ames.arpa (Max Hailperin) Subject: Re: Re^2: Scheme Digest #8, Efficiency of Y Message-Id: Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu What I had in mind was something like this: (letrec ((p (lambda () p))) (eqv? p (p))) This is will evaluate to #t, according to R^3R. On the other hand, if we rewrite this as (let ((p (Y (lambda (p) (lambda () p))))) (eqv? p (p))) then it is undefined whether the result will be #t or #f. For a straightforward impelementation of Y, it will probably be #f, but for an optimized one, it would be #t. The problem is not, as you suggested, from two occurences of (Y (lambda ...)), but from the difference between the procedure as the outside world knows it vs. as it knows itself. Now that I've explained myself, let me try to answer your question about the definition of eqvness of procedures. The problem with defining it as alpha-convertability [plus same environment] is two fold: 1) It is not in keeping with the philosophy as to what a procedure is. In particular, contrary to some other languages, scheme doesn't allow you to "reopen" a closure: they are black boxes which can only be applied. 2) It can lead to inefficiencies of two sorts (one obvious, one less so): a) if the implementation doesn't choose to fold together procedures which are eqv in your sense, then testing eqvness is slow b) if the implementation *does* choose to fold together procedures which it can determine are operationally equivalent but *not* eqv in your sense, then your eqv test becomes impossible -- so such a compiler optimization has to be ruled out, at a possible loss in speed. 2b in particular essentially is a way of saying that you want to define into the language spec a particular level of compiler-optimization smarts. That's unwise. Moreover, the existing definition turns out to work well in practice.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 17 Nov 88 17:57:00 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 17 Nov 88 17:43:46 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 17 Nov 88 21:08:31 GMT From: zodiac!DUCHAMPS.ADS.COM!rar@ames.arpa (Bob Riemenschneider) Subject: Re^2: Scheme Digest #8, Efficiency of Y Message-Id: <8811172108.AA00499@duchamps.ads.com> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Max Hailpern writes: => There is another reason, in Scheme, not to use Y: it breaks the fact => that you can use procedures as objects. While the R^3R says that a => procedure created by a given lambda at a given time will be eqv to => itself (and implies eq as well, though on looking I see that isn't in => there -- is this a mistake?), the same does not necessarily hold for => the various incarnations of a procedure that Y will churn out (or => rather, that Y is entitled to churn out: presumably in Rozas's => implementation there is indeed only one procedure). => => Perhaps I'm wrong to mix together such disparate worlds as Y and => eqvness of procedures belong to, but I do consider this to be => something of an issue. Does anyone else? Could you provide a specific example? I don't see how Y makes the situation any worse than lambda. Just as you might decide to write (let ((p (lambda (n) ...n...))) ===p===p===) rather than ===(lambda(n) ...n...)===(lambda (n) ...n...)=== because Scheme doesn't guarantee that even syntactically identical lambda terms will test equivalent---Does anyone know why 'operational equivalence' for procedures was defined extensionally, making it uncomputable, rather than intensionally (say, in terms of alpha-convertability)?--, you might decide to write (let ((p (Y (lambda (q) ...q...)))) ===p===p===) rather than ===(Y (lambda(q) ...q...))===(Y (lambda (q) ...q...))=== Arguments against Y that apply equally well to lambda don't count! -- rar  Received: from void.ai.mit.edu (TCP 2206400236) by MC.LCS.MIT.EDU 17 Nov 88 16:59:59 EST Received: by void.ai.mit.edu (5.59/1.5) id AA13742; Thu, 17 Nov 88 17:03:52 EST Date: Thu, 17 Nov 88 17:03:52 EST From: jar@void.ai.mit.edu (Jonathan Rees) Message-Id: <8811172203.AA13742@void.ai.mit.edu> To: Scheme@mc.lcs.mit.edu In-Reply-To: Automatic Scheme Digestifier's message of 17 NOV 88 00:00:51 EST Subject: Please use meaningful subject lines Reply-To: scheme-request@mc.lcs.mit.edu Now that the list is digested, it is important that submissions be labeled with meaningful "Subject:" lines. (The subject line of each item is listed in the table of contents at the top of the digest.) This means you may have to override the default that your mail reading system supplies if that's something useless like "Scheme Digest #10". Thanks. - administrator.  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 17 Nov 88 13:26:37 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 17 Nov 88 13:16:57 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 17 Nov 88 15:51:13 GMT From: mailrus!uflorida!haven!uvaarpa!hudson!vivaldi.acc.Virginia.EDU!pmy@ohio-state.arpa (Pete Yadlowsky) Organization: University of Virginia, Charlottesville Subject: AmigaScheme Message-Id: <777@hudson.acc.virginia.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Hello, Does anyone know if Scheme has been implemented on the Commodore Amiga? Thanks. Peter M. Yadlowsky Academic Computing Center University of Virginia pmy@vivaldi.acc.Virginia.EDU  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 17 Nov 88 04:41:50 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Thu, 17 Nov 88 04:33:31 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 16 Nov 88 18:59:15 GMT From: jeschke@iuvax.cs.indiana.edu (Eric Jeschke) Organization: Indiana University CSCI, Bloomington Subject: Re: Scheme Digest #9 Message-Id: <15089@iuvax.cs.indiana.edu> References: <8811160652.AA19419@theory.LCS.MIT.EDU>, <8811161428.AA13775@toucan.LCS.MIT.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu Mark VandeWettering writes: | | I think (and my thesis work is evolving into this kind of | argument) that Y is overlooked for trivial reasons. Partial | evaluation and smarter code generation could make an SK based | compiler generate code which is equal in quality to that produced | by supercombinator based compilation. | Bard Bloom points out the space problem: |I thought that the reason for using supercombinators rather than S and K is |space. | | | In any event, the SK compiler has a lot of work to do before it can match |even a fairly stupid supercombinator compiler, simply because it can be |forced to produce incredibly long code. My guess, and I gather the guess of |many people who actually work on this, is that SK would lose. I would be |very interested in some proof that this guess was wrong. | More specifically, the problem is not with the larger code image produced by SK compilation (because memory size is typically not a problem these days), but rather that the granularity of the instructions is too fine. Supercombinators have much coarser granularity, and get more work done per `instruction'. This is reminicent of the RISC vs. CISC arguments that are raging over in comp.arch. I think Mark is making a case that with a high enough instruction bandwidth and more intelligent code generation/optimization, SK reduction performance could approach current supercombinator reduction performance. I doubt it, especially with SK, but you might with a larger set of fixed combinators, such as Turner's expanded set. I think you will also need hardware support to really approach/improve on supercombinator performance. Some fixed combinator machines have been built, but I haven't heard of any that are close performance-wise to the current breed of supercombinator implementations. In short, a number of people have looked into this already, and most are opting in favor of supercombinators. With the performance of general-purpose architectures climbing steadily, the trend seems to be moving away from building special purpose machines. For the forseeable future, fixed combinator implementations will be slower, given the advanced state of supercombinator compilation techniques. -- Eric ------ jeschke@iuvax.cs.indiana.edu ...{pyramid, rutgers}!iuvax!jeschke ------  Received: from XX.LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 17 Nov 88 00:30:35 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Wed 16 Nov 88 23:13:35-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 16 Nov 88 23:08:27 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 17 Nov 88 02:43:28 GMT From: zodiac!DUCHAMPS.ADS.COM!rar@ames.arpa (Bob Riemenschneider) Subject: Re: Scheme Digest #8, Efficiency of Y Message-Id: <8811170243.AA00199@duchamps.ads.com> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu => In article <8811161012.AA13091@kleph.ai.mit.edu>, cph@KLEPH (Chris Hanson) => writes: => >Bill Rozas has expended no small effort in the MIT Scheme compiler to => >make the Y combinator produce good results, and these timings are => >evidence of that. Still not perfect, but I believe Bill claims that => >he can make the output code identical given a bit more work. => => Is there a particular reason why its worth a lot of effort to make Y => compile efficiently?? More the the point, does anyone have examples => of code that is more elegant (or better in some other way) than, say, => a simple recursive implementation?? => => => Bruce Rather than present particular examples, let me make three general points. 1. Y is elegant for the same reason lambda is elegant: you can define and use a procedure without having to give it a name. 2. The treatment of procedures in Scheme, while better than Lisp, is still not entirely first-class. Here's an example. Suppose n ==> 2. After (define n (* n n)) n ==> 4: (* n n) gets evaluated, and the result gets stored in the location n is bound to. Now suppose f computes the successor function. If procedure values were treated like numeric values, after (define f (lambda (n) (if (= n 0) 1 (+ n (f (- n 1)))))) f would compute the function that returns 1 when applied to 0, and 2n when applied to any n > 0: the lambda would be evaluated in an environment where f computes successor and the resulting procedure would be stored in the location f is bound to. Of course, that's not what happens in Scheme. The definition is interpreted as: let f be a solution (in fact, the least solution) to f = (lambda (n) ...f...) Having Y allows you to convert the implicit definition into an explicit definition (define f (Y (lambda (g) (lambda (n) ...g...)))) and pretend that procedures are treated just like other values by define. This certainly seems more elegant to me. 3. Having Y around makes Scheme seem more like "an interpreter for extended lambda calculus". -- rar  Received: from XX.LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 17 Nov 88 00:16:28 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Wed 16 Nov 88 21:22:27-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 16 Nov 88 19:56:34 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 16 Nov 88 23:17:46 GMT From: uoregon!markv@beaver.cs.washington.edu (Mark VandeWettering) Organization: University of Oregon, Computer Science, Eugene OR Subject: Re: Scheme Digest #9 Message-Id: <3179@uoregon.uoregon.edu> References: <8811160652.AA19419@theory.LCS.MIT.EDU>, <8811161428.AA13775@toucan.LCS.MIT.EDU> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8811161428.AA13775@toucan.LCS.MIT.EDU> bard@THEORY.LCS.MIT.EDU writes: > >> >> Mark VandeWettering writes: >> >> I think (and my thesis work is evolving into this kind of >> argument) that Y is overlooked for trivial reasons. Partial >> evaluation and smarter code generation could make an SK based >> compiler generate code which is equal in quality to that produced >> by supercombinator based compilation. >I thought that the reason for using supercombinators rather than S and K is >space. Ordinary \-calculus expressions can be translated into SK-combinatory >expressions, but the combinatory version is exponentially longer than the SK >term. Some sets of supercombinators give polynomial-length expansions; I >think some give linear expansions. This is true for the trivial compilation algorithm described in Turner's original paper. Typically with better compilation and the addition of several "longer reach" combinators, expansions can typically be O(nlogn) or less. I should point out that I do not intend to use SK combinators as the final "primitives" in the SK machine. I believe that SK combinators form a good basis for performing partial evaluation. Hence, the compilation algorithm I am currently deriving is as follows: SASL-like functional language | V Enriched Lambda Calculus | V SK combinators | (by Partial Evaluation) V Stack Machine Code (similar to the G-machine) I have found the work of Wand, Friedman, Haines and Kohlbecker to be interesting, in that they transform an interpreter for Scheme into a compiler. I have applied much of the same methodology within the framework of a graph reduction engine, and find very interesting results. > Now, code size isn't usually much of a problem, in that we don't >usually care whether a program is 50K or 250K. The difference between 50K >and 2^50K is significant. I don't know if the translation has a decent >expected case or not. Recent evidence has shown that it does have "decent" performance. > In any event, the SK compiler has a lot of work to do before it can match >even a fairly stupid supercombinator compiler, simply because it can be >forced to produce incredibly long code. My guess, and I gather the guess of >many people who actually work on this, is that SK would lose. I would be >very interested in some proof that this guess was wrong. I question whether "longer code" is indeed the bugaboo here. We are basically talking about a logn performance difference here. Imagine that our implementation of supercombinators actually required the implementation of a primitive that didn't have a bounded execution time. Most of the time, we are indeed concerned with TIME of execution rather than space. I wonder (and don't really believe) if the way that other supercombinator methods don't achieve shorter code is by making more complex primitives. It was an idea, not a particularly good one. I am very impressed with the G machine, and find myself playing "catch up" to make SK combinators have similar performance. Why? Well, its the stuff that theses are made of..... >-- Bard Bloom Mark VandeWettering  Received: from XX.LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 17 Nov 88 00:16:19 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Wed 16 Nov 88 21:22:18-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 16 Nov 88 19:58:30 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 16 Nov 88 23:29:11 GMT From: uoregon!markv@beaver.cs.washington.edu (Mark VandeWettering) Organization: University of Oregon, Computer Science, Eugene OR Subject: Re: Scheme Digest #9 Message-Id: <3180@uoregon.uoregon.edu> References: <8811160652.AA19419@theory.LCS.MIT.EDU>, <8811161428.AA13775@toucan.LCS.MIT.EDU>, <15089@iuvax.cs.indiana.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <15089@iuvax.cs.indiana.edu> jeschke@iuvax.UUCP (Eric Jeschke) writes: > More specifically, the problem is not with the larger code image >produced by SK compilation (because memory size is typically not a >problem these days), but rather that the granularity of the >instructions is too fine. Supercombinators have much coarser >granularity, and get more work done per `instruction'. Perhaps I haven't been entirely clear: I am NOT using SK combinators as the final code in the target machine. Just as supercombinators have an efficient implementation in the G-machine, I believe that SK combinators have an efficient implementation in a similar stack based machine. Why use SK combinators? Because they provide a convenient formalism for reasoning about optimizations, strictness and partial evaluation. >This is reminicent of the RISC vs. CISC arguments that are raging over >in comp.arch. I think Mark is making a case that with a high enough >instruction bandwidth and more intelligent code >generation/optimization, SK reduction performance could approach >current supercombinator reduction performance. I see the problem of implementing an SK machine as twofold, the instructions themselves are reasonably "highlevel", but do relatively little relative to the source language. For instance, a numerically intensive program spends most of its time copying argument pointers into the right place on the heap for execution. I believe that by partially evaluating SK expressions, and studying the actions that are performed in an INTERPRETER, we eliminate most of the silly and redundant copying of pointers and heap allocation that plague SK implementations. >I doubt it, especially with SK, but you might with a larger set of >fixed combinators, such as Turner's expanded set. I think you will >also need hardware support to really approach/improve on >supercombinator performance. Some fixed combinator machines have been >built, but I haven't heard of any that are close performance-wise to >the current breed of supercombinator implementations. I should be more clear, when I say SK combinators, I mean the expanded set. > In short, a number of people have looked into this already, and most >are opting in favor of supercombinators. With the performance of >general-purpose architectures climbing steadily, the trend seems to be >moving away from building special purpose machines. For the >forseeable future, fixed combinator implementations will be slower, >given the advanced state of supercombinator compilation techniques. I agree in part, smart compilation will beat special hardware MOST of the time. But I don't believe that the state of the art in compiler technology has been applied to compiling combinators. Also, the target of my compilation is NOT to a fixed set of combinators. >Eric ------ > jeschke@iuvax.cs.indiana.edu ...{pyramid, rutgers}!iuvax!jeschke >------ Mark VandeWettering  Received: from XX.LCS.MIT.EDU (CHAOS 2420) by MC.LCS.MIT.EDU 17 Nov 88 00:15:53 EST Received: from BLOOM-BEACON.MIT.EDU by XX.LCS.MIT.EDU with TCP/SMTP; Wed 16 Nov 88 20:59:30-EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 16 Nov 88 20:23:56 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 17 Nov 88 00:30:53 GMT From: Krulwich-Bruce@yale-zoo.arpa (Bruce Krulwich) Organization: Computer Science, Yale University, New Haven, CT 06520-2158 Subject: Re: Scheme Digest #8, Efficiency of Y Message-Id: <43311@yale-celray.yale.UUCP> References: <8811161012.AA13091@kleph.ai.mit.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8811161012.AA13091@kleph.ai.mit.edu>, cph@KLEPH (Chris Hanson) writes: >Bill Rozas has expended no small effort in the MIT Scheme compiler to >make the Y combinator produce good results, and these timings are >evidence of that. Still not perfect, but I believe Bill claims that >he can make the output code identical given a bit more work. Is there a particular reason why its worth a lot of effort to make Y compile efficiently?? More the the point, does anyone have examples of code that is more elegant (or better in some other way) than, say, a simple recursive implementation?? Bruce  Received: from BLOOM-BEACON.MIT.EDU (TCP 2224000021) by MC.LCS.MIT.EDU 16 Nov 88 23:41:48 EST Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id ; Wed, 16 Nov 88 23:35:02 EST Received: from USENET by bloom-beacon.mit.edu with netnews for scheme@mc.lcs.mit.edu (scheme@mc.lcs.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 16 Nov 88 16:43:27 GMT From: polya!max@labrea.stanford.edu (Max Hailperin) Organization: Stanford University Subject: Re: Scheme Digest #8, Efficiency of Y Message-Id: <5084@polya.Stanford.EDU> References: <8811161012.AA13091@kleph.ai.mit.edu> Sender: scheme-request@mc.lcs.mit.edu To: scheme@mc.lcs.mit.edu In article <8811161012.AA13091@kleph.ai.mit.edu> cph@zurich.ai.mit.edu writes: >Bill Rozas has expended no small effort in the MIT Scheme compiler to >make the Y combinator produce good results, and these timings are >evidence of that. Still not perfect, but I believe Bill claims that >he can make the output code identical given a bit more work. As this remark points out, there is no reason from an efficiency standpoint to not simply define letrec in terms of Y. While Y may be expensive in some general cases, as long as it only appears surrounding an explicit lambda, there is no particular reason a compiler can't catch on to what's going on. HOWEVER, There is another reason, in Scheme, not to use Y: it breaks the fact that you can use procedures as objects. While the R^3R says that a procedure created by a given lambda at a given time will be eqv to itself (and implies eq as well, though on looking I see that isn't in there -- is this a mistake?), the same does not necessarily hold for the various incarnations of a procedure that Y will churn out (or rather, that Y is entitled to churn out: presumably in Rozas's implementation there is indeed only one procedure). Perhaps I'm wrong to mix together such disparate worlds as Y and eqvness of procedures belong to, but I do consider this to be something of an issue. Does anyone else?