unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: David Van Horn <dvanhorn@cs.uvm.edu>
Cc: Neil Jerram <neil@ossau.uklinux.net>
Subject: Re: Doc organization (Re: Around again, and docs lead role)
Date: Fri, 09 May 2003 12:46:00 -0500	[thread overview]
Message-ID: <3EBBE958.7090403@cs.uvm.edu> (raw)
In-Reply-To: <87isskq2mi.fsf@raven.i.defaultvalue.org>

Rob Browning wrote:

> Actually, I've been playing around with code that would make something
> like this possible (as a dumb example):
> 
>   (define (double x)
>     (c-syntax
>       (if ("SCM_INUMP" x)
>           (return (* x x))
>           (return ("scm_apply" ("scm_lookup" "+") x x)))))
> 
> and that already works for
> 
>   (%function "main" int ((int argc) ((%array (* char)) argv))
>     ("printf" "Hello world\\n"))
> 
> etc. (i.e. a C s-expression representation), but I'm not sure how
> likely it is that anyone else would find it amusing.  I can think of a
> few possible uses for such a construction (g-wrap, auto-ffi,
> "c-side"-macros, scm-to-C-compiler-back-end, c equiv of inline-asm),
> but I'm still not sure it's really worthwhile.  I might comment more
> later if I remain intrigued...

Are you familiar with the Gambit-C FFI?  This allows you to write, eg.

   (define fmod (c-lambda (double double) double "fmod"))

Type checking and conversion are done for you.  I think it's a rather nice tool.

   Gambit-C: Interface to C
   http://www.iro.umontreal.ca/~gambit/doc/gambit-c.html#SEC27

PLT Scheme supports a subset of this, namely `c-lambda' and `c-declare'.

   MzScheme Compiler Manual: Foreign-Function Interface to C
   http://download.plt-scheme.org/doc/203/html/mzc/mzc-Z-H-2.html#%_chap_2

A Gambit-C style back-end to FFIGEN would be rather useful, especially if
three Schemes supported the emitted code.  I believe there has been some work
done to this end, but I can't seem to find mention of it beyond the to-do list
of FFIGEN.

   FFIGEN
   http://www.ccs.neu.edu/home/lth/ffigen/

-d



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


  reply	other threads:[~2003-05-09 17:46 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-26  7:33 Around again, and docs lead role Neil Jerram
2003-04-26 10:19 ` Thamer Al-Harbash
2003-04-27 20:56   ` Neil Jerram
     [not found]   ` <3E92E1B40021F4D7@pop3.tiscalinet.es>
2003-04-27 21:01     ` Neil Jerram
     [not found]       ` <3E92E1B4002B0632@pop3.tiscalinet.es>
2003-04-30 22:47         ` Neil Jerram
     [not found]           ` <3EAFE4EC000D9733@pop1.tiscalinet.es>
2003-05-07 21:06             ` Doc organization (Re: Around again, and docs lead role) Neil Jerram
2003-05-08 16:21               ` Rob Browning
2003-05-08 17:50                 ` rm
2003-05-08 22:47                   ` Neil Jerram
2003-05-08 21:18                 ` Wolfgang Jaehrling
2003-05-08 22:36                 ` Neil Jerram
2003-05-09  2:23                   ` Rob Browning
2003-05-09 17:46                     ` David Van Horn [this message]
2003-05-10 11:32                     ` Neil Jerram
2003-05-15 16:02                       ` Rob Browning
2003-05-15 16:33                         ` Paul Jarc
2003-05-08 16:21               ` Max Techter
     [not found]                 ` <3EB9828B00021495@pop1.tiscalinet.es>
2003-05-08 21:12                   ` Max Techter
2003-05-27  2:02                     ` Max Techter
2003-05-08 22:57                 ` Neil Jerram
2003-05-09 12:32                   ` Max Techter
2003-05-09  8:15               ` tomas
2003-05-10 12:01                 ` Neil Jerram
2003-05-12 11:40                   ` tomas
2003-05-12 16:46 ` Around again, and docs lead role Max Techter
2003-05-12 20:25   ` Neil Jerram
2003-05-13 14:14     ` Max Techter
2003-05-13 19:56       ` Neil Jerram

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=3EBBE958.7090403@cs.uvm.edu \
    --to=dvanhorn@cs.uvm.edu \
    --cc=neil@ossau.uklinux.net \
    /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).