axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] RE: lisp talk


From: Bill Page
Subject: [Axiom-developer] RE: lisp talk
Date: Fri, 20 May 2005 22:38:49 -0400

On May 20, 2005 6:14 PM Tim Daly wrote:

> There is an embedded command server within AXIOMsys.
> Look at:
>
http://daly.axiom-developer.org/TimothyDaly_files/lisptalk/pages/lisp35.
html
>

Thanks, Tim. I believe that 

  parseAndInterpret stringBuf

is what I was looking for.

Now, this is boot language code, right? So in lisp I have
to tack on the | | onto the function name and then I can
call it like this:

  (1) -> )lisp (|parseAndInterpret| "integrate(sin x,x)")

   (1)  - cos(x)
                          Type: Union(Expression Integer,...)

  Value = ((|Union| (|Expression| (|Integer|)) (|List| (|Expression|
(|Integer|)))
  ) WRAPPED 0 (1 #<vector 10ccde54> (1 0 . -1)) 0 . 1)

  (2) ->

and sure enough! Axiom parses and interprets the string.
Great.

I presume that there is no reason why this would not work
when called directly from a lisp function, right? In my
scheme this string would be passed to Axiom by the http
webserver code.

But the result appears as stdout and the value returned
seems to contain the type information. (What is this WRAPPED
stuff?)

> Also, there is some way to do input because the axiom browser
> already feeds expressions to AXIOMsys thru a socket. 

Yes, input seems to be no problem.

> The string output function mentioned in FAQ 19 is a linear
> form of the output. However Axiom's native output machinery
> is called CHARYBDIS which was a research project from the
> 60s with the goal of printing mathematics on typewriters.
> Axiom still uses that code.

What I really would like is to see the result also returned
in the value. I would like to see the output in the form
of say, a list of strings. So the returned value in the
example above would be something like this

  Value = (("- cos(x)" "Type: Union(Expression Integer,...)")
   ((|Union| (|Expression| (|Integer|)) (|List| (|Expression|
(|Integer|)))
   ) WRAPPED 0 (1 #<vector 10ccde54> (1 0 . -1)) 0 . 1)
  )

In other words I guess I need the ouput of CHARYBDIS in the
form of a list of strings instead of in the output stream
(and later the LaTeX output and the openmath output). Can
you think of anywhere in Axiom where something like this is
already done?

Regards,
Bill Page.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]