|
From: Raymond T. <toy...@gm...> - 2025-10-24 01:50:39
|
On 10/23/25 9:06 AM, Stavros Macrakis wrote: > It's great the way def-simplifierstandardizes the definition of > simplifying (mathematical) functions. > > I use the Tags system in Emacs, so I type META-. /function/to jump to > the definition of a function. That certainly wasn't the intention, but I'm glad there are additional benefits. > > def-simplifier makes this much more efficient. I used to have to know > that the simplifier for gamma is simp-%gamma, for example. Yeah, and the naming wasn't always consistent. > > But unfortunately, the def-simplifierscheme doesn't apply to all > functions: it fails for min, floor, matrix, lambda, etc., not to > mention operators like +, ^^, etc. This is probably because these functions have lambda args that aren't currently supported. Also, I think some functions use maclisp syntax. We should probably replace all of these old-style functions with CL-style. A different task, I think. > > It would be nice if we could somehow extend the def-simplifier scheme > to cover all these cases, even if the call is actually a no-op -- that > is, use def-simplifier simply to make the simplifier findable. > > (def-simplifier lambda simplambda) ;; random syntax > (defun simplambda (x vestigial simp-flag) A different syntax that I didn't think of. I'll look into it, but part of the reason for def-simplifier was to make the bodies also consistent so that errors and what not produce consistent results. This kind of defeats that purpose. ​ |