replacing guile [WAS: Re: gnucash on WIndows]

Josh Sled jsled at asynchronous.org
Tue Jul 18 10:04:46 EDT 2006


On Tue, 2006-07-18 at 12:29 +0100, Andrew Wood wrote:
> This is a slight aside but I wondered about replacing the services 
> provided by guile with those of Mono. Anyone know how similar the 
> runtime services are?

It would be a major amount of work.  The QIF importer, all of the
reports (core and business) and the report subsystem, the modularization
system and other bits and pieces are written in scheme.  While true that
the QIF importer should be re-written (to use the bayesian matching
framework at least), the reports could stand a major overhaul, and the
modularization system needs a re-write ... it's going to take a while to
get there.

One of my objections to scheme is the "impedance mismatch" between it
and the C code.  There are ways and idioms of writing lisp programs that
are pretty different from writing C programs, so a literal translation
isn't always possible.  So, basically, the affected bits will need to be
re-written.

A question is: why Mono?  While Mono wouldn't have quite the same
impedance mismatch with C, the natural language for the aforementioned
changes *is* C, like the other 80-90% of the gnucash codebase.  I'd
rather just lose the guile dependencies (guile, slib, g-wrap)
altogether, not just replace them with mono ones.

Of course, there is a need for a scripting-type language, though (after
all the above, and some other potential changes I didn't mention)
there's only two places: 1) a generic "plugin" mechansim that doesn't
really exist, and 2) writing templates for the HTML generation of
reports.  Presently, the reports are HTML-emitting guile scripts, but if
they were <something>-templated HTML files, they would be more
accessible.  As they're written in guile presently, we've been talking
about using `eguile` <http://woozle.org/~neale/src/eguile.html> for
this.  I've also looked at `clearsilver` <http://www.clearsilver.net/>,
though this would be yet-another-dependency :( .

Of course, and a bit unrelatedly, it'd be nice to expose more gnucash
API to higher-level languages ... if we use swig we should get
guile,perl,python,ruby and c# bindings for "free".  But, again, much
more work to do.

-- 
...jsled
http://asynchronous.org/ - `a=jsled; b=asynchronous.org; echo ${a}@${b}`
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060718/8cc14a16/attachment.bin 


More information about the gnucash-devel mailing list