unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Cc: guile-user@gnu.org
Subject: Re: searching: example of C extension implementing port
Date: Wed, 08 Mar 2006 07:55:43 +1100	[thread overview]
Message-ID: <87k6b6km9c.fsf@zip.com.au> (raw)
In-Reply-To: IVQ701$0BF9335B9BD287959E67AEF6E431F2DD@poste.it

"Marco Maggi" <marco.maggi-ipsu@poste.it> writes:
>
> is there a sample extension implementing an input/output
> channel?

You'll have seen the "Soft Ports" node in the manual, it's pretty
straightforward.

> I'm thinking of a memory channel (not an interface
> to a file or hardware port), something like the string
> port; is the channel API of Guile worth learning for this,

If it's for a lot of bytes, then the scheme-level bits will be very
slow (read/write only 1 byte at a time) and you might have to break
out some C.  (Getting that C level bits into scheme would be a good
thing one day.)

> or is it better to write something of my own?

For reading OLE file contents I did my own read func.  But whether
that's good probably depends what and how much other code is going to
use the port.


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


  parent reply	other threads:[~2006-03-07 20:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-06 21:43 searching: example of C extension implementing port Marco Maggi
2006-03-07  9:15 ` Ludovic Courtès
2006-03-07 20:55 ` Kevin Ryde [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-03-07 22:23 Marco Maggi
2006-03-08 22:45 Marco Maggi

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=87k6b6km9c.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --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).