Path: utzoo!mnetor!uunet!husc6!hao!ames!ucbcad!zen!ucbvax!cbosgd!osu-cis!tut!welch From: welch@tut.cis.ohio-state.edu (Arun Welch) Newsgroups: comp.lang.lisp Subject: lisp environments summary Message-ID: <3121@tut.cis.ohio-state.edu> Date: 11 Dec 87 19:17:20 GMT Sender: welch@tut.cis.ohio-state.edu Lines: 54 > >In article <3044@tut.cis.ohio-state.edu> you write: >>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))) > >I have one question about this: how does this stuff get into the >variable before the first time you refer to the file? There are a bunch of functions for manipulating the coms, like ADDTOFILE, DELFROMFILE a so on. When ADDTOFILE is called, the first thing it does is check and see if the variable exists, and if not, then it creates it. One can also directly edit the variable using the editor. > Are D-machine >file multi-forked, like Macintosh files, with one fork containing the >COMS related to the data in the other fork? Or is the COMS just a >header that Lisp files have, which is processed when the file is >incorporated into the environment? It's closer to the latter. The coms, being a variable, is defined in the file too. One of the things contained in the file is a statement of the sort (RPAQQ FOOCOMS ((FILES RALPH) (FNS BAR) (VARS (BAZ 5)) (P (CHANGEBACKGROUNDBORDER BLACKSHADE)))) [ RPAQQ is a function of two arguments, VAR and VALUE, that sets the top level binding of VAR to VALUE]. >Or is the COMS something like a >file property list, like Symbolics Lisp Machines implement? Files have property lists too, which define things like which compiler to use, what sort of reader environment to use, what base to use for numbers, etc. ...arun ---------------------------------------------------------------------------- Arun Welch Lisp Systems Programmer, Lab for AI Research, Ohio State University welch@ohio-state.{CSNET,ARPA} welch@red.rutgers.edu (a guest account, but mail gets to me eventually)