[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: binary loadable files
From: |
Martin Grabmueller |
Subject: |
Re: binary loadable files |
Date: |
Tue, 30 Jan 2001 08:35:26 +0100 |
> From: Keisuke Nishida <address@hidden>
> Date: Tue, 30 Jan 2001 00:20:29 -0500
>
> I'm considering how to store bytecodes in binary files.
> I want to make it as general as possible, so that I can
> store not only bytecodes but also any Scheme objects.
>
> I'm thinking of the following procedures:
> (Are there better names?)
>
> ;; Write OBJ to PORT in the binary format
> (dump OBJ [PORT])
>
> ;; Read an object from PORT in the binary format
> (pull [PORT])
>
> If PORT is a file, pull will use read-only shared mmap
> so that some memory can be shared between processes.
>
> Since I want to store any objects, I'm thinking of adding
> new slots `dump' and `pull' to scm_smob_descriptor.
>
> Is that all good thing? May I continue to work on this?
I don't know much about serialization, but there are a lot of problems
with that, at least for general serialization of all data types. One
problem is: How can we serialize procedures, or circular data
structures?
One possibility is not to store the objects themselves, but `rules'
for constructing them. This is what normally is done in Scheme source
code, but maybe it can be used for bytecode, too.
Just a few thoughts,
'martin
--
Martin Grabmueller address@hidden
http://www.pintus.de/mgrabmue/ address@hidden on EFnet