\start
Date: Tue, 21 Jan 2014 09:02:50 +1100
From: Alasdair McAndrew
To: list
Subject: A few issues with a newly compiled axiom

I have just compiled and installed axiom on Ubuntu 12.04, following the
Ubuntu instructions here:

http://www.axiom-developer.org/axiom-website/download.html

and I installed my axiom in  /opt/axiom However:

(1) hypertex doesn't start; instead I get an error message:

"(HyperDoc) Warning: Not connected to AXIOM Server!
ReadBitmapFile: File
>/opt/axiom/mnt/ubuntu/share/hypertex/bitmaps/menudot.bitmap< not found"

which would seem to indicate that hypertex is looking somewhere else for
its files.  Does this mean that hypertex needs to be compiled separately,
or is it just a matter of fixing up a configuration file somewhere?

(2) I can't get axiom to work in TeXmacs.  Even though axiom is in my path,
and TeXmacs is started from a shell which includes the correct values for
PATH and AXIOM, "Axiom" doesn't exist as a possible session type.

(3) Can I get axiom to play nicely with GNU-Readline?  I'd like my Home and
End keys to go to those places on an input line, and also Ctrl-A and
Ctrl-E.  Or can I set up some environment variables somewhere which will
allow this?  (I started axiom within the KDE Konsole; I guess I could try
another terminal emulator - there are lots to choose from!)

\start
Date: Tue, 21 Jan 2014 00:38:10 -0500
From: Tim Daly
To: Alasdair McAndrew
Subject: Re: A few issues with a newly compiled axiom

I will look into your questions as soon as I can -- Tim

\start
Date: Wed, 22 Jan 2014 08:54:19 +1100
From: Alasdair McAndrew
To: Tim Daly
Subject: Re: A few issues with a newly compiled axiom

I should mention that I have the same errors with a compiled axiom, the
axiom from the Ubuntu repositories (installed with sudo apt-get install
axiom), and the axiom Ubuntu binaries downloaded and installed from the
axiom-developer.org site.

On Tue, Jan 21, 2014 at 4:38 PM, Tim Daly wrote:

> I will look into your questions as soon as I can -- Tim

\start
Date: Thu, 23 Jan 2014 11:12:34 +1100
From: Alasdair McAndrew
To: list
Subject: "Sage-type" notebook in a web browser

One of the to-do's at

http://www.axiom-developer.org/axiom-website/currentstate.html

is "Write Notebook Front End".

