Discussion:
Composing a programming guide for maxima
Harry Kanda
2005-08-10 13:23:34 UTC
Permalink
Hi guys,

I'm planning on writing some documentation for maxima programming
the kind of things to expect, simple concepts about programming for
mathematicians.

Having had to use it this summer for a project (STACK), i feel that maxima
could do with some newbie documentation. So, all i'm asking is
what kind of things do you guys want to see in it?

Also if you have any other suggestions feel free to give me a shout.

Harry.

PS I've been programming for a number of years now and a good newbie
guide is always
essential ;)
C Y
2005-08-11 04:02:17 UTC
Permalink
Post by Harry Kanda
Hi guys,
I'm planning on writing some documentation for maxima programming
the kind of things to expect, simple concepts about programming for
mathematicians.
Cool!
Post by Harry Kanda
Having had to use it this summer for a project (STACK), i feel that
maxima could do with some newbie documentation. So, all i'm asking is
what kind of things do you guys want to see in it?
Ah, where to begin...

I was and am planning something similar to be part of Maximabook. Here
are my notes thus far about what would be good (undoubtedly more
experienced folk can make better suggestions):

Programming in Maxima Language:

1. block
2. local variables within block
3. for do, if then, while do
4: trick of using apply when you want to evaluate both arguments
5: other stuff in current programming chapter of Maximabook (not well
integrated yet - need to read section on functions with arbitrary
number of args myself!)

Programming Maxima in Lisp

1. :lisp();
2. ?print, other uses of ?
3. to_lisp();, (to-maxima)
4. mapping of the Maxima variable a to the lisp variable $a
5. maximafunction -> ($maximafunction )
6. comprehensive listing of, and careful and thorough description of
the purpose and behavior of, normal lisp tools and special macros
common in Maxima. For starters (there are many more):

defmfun
defmvar
defmspec

7. kill and kill1 - customization thereof
8. Discuss this technique for redefining things in Maxima:
http://www.math.utexas.edu/pipermail/maxima/2005/010387.html
9. Using ($displa ) on the lisp command line
10. Accessing %i1 and %o1 from lisp command line

Debugging

1. Using ?print to inspect the underlying lisp form of an expression
(can sometimes reveal differences between apparently identical
expressions)
2. Maxima's debugging environment
3. the Maxima level trace command and lisp's own trace - when to use
each.
4. SLIME+CMUCL+XREF+Maxima, as per earlier discussions
Post by Harry Kanda
Also if you have any other suggestions feel free to give me a shout.
Perhaps you would consider contributing such a guide to the Maxima
book? (Assuming I get organized enough here to get back on the ball?)

Cheers,
CY

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Robert Dodier
2005-08-11 07:19:47 UTC
Permalink
Hi Harry,
Post by Harry Kanda
I'm planning on writing some documentation for maxima programming
the kind of things to expect, simple concepts about programming for
mathematicians.
That's an excellent idea. Here is my $0.02.

(1) Do not make your document comprehensive.
There is a reference manual for that.

(2) Focus on the stuff that is peculiar to Maxima.

(3) Above all, be terse, pointed, and pithy.
If you can condense the essentials into a short document
you and your readers will both be happier.
This is math -- less is more.

About item (2), what is peculiar to Maxima? I see this:
Maxima works on expressions; evaluation and simplification;
map, apply, and lambda; built-in object types; Maxima language
syntax; plus some how-to's: function definition, integrate/
differentiate, make a plot, save/load a file.

Of these topics, evaluation is probably the one which
causes the most pain and confusion.

Hope this helps -- keep us posted -- feel free to
follow up if you'd like more comments.

Robert Dodier
Robert Dodier
2005-08-11 14:49:26 UTC
Permalink
Hi Harry,

You might want to take a look at the documents in
the directory maxima/doc/ if you haven't already.
You can view these files on the web --
http://cvs.sf.net/viewcvs.py/maxima/maxima/doc/

Hope this helps,
Robert Dodier
Richard Fateman
2005-08-11 16:11:07 UTC
Permalink
I don't know what's in the directory, but you might see also

http://www.cs.berkeley.edu/~fateman/papers/neweval.pdf

and also simplifier.txt

RJF
Post by Robert Dodier
Hi Harry,
You might want to take a look at the documents in
the directory maxima/doc/ if you haven't already.
You can view these files on the web --
http://cvs.sf.net/viewcvs.py/maxima/maxima/doc/
Hope this helps,
Robert Dodier
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
Harry Kanda
2005-08-12 11:35:20 UTC
Permalink
Thanks guys that seems really helpful, of course any more contribution
would be welcome.

Here's my thoughts.

1) Basic introduction to a .mac file (cos i didn't know how to do it
when i started)

2) Structures
BLOCKs, Expressions, loops, constraints

3) Function definition

4) Easy tutorial

5) Lisp and it's uses within Maxima (from the programming areas

6) Advanced topics

What do people think?
Stavros Macrakis
2005-08-15 15:04:39 UTC
Permalink
Post by Harry Kanda
1) Basic introduction to a .mac file (cos i didn't know how to do it
when i started)
I would start with interactive use, not batch files.
Post by Harry Kanda
2) Structures
BLOCKs, Expressions, loops, constraints
A very important topic is the use of symbols *both* as mathematical
variables *and* as programming variables. This is a common stumbling
block in working with Maxima programming.

What do you mean by constraints? Assertions?

You should probably have a section on working with the various Maxima
data types, notably:

-- symbols
-- general symbolic expressions (part, inpart, op, etc.)
-- lists and matrices
-- arrays (though I would mostly suggest that users avoid them)
-- numbers
Post by Harry Kanda
5) Lisp and it's uses within Maxima (from the programming areas
I don't think this belongs in an introduction to Maxima programming.
I think it is a completely separate topic.
Post by Harry Kanda
6) Advanced topics
I think the hardest part is getting the basics right.

-s
Daniel Lyddy
2005-08-15 15:44:38 UTC
Permalink
Harry:

Someone named Boris Gaertner wrote a short Maxima
Tutorial. You may wish to use his version as a
starting point, or maybe even involve him in your
version.

http://www.bgaertner.gmxhome.de/Maxima.htm

Contact information is available on his home page:

http://www.bgaertner.gmxhome.de/

Dan
Post by Harry Kanda
Post by Harry Kanda
1) Basic introduction to a .mac file (cos i didn't
know how to do it
Post by Harry Kanda
when i started)
I would start with interactive use, not batch files.
Post by Harry Kanda
2) Structures
BLOCKs, Expressions, loops, constraints
A very important topic is the use of symbols *both*
as mathematical
variables *and* as programming variables. This is a
common stumbling
block in working with Maxima programming.
What do you mean by constraints? Assertions?
You should probably have a section on working with
the various Maxima
-- symbols
-- general symbolic expressions (part, inpart,
op, etc.)
-- lists and matrices
-- arrays (though I would mostly suggest that
users avoid them)
-- numbers
Post by Harry Kanda
5) Lisp and it's uses within Maxima (from the
programming areas
I don't think this belongs in an introduction to
Maxima programming.
I think it is a completely separate topic.
Post by Harry Kanda
6) Advanced topics
I think the hardest part is getting the basics
right.
-s
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Loading...