unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Andreas Rottmann <a.rottmann@gmx.at>
Subject: Re: to serialize/deserialize closures; and multithreading
Date: Fri, 26 Mar 2004 21:35:54 +0100	[thread overview]
Message-ID: <87n063xs5x.fsf@ivanova.rotty.yi.org> (raw)
In-Reply-To: 20040326200251.19862.qmail@webmail27.rediffmail.com

"Faraz Shahbazker" <faraz_ms@rediffmail.com> writes:

>         That I accept. It can be speeded up by building the
> transformation into the compiler, something which is not possible
> with guile - bigloo perhaps would be a better choice for such work.
> But it is difficult to leave guile for 2 reasons :
>
> 1. it's got the "GNU" in it's name
> 2. SCM API is too good - absolutely love it. I don't think anyone
> can provide a better extensibility for Scheme than what we have here.
>
Have a look at Pika's API - it's cleaner (IMHO) and more general, due
to passing only location of SCM values (which allows easier/better GC)
and passing an 'arena' (roughly a interpreter instance), which allows
for more than one Scheme "subsystem" in one program; each such
subsystem can have a different memory pool size, independent GC,
... OTOH, this tends to make the C code more verbose. Example:

t_scm_error
scm_ref_list_elt (t_scm_word * result, t_scm_arena arena, t_scm_word * list,
                  ssize_t elt)
{
  struct ref_locals
    {
      SCM_FRAME;
      t_scm_word tail;
    } l;
  t_scm_error status = 0;

  SCM_PROTECT_FRAME (l);

  status = scm_list_tail (&l.tail, arena, list, elt);
  if (status == 0)
    {
      scm_ref_pair_car (result, arena, &l.tail);
    }
   
  SCM_UNPROTECT_FRAME (l);
   
  return status;
}

Cheers, Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
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!



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


  reply	other threads:[~2004-03-26 20:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-26 20:02 Re: to serialize/deserialize closures; and multithreading Faraz Shahbazker
2004-03-26 20:35 ` Andreas Rottmann [this message]
  -- 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-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=87n063xs5x.fsf@ivanova.rotty.yi.org \
    --to=a.rottmann@gmx.at \
    /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).