[Openmcl-devel] saving data to a fasl file
helink at sandia.gov
Wed Nov 24 16:58:10 EST 2004
Do something like...
(setf x #.(some form that evaluates to the right thing))
without using #., the FORM will be what gets stored in fasl form, and
if it's not computable at load time you'll have a problem.
On Nov 23, 2004, at 8:56 PM, alex crain wrote:
> This is what I thought, but I'm not having luch luck getting anything
> to work.
> I would think that I could do something like:
> (eval-when (:compile-toplevel :load-toplevel :execute)
> (defvar x nil))
> (eval-when (:compile-toplevel)
> (setf x '(1 2 3 4)))
> Would work, but it doesn't.
> Pointers would be appreciated.
> On Nov 23, 2004, at 6:26 PM, Hamilton Link wrote:
>> And let's not forget that the easiest way to put something in a fasl
>> file is to compile-file a lisp file with forms in it that evaluate to
>> what you want to save (although that means selecting variables you
>> want to setf to those values when the fasl is loaded back in).
>> I had to store some data in a reloadable format for a project (I
>> wanted to save some big honkin' data structures into fasl files), and
>> I found this approach to be the most straightforward. It has the
>> added benefit of being portable.
>> On Nov 23, 2004, at 1:43 PM, alex crain wrote:
>>> Does OpenMCL have a way to write data to a fasl file?
>>> I'm thinking along the lines of LispWorks DUMP-FORMS-TO-FILE
>>> Along those lines, are there any tools for taking apart fasl (dfsl)
>>> I'd just like to learn about what's in there.
>>> Openmcl-devel mailing list
>>> Openmcl-devel at clozure.com
More information about the Openmcl-devel