unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Linas Vepstas <linasvepstas@gmail.com>
To: guile-user@gnu.org
Subject: Re: Guile continuations
Date: Sat, 22 Aug 2009 10:26:40 -0500	[thread overview]
Message-ID: <3ae3aa420908220826r3eae4ce9p4f3502e5eba5de54@mail.gmail.com> (raw)
In-Reply-To: <20090822030824.GD7342@localhost>

2009/8/21 Eric Cooper <ecc@cmu.edu>:
> On Fri, Aug 21, 2009 at 06:53:29PM -0500, Linas Vepstas wrote:
>> I'm trying to find an elegant way of multi-threading between C
>> and scheme code, without actually using threads... Basically,
>> I want to do some scheme stuff for a while, break off, run some
>> C code for a while, then resume the scheme execution where
>> I left off.
>
> You can implement coroutines using call/cc, and the coroutines can be
> either Scheme or C code.

Yes, thank you!  Easy when you put it that way, and a great example
too!  I really like that simple straightforward fork/yield ... its so ...
obvious ... once you see the answer. Sheesh.

By contrast, googling "coroutine scheme" comes up with horrid
messes.  The wikipedia article on coroutines doesn't even link to
a scheme version; the Wikipedia article on continuations could
almost surely benefit from a cut-n-paste of your email.

In fact, I'm planning on cut-n-pasting that into the talk page
right now, if that's OK with you ...


--linas




  reply	other threads:[~2009-08-22 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-21 23:53 Guile continuations Linas Vepstas
2009-08-22  3:08 ` Eric Cooper
2009-08-22 15:26   ` Linas Vepstas [this message]
2009-08-22 16:01     ` Eric Cooper

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=3ae3aa420908220826r3eae4ce9p4f3502e5eba5de54@mail.gmail.com \
    --to=linasvepstas@gmail.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).