unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: marco.maggi-ipsu@poste.it
Cc: guile-user@gnu.org
Subject: Re: on coding a portable R6RS package supporting Guile and its FFI
Date: Tue, 05 Feb 2013 18:38:43 +0100	[thread overview]
Message-ID: <87sj5afyos.fsf@pobox.com> (raw)
In-Reply-To: <87y5fsw05u.fsf@rapitore.luna> (Marco Maggi's message of "Thu, 17 Jan 2013 11:53:33 +0100")

On Thu 17 Jan 2013 11:53, Marco Maggi <marco.maggi-ipsu@poste.it> writes:

> * Whenever  a callout  to C  accepts a  pointer argument:  a
>   bytevector argument  is rejected.   Is this not  a useless
>   complication?
>
>   One   can    work   around   it   by    explicitly   using
>   BYTEVECTOR->POINTER, so everything is ready in Guile.  The
>   other  Scheme   implementations  using   a  non-compacting
>   garbage collector already support  this feature and I find
>   it truly convenient.

I agree that we would do well to allow bytevectors wherever an argument
type is a pointer.  It avoids an allocation in a very common case
without changing the expressiveness of the interface or adding
significant additional overhead.

Ludovic sounded like he could go either way on this point.  Daniel
brought up the argument that "a bytevector is not a pointer"; but for
many purposes it's not a terrible thing to think of it that way.  IMHO.

Andy
-- 
http://wingolog.org/



  parent reply	other threads:[~2013-02-05 17:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-17 10:53 on coding a portable R6RS package supporting Guile and its FFI Marco Maggi
2013-01-27 15:08 ` Ludovic Courtès
2013-01-28  3:00   ` Daniel Hartwig
2013-02-05 17:38 ` Andy Wingo [this message]
2013-02-05 19:29   ` Noah Lavine
2013-02-06  8:36     ` Andy Wingo
2013-02-06 13:25       ` Noah Lavine
2013-02-05 22:31   ` Ludovic Courtès
2013-02-06 10:57     ` Andy Wingo
2013-02-08 14:10       ` Ludovic Courtès
2013-02-08 14:37         ` Andy Wingo
2013-02-08 15:52           ` Ludovic Courtès

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=87sj5afyos.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-user@gnu.org \
    --cc=marco.maggi-ipsu@poste.it \
    /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).