\start
Date: Thu, 1 Jul 2010 10:23:00 +0200 (CEST)
From: Fabio Stumbo
To: list
Subject: Re: Memory limit.

First of all, thanks for having isolated the question in a new thread.

Moreover, let me also say that my question arises from the fact that 
during some computations axiom aborts, after some hours, with the 
following error message

--------------
(150) ->

    >> System error:
    The storage for CONS is exhausted.
Currently, 65542 pages are allocated.
Use ALLOCATE to expand the space.
--------------


>> Using all the ram is another problem: should I post it in a new, different
>> thread?
>>
>
>>>>
>>>> What about the RAM? Is it a trivial question?
>>>> If I am not wrong, axiom uses only up to 1Gb of RAM: on modern systems this
>>>> can be a limit.
>>>>
>
> AFAIK this limitation has little to do with Axiom, it comes from GCL.
> IIRC that this is unavoidable using GCL 2.6.7. When using GCL 2.6.8
> I think it is possible to enlarge the limit.  This question came out
> few years ago and Camm Maguire (main GCL developer) gave the answer.
> Either search the list archives or try to contact Camm.
>
> --
>                              Waldek Hebisch

Before posting, I searched on the list archives.

Apart of finding a message of myself (in 2008) with the same
problem... :-(  I saw that the question is probably related to GCL but I 
couldn't realize how to solve it.
I tried

)lisp (ALLOCATE 'cons 200000 t))

changing the value in different ways but as long as I can guess from 
)lisp (room)
it doesn't increase the total amount of available RAM (i.e., maximum 
pages, which is always 262144, that is 1 Gb, if I am not wrong).

So, are you telling that I should install GCL 2.6.8 and after I would be 
able to increase it? How?

\start
Date: Thu, 1 Jul 2010 10:37:23 +0200 (CEST)
From: Fabio Stumbo
To: list
Subject: Re: Compilation problem

> I built ubuntu on a 64 bit machine and then did
> git clone http://github.com/daly/axiom.git
> cd axiom
> export AXIOM=3D`pwd`/mnt/ubuntu
> export PATH=3D$AXIOM/bin:$PATH
> make
>
> and it builds properly here.
>

I tried exactly the same as you, but the result doesn't change.

The logs are here, if they can help:

log of "make": http://dl.dropbox.com/u/7972796/make-1.log

log of "make NOISE=3D": http://dl.dropbox.com/u/7972796/make-noise-1.log

Clearly, something is wrong on my machine, but I can't realize what.

Dependencies are satisfied:

[root@em243:~]# apt-get install m4 libxpm-dev libxt-dev x-dev libx11-dev
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
m4 =E8 gi=E0 alla versione pi=F9 recente.
libxpm-dev =E8 gi=E0 alla versione pi=F9 recente.
libxt-dev =E8 gi=E0 alla versione pi=F9 recente.
x-dev =E8 gi=E0 alla versione pi=F9 recente.
libx11-dev =E8 gi=E0 alla versione pi=F9 recente.
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.
[root@em243:~]# apt-get install libxext-dev gettext git-core texlive gawk=
=20
git-core
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
libxext-dev =E8 gi=E0 alla versione pi=F9 recente.
gettext =E8 gi=E0 alla versione pi=F9 recente.
git-core =E8 gi=E0 alla versione pi=F9 recente.
texlive =E8 gi=E0 alla versione pi=F9 recente.
gawk =E8 gi=E0 alla versione pi=F9 recente.
git-core =E8 gi=E0 alla versione pi=F9 recente.
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.

(it is in italian, but I imagine it can be guessed)
--8323329-895146394-1277973444=:1904--

\start
Date: Thu, 01 Jul 2010 08:10:26 -0400
From: Tim Daly
To: list
Subject: Re: Compilation problem

Can you rerun the make as root?

Fabio S. wrote:
>> I built ubuntu on a 64 bit machine and then did
>> git clone http://github.com/daly/axiom.git
>> cd axiom
>> export AXIOM=3D`pwd`/mnt/ubuntu
>> export PATH=3D$AXIOM/bin:$PATH
>> make
>>
>> and it builds properly here.
>>
>
> I tried exactly the same as you, but the result doesn't change.
>
> The logs are here, if they can help:
>
> log of "make": http://dl.dropbox.com/u/7972796/make-1.log
>
> log of "make NOISE=3D": http://dl.dropbox.com/u/7972796/make-noise-1.lo=
g
>
> Clearly, something is wrong on my machine, but I can't realize what.
>
> Dependencies are satisfied:
>
> [root@em243:~]# apt-get install m4 libxpm-dev libxt-dev x-dev libx11-dev
>
> (it is in italian, but I imagine it can be guessed)

\start
Date: Thu, 1 Jul 2010 18:28:30 +0200 (CEST)
From: Fabio Stumbo
To: list
Subject: Re: Compilation problem

> Can you rerun the make as root?
>

Sure I can.
And I am doing it.
It is compiling and up to now, without errors.
It already passed the critical point.
Meanwhile, in another shell I started a compilation as normal user and it 
already stopped at the usual point.

As soon as the root shell will terminate I will submit the logs, if it is 
of some use.

\start
Date: Thu, 01 Jul 2010 12:35:14 -0400
From: Tim Daly
To: list
Subject: Re: Compilation problem

what are your ulimit settings?

ulimit -a

Fabio S. wrote:
>> Can you rerun the make as root?
>>
>
> Sure I can.
> And I am doing it.
> It is compiling and up to now, without errors.
> It already passed the critical point.
> Meanwhile, in another shell I started a compilation as normal user and 
> it already stopped at the usual point.
>
> As soon as the root shell will terminate I will submit the logs, if it 
> is of some use.