I think that this should be do-able by somebody with expertise, and with
time on their hands (i.e, not me!).  Sage does it by simply piggy-backing
on iPython (http://ipython.org/), which provides a full API for a web-based
notebook.

Other languages which have used iPython for this include Julia (
http://julialang.org/), with its IJulia package (
https://github.com/JuliaLang/IJulia.jl) and Haskell with IHaskell (
https://github.com/gibiansky/IHaskell).  Other examples are given at
https://github.com/ipython/ipython/wiki/Projects-using-IPython.  Given
iPython, I would have thought that it would be quite possible to write a
front end for Axiom, which applies LaTeX to the output so as to give nicely
formatted display (again, I think this is provided by iPython).

One of the problems seems to me is that for whatever reason, Axiom is niche
software, and doesn't have the user base of either Maxima or Sage.  It
might be hard to garner support for such projects as this.

\start
Date: Wed, 22 Jan 2014 22:23:02 -0600
From: Tim Daly
To: Alasdair McAndrew
Subject: "Sage-type" notebook in a web browser

> One of the to-do's at
> 
> http://www.axiom-developer.org/axiom-website/currentstate.html
> 
> is "Write Notebook Front End".
> 
> I think that this should be do-able by somebody with expertise, and with
> time on their hands (i.e, not me!).  Sage does it by simply piggy-backing
> on iPython (http://ipython.org/), which provides a full API for a web-based
> notebook.
> 
> Other languages which have used iPython for this include Julia (
> http://julialang.org/), with its IJulia package (
> https://github.com/JuliaLang/IJulia.jl) and Haskell with IHaskell (
> https://github.com/gibiansky/IHaskell).  Other examples are given at
> https://github.com/ipython/ipython/wiki/Projects-using-IPython.  Given
> iPython, I would have thought that it would be quite possible to write a
> front end for Axiom, which applies LaTeX to the output so as to give nicely
> formatted display (again, I think this is provided by iPython).
> 

I've already implemented some of the functionality.

The browser front end contains code to communicate directly to Axiom.
You can type in an equation which gets sent to Axiom and the result
is displayed back in the browser. Some of the Hyperdoc pages have
already been rewritten and work properly. See Volume 11: Axiom Browser
(http://en.wikipedia.org/wiki/Axiom_(computer_algebra_system)

I do not use Python. It is Lisp talking to Javascript.

I have experimented with a re-implementation using web sockets
but I haven't got a completely working Lisp web socket interface yet.
Either my browser doesn't implement web sockets correctly yet or
I'm being thick about reading the specs. Anyway we both know that
"There is no such thing as a simple job."

Everything takes time. Hence the phrase "The 30 Year Horizon".

> One of the problems seems to me is that for whatever reason, Axiom is niche
> software, and doesn't have the user base of either Maxima or Sage.  It
> might be hard to garner support for such projects as this.

So? All mathematical software is niche software. It is not about the
current user base.  The long term issue is how it will be maintained. 
It is my claim, based on experience, that unless great effort is made 
to communicate to the next generation, any piece of software will die. 

See http://www.ams.org/notices/201202/rtx120200320.pdf

... therefore literate programming.

\start
Date: Thu, 23 Jan 2014 01:21:51 -0600
From: Tim Daly
To: Alasdair McAndrew
Subject: "Sage-type" notebook in a web browser

> Thank you for your reply!  I've had a quick go at installing the browser
> interface (with instructions at the start of bookvol11.pdf).  I thought I'd
> try installing everything in my home directory, under /home/amca/axiom, but
> it seems that some of the material is coded to use /home/silver - which
> means I would have to add a new user to the system.  

Sorry about the 'silver' thing. The code is still being written and is
not yet 'production ready' so I haven't said much about it here. There
is still a lot of work to do before it replaces Hyperdoc although most
of it is low-level grind-it-out things I know how to do. Time, yaknow?

> What do you thing about using iPython, though?

I've used Python professionally. It is quite nice for simple scripts
and small problems. However, I ran into several issues, the most annoying
of which was the Python 2.7 vs Python 3.+ issue. Since it lacks a standard
(ala Common Lisp) I spent a lot of time wrestling with compatibility.

For instance, I started in Python 3.1 and decided to use a GUI library
which only ran on 2.7. I also had trouble with distribution issues as
the customer systems had incompatible versions.

I suspect that Sage will eventually have a huge issue when 2.7 disappears
since the 3.+ versions are not at all compatible.  Who is going to rewrite
PhD-thesis level algorithms in areas where they are not the author? Who
knows why PHI has the value 3.17313?

Anyway, I've been making sure that I minimize the number of languages
in Axiom. Meta is gone. Boot is gone. Noweb is disappearing. C is being
rewritten out of the system. Make will disappear eventually. So I 
certainly have no plans to introduce Python. 

> When I said Axiom was a "niche system", I meant in no way to belittle it -
> I think Axiom has qualities far and above every other system currently
> available - it just seems to me to have a small user-base (worse because of
> the fracturing into different forks), and hence work devolves to a very
> small number of people.  As for long-lived software, I don't know - the
> software with the longest lives seem to be programming languages (Fortran,
> Basic, C) with a large market.  But for any other system to survive, as you
> say, it has to be maintainable in the long term.

Axiom was a research project, never intended to be released to the world.
The algebra was written by people who invented the theory as part of their
PhD research. As such there was no motivation to write words to communicate
the ideas to anyone who might need to maintain it (me, mostly :-) ) since
I could just ask the soul next door.

Some of those "soul next door" people from the project are dead (e.g.
Richard Jenks, Manuel Bronstein, Chris Sundarasan, etc) making it
rather more difficult to get answers. In "The 30 Year Horizon" I
suspect that number will grow, unfortunately. Even those that are alive
do not maintain the code they wrote as they have better things to do.

So the model was "write the code, throw it on the heap, and hope it
never needs maintaining". That makes the "hill" you have to climb to
be part of the "user-base" very steep. That might be fine for a research
tool but not for public code. It is simply short-sighted, and rather
unprofessional in my opinion, to write computational mathematics for
public consumption with such an attitude.

I realize that it is pompous of me to make these claims. However, 
historically speaking, mathematics had the same kind of "hand wave"
approach to proofs in the 19th century. The 20th century raised the
standard, much to the improvement of mathematics. I believe we need to
"raise the standard" of computational mathematics to a level where the
code is explained well enough in natural language and equations that
it could be reproduced.

If we can't reproduce it then we don't understand it. If we don't understand
it then the code is dead. Axiom should live. Thus, I'm being a complete
curmudgeon about expected standards for computational mathematicians.

Computational mathematics that can be read, understood, and reproduced
can also be maintained, modified, and extended by someone who is not the
original author. In other words, live code, long-term progress in 
computational mathematics, and a potentially larger user base.

Tim
Curmudgeon-at-Large.

\start
Date: Thu, 23 Jan 2014 10:30:38 -0500
From: Tim Daly
To: Alasdair McAndrew
Subject: Re: "Sage-type" notebook in a web browser

> I'll write the answer you deserve soon, but just one point: according to
> the inverse symbolic calculator at http://isc.carma.newcastle.edu.au/index,
> 3.17313 is the value (among other things) of (23+11*sqrt(5))/15.  I grew up
> thinking that phi was the "golden ratio" of (1+sqrt(5))/2 - but I don't see
> the immediate connection.

The fact that you can't reverse-engineer a constant without knowing the
author's intention IS the immediate connection. 

There is a great book which is written in a literate programming style
called "Implementing Elliptic Curve Cryptography" by Michael Rosing.
(I highly recommend this book as an example of literate style)

In it Rosing has a C constant DEFINED (I don't have my copy handy so
this isn't exact but...)

   #DEFINE numbits 193

He comments that numbits is arbitrary and can be changed at will.

Now suppose you had a copy of the program without the literate text.
And suppose you needed a subroutine where "numbits" was locally 
required to be 255 for some small part of the calculation. It is
very likely that you'd either make a new variable "myNumBits" or
shadow the global value or hard-code your 255. 

You'd be forced into this compromise because it might be too time
consuming or too difficult to ensure that the code is insenstive to
the value of numbits and could be changed globally. Now multiply
this change by 30 other people making local "myNumBitsAlso" and
you can see the intellectual tangle arise in the code base.

In the literate version you know the "author's mind" and can make
the global change with confidence and little thought. And as the
program is literate you ought to modify the global constant to say

   #DEFINE numbits 255

   This constant is globally free to be changed but the foobar
   subroutine depends on the value being a minimum of 255. The
   subroutine uses this as a bitmask to ....

Now consider the same situation where you read:

   PHI = 3.17313

without comment or explanation or any other connection to the 
theory or the implementation. You get to guess. In a really
complex algorithm in an area where you are not the author or
not a PhD in that subject it is unlikely that you have the
background to guess correctly. Or there may be no background
at all since the value might just be a fudge factor that "works".
Who knows?

The author has failed to communicate. 

\start
Date: Sun, 26 Jan 2014 16:04:37 -0600
From: Tim Daly
To: list
Subject: Academy Award goes to a literate program

>From http://lambda-the-ultimate.org/node/4876:

Matt Pharr, Greg Humphreys, and Pat Hanrahan have recently been given an
Academy Award for Technical Achievement, for the book Physically Based
Rendering. This is the first time the award has been given to a book and
(more relevant to LtU) the first time a literate program has won an
Academy Award.

\start
Date: Tue, 28 Jan 2014 06:05:50 -0600
From: Tim Daly
To: list
Subject: Reproducible Research

I would strongly recommend that you watch this video.
This uses Emacs+org-mode and shows impressive results.

http://www.youtube.com/watch?v=1-dUkyn_fZA



