toy.raymond at gmail.com
Wed Jan 23 20:40:00 CST 2008
Rupert Swarbrick wrote:
> 1) When I finally reach the bottom, would there be interest in
> uploading the docced file to cvs? I'm being really careful not to
> add/change code, so the only change to the sexps is a string at the
> start of each defun. Thus although it would be an enormous patch/change
> (think every line of code), there would actually be no change to the
> program, just the addition of docs!
Very much so! I wish more people would do that when they fix a bug in
some hairy piece of code. (I'm guilty of that.)
> 2) There are lots of smallish utility functions in simp.lisp, in
> particular predicates like mplusp and the like. As a general comment, I
> think it might be nice to group up, say, predicates in a file of their
> own for reuse - I'm sure we'd find the same code with different names
> in different parts of the tree.
I think there's lots of little bits of code that are like that. Some
even have the same names but slightly different bodies. Combining them
into one would be good, if someone really understand the differences.
This is probably historical baggage. Someone added something but didn't
know about an equivalent function somewhere else.
> 4) Goto! Aargh! I never realised _how_ incredibly difficult it is to
> understand code with gotos - for example uses them heavily. Although I
> understand the code is working currently, I think it's worth going
> through this sort of thing and tidying it - after all, if I found a bug
> somewhere in the middle of simp.lisp: in plusin, say, I'd just groan
> and try to ignore it: the code's just so complicated that it's
> incredibly hard to keep in one's head at once (unless this is just me
> being rubbish!)
I think it's a good idea, but needs to be done with extreme caution.
I've made "trivial" changes that were actually wrong, but weren't
covered by the testsuite.
> 5) (ahah there was another question) Can anyone explain the idiom of
> writing a defun containing just a ((lambda (x) ....) nil)) as in
> eqtest? Is it just a way of doing let for ancient lisp interpreters
> that didn't have it?
It's from old Lisp implementations. Richard Fateman, I think,
explained this somewhere. I know Andreas has been fixing them here and
More information about the Maxima