\start
Date: Thu, 1 Jul 2010 18:44:46 +0200 (CEST)
From: Fabio Stumbo
To: list
Subject: Re: Compilation problem

[em243 18:43:20 axiom]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

This as user. As root it is the same.


> what are your ulimit settings?
>
> ulimit -a
>
>
> Fabio S. wrote:
>>> Can you rerun the make as root?
>>> 
>> 
>> Sure I can.
>> And I am doing it.
>> It is compiling and up to now, without errors.
>> It already passed the critical point.
>> Meanwhile, in another shell I started a compilation as normal user and it 
>> already stopped at the usual point.
>> 
>> As soon as the root shell will terminate I will submit the logs, if it is 
>> of some use.

\start
Date: Thu, 1 Jul 2010 18:50:59 +0200 (CEST)
From: Fabio Stumbo
To: list
Subject: Re: Compilation problem

> Can you rerun the make as root?

Compilation ended. It seems ok. At least, I have the binary...

Here is the log

http://dl.dropbox.com/u/7972796/make-root.log

I am also making another test: I created a new ubuntu box in virtualbox 
and I didn't touch anything, just the minimum for compiling. I just 
started compilation there.

\start
Date: Fri, 2 Jul 2010 12:34:25 +0200 (CEST)
From: Fabio Stumbo
To: list
Subject: Re: Compilation problem

Maybe I solved my problem.
At least, I have found the cause, but not the reason.

I said that I created a new ubuntu box: it compiled there.

So the problem was in my settings.

I created a new user on my (real) machine: on the new user, it compiled.

So the problem was in my _user_ settings.

I made many tests (removing personal settings in .bashrc, .profile and so 
on).

The only thing that helped was removing my ~/.axiom.input

After removing that file, the compilation is going on: it is not yet 
finished but it has gone well past the point where it usually stops.

The content of the .axiom.input file is

-----
++ Copiare questo file nel file "axiom.input" nella propria HOME affinche'
++ axiom lo esegua in partenza
)set            quit                    unprotected
)set            functions compile       on
)set            message time            on
++)set            output                  length  137
)set            output                  length  96
)synonym        uscita                  set output algebra
++)lib /home/stumbo/Axiom_lib/OFMONOID
-----

\start
Date: Thu, 08 Jul 2010 12:23:40 +0400
From: Grigory Sarnitskiy
To: list
Subject: Syntax highlighting.

Hello, I wonder what text editors are capable of syntax highlighting for axiom input files.

I'm sure, even if there are no such default feature somebody here has written it for his own usage.

Ideally, I would like to find .lang file for gtkSourceView to use in gedit.

\start
Date: Fri, 09 Jul 2010 12:30:15 +0400
From: Grigory Sarnitskiy
To: list
Subject: Understanding Axiom.

I think I don't understand some aspects of Axiom.

Imagine I want to have a function that returns the derivative of real-valued function of one real variable, something like

Deriv  : ((Float) -> Float) -> ((Float) -> Float)

I want Deriv to handle symbolic computation, not (Deriv f) to be some numeric algorithm to return value for every point.
So may be for symbolic computation I need another type, not ((Float) -> Float) -> ((Float) -> Float) ?

What type should I use to deal symbolically with real valued functions of real valuables? I guess most natural type like (Float -> Float) won't help.

\start
Date: Fri, 09 Jul 2010 10:48:41 +0200
From: Martin Rubey
To: Grigory Sarnitskiy
Subject: Re: Understanding Axiom.

Grigory Sarnitskiy writes:

> I think I don't understand some aspects of Axiom.
>
> Imagine I want to have a function that returns the derivative of real-valued function of one real variable, something like
>
> Deriv  : ((Float) -> Float) -> ((Float) -> Float)
>
> I want Deriv to handle symbolic computation, not (Deriv f) to be some numeric algorithm to return value for every point.
> So may be for symbolic computation I need another type, not ((Float) -> Float) -> ((Float) -> Float) ?

> What type should I use to deal symbolically with real valued functions
> of real valuables? I guess most natural type like (Float -> Float)
> won't help.

Precisely.  

There are several options, depending on your situation.  The most
general type is Expression Integer:

(1) -> ex := D(exp(x*(log x)), x)

                      x log(x)
   (1)  (log(x) + 1)%e
                                                    Type: Expression(Integer)
To evaluate at a point, use

(2) -> eval(ex, x=1)

   (2)  1
                                                    Type: Expression(Integer)
(3) -> eval(ex, x=%e)

           %e
   (3)  2%e
                                                    Type: Expression(Integer)
(4) -> eval(ex, x=y)

                      y log(y)
   (4)  (log(y) + 1)%e
                                                    Type: Expression(Integer)

Note that we are dealing here not really with functions, but rather with
"expressions" (roughly: with elements of a differential algebra).  The
main drawback of Expression Integer is that there is no reliable way to
test whether two expressions are equal (that's shown to be impossible).
Sometimes you can get by using "normalize":

(1) -> ex1 := exp(x+log x); ex2 := x*exp x;

                                                    Type: Expression(Integer)
(2) -> (ex1 = ex2)@Boolean

   (2)  false
                                                                Type: Boolean
(3) -> zero?(ex1 - ex2)

   (3)  false
                                                                Type: Boolean
(4) -> normalize(ex1) - normalize(ex2)

          log(x) + x       x
   (4)  %e           - x %e
                                                    Type: Expression(Integer)
(5) -> normalize(ex1 - ex2)

   (5)  0
                                                    Type: Expression(Integer)

If you have only rational functions, use Fraction Polynomial Integer
(short: FRAC POLY INT), where it is always possible to decide equality.

Finally, if you know that your functions are algebraic, or satisfy a
linear differential equation, or are differentially algebraic, I have
experimental code that deals with those...

I'd need more info to give a better answer.

\start
Date: Fri, 9 Jul 2010 20:38:05 +0200 (CEST)
From: Franz Lehner
To: Grigory Sarnitskiy
Subject: Re: Syntax highlighting.

On Thu, 8 Jul 2010, Grigory Sarnitskiy wrote:
> Hello, I wonder what text editors are capable of syntax highlighting for 
> axiom input files.
I personally use Ralf's aldor-mode for emacs in one buffer for editing
  https://portal.risc.jku.at/Members/hemmecke/aldor/emacs
and Martin's emacs interface (included with fricas, don't know about axiom)
in another for executing.

