Greetings, and thanks so much for this very helpful report! I've found the cause and am testing the fix now.
Alas, this does not fix the other issue: > > 2) The FriCAS snippet below in final step gives old (stale) output > > corresponding to n==10, instead of output corresponding to n==15: > > > > )set functions cache all > > n==10 > > v==[i for i in 0..n] > > v > > n==15 > > v You probably already know what with a second n==15 v we get the expected results. Might you isolate this one as well as you did with the last? Take care, Waldek Hebisch <de...@fricas.org> writes: > On Sun, Apr 27, 2025 at 01:55:13PM -0400, Camm Maguire wrote: >> Greetings! I'm wondering if you can help me map this to a lisp function >> failure, or at least point me in the right direction. I think the two >> are related. The sort is fine with abs1 -> abs. Or if abs1(x: Integer): >> Integer == abs(x). I cannot trace this. |abs1| is not fboundp. I do >> not understand how axiom handles anonymous function calls, or why these >> are considered anonymous, as abs1 is a name. >> >> >> > 1) The FriCAS snippet below gives no output using gcl-2.7.1: >> >> > >> >> > x+-> if x < 0 then - x else x >> >> > abs1 := % >> >> > (x,y) +-> abs1(x) > abs1(y) >> >> > sort(%,[3,9,-4,10,-3,-1,-9,5]) > > Tracing like below: > > x+-> if x < 0 then - x else x > abs1 := % > (x,y) +-> abs1(x) > abs1(y) > )lisp (trace |evalTargetedADEF1|) > )lisp (trace |compileTargetedADEF|) > )lisp (trace |compileBody|) > )lisp (trace |compileADEFBody|) > )lisp (trace |compileInteractive|) > )lisp (trace |timedOptimization|) > )lisp (trace |compQuietly|) > )lisp (trace |COMP|) > )lisp (trace |COMP_2|) > )lisp (trace |COMP370|) > )lisp (trace compile-defun) > )lisp (trace compile) > sort(%,[3,9,-4,10,-3,-1,-9,5]) > > gives me as the last part: > > 9> (COMPILE-DEFUN > |*2;anonymousFunction;0;frame0;internal| > (DEFUN > |*2;anonymousFunction;0;frame0;internal| > (#1=#:G12 #2=#:G13 |envArg|) > (> > (SPADCALL #1# '(#<function 0000000001d08e20>)) > (SPADCALL #2# '(#<function 0000000001d092d0>))))) > 10> (COMPILE > |*2;anonymousFunction;0;frame0;internal|) > > So it seems that trouble is in 'compile' called from 'compile-defun'. > 'compile-defun' is: > > (defun compile-defun (name body) (eval body) (compile name)) > > I also have: > > )lisp (describe #'|*2;anonymousFunction;0;frame0;internal|) > > #<function 0000000001d09300> - SYSTEM:INTERPRETED-FUNCTION > > which confirms that 'eval' part worked, but 'compile' failed. > Calling |*2;anonymousFunction;0;frame0;internal| seem to work. > > -- > Waldek Hebisch -- Camm Maguire c...@maguirefamily.org ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/87jz74xq8e.fsf%40maguirefamily.org.