axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] begin{axiom}, begin{spad} and begin{aldor} (was: new v


From: Bill Page
Subject: [Axiom-developer] begin{axiom}, begin{spad} and begin{aldor} (was: new version of polymake.spad)
Date: Mon, 29 Aug 2005 00:15:41 -0400

On August 27, 2005 3:38 PM Martin Rubey wrote:
> 
> I suppose you hate seeing my email address by now...
> 

Not at all! I am still very enthusiastic to try to help anyone
who is willing to share their expertise with other Axiom users
and developers. I think you are setting an excellent example to
others. Thank you for all your contributions.

> Anyway: I had problems uploading my most recent version of the
> polymake wrapper. MathAction keeps responding with Site Error...
> 

I am sorry that it took me a little longer to find the source of
this problem. In this case it had nothing specifically to do with
your polymake code. Instead it turned out that the Site Error is
directly related to a recent email to axiom-developer.

In a recent thread with subject "steps towards better TeXmacs
interface" Andrey G. Grozin addressed the issue that the output
of Axiom is not well suited for processing as input to another
program such as TeXmacs. This is also a problem on the MathAction
website which must capture Axiom output and prepare it for
display on a web page.

The problem in this case is that the output of the SPAD compiler
is very verbose and quite messy. This output was causing the
MathAction parsing routines (based on some moderately complex
python regular expressions) to blow-up and abort the conversion
process.

In fact, I knew that this problem also occurred on some other
pages on MathAction. The most significant example was your code
for the 'Guess' routines. If saved as page type StructuredText+
LaTeX in order to trigger the Axiom SPAD compiler, that also
caused the Site Error and so previously it had to be saved as a
PlainText format page. The Site Error did not prevent the SPAD
compiler from running and compiling the code but it was impossible
to save the page unless the page type was changed to PlainText
because the Site Error aborts just prior to the save process.

The solution was also similar to that mentioned in the message by
Andrey: I had to insert additional markers in the Axiom output.
I did this using the following Axiom commands:

  )sys echo <SPAD>
  )sys cat code.spad
  )sys echo </SPAD>
  )co code.spad
    SPAD compiler output

to more simply delimit the SPAD code from the associated compiler
output. This allowed me to avoid the more complex output parsing.

The other thing that happened recently was that I upgraded the
version of Axiom on MathAction to Patch-44 plus Peter Broadbery's
patches to support Aldor. So now it is possible to write both
SPAD and Aldor library routines on MathAction. To distinguish
between SPAD and Aldor I introduced the follow two new
environments:

\begin{aldor}
  Aldor library code here
\end{aldor}

and

\begin{spad}
  SPAD library code here
\end{spad}

The older \begin{axiom} ... environment still exists and is
intended to be used only for Axiom interpreter commands. For the
time being the deprecated form:

\begin{axiom}
)abbrev ...
  SPAD library code here
\end{axiom}

still works but after everything that uses this form is converted
to form, this will be eliminated.

Only the new environment \begin{spad} ... produces the new
syntactic markers that permits SPAD compiler output to be handled
reliably. So this should be used for all new library code on
MathAction.

> I attach it, maybe you are luckier than me, probably more 
> knowledgeable in any case...
> 

In your polymake page I have changed the delimiters to:

\begin{spad}
...
\end{spad}

and inserted your new code.

> 
> )abbrev domain POLYTOPE Polytope
> Polytope(): Exports == Implementation where
> ...

Now the page compiles and renders properly on MathAction.
I also did the same on you page named 'Guess' and now it
also is compiled and saved properly.

Let me know if you have any questions about this.

Regards,
Bill Page.






reply via email to

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