\start
Date: Fri, 9 Jul 2010 20:47:29 +0200 (CEST)
From: Franz Lehner
To: Grigory Sarnitskiy
Subject: Re: Understanding Axiom.

On Fri, 9 Jul 2010, Grigory Sarnitskiy wrote:
> Imagine I want to have a function that returns the derivative of real-valued function of one real variable, something like
>
> Deriv  : ((Float) -> Float) -> ((Float) -> Float)
As Martin wrote, axiom only handles derivatives of expressions.
In Leibniz' times every function was an expression, nowadays this is not 
true anymore.
In Axiom an object of type Float->Float is a function in the sense of 
programming, i.e., it takes an object of type float and returns an object 
of type float.
You can always turn an expression into a function in this sense:
(1) -> y:=sin x + 1

    (1)  sin(x) + 1
                                                     Type: Expression(Integer)
(2) -> function(y,f,x)

    (2)  f
                                                                  Type: Symbol
(3) -> f(u)
    Compiling function f with type Variable(u) -> Expression(Integer)

    (3)  sin(u) + 1
                                                     Type: Expression(Integer)
(4) -> f(1.0)
    Compiling function f with type Float -> Float

    (4)  1.8414709848 078965067
                                                                  Type: Float

\start
Date: Mon, 12 Jul 2010 15:11:36 -0700 (PDT)
From: Tim Daly
To: list
Subject: Re: Rule-based integration

On Jul 12, 3:32=A0pm, Richard Fateman <fate...@cs.berkeley.edu> wrote:
> There are issues in pattern matching that are fairly subtle, and may
> not be obvious to the casual reader (or programmer).
>
> For example, you may have a rule that works to integrate
>
> exp(n*x) * x^m =A0wrt x.
> Mathematica 7 gives
>
> -E^(-n x) (E^x)^n x^(1 + m) (-n x)^(-1 - m) Gamma[1 + m, -n x]
>
> now if we substitute n->0, we should get something like
>
> If m=3D-1 then log(x) =A0else x^(m+1)/(m+1)
>
> but
> mathematica gives
> -0^(-1 - m) x^(1 + m) Gamma[1 + m, 0]
> and actually, for integral of x^m, it still does not include the log
> possibilities.
>
> But back to patterns. =A0If we try to classify the pattern for
> exp(n*x)*x^m, =A0we might say that this rule applies to
> products of exponentials and powers.
>
> but perhaps it is also a rule that applies to
> products of exponentials and symbols like x, =A0where of course x^1 is a
> power, but simplified to x.
>
> or maybe it is a rule that applies just to exponentials, since x^0 is a
> power, but but simplified to 1, after which the "product" disappears
> entirely.
>
> This is all to provide a specific example of a kind of rule that may
> crop up fairly often..
>
> Consider a rule that for particular functions f,g,h =A0 like (say) exp,
> log, sin, power, ...erf, gamma, ... says how to integrate f^n*g^m*h^k ..
>
> given a particular expression to integrate, it might be missing some
> power, or even missing some function entirely. =A0This makes finding the
> right rules more difficult.
>
> The trick in assembling large numbers of rules is to make sure you don't
> have to run them all, but only that (one hopes) very small subset that
> is likely or even possible to match.
>
> I think it is great that Rubi may be adapted for free software systems.
>
> RJF

There has been some initial discussions between myself, Albert Rich,
and David Parnas about how to think about this problem.

My current thinking involves a tree-structuring of the rule patterns
where each node in the tree represents one or more pattern
tables and each edge is a function (e.g. division operation, etc).
Walking the input expression walks the tree to find applicable
patterns.
Because a pattern table can be reached from many different paths the
"tree" is actually a graph. Each table specifies an input pattern and
an output pattern and the output pattern points to another node.

So far all I have are "paper studies" using index cards as the tables.

I looked at constructing a Rete pattern match (Charles Forgy, OPS5)
but there are only a small number of rules that can be applied so
there is not much depth. I also don't know quite how to factor the
"meta rules" into a Rete network.

There are a lot of interesting questions that arise, such as the
issue of branch cuts and choice of trigonometric identities that
get applied (which can easily lead to cycles).

The problem also seems ideal for a parallel decomposition because
I can see multiple patterns applied in any situation (e.g. making
various choices for integration by parts).

Special functions are also a question... is it better to leave the
result as sin(x)/x or to choose sinc(x). The first is easier to
combine with other results but the second is shorter to represent.
Albert measures the number of leaf nodes as a measure of simplicity.
Unfortunately, "simplicity" is in the eye of the beholder. Axiom
generally deals with the simplicity issue by making different domains.
Thus in the domain of Polynomials with fractional coefficients the
"simple" form is:

(1/3)*x^2+7

but in the domain of fractions of polynomials with integer
coefficients
we see the same answer as:

