From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Van Horn Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: Doc organization (Re: Around again, and docs lead role) Date: Fri, 09 May 2003 12:46:00 -0500 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <3EBBE958.7090403@cs.uvm.edu> References: <3E92E1B4002B0632@pop3.tiscalinet.es> <3EAFE4EC000D9733@pop1.tiscalinet.es> <87d6its93b.fsf@raven.i.defaultvalue.org> <87isskq2mi.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1052502409 3090 80.91.224.249 (9 May 2003 17:46:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 9 May 2003 17:46:49 +0000 (UTC) Cc: Neil Jerram Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri May 09 19:46:46 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19EBwt-0000lI-00 for ; Fri, 09 May 2003 19:46:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19EByG-0007mn-03 for guile-devel@m.gmane.org; Fri, 09 May 2003 13:47:48 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19EBxu-0007lE-00 for guile-devel@gnu.org; Fri, 09 May 2003 13:47:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19EBx3-0007B1-00 for guile-devel@gnu.org; Fri, 09 May 2003 13:46:34 -0400 Original-Received: from badger-ssl.uvm.edu ([132.198.101.194] helo=badger.uvm.edu) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19EBwd-00071G-00; Fri, 09 May 2003 13:46:07 -0400 Original-Received: from cs.uvm.edu (adsl-64-222-92-145.ba-dsg.net [64.222.92.145]) (authenticated bits=0) by badger.uvm.edu (8.12.9/8.12.9) with ESMTP id h49HjwMV008487 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Fri, 9 May 2003 13:46:00 -0400 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en Original-To: Rob Browning In-Reply-To: <87isskq2mi.fsf@raven.i.defaultvalue.org> X-Enigmail-Version: 0.74.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Original-cc: guile-devel@gnu.org Original-cc: guile-user@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2306 gmane.lisp.guile.user:1929 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2306 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