guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dumping arbitrary structures


From: Andreas Rottmann
Subject: Re: dumping arbitrary structures
Date: Tue, 27 Jan 2004 00:50:59 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

address@hidden (Paul Jarc) writes:

> address@hidden wrote:
>>         I'm looking for something which can dump *arbitrary* guile
>> structures to a byte(or scm_t_bits) array - so that they may be
>> transmitted (send()) and recieved and reconstructed cleanly on the
>> other end. It could also be used to save data structures to a file
>> and restore them later on.
>
> (with-output-to-string (lambda () (write object)))
> That will work for built-in data types like lists, vectors, numbers,
> strings, symbols, etc.  User-defined records and classes are a harder
> problem.
>
For classes you might use something like described in
http://unknownlamer.org/code/guile-web-manual.html#SEC4.

Andy
-- 
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]