(x^2+21)/3

The "simple" form depends on the domain. This raises interesting
questions for some intermediate domains to express patterns rather
than using the general "Expression(Integer)" domain. The same
"pattern table" advocated by Parnas might generate multiple results
depending on the target domain. Axiom is ideal for this but it
requires a lot of thought.

\start
Date: 13 Jul 2010 15:43:56 +0200
From: Daniel Cordeiro
To: Daniel Cordeiro
Subject: PASCO 2010: Programming Challenge

   Matrix product over multi-precision integer and gcd computation
                http://pasco2010.imag.fr/contest.html
                         21st-23rd July 2010

                   PASCO 2010 Programming Challenge
                      http://pasco2010.imag.fr/


Call for Participation
----------------------

Since the  80s and  during the  90s a lot  of parallel  algorithms was
proposed  for computer  algebra.  Thus,  30 years  after  few computer
algebra  system  are able  to  exploit  modern parallel  architectures
multi-core, cluster  and GPUs. The International  Workshop on Parallel
and Symbolic Computation (PASCO) is a series of workshops dedicated to
the promotion  and advancement of parallel algorithms  and software in
all areas of symbolic mathematical computation. The pervasive ubiquity
of  parallel  architectures  and  memory  hierarchy  has  led  to  the
emergence  of a  new quest  for parallel  mathematical  algorithms and
software capable of exploiting the various levels of parallelism: from
hardware  acceleration  technologies  (multi-core and  multi-processor
system  on  chip,  GPGPU,   FPGA)  to  cluster  and  global  computing
platforms.   To   push  up  the  limits  of   symbolic  and  algebraic
computations, beyond  the optimization of the  application itself, the
effective use of a large number  of resources -- memory and general or
specialized computing units --  is expected to enhance the performance
multi-criteria objectives:  time, energy consumption,  resource usage,
reliability.   This   year  the  PASCO  2010   workshop  organize  two
programming  challenges on  ones  of the  most fundamental  algorithms
arising in computer algebra  and providing rich opportunities for high
performance computing. The two  problems are matrix multiplication and
gcd computations. Instances of the problems are given on the web site.

