Q: nounify symbols with a 'm prefix ?



Stavros Macrakis wrote:
> For mathematical functions such as abs, sin, "+", etc., we recently 
> discussed this, and if I'm not mistaken, we all agree that the noun form 
> and the verb form should be identical: there is no useful functionality 
> attached to the difference.  So we should have 'abs = nounify('abs) = 
> verbify('abs) = ?mabs.

Thank you for the explanation.

> Things get messier when you start looking at things like 
> op("abs"(x)).  In the current system, we have:

The use of strings to name operations currently seems problematic because
'amperchk (in suprv1.lisp) converts maxima strings into symbol names by
effectively downcasing all characters.  For example: neither "sin"(1) or
or "SIN"(1) are equivalent to sin(1).

(%i1) (postfix ("f2"), "f2"(x));
(%o1)                                F2(x)
(%i2) "sin"(1);
(%o2)                               SIN(1)
(%i3) "SIN"(1);
(%o3)                               SIN(1)


Would there be any objections to modifying 'amperchk to use the case flipping
rules that are used for unquoted names?

The proposed change is to 'casify-exploden:
(defun casify-exploden (x)
   (cond ((char= (getcharn x 1) #\&)
	 (cdr (exploden (maybe-invert-string-case (string x)))))
	(t (exploden x))))

With this change:

(%i1) (postfix ("f2"), "f2"(x));
(%o1)                                x f2
(%i2) "sin"(1);
(%o2)                          .8414709848078965
(%i3) "SIN"(1);
(%o3)                               SIN(1)

Regards
Douglas Crosher