unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* searching: example of C extension implementing port
@ 2006-03-06 21:43 Marco Maggi
  2006-03-07  9:15 ` Ludovic Courtès
  2006-03-07 20:55 ` Kevin Ryde
  0 siblings, 2 replies; 5+ messages in thread
From: Marco Maggi @ 2006-03-06 21:43 UTC (permalink / raw)


Ciao,

  is there a sample extension implementing an input/output
channel?

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,
or is it better to write something of my own?

I only need the open/close/read/write/end operations, no
events, no seek.

--
Marco Maggi

"They say jump!, you say how high?"
Rage Against the Machine - "Bullet in the Head"



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


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: searching: example of C extension implementing port
@ 2006-03-07 22:23 Marco Maggi
  0 siblings, 0 replies; 5+ messages in thread
From: Marco Maggi @ 2006-03-07 22:23 UTC (permalink / raw)


"user42@zip.com.au" wrote:
>You'll have seen the "Soft Ports" node in the manual,
>it's pretty straightforward.

Yes, it is straightforward with pure Scheme; but I have
to filter a stream of bytes (binary data not strings)
thru a C implemented algorithm.





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


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: searching: example of C extension implementing port
@ 2006-03-08 22:45 Marco Maggi
  0 siblings, 0 replies; 5+ messages in thread
From: Marco Maggi @ 2006-03-08 22:45 UTC (permalink / raw)


>"Marco Maggi" <marco.maggi-ipsu@poste.it> writes:
>> If, dunno when, I come up with a simple example channel
>> implementation: is there an "official" place where I can
>> put it?
>I don't think so.  Well, depends on what you mean by
>"official" I guess.  ;-)  And BTW, what do you mean
>by "channel"?

I come from TCL:

* in the TCL world it is known that the sample
  extension is a module in the CVS repository of
  the TCL core project at SourceForge; if one goes
  to the TCL'ers Wiki and does a search he quickly
  finds it;

* in the TCL world a channel is a generalisation
  of Guile ports; not only it does I/O on file,
  sockets and memory (strings), but channels can be
  stacked to do compression, encryption, etc.

With TCL a channel is somewhat complex because: there
is also the event loop to take into account; so simpler
stacking is what I'm trying to do in a C only library and
I would like to build an interface for Guile.

  If someone wants to take a look at what I've done so
far (it is only half written, it is tough to do reverse
engineering):

http://web.tiscali.it/marcomaggi/tmp/gee--alpha--0.1.tar.gz

--
Marco Maggi

"They say jump!, you say how high?"
Rage Against the Machine - "Bullet in the Head"



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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-03-08 22:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2006-03-07 22:23 Marco Maggi
2006-03-08 22:45 Marco Maggi

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).