The  competition   will  take  place   live  during  the   PASCO  2010
workshop. The results of the  competition will be presented as part of
the PASCO 2010 program. All participating teams will run their program
on a selected  set of the problems. The rule of  the game is available
on         the         PASCO         2010        workshop         site
[http://pasco2010.imag.fr/contest.html].   We  strongly encourage  all
developers  of parallel  program  or developers  of parallel  computer
algebra  system tools to  participate in  the competition.   Teams are
invited to send a declaration  of participation as soon as possible by
sending   a  mail  to   the  PASCO   2010  conference   organizers  at
pasco2010@imag.fr with the following information:

* The  name of  the  team  and the  contact  information (name,  email
address,  institution  or company)  of  each  team  member willing  to
participate to the  PASCO 2010 programming contest;

* The name of the contact person (interlocutor and team
representative).

Accounts will  be created on machine  to allow teams  to prepare their
competition.


Important dates
---------------

Team declaration of participation:   19 July 2010
Preparation of the team:             From 18 June until 20 July (remotely)
Final preparation day:               Wednesday 21 July 2010 at the Conference location
Face to face challenge:              Thursday 22 July 2010

Publication of the results during the Conference banquet.


\start
Date: Thu, 15 Jul 2010 19:27:31 +0200
From: Vladimir Skokov
To: list
Subject: repeated series expansion

--001485f2775c001e41048b706c4c

Dear All!!!

I am new at Axiom... Could you help  me how do I do the repeated series
expansion, eg.

series( series(sin(x*cos(y)),x=0), y=0)

thank you in advance

--001485f2775c001e41048b706c4c

Dear All!!!=A0<br>
<div><br></div><div>I am new at Axiom...=A0Could you help =A0me how do I do=
 the repeated series expansion, eg.=A0</div><div><br></div><div>series( ser=
ies(sin(x*cos(y)),x=3D0), y=3D0)</div><div><br></div><div>thank you in adva=
nce=A0</div>

<div><br></div>

--001485f2775c001e41048b706c4c--


\start
Date: Sun, 18 Jul 2010 19:01:21 +0200
From: Guillaume Yziquel
To: list
Subject: Embedding Axiom as an OCaml library.

Hello.

I would appreciate embedding Axiom as an OCaml library.

Looking around in the (huge) documentation of Axiom hasn't been 
extremely fruitful to gather the information that I need.

 From what I gather, Axiom, as it is currently distributed in Debian, is 
a modified version of Lisp, with a rather specific language, namely 
spad, and various packages compiled to native code, and accessible from 
the interpreter.

I do not binding interpreters and such, but I'd appreciate informations 
on where to look for the things to bind.

I'd first be interested in importing or replicating the hierarchy to 
include at least the ring of polynomials over the field of real numbers.

How difficult does that seem to be?

All the best,

\start
Date: Sun, 18 Jul 2010 19:59:04 -0400
From: Tim Daly
To: Guillaume Yziquel
Subject: Re: Embedding Axiom as an OCaml library.

Axiom isn't structured to be used as a library.
The only place I've ever seen it embedded is in Sage.
They use pexpect to capture the Axiom input and output.

Axiom can be configured to work as a server.
Currently it will talk to a firefox browser.
The code interface is rather specific to this application.
I'm not sure if a "server mode" fits your design
but it is a good idea to have it specified.

I will give some thought to writing a specification of
this protocol and generalizing the communication.
It would be possible to construct a JSON output mode
of Axiom so it can communicate through that format.

Tim

Guillaume Yziquel wrote:
> Hello.
>
> I would appreciate embedding Axiom as an OCaml library.
>
> Looking around in the (huge) documentation of Axiom hasn't been 
> extremely fruitful to gather the information that I need.
>
> From what I gather, Axiom, as it is currently distributed in Debian, 
> is a modified version of Lisp, with a rather specific language, namely 
> spad, and various packages compiled to native code, and accessible 
> from the interpreter.
>
> I do not binding interpreters and such, but I'd appreciate 
> informations on where to look for the things to bind.
>
> I'd first be interested in importing or replicating the hierarchy to 
> include at least the ring of polynomials over the field of real numbers.
>
> How difficult does that seem to be?

\start
Date: Mon, 19 Jul 2010 10:17:26 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: Embedding Axiom as an OCaml library.

Waldek once wrote some code to use FriCAS as a Lisp library.  Possibly
you get some hints there, how to do something similar for OCAML and
Axiom

\start
Date: Wed, 21 Jul 2010 13:38:08 -0400
From: Tim Daly
To: clojure@googlegroups.com
Subject: Re: Literate Clojure - a good lead ...

Antony Blakey wrote:
> On 21/07/2010, at 10:29 PM, Tim Daly wrote:
>
>   
>> The PLT Scheme mechanism mentioned above is a good idea
>> but it has a niche quality to it.
>>
>> Latex is an industry standard publication language. Many
>> books and technical papers, especially in mathematics,
>> use it. Some conferences require it. All publishers support
>> it and it is widely used.
>>     
>
> Going from the PLT form to Latex is possible. Why use Latex when you can use Clojure?

The essence of literate programming is writing for humans.
My main example is "Lisp In Small Pieces" which is a full lisp with
a compiler written as a readable book. So the primary focus is the
text, not the code. "Clojure in Small Pieces" would be fantastic.

It is always possible to go from a "program documentation" language
to latex since latex is just a document markup language. The problem is
the mindset that this is "program documentation" rather than a book
for humans to read, cover to cover. Wouldn't it be nice to read a book
that, oh-by-the-way, has the actual source code not only explained but
motivated?

I've been doing literate programming in Axiom for about 10 years now.
I've looked at a couple dozen possible tools and techniques ranging from
"use good variable names makes the code self-documenting" to
"embed the code in a special purpose tool". Programmers tend to like
things that "work from the code and comments" so they don't have to
write actual prose (e.g. javadoc, doxygen, etc). However, writing for
humans requires a completely different mindset, at least in my experience.

> The essence of the PLT model is the language integration that allows symbol resolution by reusing the language mechanism for the documentation.
>   
"Language integration" is a false goal. It is technically possible to
call functions in any language from latex but unnecessary in general.
It is technically possible to generate latex from any language.

Symbol resolution is also rarely an issue in literate programs.
Your prose is intended to explain "why" a code chunks exists,
not "how" a code chunk works. If you explain the problem you
are trying to solve and the issues of various approaches you considered
then I can usually understand the solution.

Axiom has all of the function and variable definitions and uses
cross-referenced in the index. Making these references hyperlink
in the generated pdf is trivial. Again, the problem is not a question
of technology as in the PLT Scheme approach but one of mindset.

Choosing the right approach matters. It is technically possible to
write clojure code in Microsoft word but utterly painful since MSWord
does not have a programming focus. It is possible to write a book in
PLT Scheme but painful for the same reason.

If your intention is to write a literate program, which as Knuth defined it,
to be a piece of literature, use a tool designed for literature.

I want to see a chapter in a "Clojure in Small Pieces" that explains WHY
Rich chose his data structures, why immutability is important, then why
he chose to use 32-bit wide trees, THEN show me the code. In essence
I want what Rich does not currently write, which is the agony of choice,
the ecstasy of insight, and the tragedy of implementation details. Make
me weep at the beauty of the chosen solution. Literature!

Thus I advocate the primacy of latex over that of the implementation
language magic.

P.S. The clojure team needs a job opening for "Senior Editor" :-)

\start
Date: Wed, 21 Jul 2010 22:37:28 -0400
From: Tim Daly
To: clojure@googlegroups.com
Subject: Re: Literate Clojure - a good lead ...

Antony Blakey wrote:
> On 22/07/2010, at 3:08 AM, Tim Daly wrote:
>
>   
>> "Language integration" is a false goal. It is technically possible to
>> call functions in any language from latex but unnecessary in general.
>> It is technically possible to generate latex from any language.
>>     
>
> Have you read the paper? Being able to automatically embed the output of examples is a big win IMO.
>   
Yes, I read the paper. You can call external routines to generate output 
into latex
in many systems and languages. There are many such examples:

Here you can create live 3D rendering in a pdf using latex:
http://meshlabstuff.blogspot.com/2009/03/creating-interactive-3d-objects-inside.html

Here you can render images into latex
http://www.mayer.dial.pipex.com/tex.htm

Here you can create latex from javascript:
http://code.google.com/p/jstexrender/

PDF with animations from latex:
http://www.uoregon.edu/~noeckel/PDFmovie.html

Automatic latex generation from Maple:
http://www.math.tamu.edu/~boas/courses/math696/converting-Maple-code-into-LaTeX.html

And, of course, the Haskell-in-Latex:
http://yav.purely-functional.net/haskell_latex.html

I have dozens more, since I tend to collect them. Axiom can even
generate latex (or fortran or mathml or html) automatically.
The technology isn't the point, though.

The point is that you're writing a document that happens to include code.

If you were going to write a PROGRAM you wouldn't start with latex as the
primary tool even though it is turing complete and can implement scheme.
Since the GOAL of literate programming is to write a DOCUMENT,
the primary tool is one that is designed to express documents.

