code in cvs is broken

Derek Atkins warlord@MIT.EDU
14 Nov 2001 19:03:40 -0500


Personally I find debugging the C to be much easier.  Then again
I'm very familiar with gdb, but no such equivalent exists
for debugging guile.  With guile the only debugging tool it
"output", which IMHO isn't very useful.  Doesn't help you
single-step through the code, either ;)

-derek, who is trying to track down an apparent memory corruption bug.

linas@linas.org (Linas Vepstas) writes:

> On Wed, Nov 14, 2001 at 07:57:14AM -0600, Bill Gribble was heard to remark:
> > 
> > That means libgncgnome.la has to be built before libgw-gnc.la. However,
> > top-level.c included gw-gnc.h, meaning that libgw-gnc.la has to be built
> > before libgncgnome.la.... AAAH!
> 
> Well, one way out of circular dependencies would be to declare that 
> C code never calls scm routines.  That everything 'dead-ends' on C
> libraries.  If we need to initialize the C libraries, then we should
> 'push' data into them (from scm), rather than using C/libguile to 
> 'pull' from scm.
> 
> For example: libgncengine needs to be initialized with currency info.
> Currently, it 'pulls' the currency info out of scm code.  I think it
> would be cleaner to instead make a declaration 'yea verily the engine
> must be initialized with currency data before being used', and then
> use scm code to push that data into the engine.
> 
> The benefit of this, at least for the engine, is to enable perl & java
> bindings to the engine (which currently are messed up because both 
> guile and perl want to 'own' the main loop.)
> 
> Other benefits are debatable, I supose.  I like it because it has a
> certain 'traditional' feel too it; it avoids a spaghetti of flow of
> control.   The philosophy keeps the C code 'stupid', (as C code tends 
> to be), and leaves all the 'brains' in the over-seeing scm.  I think
> this makes debugging easier, since its clearer as to who is responsible 
> for what.  
> 
> I would guess there are parallel issues for menu and register layout.
> I'd suggest using scm code to 'tell' the C code what the layout should 
> be, rather than using libguile in the C code to import data from scm 
> config files.  
> 
> Does this make sense? Do you feel that this might not be such a good
> idea?  Is it a wash?
> 
> --linas
> 
> -- 
> pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas@linas.org>
> PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel@lists.gnumatic.com
> http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available