meval / thanks



On Thu, 6 Feb 2003, Richard Fateman wrote:

> ratdisrep etc  changes only the FORM of data. meval changes the
> value by looking up bindings.  If hayat converts information into
> rat form and then calls meval on kernels, and there is a possibility
> that the call to meval itself calls ratdisrep, and it does so without
> locally protecting the values of genvars and varlist by making local
> copies, then there would be a chance for a bad interaction.

OK, now I think everything is very clear.

> It seems to me a really bad idea to mix form-changing programs with
> value-changing programs this way.

As hayat does.

> Ideally,
> no lisp program except one that is written with full understanding of
> the genvar/ varlist situation should be handed the "insides" of a
> rat form.
> By inside I mean the stuff like  (g0012 1 1)
> inside
> 
> ((mrat simp ($x) (g0012 ..)) (g0012 1 1) . 1)

I even think that there can't be a full understanding, because 
genvar/varlist might change...

> Somehow I get the feeling that I am repeating myself.  

You are not. It was necessary for me to see clearly.

> It would be
> tempting to re-do this whole aspect of the rational function package
> in a way that would be cleaner, except that I'm not sure how that
> new version would work.  

Might be a lot of work. As I said once already, it would be necessary to 
have a clearer picture of the future of maxima. Maybe it seems to me that 
only little progress is made because of the long 5.9.0 release delay. 
Maybe this will change. However, there are horrible bugs - without fixes - 
on the list...

> The concept of using tagged data  (e.g.
> tagged with MRAT)  as an external interface, but using the untagged
> data internal to some suite of programs, is pretty standard, I think.
> People messing around with the internal data form need to abide by
> the standards of that form.

Unfortunately, abiding to the standards is not the case in hayat...  For
the time being (for hayat), it would be a good thing to have a list of all
functions that need to be protected. maxima-substitute, meval are two of
them. Is there an easy way to produce such a list?

(to check, I protected the three calls to maxima-substitute, and the bug 
vanished of course. I don't know wether I need to protect the calls to 
meval, I think yes.)

Thanks a lot, Martin