I would love to see Clojure embrace literate programming. I believe that
a book that explained all of the details of why Clojure chose agents, refs,
immutable data structures, the Java integration strategy and the constraints
it imposes, the choice of lazy functions, the REPL, the AOT techniques,
the use of time and state and many other choices would make most of the
questions/comments/debates on this list pointless. People could just read
a chapter on fast-arithmetic and see the choices made. And, oh-by-the-way,
the code to implement those choices is in the book.

It would also make it easier to see when and why changes need to be made
to keep up with technology. The 32 element tree structure is almost 
certainly
a function of todays cache-line sizes. What happens when the technology
moves to light-busses and the cache-line is now 4k? Will it be meaningful
to have a 4k-per-level tree structure? What are the tradeoffs and why were
they made? Rich knows.

Instead we will continue to have a stream of people who are learning Clojure
being taught "in an oral tradition" by helpful people on the mailing 
list. And we
will have limited opportunity to contribute to the core code because 
there is a
very steep learning curve to swallow all of that code when you have to guess
what the design decisions were. It is a modern day version of the 
pre-printing
press, medieval guild-worker technology.

Clojure is moving away from the "old lisp way" of doing things but it is
continuing the tradition of "tiny-little-files-in-a-file-system 
hierarchy" from
the PDP-11/40 4k-max-file-size C programming days with make-ant-lein,
stuff-on-the-path, 60s unix techniques and mindset.

Literate programming would put it all into a book and let the machine
handle the details without the programmer knowing or caring. The book
is completely unconstrained in size since you would never print it. The
namespace issue disappears since you can simply use (hidden) section
names automatically. Tutorials become test cases as well as an
opportunity to show detailed examples. References to published papers
to support the design choices would be "expected", as in any professional
piece of technical writing.

The real benefit is in the long term. Clojure could be read and taught
without pain to a whole new generation without the original authors.
It is like Clojure discovered the printing press.

\start
Date: Wed, 21 Jul 2010 10:49:12 +1000
From: John Briggs
To: list
Subject: Axiom Source from github

  I am trying to compile axiom using the source files from github.
I have set the environment variables correctly using the generic path 
...../axiom/mnt/linux.
Because I am using the Xorg environment I had to recompile my libXpm to 
give me the static library libXpm.a and I modified Makefile.pamphlet to 
put the libXpm path to /usr/lib.

The source code seems to compile correctly but I get Failures during the 
regression testing. Is this normal?

\start
Date: Thu, 22 Jul 2010 17:05:46 -0400
From: Tim Daly
To: John Briggs
Subject: Re: Axiom Source from github

Yes, there are some "normal" failures from regression testing.
Some of the tests have random components.
I plan to move random-failing tests into their own testset.

John Briggs wrote:
>  I am trying to compile axiom using the source files from github.
> I have set the environment variables correctly using the generic path 
> ...../axiom/mnt/linux.
> Because I am using the Xorg environment I had to recompile my libXpm 
> to give me the static library libXpm.a and I modified 
> Makefile.pamphlet to put the libXpm path to /usr/lib.
>
> The source code seems to compile correctly but I get Failures during 
> the regression testing. Is this normal?

\start
Date: Sat, 24 Jul 2010 21:00:38 -0400
From: Tim Daly
To: list
Subject: Axiom July 2010 release

July 2010 Release

This release concentrated on the work of Albert Rich and his Rubi pattern
matching machinery. All of his integrals from his test suite were converted
to a regression test suite. This will form a baseline for the pattern work
in future releases. David Parnas has a table-based method of specifying
programs. Axiom is trying to synthesize this work with the pattern match
work to create pattern specifications using tables. Martin Baker added
HTML output to the system. Waldek Hebisch implemented the DoubleFloat
representation routines. Martin Rubey implemented Dirichlet.

The symbolic version of the fresnel integrals was added as well as a
numeric implementation of the fresnelC and fresnelS functions. The
output of these numeric functions were validated against Pearcy's tables,
with the comparison as part of the regression tests. Further work on
numeric approximation is ongoing and expected in the next release.

These people were added to the credits list:

  Albert D. Rich, David Parnas, Martin Baker

readme
  update credits list

Makefile
  add Mandriva
  fix environment variables
  segment test set choice from command line

books/axbook.tgz
  rewrite section 8.3.2 for current output

books/bookvol0
  rewrite section 8.3.2 for current output

books/bookvol10.2
  add fresnelS, fresnelC to LFCAT
  add test and help files for all categories

books/bookvol10.3
  add CDFMAT ComplexDoubleFloatMatrix
  add CDFVEC ComplexDoubleFloatVector
  add DIR Dirichlet
  add DFMAT DoubleFloatMatrix
  add DFVEC DoubleFloatVector
  add HTMLFORM HTMLFormat
  add fresnelS, fresnelC to EXPR

books/bookvol10.4
  add EXP3D Export3D
  add GDRAW  GnuDraw
  add fresnelC, fresnelS numeric computation to DFSFUN
  add fresnelS, fresnelC symbolics to LF, COMMONOP, LIMITPS

books/bookvol10.5
  start of numeric analysis of BLAS/LAPACK
  tighten array type declarations in BLAS
  use simple-array, not simple-vector type in BLAS

books/bookvol4
  document the Makefile build process

books/bookvol5
  change )version to include *build-version* info
  add macros to support algebra
  add Albert D. Rich, David Parnas, Martin Baker to credits

books/bookvol6
  fix deleted variable from axiom script
  remove AXIOMXLROOT reference

books/bookvol7.1
  document HTMLFormat

