code in cvs is broken

Linas Vepstas linas@linas.org
Mon, 19 Nov 2001 13:19:45 -0600


On Mon, Nov 19, 2001 at 12:06:27PM -0600, Rob Browning was heard to remark:
> linas@linas.org (Linas Vepstas) writes:
> 
> > I don't see what this has to do with parsers.  Which 'particular
> > situation' are you refering to?
> 
> All I was referring to was that if you want the commodities to be
> loaded from a file at runtime, so that they can be
> updated/modified/etc. between releases, or for specific purposes, then
> you need a parser, and for jobs like that, I'd rather just use scheme
> forms (and if necessary some syntactic macro-sugar) and the scheme
> reader (or load) than write a text file parser by hand in C, or suffer
> the aggravations involved in dealing with XML from C.

Right. Don't write a parser.  Don't load the currencies from a file.
Let the engine start out empty, buck-naked.  The engine does not need
to know about currencies; the engine shouldn't read initialization info
from a file.

What I was envisioning was that gnucash, the application, would *push*
currency values into the engine, at some point during startup.  
Basically, gnucash, the app, has responsibility for inserting the
currencies into the engine.  However it got/found the currencies,
that, I don't have an opinion about.   Once it has them, it would need
to insert them into the engine before it can use them.  

In other words, its up to gnucash-the-app to initialize the engine, 
instead of asking the engine try to initialize itself.  You don't need 
a parser for this, you don't need a file format, you need very little 
new code.  Just load the currencies into it, instead of asking it to 
load itself up.  

--linas

p.s. Yes, I agree with you about XML.  I'm thinking that if the people
who are designing XML only knew Scheme or LISP, then XML wouldn't be the
abortion that it is.  This is a clear case of standards committees
causing great damage because they don't have broad enough experience &
background in programming.  Oh wait, that's right, I forgot, XML is 
another great Microsoft "innovation".   Gosh, I suppose that means that
I should be thankful that it's not a closer match to Visual Basic. ;-()

But I notice that DSSSL is infiltrating via XSL, so maybe there still is
hope ...


-- 
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