unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
Cc: guile-user@gnu.org
Subject: Re: to serialize/deserialize closures; and multithreading
Date: Thu, 25 Mar 2004 01:43:38 -0500	[thread overview]
Message-ID: <m3lllps9xr.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <Pine.LNX.4.44.0403250050390.22664-100000@localhost.localdomain> (Nicholas Paul Johnson's message of "Thu, 25 Mar 2004 01:19:52 -0500 (EST)")

Nicholas Paul Johnson <nickjohnson@virginia.edu> wrote:
> 1. If I have a scheme value that is a closure, is there any way that I can
> serialize this closure (from C code) into a form that it can be
> deserialized back into a SCM closure variable (again, by C code)?

Well, there's (procedure-source foo), which gets you a list
(lambda ...) which can be passed to (write) and recovered with
(read).  But the closure may also have captured some lexical bindings,
which won't survive this translation.  (And of course, anything that
can be done from Scheme can also be done from C, though the details
may vary depending on the procedure/function in question.)

> Also, does anyone know of a good documentation of the SCM_ API?  I've not
> been able to find one.

Relative to the manual released with 1.6.4, there have been many
additions in CVS.  Some of the changes are due to code changes, but
I'd expect most of it would hold for 1.6 as well.


paul


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2004-03-25  6:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25  6:19 to serialize/deserialize closures; and multithreading Nicholas Paul Johnson
2004-03-25  6:43 ` Paul Jarc [this message]
2004-03-25 12:40 ` Greg Troxel
2004-03-25 17:18   ` Lynn Winebarger
2004-03-25 18:11     ` Lynn Winebarger
2004-03-25 19:55     ` Paul Jarc
  -- strict thread matches above, loose matches on Subject: below --
2004-03-25 22:38 Faraz Shahbazker
2004-03-26 13:05 ` rm
2004-03-26 15:22   ` Nicholas Paul Johnson
2004-03-26 20:02 Faraz Shahbazker
2004-03-26 20:35 ` Andreas Rottmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3lllps9xr.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).