books/bookvol8
  add 3D graphic file format table

books/bookvolbib
  Adams [AL94], Brunelli [Bru09], Burcin [ES10], Dewar [Dew94], Golub 
[GL89],
  Higham [Hig02], Householder [Hou81], Jenks [JT18], [JT18a], [JT18b], 
[JWS87],
  Lecerf [Le96], Losch [Los60], Luke [Luk169], [Luk269], Pearcey [Pea56],
  Press [PTVF95], Taivalsaari [Tai96]

src/algebra/Makefile
  add help and test for new algebra
  handle case-insensitive MAC filesystem
  remove new algebra scaffolding code

src/doc/Makefile
  cleanly latex pure latex files

src/input/Makefile add TESTSET=notests
  add derivefail, exampleagcode, hyperell, paffexample,
  rule-based algebraic integration, rule-based rational integration,
  rule-based exponential integration, rule-based hyper integration,
  rule-based inverse hyperbolic integration, rule-based log integration,
  rule-based inverse trig integration, rule-based trig integration

zips
  remove aldor.20070901.tgz

src/input
  derivefail, examplegcode, hyperell, monitortest, paffexample,
  richalgebraic000-099, richalgebraic100-199, richalgebraic200-299,
  richalgebraic300-399, richalgebraic400-461, richerror000-078,
  richexponential, richhyper000-099, richhyper100-199, richhyper100-199,
  richhyper1000-1098, richhyper200-299, richhyper300-399,
  richhyper400-499, richhyper500-599, richhyper600-699, richhyper700-799,
  richhyper800-899, richhyper900-999, richintfunc000-032,
  richinvhyper000-099, richinvhyper100-199, richinvhyper200-296,
  richinvtrig000-092, richlog000-099, richlog100-199, richlog200-299,
  richlog300-391, richrational.input, richspecfunc000-022,
  richtrig000-099, richtrig100-199, richtrig200-299, richtrig300-399,
  richtrig400-499, richtrig500-599, richtrig600-699, richtrig700-799,
  richtrig800-899, richtrig900-920

src/interp
  i-output.lisp, vmlisp.lisp HTMLFormat support code

src/share/algebra/
  browse, category, compress, interp, operation, users daase updated
  remove libaldor.al

GCL was upgraded, thanks to Camm Maquire.

\start
Date: Mon, 26 Jul 2010 16:45:07 +0200 (CEST)
From: Franz Lehner
To: list
Subject: Re: repeated series expansion

Dear Vladimir

On Thu, 15 Jul 2010, Vladimir Skokov wrote:
> Could you help =C2=A0me how do I do the repeated series expansion, eg.=C2=
=A0
sure. One way would be to first make a series in x and then
expand the coefficients:
(1) -> )set str calc 5
(1) -> z :=3D sin(x+y)

    (1)  sin(y + x)
                                                 Type: Expression(Integer)
(2) -> s1:=3Dseries(z,x=3D0)

    (2)
                         sin(y)  2   cos(y)  3   sin(y)  4   cos(y)  5
      sin(y) + cos(y)x - ------ x  - ------ x  + ------ x  + ------ x
                            2           6          24          120
    +
        sin(y)  6   cos(y)  7   sin(y)  8   cos(y)  9    sin(y)  10      11
      - ------ x  - ------ x  + ------ x  + ------ x  - ------- x   + O(x  =
)
          720        5040        40320      362880      3628800
                    Type: UnivariatePuiseuxSeries(Expression(Integer),x,0)
(3) -> s1::UPXS(UPXS(EXPR INT,y,0),x,0)

    (3)
          1  3    1   5      7         1  2    1  4      6
      y - - y  + --- y  + O(y ) + (1 - - y  + -- y  + O(y ))x
          6      120                   2      24
    +
         1      1  3    1   5      7   2      1    1  2    1   4      6   3
      (- - y + -- y  - --- y  + O(y ))x  + (- - + -- y  - --- y  + O(y ))x
         2     12      240                    6   12      144
    +
        1      1   3     1   5      7   4     1     1   2     1   4      6 =
  5
      (-- y - --- y  + ---- y  + O(y ))x  + (--- - --- y  + ---- y  + O(y )=
)x
       24     144      2880                  120   240      2880
    +
         6
      O(x )
Type:=20
UnivariatePuiseuxSeries(UnivariatePuiseuxSeries(Expression(Integer),y,0),x,=
0)

The following does not what you want:
(4) -> z::UPXS(UPXS(EXPR INT,y,0),x,0)

    (4)
                       sin(x)  2   cos(x)  3   sin(x)  4   cos(x)  5      6
    sin(x) + cos(x)y - ------ y  - ------ y  + ------ y  + ------ y  + O(y =
)
                          2           6          24          120
Type:=20
UnivariatePuiseuxSeries(UnivariatePuiseuxSeries(Expression(Integer),y,0),x,=
0)

In general, you should be careful with EXPR INT as coefficient domain:
(5) -> s:=3Dseries(sin x,x=3D0)

             1  3    1   5      7
    (5)  x - - x  + --- x  + O(x )
             6      120
                    Type: UnivariatePuiseuxSeries(Expression(Integer),x,0)
(6) -> x*s

               x  3    x   5      7
    (6)  x x - - x  + --- x  + O(x )
               6      120
                    Type: UnivariatePuiseuxSeries(Expression(Integer),x,0)
(7) -> s1:=3Ds::UPXS(Fraction Integer,x,0)

             1  3    1   5      7
    (7)  x - - x  + --- x  + O(x )
             6      120
                      Type: UnivariatePuiseuxSeries(Fraction(Integer),x,0)
