From: Barry Margolin
Subject: Re: lisp environments summary
Date: 
Message-ID: <13253@think.UUCP>
In article <···@siemens.UUCP> ·····@siemens.UUCP (Steve Clark) writes:
>  I maintain that the non-Interlisp systems are wrong, however.  It
>is clearly more advanced to treat a file as a database of definitions of
>functions, data, structures, etc. than to treat it as a string of characters
>that might have been typed at the keyboard.  However, since the rest of the
>world hasn't caught up yet, there are bound to be incompatibilities.

It would not be appropriate for a general-purpose Lisp standard to
require the Interlisp style of permanent storage of function
definitions.  This style requires that a function editor be built into
the Lisp system, and this may not be feasible or desirable in all
implementations and/or environments.  While many Common Lisp
implementations do include an editor, at least one notable one (Kyoto
Common Lisp) would have a hard time doing so.

I also wonder whether the Interlisp database is as powerful as the
Common Lisp LOAD style.  I'm not very familiar with Interlisp, so bear
with me.  A file to be loaded can contain other code besides
definitions and declarations; it can contain immediate code to be
executed.  Thus, the file LOAD-EVERYTHING.LISP could contain:

(load "first-thing")
(load "second-thing")
(load "third-thing")
(load "last-thing")

How is this done in Interlisp?  If there is a way to do it, then
what's the difference between that and LOAD?

The main thing that Common Lisp is missing is an easy way to save out
definitions that were defined interactively.  Common Lisp was designed
primarily by users of Maclisp and its descendents, and they presumed a
programming style built around text-file-based editor, so they didn't
include such a feature.  (Some implementations (e.g. MIT-derived Lisp
Machines) provide editor commands to insert interpreted definitions
into editor buffers, but this is beyond the scope of Common Lisp to
define.)

How does Interlisp know which definitions are important to save?  I
certainly wouldn't want it saving everything, since I constantly
create little temporary functions and variables while debugging.  If
the user has to save functions explicitly it seems like it would be
hard to make sure you don't miss some.  I'm sure these problems have
been solved, since I doubt Interlisp would have survived so long
without solutions, but I'm curious how.

---
Barry Margolin
Thinking Machines Corp.

······@think.com
seismo!think!barmar

From: Arun Welch
Subject: Re: lisp environments summary
Date: 
Message-ID: <3044@tut.cis.ohio-state.edu>
>From: ······@think.COM (Barry Margolin)
>
>In article <···@siemens.UUCP> ·····@siemens.UUCP (Steve Clark) writes:
>>  I maintain that the non-Interlisp systems are wrong, however.  It
>>is clearly more advanced to treat a file as a database of definitions of
>>functions, data, structures, etc. than to treat it as a string of characters
>>that might have been typed at the keyboard.  However, since the rest of the
>>world hasn't caught up yet, there are bound to be incompatibilities.
>
>It would not be appropriate for a general-purpose Lisp standard to
>require the Interlisp style of permanent storage of function
>definitions.  This style requires that a function editor be built into
>the Lisp system, and this may not be feasible or desirable in all
>implementations and/or environments.  While many Common Lisp
>implementations do include an editor, at least one notable one (Kyoto
>Common Lisp) would have a hard time doing so.
>
Well, yes and no.  While a particular function editor can't possibly be
built into a general-purpose Lisp standard, more hooks to one can be.
Interlisp, in it's native mode, defines a tty-based structure editor,
which is pretty powerful in it's own right. Most implementations of
Interlisp have then added their own editors on top of the basic
environment, for example Interlisp-10 used Emacs, Interlisp-D used
Dedit, and now XAIE uses Sedit. Which editor you use is settable by a
flag, but the basic effects of the editor remain the same across the
board. 

