Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!hplabs!sdcrdcf!darrelj From: darrelj@sdcrdcf.UUCP (Darrel VanBuer) Newsgroups: comp.lang.lisp Subject: Re: lisp environments summary Keywords: Interlisp, Editing, Files Message-ID: <5024@sdcrdcf.UUCP> Date: 10 Dec 87 16:15:28 GMT References: <613@umbc3.UMD.EDU> <325@siemens.UUCP> <323@spar.SPAR.SLB.COM> <329@siemens.UUCP> <13253@think.UUCP> Reply-To: darrelj@sdcrdcf.UUCP (Darrel VanBuer) Organization: Unisys - System Development Group, Santa Monica Lines: 62 In article <13253@think.UUCP> barmar@sauron.UUCP (Barry Margolin) writes: >In article <329@siemens.UUCP> steve@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. > >barmar@think.com >seismo!think!barmar -- Darrel J. Van Buer, PhD; unisys; 2525 Colorado Ave; Santa Monica, CA 90406 (213)829-7511 x5449 KI6VY darrel@CAM.UNISYS.COM or ...{allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!darrelj