[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Development/Production versions (was RE: CVS)
Leo Razoumov wrote:
> >>>>> "SK" == Shriram Krishnamurthi <shriram@cs.rice.edu> writes:
> SK> As I recall, Swig provides Guile bindings. How about creating one for
> SK> MzScheme? Takers? Swig fans? (I believe there's a major revamping
> SK> of Swig in progress, so this would be a good time to get involved.)
>
> SK> 'shriram
>
> How about having the wrapper generating engine written in Scheme? After all
> don't we believe that Scheme is the best language of all:-)
There's a "g-wrap" system where you describe the bindings between C and
Scheme in Scheme form. This is extensively used with GnuCash to attach
Scheme bindings to C functions and vice-versa to allow scripting in
Guile. g-wrap also supports RScheme, which I *think* has something to
do with Rice?
<http://www.cs.cmu.edu/~chrislee/Software/g-wrap/> is the home of
g-wrap.
Note that a slick part of g-wrap is that it generates HTML documentation
as output; if you define some functions thus:
(new-function
'gnc:get-num-accounts
'int "xaccGetNumAccounts" '((AccountGroup* g))
"Return the number of accounts, including subaccounts, in the account
group")
(new-function
'gnc:group-get-num-accounts
'int "xaccGroupGetNumAccounts" '((AccountGroup* g))
"Return the number of accounts in the indicated group only
(children not counted).")
(new-function
'gnc:group-get-account
'Account* "xaccGroupGetAccount" '((AccountGroup* g) (int n))
"Return account number n in account group g.")
g-wrap will generate a web page with the names of the functions and
arguments.
--
"One World. One Web. One Program." -- MICROS~1 hype
"Ein Volk, ein Reich, ein Fuehrer" -- Nazi hype
(One people, one country, one leader)
chris.browne@sabre.com
begin:vcard
n:Browne;Christopher
tel;work:817-963-5621
x-mozilla-html:FALSE
url:http://www.hex.net/~cbbrowne/
org:Sabre Inc;SHARP Project
version:2.1
email;internet:chris.browne@sabre.com
title:Consultant II
adr;quoted-printable:;;4333 Amon Carter Blvd=0D=0AMD 3N2D41;DFW Airport;TX;75261-9616;USA
x-mozilla-cpt:;0
fn:Christopher Browne
end:vcard