>I also wonder whether the Interlisp database is as powerful as the
>Common Lisp LOAD style.  I'm not very familiar with Interlisp, so bear
>with me.  A file to be loaded can contain other code besides
>definitions and declarations; it can contain immediate code to be
>executed.  Thus, the file LOAD-EVERYTHING.LISP could contain:
>
>(load "first-thing")
>(load "second-thing")
>(load "third-thing")
>(load "last-thing")
>
>How is this done in Interlisp?  If there is a way to do it, then
>what's the difference between that and LOAD?

To answer this question, I think it would be best if I start with a
quick introduction on how the database works, for those out there who
have never worked with an Interlisp system. 
Every file has a variable associated with it, called the COMS, which
is the database.  Thus, for the file FOO, there would exist a variable
FOOCOMS, which defines what's contained in FOO, what operations to
perform when loading foo, etc. Let's say that I want FOO to contain
the function definition for the function BAR, the variable definition
for the variable BAZ, which has the initial value 5, and for the file
RALPH loaded before the file FOO is loaded, and also, for the screen
background to be set to the blackshade after FOO is loaded. FOOCOMS
would then look like this:
((FILES RALPH)
 (FNS BAR)
 (VARS (BAZ 5))
 (P (CHANGEBACKGROUNDBORDER BLACKSHADE)))
After making the file, if someone were to load the file into their
system, it would load the file RALPH, defien the function BAR, and
declare thevariable BAZ to have the value 5, and change the screen
background to blackshade.  It's quite possible that RALPH would do
similiar things in its loadup too.  A COMS can contain more than just
these three sorts of things, like property lists, structure
definitiions, etc., but I just thought this would be a good example. 
SO, to answer the question, there are three ways to have a
LOAD-EVERYTHING behaviour.
1) Create a file, whose COMS consist of the database commands to load
those files,
2) Have the COMS of the first file load the second through nth files
3) have each file load the next file when it's done loading itself.

>How does Interlisp know which definitions are important to save?  I
>certainly wouldn't want it saving everything, since I constantly
>create little temporary functions and variables while debugging.  If
>the user has to save functions explicitly it seems like it would be
>hard to make sure you don't miss some.  I'm sure these problems have
>been solved, since I doubt Interlisp would have survived so long
>without solutions, but I'm curious how.
>

