On 10/23/2014 10:49 AM, [email protected] wrote:
> Axiom does keep the information you're looking for.
>
> (1) -> f(x) == 3*x^2+5
> Type: Void
> (2) -> )history )show 1
> [1] f(x) == 3*x^2+5
Yes. But as William already said, it's not exported by the function
itself. One has to look elsewhere.
> For more detail about the function you could access foo.axh/index.kaf
> which is a "keyed access file". You could extend GETDATABASE
> which knows how to manipulate .kaf files. The format is (was)
> explained in the source code. Anyway, the foo.axh/index.kaf file:
>
> ------------------------------------------------------------------------
> 335 ("f(x) == 3*x^2+5" (% (|value| (|Void|) . "()"))
> (|f|
> (|value| (|FunctionCalled| |f|) SPADMAP
> (|#1| + (* 3 (^ |#1| 2)) 5))
> (|recursive|) (|alias| |x|) (|isInterpreterFunction| .
> T)
> (|isInterpreterRule|)))
> (("1" 0 20))
> ------------------------------------------------------------------------
>
> where 335 is a byte offset to the dictionary entry list (("1" 0 20))
> which means that user input (1) is 20 bytes into the file
>
> so you seek 20 bytes from the start of the file for the object
> which is a list object whose CAR is the string input you seek.
Yes, I belief that all this is possible, but it sounds like what one can
do in Python, namely look inside an object although it doesn't export
the respective method. I call that cheating and not proper programming.
In other words "cheating" is the default in Mathematica and Maple. I
like Axiom better, because it doesn't allow for easy cheating.
Ralf
_______________________________________________
Axiom-developer mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/axiom-developer