Python report-writing mechanism?

Donald Allen donaldcallen at gmail.com
Wed Mar 7 14:26:03 EST 2007


On 3/7/07, Derek Atkins <warlord at mit.edu> wrote:
> Don,
>
> Quoting Donald Allen <donaldcallen at gmail.com>:
>
> >> I'll note that while I AM an MIT person, I've never been fond of LISP
> >> or Scheme.  I did study it, and I'm fairly comfortable using it, but
> >> I certainly had nothing to do with choosing scheme/guile as the
> >> scripting language in GnuCash.  It was chosen before I started using
> >> (or developing) GnuCash, and I've been around the project since 1999.
> >>
> >> -derek
> >
> > I write:
> >
> > This is a religious issue and a subjective one, so I won't attempt to
> > dissuade you from your opinion, but I will say that I disagree with
> > you completely about Lisp and Scheme. Did you take 6.001? With Jerry
> > Sussman? Have you read Structure and Interpretation of Computer
> > Programs? I'm asking just out of curiousity -- not trying to provoke a
> > confrontation.
>
> Oh, yeah.  It was a decent class, but it wasn't until a decade after I
> took it that I really began to understand it.  I'm still not someone who
> lives and dies by scheme, but unlike many people I'm not afraid of it
> either.
>
> So, honestly, I'm not sure what you disagree with here, in particular
> with what I said.  How can you disagree with me stating that I'm not
> fond of scheme?

You are not (fond of Scheme). I am. Therefore we disagree. That
doesn't mean I think you are an idiot, a bad person, or that you
deserve to be flogged :-). I tried to make that clear in my earlier
post, but apparently didn't succeed.

 Or that it was chosen before I came to the GnuCash
> project?   Note that nowhere did I talk about the merits of Scheme
> as a language OR compare it to other languages.  I just stated my
> personal opinion and some facts about GnuCash.  If you really want to
> argue those, then I suggest taking this to /dev/null.

You really like /dev/null. It must be filling up fast.

>
> [namedropping elided]
> > I confess I haven't read this thread carefully, but I got the
> > impression that there's a plan a-foot to have C take on some of the
> > role played by Scheme now? I'm a little unclear as to how that relates
> > to the plan to move some of the report-writing function from Scheme to
> > HTML+Scheme, but moving from Scheme to C for ease-of-programming (as
> > opposed to performance) reasons would make no sense to me. My $.02.
>
> Yes, there's a plan afoot to migrate some of the functionality from
> Scheme to C.  There are MULTIPLE reasons for this:
>
>   1) Performance.  C code is usually much faster.

That makes sense to me, as I suggested above.

>   2) Debugging.    It's REALLY HARD to debug Scheme code.  The C compiler
>      can provide early warnings to errors that you only see in scheme
>      when you actually execute the broken code.

I'm actually not familiar with guile, but this is obviously an
implementation-specific issue, not inherent in Scheme. Most of the
Scheme code I've written has been debugged and run with MIT Scheme,
which has excellent debugging facilities. But certainly if guile makes
debugging a pain, then what you say makes sense here as well.

>   3) Maintanence.  Most of the current GnuCash developers don't known scheme
>      and most of the prospective developers don't know scheme.  This makes
>      it really hard to get people to maintain the code.  The pool of C
>      developers is much greater than the pool of Scheme developers.  Now
>      add the "and want to work on gnucash" and the numbers reduce drastically.

That I didn't realize. I assumed that the conditions that existed when
the choice of Scheme was made still existed. If you don't have people
who can and will write Scheme, but will and can write C, then
obviously your hand is forced.

>   4) Report writing.  Writing a new report requires a knowledge of scheme,
>      whereas we'd prefer to require much less programming knowledge of
>      our potential report-writers.

>
> The "Scheme to HTML+Scheme" is a separate issue, more of a short-term stopgap
> in order to make it easier for a novice user to change the visible style
> of reports (in particular Invoices).  A notice user could change HTML much
> easier than re-coding scheme to get their desired visual appearance.


Yep.

See? We mostly agree (actually, you convinced me that your decisions
are sensible, which doesn't surprise me). But, as an obviously
accomplished hacker (and I use that word in the good sense), I'd urge
you to think about the elegance of Scheme, and perhaps try using an
implementation of it that does it justice. It's not good for
everything (you've cited practical reasons in the gnucash setting that
are an example of this), but in the right problem domain, with the
right implementation, you can get more done per unit time than
anything else I've ever used.

/Don

>
> > /Don
>
> -derek
>
> --
>        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 at MIT.EDU                        PGP key available
>
>


More information about the gnucash-user mailing list