axiom-developer
[Top][All Lists]

[Axiom-developer] [#99 x^1 abc[y] should be a syntax error] bad day? not

 From: Bill Page Subject: [Axiom-developer] [#99 x^1 abc[y] should be a syntax error] bad day? not really :) Date: Thu, 17 Feb 2005 22:15:21 -0600

Changes
http://page.axiom-developer.org/zope/mathaction/99X1AbcYShouldBeASyntaxError/diff
--
Today I felt like taking what I think might be the point of view
of a new user of Axiom. I agree completely that the Wiki pages are
supposed to be for experts as well as for novices and when simple
input like this causes some apparent problem that is "unexpected",
that we should explain it. I think you did a good job of that.
But in my opinion the explanation is rather bizarre (especially
from the point of view of a new user). So this is were the experts
come in: How can we make Axiom's behaviour less bizarre to new
users?

I originally saw this behaviour in an simple test in the SandBox
where a new user wrote something like this
\begin{axiom}
integrate(z^2 ln[z],z)
\end{axiom}

I was quite sure that what they intended to compule was
\begin{axiom}
integrate(z^2*log(z),z)
\end{axiom}

but I had a hard time understanding the original answer and I
wondered way Axiom did not at least produce some kind of syntax
error.

About the status: 'Closed' looks like you have decided that there
should be no more discussion. Yes this is a wiki and so I could
simply 'Open' it again, but I think it is better to try to develop
some "rules of netiquette" so that the open collaboration allowed
by the wiki can work smoothly. We are all still fairly new at this.

Perhaps I was too direct in using the word "annoyed" since I am
well aware that it is very hard to correctly interpret other peoples'
motives and emotional state when reading what they wrote alone.
I was annoyed :) but if you had seen me in person you would have
noticed that I also smiled when I said that. Of course I used the
word "blame" in the same way. I did not mean it to sound like I
was "finding fault" with anyone, only that I wanted to identify
what might be changed to make Axiom's behaviour more intuitive.

About 'preferences': It seems that "wiki people" generally would
like to avoid any perceived "login barrier". Setting preferences
is just a matter of saying how you would like to be identified
(and a few other details) - it is not supposed to be like
"logging in". And you are right that in principle this only
needs to be done once. Setting preferences sends some cookies
to your browser which, depending on whether you have set your
browser security to permit it or not, will allow the system
to remember your preferences the next time you connect to the
wiki. But maybe you are right that there might be a better
label than 'preferences'. How about something like 'Who Am I'?

About the use of '*01abc y' as a symbol in a type. Maybe this
notation starts to make a *little* more sense if you see an
expression like
\begin{axiom}
1 t[x,y,z]
\end{axiom}

but I still don't see why, if there is a need for some
linear syntax, there would be any objection to using the
same syntax as the input. Surely::

Type: UnivariatePolynomial(t[x,y,z], Integer)

would be self explanatory, no?

About functions and expressions. There is no problem making
substitutions into polynomials like this:
\begin{axiom}
subst((1+b^2)::UP(b,INT),b=(t^2::UP(t,INT)))::UP(t,INT)
\end{axiom}

or even this
\begin{axiom}
subst((1+c*b^2)::MPOLY([b,c],INT),b=(t^2::UP(t,INT)))::MPOLY([t,c],INT)
\end{axiom}

We can also explicitly use 'eval'. So I don't understand the
need to define application for univariate polynomials and to
treat them like functions.

Finally, could you explain further your reasoning about why the
interpreter should not coerce 'Variable x' to 'Symbol'? Axiom
has no trouble coercing x to a Symbol in the case of an expresion
like 'UP(x,INT)'. Surely it should be able to solve the problem
of coercing x to Symbol in order that Symbol can be coerced to
UP(x,INT) in cases like '1 x' and 'integrate(x)'?

Or is it the case that the interpreter never tries harder than
just one coercion?

BTW, I tried specifying
\begin{axiom}
)expose Variable
\end{axiom}

but I did not see any change in Axiom's behaviour.
\begin{axiom}
1 x
integrate(x)
\end{axiom}

---------
Bill Page
--