Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cs.utexas.edu!pp!cadillac!vaughan From: vaughan@cadillac.CAD.MCC.COM (Paul Vaughan) Newsgroups: comp.lang.lisp Subject: Re: The best way to save data Summary: In SCL, si:dump-forms-to-file Keywords: save, load, lisp, Database Message-ID: <670@cadillac.CAD.MCC.COM> Date: 20 Dec 88 15:42:59 GMT References: <627@wucs1.wustl.edu> <7943@orstcs.CS.ORST.EDU> <414@aipna.ed.ac.uk> Organization: MCC VLSI-CAD Program, Austin, TX Lines: 13 In article <414@aipna.ed.ac.uk>, jeff@aipna.ed.ac.uk (Jeff Dalton) writes: > should be available directly, without compiling a file. But > it's quite common in Common Lisp for such operations (where > you know they're there and want to get at them) to be unavailable. It depends on whose "Common" Lisp you use. In Symbolics Common Lisp, there is si:dump-forms-to-file that does this rather satisfactorily and certainly beats working out your own data encoding scheme. Sorry if this doesn't help. An interesting point about this whole technique is that the code that is dumped must reference a free variable in order to create a side effect on the program that loads it. It's not possible, for instance, to just dump a data structure, or even a form for creating the data structure and then read it in as if it were an object. The file must be LOADED, not read, and the code in it must perform some sort of side effect on the current environment in order to accomplish anything at all. -- Paul Vaughan, MCC CAD Program | ARPA: vaughan@mcc.com | Phone: [512] 338-3639 Box 200195, Austin, TX 78720 | UUCP: ...!cs.utexas.edu!milano!cadillac!vaughan