(8) -> x*s1

          2   1  4    1   6      8
    (8)  x  - - x  + --- x  + O(x )
              6      120
                      Type: UnivariatePuiseuxSeries(Fraction(Integer),x,0)

The following is also too hard for the interpreter:

(9) -> sin(x+y)::UPXS(UPXS(Fraction Integer,y,0),x,0)

    Cannot convert from type Expression(Integer) to
       UnivariatePuiseuxSeries(UnivariatePuiseuxSeries(Fraction(Integer)
       ,y,0),x,0) for value
    sin(y + x)

There is also a domain MultivariateTaylorSeries,
but no corresponding 'series' command and I don't know how to create elemen=
ts.

\start
Date: Mon, 26 Jul 2010 15:30:19 -0500
From: Tim Daly
To: Peter Thomas-Stutte
Subject: axiom graph

See the page
http://axiom-developer.org/axiom-webiste/documentation.html
in either Volume 0 or Volume 1 for multiple examples of use
of the graphics package.

Tim


\start
Date: Mon, 26 Jul 2010 15:33:29 -0500
From: Tim Daly
To: Camm Maguire
Subject: GCL for intel mac

> I'm working with wine and mingw32 cross compiler at the moment with
> success.  If this is of interest I can provide some instructions.  For
> native builds, I can point you to a coworker who handles this for the
> gcl project.
> 
> Is this port important in your opinion?

Eventually. I do want to get a windows port running.
Instructions would help.

> 
> BTW, axiom-developer.com is down again, and I would love to be able to
> ensure that the windows stuff doesn't break the mac.

Sorry about that. I'm away on a business trip until friday.
My girlfriend is working until midnight.
I'll walk her thru the restart on tuesday morning.

\start
Date: Mon, 26 Jul 2010 18:59:03 -0400
From: Camm Maguire
To: Tim Daly
Subject: Re: GCL for intel mac

Greetings!

Tim Daly writes:

>> I'm working with wine and mingw32 cross compiler at the moment with
>> success.  If this is of interest I can provide some instructions.  For
>> native builds, I can point you to a coworker who handles this for the
>> gcl project.
>> 
>> Is this port important in your opinion?
>
> Eventually. I do want to get a windows port running.
> Instructions would help.
>

I think this should work for both Ubuntu and Debian cross compiling:

install mingw32, mingw32-runtime, mingw32-binutils and wine.

Now there is a bug in wine which they won't fix.  system() will run a
unix process, e.g. the C compiler, but not wait for it to complete.
Therefore before beginning to run gcl, one must cd into unixport and
run the following shell script:

#!/bin/sh

cd $(dirname $0)
while true ; do
      if [ -e lckk ] ; then
      	 if ! pidof $(basename $(awk '{print $1}' lckk)); then
	     echo $(cat lckk) is done
	     rm lckk;
	 fi 
      fi
      sleep 0.1;
done &

One then applies a small patch I'm finalizing which detects running
under wine and waits on the lockfile when running system() when found.
Then it is simply

export PATH=/usr/i586-mingw32msvc/bin:$PATH
CC=/usr/bin/i586-mingw32msvc-gcc ./configure --host=mingw32 && make

Let me know if you'd like to try the patch.  If it passes all my
tests, it will be going into cvs shortly anyway.  I thought I could
get around the lockfile business, but the wine developers say this is
the best option.

We have a native windows user (Donald Winiecki) testing these binaries
separately (thanks so much!).

>> 
>> BTW, axiom-developer.com is down again, and I would love to be able to
>> ensure that the windows stuff doesn't break the mac.
>
> Sorry about that. I'm away on a business trip until friday.
> My girlfriend is working until midnight.
> I'll walk her thru the restart on tuesday morning.
>

No rush, please only do what is convenient.  Just trying to get 2.6.8
out of the way at last.  

BTW, 20100701 being uploaded into Debian this evening.

\start
Date: Tue, 27 Jul 2010 11:58:58 +0200
From: Peter Thomas-Stutte
To: list
Subject: axiom graph

Dear Sirs,

how can I make axiom showing the graph of a function? The command
makeViewport(v1) etc.   does not give the graph.

Sincerely

\start
Date: Thu, 29 Jul 2010 06:21:31 -0700
From: Richard Fateman
To: Tim Daly
Subject: Re: Rule-based integration

TimDaly wrote:
...


> 
> There has been some initial discussions between myself, Albert Rich,
> and David Parnas about how to think about this problem.
> 
> My current thinking involves a tree-structuring of the rule patterns
> where each node in the tree represents one or more pattern
> tables and each edge is a function (e.g. division operation, etc).
> Walking the input expression walks the tree to find applicable
> patterns.
> Because a pattern table can be reached from many different paths the
> "tree" is actually a graph. Each table specifies an input pattern and
> an output pattern and the output pattern points to another node.
>
...

Tilu would take a rule and place it several places in a tree.  As an 
overly-simplified example, consider

a*cos(x)+b.   It appears to have a head operator of "+" and so that is
where the rule would seem to fit in a tree of rules.


However, if b=0, the head operator is "*",  and so the pattern  a*cos(x) 
--> .. would also appear in the tree at "*".

But if a=1, then the rule would appear with head operator "cos".

As I recall, the head operators are not really in a tree but a hash table.

The entries in the hash table may themselves be hash tables, where the
presence or absence of some sub-operators is allowed, in order to narrow
down the number of possibly-appropriate rules.

Note that one may end up in Tilu with some number of matching rules -- 
with possibly different sets of side conditions, or maybe not. Tilu does 
not exclude the possibility of any number of applicable rules giving 
perhaps different versions of the answer.

RJF




