unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Faraz Shahbazker" <faraz_ms@rediffmail.com>
Cc: guile-user@gnu.org
Subject: Re: to serialize/deserialize closures; and multithreading
Date: 25 Mar 2004 22:38:00 -0000	[thread overview]
Message-ID: <20040325223800.14670.qmail@webmail27.rediffmail.com> (raw)


[-- Attachment #1.1: Type: text/html, Size: 2421 bytes --]

[-- Attachment #1.2: Type: text/plain, Size: 1857 bytes --]

nick,

I am curious too : what is your purpose of migration?

        I am working on something similar, for using scheme on
Beowulf-clusters with PVM. Here the purpose of migration is to
remotely-evaluate a sexp. But possible uses of this technology
could be to simply suspend/restart programs(see chpox), or for
delivering active web-content.

> Should a mutation on the new computer of a captured variable
> affect the old computer? - greg

        Basically, if your program is purely/mostly functional,
it might be easy to migrate, while maintaining referential
transparency - just byte-copy(with tags) all   data-types.
The semantics of mutable objects (when mutation does occur)
is for you to decide. It might make greater sense for example
for exceptions to be migrated and  handled remotely, than
say mutexes or ports.


>  Also, you'd need to check that any symbols referenced by
> the code or variables were actually in existence in the
> new guile instance's symbol table.  And that global
> variables referenced by the code got copied (as well as
> the lexical variables).
> So will be recursively nasty.

        I agree with Lynn. Guile's own procedures for
detecting free-variables in expressions may be inadequate for
this.  There is a technique called lambda-lifting meant for
converting sexps into pure combinators(a.k.a thunks). See
Jonhsson's paper on lambda-lifting. It was meant to be used
for compiler optimizations for ML. It was also used in the
Larceny Scheme compiler. But since you are not yet conversant
with SCM_API, I don't know....

        printer/reader is an elegant(read slow ;) solution for
plain Scheme code, but it obviously won't work for custom smobs,
which I am assuming that you might want to create(since you are
using C). 

So tell me more about it!!

- faraz 



[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

             reply	other threads:[~2004-03-25 22:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25 22:38 Faraz Shahbazker [this message]
2004-03-26 13:05 ` to serialize/deserialize closures; and multithreading rm
2004-03-26 15:22   ` Nicholas Paul Johnson
  -- strict thread matches above, loose matches on Subject: below --
2004-03-26 20:02 Faraz Shahbazker
2004-03-26 20:35 ` Andreas Rottmann
2004-03-25  6:19 Nicholas Paul Johnson
2004-03-25  6:43 ` Paul Jarc
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

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=20040325223800.14670.qmail@webmail27.rediffmail.com \
    --to=faraz_ms@rediffmail.com \
    --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).