The simplest way is to call the function (FILES?).  This prints out a
list of all the things in the system that haven't been written to a
file yet, and prompts for files to put them in (You don't have to save
things you don't want to, though) . If you've actually been keeping
track of what you've defined, you can also insert them into a file
without the help of FILES?. After the COMS have been set up, one calls
the funciton MAKEFILE to write out the file to disk. If one want's one
can call the function MAKEFILES which calls FILES?  first, and then
remakes all the files which contain changed definitions too.


Its kind of unfortunate that the Interlisp philosophy and the
Mac/Zeta-lisp philosophies are so different.  There are a lot of neat
things in Interlisp which will probably go the way of the Dodo, which
will be a loss for the language. Interlisp vs. M/Zlisp discussions
also tend to carry a fair amount of religion with them, leading to
unconstructive interactions...


....arun



----------------------------------------------------------------------------
Arun Welch
Lisp Systems Programmer, Lab for AI Research, Ohio State University
·····@ohio-state.{CSNET,ARPA}
From: Darrel VanBuer
Subject: Re: lisp environments summary
Date: 
Message-ID: <5024@sdcrdcf.UUCP>
In article <·····@think.UUCP> ······@sauron.UUCP (Barry Margolin) writes:
>In article <···@siemens.UUCP> ·····@siemens.UUCP (Steve Clark) writes:
>>  I maintain that the non-Interlisp systems are wrong, however.  It
>>is clearly more advanced to treat a file as a database of definitions of
>>functions, data, structures, etc. than to treat it as a string of characters
>I also wonder whether the Interlisp database is as powerful as the
>Common Lisp LOAD style.  I'm not very familiar with Interlisp, so bear
>with me.  A file to be loaded can contain other code besides
>definitions and declarations; it can contain immediate code to be
>executed.  Thus, the file LOAD-EVERYTHING.LISP could contain:
>
>(load "first-thing")
>(load "second-thing")
>(load "third-thing")
>(load "last-thing")
>How is this done in Interlisp?  If there is a way to do it, then
>what's the difference between that and LOAD?
Part of the interlisp file manager writes the "database of contents" to the
file, then uses this database to direct writing the file.  There are more
than a dozen kinds of objects - functions, variables, declarations, property
list entries, files ...
(FILES "first-thing" "second-thing" ...) generates calls to LOAD (indirectly,
because FILES is more like REQUIRE than LOAD, and takes a variety of
keyword-like tags to control directory, source vs compiled, etc.
The file which is written is actually full of forms which are evaluated for
effect, just like common lisp (e.g. functions get written surrounded by
DEFUN).  The database aspect is primarily the existence of the contents
variable (and for old Interlisp fns, a byte map to their location so that
a SET-FILE-POSITION plus READ will get just one).  "P" is a database command
of last resort to do anything, as it is a list of expressions to be printed
on the file, and thus evaluated on load.  E.g.
(P (LOAD "first-thing") (LOAD "second-thing") ...)

>How does Interlisp know which definitions are important to save?  I
>certainly wouldn't want it saving everything, since I constantly
>create little temporary functions and variables while debugging.  If
>the user has to save functions explicitly it seems like it would be
>hard to make sure you don't miss some.  I'm sure these problems have
>been solved, since I doubt Interlisp would have survived so long
>without solutions, but I'm curious how.
When you want to update the files, you call a function CLEANUP, which first
calls FILES? (or can call directly), then MAKEFILE (which writes, compiles
and hardcopies the file subject to various control variables).
FILES? has been "told" all the definitions you have made by little demons
inside DEFUN et al, and will engage you in a dialog about each.  The main
options in the dialog are to a file or to nowhere.  The editor also contains
demons which tell CLEANUP which functions, etc have changes, allowing it to
infer from the database of file contents which files NEED to be rewritten,
etc.

>---
>Barry Margolin
>Thinking Machines Corp.
>
>······@think.com
>seismo!think!barmar


-- 
Darrel J. Van Buer, PhD; unisys; 2525 Colorado Ave; Santa Monica, CA 90406
(213)829-7511 x5449        KI6VY        ······@CAM.UNISYS.COM   or
...{allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!darrelj
From: Charles Buckley
Subject: Re: lisp environments summary -- program storage methods
Date: 
Message-ID: <266@bernina.UUCP>
Posting-Front-End: GNU Emacs 18.41.2 of Mon Sep 14 1987 on bernina (berkeley-unix)


In article <···@siemens.UUCP> ·····@siemens.UUCP (Steve Clark) writes:
>  I maintain that the non-Interlisp systems are wrong, however.  It
>is clearly more advanced to treat a file as a database of definitions of
>functions, data, structures, etc. than to treat it as a string of characters
>that might have been typed at the keyboard.  However, since the rest of the
>world hasn't caught up yet, there are bound to be incompatibilities.

(Character) file storage is simply more flexible.  The form in which
information is stored must be the most flexible possible, or you lose
information.  The D-crate's pitching of conditionals is simply the
manifestation of this.

Proponents of restrictive protocols for information storage really ask
"the world" to change to fit the protocol model.  In science, models
change to fit the data, not the other way round (unless you cheat).
To me, browbeating eventual non-conformists into "catching up" by
labeling the a model as "advanced" is just a form of negative
motivation.  All the lousy places I have ever worked ran on negative
motivation, none of the good ones.  If your model *is* really worth
using, and you can communicate its value, you will not need such
tactics. 

Interactively defined functions?  Haven't typed one in *years* -
that's what scratch buffers are for (in case I want to change a
*character* or two, or later save it.).

Any mouse-based gadgets you can point to in Interlisp can be recreated
for a text editor working on correctly parsed Lisp code.  May  take
execution time, but if this is prohibitive, your function is probably
too large.