\documentclass{book}
%\newcommand{\VolumeName}{Volume 2: Axiom Users Guide}
%\input{bookheader.tex}
\pagenumbering{arabic}
\mainmatter
\setcounter{chapter}{0} % Chapter 1

\usepackage{makeidx}
\makeindex
\begin{document}
\begin{verbatim}
\start
Date: Sun, 03 Nov 2013 16:00:05 -0500
From: Tim Daly
To: Camm Maguire
Subject: Re: Windows

>Greetings!  Are there instructions to build just the lisp/axiom stuff,
>and skip any of 1) the docs 2) clef 3) sman 4) bsd/X11 specific c code? 
>
>I'm testing gcl 2.6.10 pre-release, and have resolved a long standing
>issue on windows.  maxima and acl2 now go through natively using the
>latest mingw/gcc tools.   Was hoping to test axiom as well.  The website
>prescription of downloading portabile ubuntu will obviously work, but
>won't stress test the windows binary compiler/loader in gcl.
>
>I've installed texlive, and get to bsdsignal.c before crashing (which it
>of course must do).

I don't know if you're using the msys compiler under Windows.
I found a bug in the compiler (which cost me a week of debugging)
so I gave up on Windows. I can dig up the details of the bug from
my backups if you really want to get low-level.

The easiest way would be to compile Axiom on a linux box and copy the
lisp files. There is a file called src/interp/debugsys.lisp.pamphlet
which contains the files that get loaded into an image. I don't know if
it is up to date but it is close. Note that this loads the raw lisp.
You could edit it to do a compile-file for each file first.

The src/interp/Makefile.pamphlet will be put into src/interp/Makefile
and that contains the steps necessary to make "interpsys" which gets
renamed to "AXIOMsys".

\start
Date: Sat, 9 Nov 2013 18:32:33 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Vim syntax file

Some time ago I asked on the list if there was a syntax file to have vim 
input files highlighted in vim: the answer was no.
After some time, I built one myself.

Unlikely, I forgot to submit it so to share it with other interested 
people (if any...!)

I did it today: interested people can find it at

http://www.vim.org/scripts/script.php?script_id=4765

I also added highlighting for pamphlet files so you can have both 
latex and axiom code properly highlighted.

\start
Date: Sun, 10 Nov 2013 09:59:46 +0400
From: Grigory Sarnitsky
To: list
Subject: Re: Vim syntax file

Umm, maybe I don't get what you did but there was a vim syntax
highlighting file http://axiom-wiki.newsynthesis.org/AxiomInVim

Though since the wiki was down for a considerable time it was unavailabe.

\start
Date: Sun, 10 Nov 2013 13:42:02 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file


> Umm, maybe I don't get what you did but there was a vim syntax
  highlighting file http://axiom-wiki.newsynthesis.org/AxiomInVim


I didn't know of this file: after I asked on the list and I made the first
version of my file in 2004, I didn't look around anymore for a syntax
file. Last month I was writing a small input file in pamphlet format and I
was upset to not having syntax highlight for axiom code in the "chunk"
environment, so I managed to have it. After having done this, I realized
that I never submited it to the vim site: I checked there and I found that
there still was no axiom syntax file, so I (uncorrectly...) assumed there
was none available and then I decide to submit mine. That's all.

In any case, there is no problem in having two different syntax files:
just choose the one which you prefer. I myself will have a look at the
file you indicated to see if I can get some idea to improve mine.

\start
Date: Sun, 10 Nov 2013 14:44:58 +0100
From: Ralf Hemmecke <ralf@hemmecke.org>
To: list
Subject: Re: Vim syntax file

On 11/10/2013 01:42 PM, Fabio S. wrote:

>>> http://www.vim.org/scripts/script.php?script_id=4765

>> Umm, maybe I don't get what you did but there was a vim syntax
>> highlighting file http://axiom-wiki.newsynthesis.org/AxiomInVim
>>
> 
> I didn't know of this file: after I asked on the list and I made the
> first version of my file in 2004, I didn't look around anymore for a
> syntax file. Last month I was writing a small input file in pamphlet
> format and I was upset to not having syntax highlight for axiom code in
> the "chunk" environment, so I managed to have it. After having done
> this, I realized that I never submited it to the vim site: I checked
> there and I found that there still was no axiom syntax file, so I
> (uncorrectly...) assumed there was none available and then I decide to
> submit mine. That's all.
> 
> In any case, there is no problem in having two different syntax files:

I think there is. People would have to waste time to test two options.
And it would certainly be easier for all if you could merge your vim
highlighting file with that on the axiom wiki. Would be a good idea to
upload all of that to your github account and do further development in
the public.

Just my 2 cents.

PS: Don't get me wrong. I appreciate if people contribute to the Axiom
Family in any way.

> just choose the one which you prefer. I myself will have a look at the
> file you indicated to see if I can get some idea to improve mine.
> 

\start
Date: Mon, 11 Nov 2013 12:31:51 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

>> I didn't know of this file: after I asked on the list and I made the
>> first version of my file in 2004, I didn't look around anymore for a
>> syntax file. Last month I was writing a small input file in pamphlet
>> format and I was upset to not having syntax highlight for axiom code in
>> the "chunk" environment, so I managed to have it. After having done
>> this, I realized that I never submited it to the vim site: I checked
>> there and I found that there still was no axiom syntax file, so I
>> (uncorrectly...) assumed there was none available and then I decide to
>> submit mine. That's all.
>>
>> In any case, there is no problem in having two different syntax files:
>
> I think there is. People would have to waste time to test two options.
> And it would certainly be easier for all if you could merge your vim
> highlighting file with that on the axiom wiki. Would be a good idea to
> upload all of that to your github account and do further development in
> the public.
>
> Just my 2 cents.
>
> Ralf
>
> PS: Don't get me wrong. I appreciate if people contribute to the Axiom
> Family in any way.

No problem.
I followed your suggestion and I had a look at the file on fricas page. It 
seems to me more sophisticated than mine. It also includes syntax for 
something else than axiom (C++, maybe?) so I don't think I can improve it.

I have only one remark: I used axiom to generate
categories/domains/packages/operators names. Are them exactly the same in 
fricas? I don't know this. From this point of view, maybe they can't be 
completely interchangeable.

Regards

Fabio

PS: I saw that you put a link to the vim page at the axiom-wiki page: I 
made the same at the vim page, where also I uploaded a cleaned up version 
of the file.

\start
Date: Mon, 11 Nov 2013 13:25:03 +0100
From: Ralf Hemmecke <ralf@hemmecke.org>
To: list
Subject: Re: Vim syntax file

On 11/11/2013 12:31 PM, Fabio S. wrote:
> I have only one remark: I used axiom to generate
> categories/domains/packages/operators names. Are them exactly the same
> in fricas? I don't know this. From this point of view, maybe they can't
> be completely interchangeable.

If I were you, I would simply write a little script that a user could
run on his/her machine and generated the respective lists of
categories/domains/... in a form appropriate for the vim-mode.

\start
Date: Mon, 11 Nov 2013 17:53:42 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

>> I have only one remark: I used axiom to generate
>> categories/domains/packages/operators names. Are them exactly the same
>> in fricas? I don't know this. From this point of view, maybe they can't
>> be completely interchangeable.
>
> If I were you, I would simply write a little script that a user could
> run on his/her machine and generated the respective lists of
> categories/domains/... in a form appropriate for the vim-mode.

That's a good idea. Done by hand, the procedure is quite simple:

1)	In axiom:
 	)set output length  20
 	)spool cat.vim
 	)what cat
 	)spool
 	)spool dom.vim
 	)what dom
 	)spool
 	)spool op.vim
 	)what op
 	)spool
 	)spool pack.vim
 	)what pack
 	)spool

2) 	clean up top and bottom of every file

3)	Insert vim syntax:

 	sed  "s/\(^[a-zA-Z].*$\)/syn keyword axCategories \1/" cat.vim > categories.vim
 	sed  "s/\(^[a-zA-Z].*$\)/syn keyword axDomain \1/" dom.vim > domains.vim
 	sed  "s/\(^[a-zA-Z].*$\)/syn keyword axPackages \1/" pack.vim > packages.vim
   	sed  "s/\(^[a-zA-Z].*$\)/syn keyword axOperation \1/" op.vim | sed "s/\(^[^s].*$\)/syn match axOperation \"\\\\M\1\\\\m\"/"  > operations.vim

Step 3 is  already shell script.
Step 2 can be done if one assumes that the "garbage" in the spool 
is always the same: but is this true for all forks of axiom? I don't know.
Maybe in this step you still need to edit files by hand, at least to check
them.
And what about step 1? How can I start axiom with a input file in a shell
script?

\start
Date: Mon, 11 Nov 2013 22:28:58 +0100
From: Ralf Hemmecke <ralf@hemmecke.org>
To: list
Subject: Re: Vim syntax file

What about the attached script?
It's developed with FriCAS, but would that work with AXIOM?

For simplicity, instead of axDomain, my script outputs axdomains.
That's easily fixable by introducing a third parameter to the keywords
shell function.

The operations.vim doesn't quite match. There are some places where in
your original file you have something like \M~=\m. Since I don't use
vim, I don't understand the differences.

Hopefully, this script also works for AXIOM and OpenAxiom.

Ralf

On 11/11/2013 05:53 PM, Fabio S. wrote:
>>> I have only one remark: I used axiom to generate
>>> categories/domains/packages/operators names. Are them exactly the same
>>> in fricas? I don't know this. From this point of view, maybe they can't
>>> be completely interchangeable.
>>
>> If I were you, I would simply write a little script that a user could
>> run on his/her machine and generated the respective lists of
>> categories/domains/... in a form appropriate for the vim-mode.
> 
> That's a good idea. Done by hand, the procedure is quite simple:
> 
> 1)    In axiom:
>     )set output length  20
>     )spool cat.vim
>     )what cat
>     )spool
>     )spool dom.vim
>     )what dom
>     )spool
>     )spool op.vim
>     )what op
>     )spool
>     )spool pack.vim
>     )what pack
>     )spool
> 
> 2)     clean up top and bottom of every file
> 
> 3)    Insert vim syntax:
> 
>     sed  "s/\(^[a-zA-Z].*$\)/syn keyword axCategories \1/" cat.vim >
> categories.vim
>     sed  "s/\(^[a-zA-Z].*$\)/syn keyword axDomain \1/" dom.vim >
> domains.vim
>     sed  "s/\(^[a-zA-Z].*$\)/syn keyword axPackages \1/" pack.vim >
> packages.vim
>       sed  "s/\(^[a-zA-Z].*$\)/syn keyword axOperation \1/" op.vim | sed
> "s/\(^[^s].*$\)/syn match axOperation \"\\\\M\1\\\\m\"/"  > operations.vim
> 
> Step 3 is  already shell script.
> Step 2 can be done if one assumes that the "garbage" in the spool is
> always the same: but is this true for all forks of axiom? I don't know.
> Maybe in this step you still need to edit files by hand, at least to check
> them.
> And what about step 1? How can I start axiom with a input file in a shell
> script?

\start
Date: Tue, 12 Nov 2013 01:01:17 -0500
From: Tim Daly
To: Fabio Stumbo
Subject: Re: Vim syntax file

Fabio,

If you want the names of all of the categories, domains, and packages
(assuming you have axiom in a directory called axiom):

cd ~/axiom/books
fgrep abbrev bookvol10.2.pamphlet
fgrep abbrev bookvol10.3.pamphlet
fgrep abbrev bookvol10.4.pamphlet
fgrep abbrev bookvol10.5.pamphlet

10.2 is all the categories, 10.3 is all the domains,
10.4 is almost all the packages, 10.5 is the new numeric packages.

In addition, when these pamphlets (which are just standard latex
files) are run through latex they generate a .idx file (latex
index file) which can contain information you might find useful.
It is trivial for me to add index entries you might want.

The chunk environment is used in the above files not only to
delimit the algebra but also to delimit test cases for each
domain and the documentation for all of the files. These are
extracted, put into their appropriate place (int/input for
tests, mnt/system/doc/spadhelp for documentation) at build time.

Chunk mode is also used in all of the src/input examples,
unit test, and regression test source file pamphlets. These
contain both the Axiom input and expected output (prefixed
by --R comment markers).

You might want to look at the above files in vim to see
if you're handling the many uses of the chunk environment.

I'm surprised that you need a vim mode for FriCAS chunks.
It was my understanding that almost all of the source files
(except the algebra for some reason) were stripped of their
literate programming. I looked at the latest repository and
it appears that only the algebra has pamphlets.

Many centuries ago there was support for "tag files" which
would allow direct indexing into the sources. It is on my
list to recover that but everything has taken a back seat
to getting Albert Rich's test cases into the computer algebra
test suite.

When you are happy with your vim file send me a copy and 
I will add it to the zips directory in the distribution.

\start
Date: Tue, 12 Nov 2013 13:29:44 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

> What about the attached script?
> It's developed with FriCAS, but would that work with AXIOM?
>
> For simplicity, instead of axDomain, my script outputs axdomains.
> That's easily fixable by introducing a third parameter to the keywords
> shell function.

Ralph, thanks for the script.
If I got it right, I should call it as

./keywords.sh axiom

If it is like so, then unluckly it doesn't work with axiom: it produces 
four empty files.

In any case, I updated the files: I added syntax for system commands too 
and I added instructions to create owns  command syntax files.
Required user intervention is very limited and straightforward and I think 
that trying to eliminate it completely can be not worth of and, also, not 
completely deterministic, given the "garbage" in output spool files.

> The operations.vim doesn't quite match. There are some places where in
> your original file you have something like \M~=\m. Since I don't use
> vim, I don't understand the differences.

The \M stuff (which today I slightly modified) is somewhat necessary due 
to vim handling of regexps, to have a precise control of them regardless 
of users' settings.

\start
Date: Tue, 12 Nov 2013 13:42:25 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

Tim, thanks for your comments and hints.

> If you want the names of all of the categories, domains, and packages
> (assuming you have axiom in a directory called axiom):
>
> cd ~/axiom/books
> fgrep abbrev bookvol10.2.pamphlet
> fgrep abbrev bookvol10.3.pamphlet
> fgrep abbrev bookvol10.4.pamphlet
> fgrep abbrev bookvol10.5.pamphlet
>
> 10.2 is all the categories, 10.3 is all the domains,
> 10.4 is almost all the packages, 10.5 is the new numeric packages.

Is there any difference between list of categories (for example) obtained 
with this method and the list obtained with
)what categories
?

Because if there is not, then it is more simple to handle the second file: 
less work is required.


> The chunk environment is used in the above files not only to
> delimit the algebra but also to delimit test cases for each
> domain and the documentation for all of the files. These are
> extracted, put into their appropriate place (int/input for
> tests, mnt/system/doc/spadhelp for documentation) at build time.
>
> Chunk mode is also used in all of the src/input examples,
> unit test, and regression test source file pamphlets. These
> contain both the Axiom input and expected output (prefixed
> by --R comment markers).
>
> You might want to look at the above files in vim to see
> if you're handling the many uses of the chunk environment.

I tried to edit the pamphlet and it seems to me that syntax is correctly 
hilighted.
For example, --R comments are treated just as -- comments.

> I'm surprised that you need a vim mode for FriCAS chunks.

Is this remark directed to me?


> When you are happy with your vim file send me a copy and
> I will add it to the zips directory in the distribution.

The version that I uploaded today seems to me complete enough.
If in the next days there is  no new remark on the list
which gives me some reason/hint to modify it, I don't think I will touch 
it any more: if you don't see any change for some weeks, you can download 
it and add it, if you want.

\start
Date: Tue, 12 Nov 2013 13:46:59 +0100
From: Ralf Hemmecke <ralf@hemmecke.org>
To: list
Subject: Re: Vim syntax file

> Ralph

I still prefer correct spelling.

> ./keywords.sh axiom

Right.

> If it is like so, then unluckly it doesn't work with axiom: it produces
> four empty files.

:-(

Just replace the keywords function by:

keywords () {
    echo ")what $1" | $EXE > $1.vim
}

And send my the 4 files.

Can you first check, whether

  echo ")what domains" | axiom -nosman

produces anything on your computer. The "-nosman" actually means to
directly call AXIOMsys. So if you do

export AXIOM=...
./keywords.sh $AXIOM/bin/AXIOMsys

(or whereever your AXIOMsys is), it might work.
But perhaps AXIOM has problems with redirects. (I would be surprised.)

> In any case, I updated the files: I added syntax for system commands too
> and I added instructions to create owns  command syntax files.
> Required user intervention is very limited and straightforward and I
> think that trying to eliminate it completely can be not worth of and,
> also, not completely deterministic, given the "garbage" in output spool
> files.

Come on, for FriCAS, my keywords.sh script gets already rid of that
garbage automatically. One just has to play a bit with sed.
Semiautomatic stuff is pretty useless.

>> The operations.vim doesn't quite match. There are some places where in
>> your original file you have something like \M~=\m. Since I don't use
>> vim, I don't understand the differences.

> The \M stuff (which today I slightly modified) is somewhat necessary due
> to vim handling of regexps, to have a precise control of them regardless
> of users' settings.

Could that be added to keywords.sh? Since I don't know vim, I wouldn't
know whether the result is right if I corrected keywords.sh myself.

\start
Date: Tue, 12 Nov 2013 15:21:44 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

>> Ralph
>
> I still prefer correct spelling.

Oooops!  Sorry...

> Just replace the keywords function by:
>
> keywords () {
>    echo ")what $1" | $EXE > $1.vim
> }
>
> And send my the 4 files.

They are all the same and they read

Unknown option: -nosman
To use a specific workspace use, e.g.: spad -ws -nosman
Goodbye.

> Can you first check, whether
>
>  echo ")what domains" | axiom -nosman
>
> produces anything on your computer.

It produces the same three lines as above

>> In any case, I updated the files: I added syntax for system commands too
>> and I added instructions to create owns  command syntax files.
>> Required user intervention is very limited and straightforward and I
>> think that trying to eliminate it completely can be not worth of and,
>> also, not completely deterministic, given the "garbage" in output spool
>> files.
>
> Come on, for FriCAS, my keywords.sh script gets already rid of that
> garbage automatically. One just has to play a bit with sed.
> Semiautomatic stuff is pretty useless.
>
>>> The operations.vim doesn't quite match. There are some places where in
>>> your original file you have something like \M~=\m. Since I don't use
>>> vim, I don't understand the differences.
>
>> The \M stuff (which today I slightly modified) is somewhat necessary due
>> to vim handling of regexps, to have a precise control of them regardless
>> of users' settings.
>
> Could that be added to keywords.sh? Since I don't know vim, I wouldn't
> know whether the result is right if I corrected keywords.sh myself.

Sure they can: assuming that you have the files
cat.txt com.txt dom.txt pack.txt op.txt,
you just need


cat cat.txt  | sed  "s/\(^.*$\)/syn keyword axCategories \1/"  > categories.vim
cat com.txt  | sed "s/\s//g" | sed "s/\(^.*$\)/syn match axCommand \"\\\\V)\1\\\\m\"/" > commands.vim
cat dom.txt  | sed  "s/\(^.*$\)/syn keyword axDomain \1/" > domains.vim
cat pack.txt | sed  "s/\(^.*$\)/syn keyword axPackages \1/"  > packages.vim
cat op.txt   | sed "s/\\\\/\\\\\\\\/" | sed  "s/\(^[a-zA-Z].*$\)/syn keyword axOperation \1/" | sed  "s/\(^[^s].*$\)/syn match axOperation \"\\\\V\1\\\\m\"/" > operations.vim

(in fact, this is the content of the little script I added today)

Please note that I also added com.txt which is the output of
)what command

The \V tells the vim regexp engine to take any character literally, 
except for the backslash. The \m reset to vim standard meaning.
The \m is  necessary only in case there is a trailing \
This doesn't happen in com.txt but it does in op.txt
The other three files contain only keywords character, so we don't need 
regexp (ie, syn match), which is better.

\start
Date: Tue, 12 Nov 2013 16:54:32 +0100
From: Ralf Hemmecke
To: list
Subject: Re: Vim syntax file

> Unknown option: -nosman
> To use a specific workspace use, e.g.: spad -ws -nosman
> Goodbye.

That's a funny and useless error message. ;-) But why does it say "spad"?

Well. Try the direct call to AXIOMsys as I've showed you in my last
mail. You probably must set the AXIOM variable right.

Ralf


\start
Date: Tue, 12 Nov 2013 16:55:59 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

> fgrep abbrev bookvol10.2.pamphlet
> fgrep abbrev bookvol10.3.pamphlet
> fgrep abbrev bookvol10.4.pamphlet
> fgrep abbrev bookvol10.5.pamphlet
>
> 10.2 is all the categories, 10.3 is all the domains,
> 10.4 is almost all the packages, 10.5 is the new numeric packages.
>
...
> You might want to look at the above files in vim to see
> if you're handling the many uses of the chunk environment.
>

Tim,

I extracted  input files from the pamphlet you indicated as examples: I 
must say that the syntax seems to look fine.

I only have to add two common abbreviations for commands which, clearly, 
can't be extracted:
)sys
)abbrev

I just have two questions:

1) Are curly brackets ever used in axiom syntax? 
It seems to me they are not and they have no meaning in axiom: if it is 
so, I can remove them from sanity check, simplifying things.

2) If I give the command (for example)
)tangle bookvol10.2
then the result is an empty input file. If I change all chunk arguments to * via
cat bookvol10.3.pamphlet | sed "s/\\\\begin{chunk}.*$/\\\\begin{chunk}{\*}/" > book.pamphlet
then
)tangle book
returns the whole input file.
What am I missing?

\start
Date: Tue, 12 Nov 2013 17:10:39 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

>> Unknown option: -nosman
>> To use a specific workspace use, e.g.: spad -ws -nosman
>> Goodbye.
>
> That's a funny and useless error message. ;-) But why does it say "spad"?
>
> Well. Try the direct call to AXIOMsys as I've showed you in my last
> mail. You probably must set the AXIOM variable right.
>

Wooow! It works:

export AXIOM="/usr/lib/axiom-20120301/"
./keywords.sh $AXIOM/bin/AXIOMsys

produces everything.

I have to combine this with the sed lines I posted before and then I think 
it will work.

\start
Date: Tue, 12 Nov 2013 12:38:28 -0500
From: Tim Daly
To: Fabio Stumbo
Subject: Re: Vim syntax file

Fabio,

>1) Are curly brackets ever used in axiom syntax? 
>It seems to me they are not and they have no meaning in axiom: if it is 
>so, I can remove them from sanity check, simplifying things.

I don't believe they have any meaning.

>2) If I give the command (for example)
>)tangle bookvol10.2
>then the result is an empty input file. 

The tangle command is optimized for files in src/input by default.
It defaults to a chunk name of "*", meaning the default chunk name.
To use a file such as algaggr.input.pamphlet in src/input, do

axiom -nox
)tangle algaggr
  (creates algaggr.input from algaggr.input.pamphlet)

)read algaggr
  (runs the algaggr.input file and exits because of the )lisp (bye) )

axiom -nox
)regress algaggr
  (reads algaggr.output and looks for failing test cases)


The ')tangle' command line is implemented by the tangle function
(see books/tangle.lisp)

For more complex files such as books/bookvol10.3.pamphlet you can 
extract particular named chunks. For instance, if you want to extract

the test cases for domain "Any":
)lisp (tangle "bookvol10.3.pamphlet" "Any.input" "Any.output")

the help file for domain "Any":
)lisp (tangle "bookvol10.3.pamphlet" "Any.help" "Any.help")

the spad source for domain "Any":
)lisp (tangle "bookvol10.3.pamphlet" "domain ANY Any" "Any.spad")

In general, the arguments are 
)lisp (tangle "the filename" "the chunk name" "the output file")

There is no reason why the )tangle command isn't more complex 
except that I haven't had a use case for it yet.

Also, the tangle function in books/tangle.lisp is not specific to
Axiom. It can be used in any literate programming context.

I'd encourage you to consider writing your vim file as a literate
program since you're the one who understands it best. Other people
will have to reverse engineer it to understand it.

\start
Date: Tue, 12 Nov 2013 23:08:49 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

Ralf, I got it work.

Please check if it works also for you.

I had to separate axiom commands and axiom operations because the output, 
in these cases, has a different layout. Moreover, with the while+for cycle 
there was some little trouble, so I changed it to "pure sed" (and one per 
line: a little bit more verbose but more clear)

\start
Date: Tue, 12 Nov 2013 23:25:50 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

>> 1) Are curly brackets ever used in axiom syntax?
>> It seems to me they are not and they have no meaning in axiom: if it is
>> so, I can remove them from sanity check, simplifying things.
>
> I don't believe they have any meaning.

Ok, I will remove them from the "sanity check"


>> 2) If I give the command (for example)
>> )tangle bookvol10.2
>> then the result is an empty input file.
>
> The tangle command is optimized for files in src/input by default.
...

I see. My doubt was originated from the fact that last week I wrote a 
small pamphlet for a package (eea.input.pamphlet) and

)tangle eea

didn't produced any output. This was because I gave a name to every chunck, 
always the same but not "*": I thought that )tangle would have extracted 
the chunks regardless of the name.
I realized that this was the problem and I corrected it, so I got the 
desired input file.

I must say that I like it very much the new format where pamphlet are pure 
latex: this is very natural when writing math.
The previous format was somewhat more clumsy.

> I'd encourage you to consider writing your vim file as a literate
> program since you're the one who understands it best. Other people
> will have to reverse engineer it to understand it.

Well, I think that a vim syntax file is something which is not going to be 
developed: once it works, it is very unlikely that it will be modified, if 
ever.
In any case, I exensively commented both the vim file and the script that 
I just submitted: producing it in a literate way I don't think I could add 
more.

\start
Date: Tue, 12 Nov 2013 17:29:46 -0500
From: Tim Daly
To: Fabio Stumbo
Subject: Re: Vim syntax file

Fabio,

Note that if you search for category, domain, and package names
using the Axiom interpreter it will not show all of the names.
For instance, AlgebraicFunction is "hidden" (see the variable
$globalExposureGroupAlist on line 24164 of books/bookvol5.pamphlet).

Directly grepping the books will show all of them.

\start
Date: Tue, 12 Nov 2013 18:39:28 -0500
From: Tim Daly
To: Fabio Stumbo
Subject: Re: Vim syntax file

>>> 2) If I give the command (for example)
>>> )tangle bookvol10.2
>>> then the result is an empty input file.
>>
>> The tangle command is optimized for files in src/input by default.
>...
>
>I see. My doubt was originated from the fact that last week I wrote a 
>small pamphlet for a package (eea.input.pamphlet) and
>
>)tangle eea
>
>didn't produced any output. This was because I gave a name to every chunck, 
>always the same but not "*": I thought that )tangle would have extracted 
>the chunks regardless of the name.
>I realized that this was the problem and I corrected it, so I got the 
>desired input file.
>
>I must say that I like it very much the new format where pamphlet are pure 
>latex: this is very natural when writing math.
>The previous format was somewhat more clumsy.

The previous format used noweb which has many features, none of which
are used in Axiom. I've been slowly eliminating noweb as I rewrite Axiom.

One of the steps was to create a latex chunk environment (the latex code
for the chunk environment is commented in the file books/tangle.lisp)
Once that exists, which is the only really useful feature, everything
else is pure latex. That eliminates the "weave" (noweave) step completely.

\start
Date: Wed, 13 Nov 2013 11:34:56 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

> Fabio,
>
> Note that if you search for category, domain, and package names
> using the Axiom interpreter it will not show all of the names.
> For instance, AlgebraicFunction is "hidden" (see the variable
> $globalExposureGroupAlist on line 24164 of books/bookvol5.pamphlet).
>
> Directly grepping the books will show all of them.

Tim,

I checked differencies. Results are:

- categories are exactly the same
- for packages, the Axiom interpeter misses exactly
   EFULS
   EFUPXS
- for domains, the file extracted from the book is strictly contained in
   the file obtained by the interpeter: the extra packages are _exactly_
   those ending in "-" or in "&"

You can check yourself: copy in an empty directory
bookvol10.2.pamphlet  bookvol10.3.pamphlet  bookvol10.4.pamphlet 
bookvol10.5.pamphlet
and the two attached scripts, then
./keywords.sh axiom
for i in *.pamphlet ; do ./extract-keywords.sh $i ; done

By the way, I point out that I found what seems to me a typo in
bookvol10.3.pamphlet:  line 45520 looks
)abbrev domain FORTRAN FortranProgra\\

and my guess is that it should be
)abbrev domain FORTRAN FortranProgram

\start
Date: Wed, 13 Nov 2013 11:49:23 +0100
From: Ralf Hemmecke
To: list
Subject: Re: Vim syntax file

> Please check if it works also for you.

I'll do that later.

But it seems that I'm not completely satisfied.

> I had to separate axiom commands and axiom operations because the
> output, in these cases, has a different layout. Moreover, with the
> while+for cycle there was some little trouble, so I changed it to "pure
> sed" (and one per line: a little bit more verbose but more clear)

OK, that's probably fine, I'll check later.

Meanwhile, I've only removed redundant spaces and remove "-nosman" after
AXIOMsys. That is ignored in this place anyway.

Please let's further develop via github. I don't like so much sending
files around.

https://github.com/hemmecke/vim-panaxiom

It would also be nice, if you can incorporate the code from Johannes
Grabmeier (http://axiom-wiki.newsynthesis.org/AxiomInVim).

\start
Date: Wed, 13 Nov 2013 11:50:44 +0100
From: Ralf Hemmecke <ralf@hemmecke.org>
To: list
Subject: Re: Vim syntax file

>> Please check if it works also for you.

Wait. I realized that you have removed the \< and \> markers. Why?

\start
Date: Wed, 13 Nov 2013 12:41:01 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

>>> Please check if it works also for you.
>
> Wait. I realized that you have removed the \< and \> markers. Why?
>

Becuase I changed syntax rules of matching: for elements which are made up 
only of keywords (that is, character in 48-57,_,a-z,A-Z,&,!,?   ) then I 
declare something like

syn keyword axCategory Domain

Before it was

syn match axCategory "\<Domain\>"

keywords select only whole words: the markers \< \> are required in 
matches if you want the same behaviour.

With the above definitions, both rules hilights Domain but not 
EuclideanDomain.
If the match were

syn match axCategory "Domain" then in EuclideanDomain you would get Domain 
highlighted.

Another difference is that keywords have the highest priority.

Given the above, whenever possible I switched to "syn keyword"

The match syntax is still necessary just for a bunch of operations which 
are made up of simbols.

\start
Date: Wed, 13 Nov 2013 13:15:12 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

> Meanwhile, I've only removed redundant spaces and remove "-nosman" after
> AXIOMsys. That is ignored in this place anyway.

I ran the script and it works as before.

>
> Please let's further develop via github. I don't like so much sending
> files around.
>
> https://github.com/hemmecke/vim-panaxiom

ok, I subscribed to github, even if I don't think there is a lot to 
develop: on my side it works just fine and I don't have more to say on it.

> It would also be nice, if you can incorporate the code from Johannes
> Grabmeier (http://axiom-wiki.newsynthesis.org/AxiomInVim).

I don't think it is a good idea:
- keywords are defined as a different set (I tried to keep it minimal): 
this reuires some care in merging syntax definitions.
- using the two differente files, axiom highlights result just in a 
different color scheme: every vim user will change the color scheme to its 
own taste.
- there are a lot of other syntax that are not relative to axiom (C++, 
maybe?) It doesn't seem to me a good idea to mix up syntax for different 
languages in the same file. Moreover, they are far too complex for me.

\start
Date: Wed, 13 Nov 2013 13:32:00 +0100
From: Ralf Hemmecke
To: Johannes Grabmeier
Subject: Re: Vim syntax file

>> https://github.com/hemmecke/vim-panaxiom

>> It would also be nice, if you can incorporate the code from Johannes
>> Grabmeier (http://axiom-wiki.newsynthesis.org/AxiomInVim).

I've now added that file as fricas.vim to the repository.

> I don't think it is a good idea:
> - keywords are defined as a different set (I tried to keep it minimal):
> this reuires some care in merging syntax definitions.
> - using the two differente files, axiom highlights result just in a
> different color scheme: every vim user will change the color scheme to
> its own taste.
> - there are a lot of other syntax that are not relative to axiom (C++,
> maybe?) It doesn't seem to me a good idea to mix up syntax for different
> languages in the same file. Moreover, they are far too complex for me.

Right. I don't understand the vim-syntax, but it seems that all the
things that start like cSomething (c-prefix) are not relevant for Axiom.

Johannes, do you think you can help in merging Fabio's and your
vim-mode. Maybe your vim-mode could at least take advantage of the
generated identifiers
(https://github.com/hemmecke/vim-panaxiom/blob/master/axiom/keywords.sh).

\start
Date: Wed, 13 Nov 2013 13:35:06 +0100
From: Johannes Grabmeier
To: list
Subject: Re: [fricas-devel] Re:  Vim syntax file

yes sure, we should merge the two solutions, if there are extra
features, not covered yet. You are right, from time to time (at every
release?), one should update the list of data structures an
operations.

Am 13.11.2013 um 13:32 schrieb Ralf Hemmecke:

>>> https://github.com/hemmecke/vim-panaxiom
>
>>> It would also be nice, if you can incorporate the code from Johannes
>>> Grabmeier (http://axiom-wiki.newsynthesis.org/AxiomInVim).
>
> I've now added that file as fricas.vim to the repository.
>
>> I don't think it is a good idea:
>> - keywords are defined as a different set (I tried to keep it minimal):
>> this reuires some care in merging syntax definitions.
>> - using the two differente files, axiom highlights result just in a
>> different color scheme: every vim user will change the color scheme to
>> its own taste.
>> - there are a lot of other syntax that are not relative to axiom (C++,
>> maybe?) It doesn't seem to me a good idea to mix up syntax for different
>> languages in the same file. Moreover, they are far too complex for me.
>
> Right. I don't understand the vim-syntax, but it seems that all the
> things that start like cSomething (c-prefix) are not relevant for Axiom.
>
> Johannes, do you think you can help in merging Fabio's and your
> vim-mode. Maybe your vim-mode could at least take advantage of the
> generated identifiers
> (https://github.com/hemmecke/vim-panaxiom/blob/master/axiom/keywords.sh).

\start
Date: Wed, 13 Nov 2013 19:13:34 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file
Cc: Johannes Grabmeier

> Please let's further develop via github. I don't like so much sending
> files around.
>
> https://github.com/hemmecke/vim-panaxiom

Ralf,

I added the last changes I made.
In particular, I changed colors definition so that it is modular and it 
can be very easy for the user to customize them, or even use an already 
existing color scheme (see the readme).

About merging the two files, I am not able to see a way of doing it.
If someone does, it is surely better to have just one package for axiom 
support in vim: I will modify mine if there are suggestions.

Otherwise, I am satisfied with the version I have and I will post it on 
vim.org as the definitive (up to the next one... ) version.

\start
Date: Thu, 14 Nov 2013 11:27:42 -0500
From: Camm Maquire
To: list
Subject: GCL 2.6.10 has been released

Greetings!  The GCL team is happy to announce the release of version
2.6.10, the latest achievement in the 'stable' (as opposed to
'development') series.  Please see http://www.gnu.org/software/gcl for
downloading information.

This release addresses many of the issues introduced by the 2.6.9
developments, in addition to using gmp for random number generation,
adding fast immediate fixnum operations for most functions, and
accelerating garbage collection and hash table lookups.  From the git
log:

  randomize addresses as hash keys
  refine readdir
  optimize gethash loop
  opendir,readdir,closedir functions
  make object_to_string safe for text strings
  no SGC on ia64 pending fix to getc/fread restart failure and hang
  ensure-directories-exist and wild-pathname-p
  changes for latest mingw on windows
  Don't use TMP in configure for windows
  prevent relocatable maxpage from extending beyond real_maxpage due to hole
  no gprof on ia64, possible function descriptor corruption due to mcount
  robustify allocation of environment and argument space in unrandomize.h
  main.c typo fix
  limit startup relblock pages to 5% of available_pages
  NOFREE_ERR for ia64
  fix trailing slash removal pre lstat on mingw
  optimize number_expt
  add mpz_ui_pow_ui and mpz_pow_ui to gmp_wrappers.h
  ensure that lstat takes no trailing slashes on mingw
  reserve 8M stack on mingw, and start alloc probe at 0x20000000 for wine
  initialize c stack variables in make_bignum before gc calling mpz_init_set
  allow for nreloc overflow in coff, restoring acl2 on mingw
  abandon stabs debug format on mingw as is now too small
  limit text start search, restoring s390 build
  make equal explicitly tail recursive on mingw to overcome compiler deficiency
  add sys and child sys values to get-internal-run-time
  optimize number_abs and number_signum
  inlines for gcd and lcm
  ctzl instruction, and defaults for clzl and ctzl when absent
  fix type-and to properly order t and object
  fix safe_mul, clz and fixnum_shft for corner cases
  remove lfun prop to eq, eql, equal and equalp
  remove redundant mod code
  fix integer_divide1 call in number_expt
  faster integer log functions
  prototypes and optimization inlines for immnum functions
  faster division algorithms -- FIXME centralize mod, do round
  centralize inlined immnum logic in new immnum.h header
  remove 'c1conditional property of 'boole
  use clz in fixnum_times where available
  try mpz_init_set in make_bignum -- FIXME stack of pre initialized bignums
  don't mark link array when not collecting relblock
  fix shifti bug
  add gmp wrappers for the various division rounding modes
  fix type-and so that t < '(values t t)
  fix sublis1-inline for new predicate macros
  faster eq,eql,equal, and equalp predicates
  configure check for clzl instruction
  define OBJNULL for hurd
  separately protect mark_link_array from non-data cfd
  remove unnecessary branches to marking of cfd code
  backport #? inline string directive to ensure 'first' vararg is initialized
  sgc mark phase typo
  only sgc mark old contiguous data when collecting contiguous
  remove null value error in mv-ref to accommodate low immediate fixnums
  fix bds_top capture bug in bds_bind macro (e.g. arg eval changes bds_top)
  scale initial relblock with heap size instead of available_pages
  try initial relblock scale of twice heap pages
  unset si::*optimize-maximum-pages* in raw image to limit unexec file size
  clear gcc warnings regarding ignored function return values
  function def typo
  scale maxrbpage and new_holepage with available_pages on startup
  clarify room report
  disable safecdr by default
  widecons configure option
  memcpy to speed up relocatable gc
  set_bits fix for i1==i2
  edit_double overflow fix
  set_bits fix
  get_sgc_bits bug fix
  get_bits debugging 2
  fix to get_bits
  get_bits/set_bits debugging
  update tm_maxpage in sgc_start
  report low immfix in (room t)
  use tee in test_results target
  imcdr typo fix
  default to high immfix, check cstack for low immfix
  enable-safecdr and enable-safecdrdbg configure options
  gbc accelerations
  support for low immediate fixnums
  box all fixnums in cdr, and speed all object typing
  gethash/hash-set optimizers
  add safety page to relocatable gc to workaround unexplained overwrite FIXME
  make sure gprof arrays are writable in sgc
  fix edit_double, failure to print 1d-6
  rework sane default to contiguous and relocatable tm_table parameters
  simplify and speedup marking of old data on sgc pages
  make sure contiguous sgc_minfree gets initialized with sane value
  revert set_type_of to preserve sgc bit, init stack objects with static
  reinit_gmp prototype
  reinit_gmp on mips to fix (random), where LD_BIND_NOW is also required
  correct cpage macro for new sgc contblock bit
  zero mark bits on contblock allocation
  define ADDR_COMPAT_LAYOUT and ADDR_LIMIT_3GB if not present in configure
  eliminate preclear of contblock mark bits
  sgc bit for contiguous pages, need low mem for code on 64bit
  prefer low memory when loading code to satisfy jump bit constraints
  backport of gmp random numbers from master
  lintian fix to VirtualFree call in unexnt.c
  rehardwire heap start address on windows
  try not fixing heap start address on windws
  try for up to 2 Gb heap on windows
  try to fix deallocation in windows heap probe
  clean windows heap size probe
  don't rely on errno on macosx heap size probe
  try to probe heap size on windows
  Use brk wrapper around sbrk to consolidate behavior when latter is emulated
  probe heap size up to 32Gb on macosx
  allocate gcl_zone_body in static area, as malloc_create_zone returns a pointer to read-only memory in macosx 10.8
  work around unlinkable profile prototype in macosx 10.8 64bit
  clear prototype mismatch warning
  Set windows heap start to stable 0x10100000 of 2.6.8 for now
  place parenthesis around argument to cast in make_fixnum, fix invalid lvalue
  support for empty filenames following -f on command line
  fix documentation formatting errors
  zero firstword in set_type_of macro to handle C stack objects

\start
Date: Fri, 15 Nov 2013 02:52:00 -0500
From: Tim Daly
To: Fabio Stumbo
Subject: Re: Vim syntax file

Fabio wrote: 

>I checked differencies. Results are:
>
>- categories are exactly the same
>- for packages, the Axiom interpeter misses exactly
>   EFULS
>   EFUPXS

These were originally listed as packages but are actually domains.
This was correced in Axiom.

>By the way, I point out that I found what seems to me a typo in
>bookvol10.3.pamphlet:  line 45520 looks
>)abbrev domain FORTRAN FortranProgra\\
>
>and my guess is that it should be
>)abbrev domain FORTRAN FortranProgram

I grepped the current sources and every instance is correct.

\start
Date: Fri, 15 Nov 2013 22:10:56 +0800
From: Jia Zhao Cong
To: list
Subject: bug in books/tangle.lisp

I was going to make
http://axiom-wiki.newsynthesis.org/images/AxiomEmacsMode.pamphlet
functioning again, so I use '\begin{chunk}' to get it compiled by latex.

When trying to tangle it to get back .el, use tangle.lisp with sbcl, get
the bug:

first char in line 128 should be ; instead of :

sbcl also complains about si::getenv. Then I find out that tangle.lisp
is gcl only and I use
  )lisp (tangle "AxiomEmacsMode.pamphlet" "*" "AxiomEmacsMode.el")
to get what I want.

\start
Date: Fri, 15 Nov 2013 09:50:20 -0500
From: Tim Daly
To: Jia Zhao Cong
Subject: Re: bug in books/tangle.lisp

>sbcl also complains about si::getenv. Then I find out that tangle.lisp
>is gcl only and I use
>  )lisp (tangle "AxiomEmacsMode.pamphlet" "*" "AxiomEmacsMode.el")
>to get what I want.

tangle is GCL only? I suppose so since si::getenv is GCL.
I will fix that to be portable.

\start
Date: Fri, 15 Nov 2013 16:01:03 +0100
From: Ralf Hemmecke <ralf@hemmecke.org>
To: list
Subject: Re: bug in books/tangle.lisp

On 11/15/2013 03:10 PM, jiazhaoconga wrote:
> I was going to make
> http://axiom-wiki.newsynthesis.org/images/AxiomEmacsMode.pamphlet
> functioning again, so I use '\begin{chunk}' to get it compiled by latex.

Maybe you should also take a look into

https://github.com/hemmecke/fricas-svn/tree/master/contrib/emacs

I believe that http://axiom-wiki.newsynthesis.org/AxiomEmacsMode is
quite old and perhaps out of date.

\start
Date: Sat, 16 Nov 2013 10:53:28 +0800
From: Jia Zhao Cong
To: list
Subject: Re: bug in books/tangle.lisp

> tangle is GCL only? I suppose so since si::getenv is GCL.
Yes, after I commented those blocks, sbcl still gives no output, no error.

> Maybe you should also take a look into
> https://github.com/hemmecke/fricas-svn/tree/master/contrib/emacs

Thank you, fricas.el is very nice. Save a lot trouble.

I am combining https://bitbucket.org/pdo/axiom-environment/
and AxiomEmacsMode/fricas.el, because both have very good features:
- AxiomEmacsMode/fricas.el provide "axiom-yank/fricas-yank", can save
  a pile to a temp file and ')read' it back automatically.
- axiom-environment offers a very nice help system, and a spad-mode
  which I can write programs in one buffer while execute part of it in the
  other buffer -- I think it's a work flow even better that REPL.

axiom-environment doesn't support pile at all(which is very very
inconvenient), that's why I'm trying to combine them together.

\start
Date: Sat, 16 Nov 2013 13:30:56 +0100
From: Ralf Hemmecke
To: Jia Zhao Cong
Subject: Re: bug in books/tangle.lisp

Oh, fine... I'd really appreciate an improvement of fricas.el.

Where is your github repo?

Anyway, you have probably seen keywords.sh.
https://github.com/hemmecke/vim-panaxiom/tree/master/axiom

I'm sure that could be used in the build-process of any of the panaxioms
in order to generated the identifiers for tab-completion/highlighting
and whatever.

Since I'm much more interested in emacs-mode, I'd be very happy if
someone having time and expertise to take a look at it and improve it.

On 11/16/2013 03:53 AM, jiazhaoconga wrote:
>> tangle is GCL only? I suppose so since si::getenv is GCL.
> Yes, after I commented those blocks, sbcl still gives no output, no error.
> 
>> Maybe you should also take a look into
>> https://github.com/hemmecke/fricas-svn/tree/master/contrib/emacs
> 
> Thank you, fricas.el is very nice. Save a lot trouble.
> 
> I am combining https://bitbucket.org/pdo/axiom-environment/
> and AxiomEmacsMode/fricas.el, because both have very good features:
> - AxiomEmacsMode/fricas.el provide "axiom-yank/fricas-yank", can save
>   a pile to a temp file and ')read' it back automatically.
> - axiom-environment offers a very nice help system, and a spad-mode
>   which I can write programs in one buffer while execute part of it in the
>   other buffer -- I think it's a work flow even better that REPL.
> 
> axiom-environment doesn't support pile at all(which is very very
> inconvenient),
> that's why I'm trying to combine them together.

\start
Date: Sat, 16 Nov 2013 23:46:42 +0800
From: Jia Zhao Cong
To: list
Subject: Re: bug in books/tangle.lisp

> Anyway, you have probably seen keywords.sh.
> https://github.com/hemmecke/vim-panaxiom/tree/master/axiom

axiom-environment keeps a list of axiom symbols,
https://bitbucket.org/pdo/axiom-environment/src/3d58f5ff7412cb519bbfb70f3cc0711931e216e9/data/?at=default
and the author updates it a few times, but there is no documentation
about how to do it.

In ${FRICASROOT}/algebra/*.daase, these files seem like database.
Only in fricas these files contain lots of ascii instead of lots of numbers.

> Since I'm much more interested in emacs-mode, I'd be very happy if
> someone having time and expertise to take a look at it and improve it.

https://github.com/ustcscgy/axiom-environment/tree/fricas.el

I implement  fricas.el's "fricas-yank" functionality into
axiom-environment's
axiom-spad-mode, but much much more user friendly.

This has been hacked for only a few hours, lots of stuff to improve, but
it's enough to express my ideal workflow:

(add-to-list 'load-path "~/.emacs.d/axiom-environment/")
(require 'axiom)

M-x run-axiom
C-x C-f test.spad ;; open a .spad file

-- you can write a one-line function, then press C-c C-c to run
integrate(x,x)

-- you can write piles, this is what I want
-- press C-c C-c to run
1+
  2
  3

At the moment, this is just a proof of concept. You are welcomed to try now
or wait a few more days.

The code is mostly copied from ESS, lots of details need to implement.

\start
Date: Sat, 16 Nov 2013 11:20:12 -0500
From: Tim Daly
To: Jia Zhao Cong
Subject: Re: bug in books/tangle.lisp

books/tangle.lisp has some support code for automating axiom-specific
tasks. This support code is GCL specific as Axiom lives on GCL.

This has been fixed with read-time conditionals.
The books/tangle code is now useful in any common lisp.

If you're interested I also have tangle written in C which is
useful for doing literate programs in a non-lisp environment.
One version is available at

http://daly.axiom-developer.org/tangle.c

\start
Date: Sat, 16 Nov 2013 11:50:29 -0500
From: Tim Daly
To: Jia Zhao Cong
Subject: Re: bug in books/tangle.lisp

First I need to mention the fact that Axiom refers to the Axiom
project, not to the FriCAS project. Please don't confuse these 
two as they are distinct projects.

>axiom-environment keeps a list of axiom symbols,
>https://bitbucket.org/pdo/axiom-environment/src/3d58f5ff7412cb519bbfb70f3cc0711931e216e9/data/?at=default
>and the author updates it a few times, but there is no documentation
>about how to do it.

>In ${FRICASROOT}/algebra/*.daase, these files seem like database.
>Only in fricas these files contain lots of ascii instead of lots of
>numbers.

The daase files are databases. "daase" is a contraction of "database"
due to length restrictions of filenames in one of the many intermediate
porting platforms.

They are random access files, indexed by byte address. There is a C 
program in src/etc/asq.c.pamphlet which is a literate program that 
explains the details of the daase file format. It can be used to
"ask" (asq) for information from daase files.

The original KAF (keyed access file) format is from LispVM.

>https://github.com/ustcscgy/axiom-environment/tree/fricas.el

>I implement  fricas.el's "fricas-yank" functionality into
>axiom-environment's axiom-spad-mode, but much much more user friendly.

>This has been hacked for only a few hours, lots of stuff to improve, but
>it's enough to express my ideal workflow:
>
>(add-to-list 'load-path "~/.emacs.d/axiom-environment/")
>(require 'axiom)
>
>M-x run-axiom
>C-x C-f test.spad ;; open a .spad file
>
>-- you can write a one-line function, then press C-c C-c to run
>integrate(x,x)
>
>-- you can write piles, this is what I want
>-- press C-c C-c to run
>1+
>  2
>  3

Actually I do this all the time. All you need to do is C-x 2 to split
the screen, M-x shell to open a shell buffer, start Axiom, and write a
trivial macro to "clip the expression, yank it into the shell, and press
enter". I have developed hundreds of files this way (see src/input or
src/axiom-website/CATS for examples).

Note that Axiom does not support "pile mode" in the input. You would
need to have trailing underscores on the input or write the expression
to a .input file and )read it.

\start
Date: Sat, 16 Nov 2013 19:07:29 +0100
From: Ralf Hemmecke
To: list
Subject: Re: [fricas-devel] Re:  bug in books/tangle.lisp

On 11/16/2013 04:46 PM, jiazhaoconga wrote:
>> Anyway, you have probably seen keywords.sh. 
>> https://github.com/hemmecke/vim-panaxiom/tree/master/axiom
> 
> axiom-environment keeps a list of axiom symbols, 
> https://bitbucket.org/pdo/axiom-environment/src/3d58f5ff7412cb519bbfb70f3cc0711931e216e9/data/?at=default
> and the author updates it a few times, but there is no documentation
> about how to do it.

Exactly for that a (slightly) rewritten keyword.sh could be used for. It
should be run at build-time of one of the pan-axiom systems to generate
the respective *-standar-*-info.el files.

Note that the result would usually differ slightly for
Axiom/OpenAxiom/FriCAS.

> I implement  fricas.el's "fricas-yank" functionality into 
> axiom-environment's axiom-spad-mode, but much much more user 
> friendly.

I've never used that. In fact, I mostly use fricas.el for running
efricas. I'm not much in favour of pile mode. Although imperfect, I
currently use my aldor.el
(https://portal.risc.jku.at/Members/hemmecke/aldor/emacs) for editing
SPAD file, but I'd rather like that SPAD syntax would be simply replaced
by Aldor syntax.

As you can certainly see, aldor.el is just a hack to make myself happy.
I'm not an elisp programmer after all.

\start
Date: Sat, 16 Nov 2013 19:38:14 +0000
From: Paul Onions
To: list
Subject: Re: [fricas-devel] Re:  bug in books/tangle.lisp

Hello jiazhaoconga,

On 16 Nov 2013, at 15:46, jiazhaoconga wrote:
> axiom-environment keeps a list of axiom symbols,
> https://bitbucket.org/pdo/axiom-environment/src/3d58f5ff7412cb519bbfb70f3cc0711931e216e9/data/?at=default
> and the author updates it a few times, but there is no documentation
> about how to do it.

Look in file axiom-build-utils.el, where you'll find emacs-lisp  
functions to extract package, domain, category and operation names  
from a running Axiom/FriCAS/OpenAxiom session.  The function axiom- 
make-standard-info-files at the bottom of the file can be used to  
update all the symbol files.

> In ${FRICASROOT}/algebra/*.daase, these files seem like database.
> Only in fricas these files contain lots of ascii instead of lots of  
> numbers.
>
> > Since I'm much more interested in emacs-mode, I'd be very happy if
> > someone having time and expertise to take a look at it and improve  
> it.
>
> https://github.com/ustcscgy/axiom-environment/tree/fricas.el
>
> I implement  fricas.el's "fricas-yank" functionality into axiom- 
> environment's
> axiom-spad-mode, but much much more user friendly.

I'm happy to consider patches for improved functionality.  I haven't  
really touched the code for a few months, so maybe it's time I got  
back into it again!

> This has been hacked for only a few hours, lots of stuff to improve,  
> but
> it's enough to express my ideal workflow:
>
> (add-to-list 'load-path "~/.emacs.d/axiom-environment/")
> (require 'axiom)
>
> M-x run-axiom
> C-x C-f test.spad ;; open a .spad file
>
> -- you can write a one-line function, then press C-c C-c to run
> integrate(x,x)
>
> -- you can write piles, this is what I want
> -- press C-c C-c to run
> 1+
>   2
>   3

So is this your main motivation, to evaluate fragments of files  
interactively?  If so, looks useful!

\start
Date: Sun, 17 Nov 2013 12:28:26 -0600
From: Tim Daly
To: list
Subject: Latex and html5

This is interesting. I'm trying to incorporate it into the
new Axiom browser-based front end. However, anyone doing 
literate programs in mathematics will find it useful.

http://latex2html5.com

\start
Date: Sun, 17 Nov 2013 19:09:11 +0000
From: Martin Baker
To: list
Subject: Re: Latex and html5

On 17/11/13 18:28, Tim Daly wrote:
> This is interesting. I'm trying to incorporate it into the
> new Axiom browser-based front end. However, anyone doing
> literate programs in mathematics will find it useful.
>
> http://latex2html5.com

Tim,

Yes it does look interesting. Looking at the webpage it seems to go 
beyond static latex to html5 translation, to something interactive, a 
bit hyperdoc like.

If only it could link to spad code instead of (or in addition to) 
javascript that would be really powerful.

\start
Date: Tue, 19 Nov 2013 12:07:29 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

>> Please check if it works also for you.
>
> I'll do that later.
>
> But it seems that I'm not completely satisfied.
>
>> I had to separate axiom commands and axiom operations because the
>> output, in these cases, has a different layout. Moreover, with the
>> while+for cycle there was some little trouble, so I changed it to "pure
>> sed" (and one per line: a little bit more verbose but more clear)
>
> OK, that's probably fine, I'll check later.

Ralf, could you please just check if the script works for you as expected?

Since I didn't make any other correction to the syntax files, I am 
thinking to submit this version at vim.org as "final" (whatever this could 
mean...!)

\start
Date: Wed, 20 Nov 2013 13:18:39 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

> When you are happy with your vim file send me a copy and
> I will add it to the zips directory in the distribution.
>

Tim,
I uploaded the latest version and I don't think I will modify it again, 
unless some error is pointed out or some nice improvement is made or 
suggested.
Inside there are two script:
one (created by Ralf and modified by myself) which extracts keywords from 
axiom output (categories, domains, packages, operations and axiom commands)
and one (by me) which extracts keywords from pamphlet files (but just for 
categories, domains and packages).

If you think in can be of any interest, you can include it wherever you 
want.

\start
Date: Wed, 20 Nov 2013 11:10:10 -0500
From: Tim Daly
To: Fabio Stumbo
Subject: Re: Vim syntax file

Uploaded to where?

\start
Date: Wed, 20 Nov 2013 17:25:44 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Vim syntax file

> Fabio,
>
> Uploaded to where?
>

To vim.org:

http://www.vim.org/scripts/script.php?script_id=4765

\start
Date: Wed, 20 Nov 2013 11:30:39 -0500
From: Tim Daly
To: Fabio Stumbo
Subject: Re: Vim syntax file

Got it. Thanks. I'll add it to the zips directory. --Tim

\start
Date: Wed, 20 Nov 2013 11:49:30 -0500
From: Tim Daly
To: list
Subject: Re: Vim syntax file
Cc: Fabio Stumbo

A new vim syntax file has been added to Axiom, written by Fabio Stumbo.
It provides syntax highlighting for Axiom spad files which are the
algebra source language. It provides syntax highlighting for Axiom
pamphlet files which are standard latex format files.

The file is in the zips subdirectory. To use it type:
cp zips/axiom.vim.tgz ~/.vim/syntax
cd ~/.vim/syntax
tar -zxf axiom.vim.tgz
cd ~
   (edit .vimrc) and add the lines

au BufNewFile,BufRead *.input *.spad exe "source ~/.vim/syntax/axiom.vim"
au BufRead,BufNewFile *.pamphlet setfiletype tex
au BufRead,BufNewFile *.pamphlet  exe "source ~/.vim/syntax/pamphlet.vim"

\start
Date: Wed, 20 Nov 2013 11:50:59 -0500
From: Tim Daly
To: Fabio Stumbo
Subject: Re: Vim syntax file

I've added it to the distribution and pushed it to the repositories.

\start
Date: Mon, 25 Nov 2013 21:34:34 +0000
From: Paul Onions
To: list
Subject: Emacs axiom-environment update

I've just pushed an update to axiom-environment that adds a function  
called axiom-process-read-region.  This function copies the current  
region to a temporary file then )read's it into the running Axiom  
process.  As such it works with piled code.  By default it is bound to  
C-c C-y.

Paul

On 16 Nov 2013, at 02:53, jiazhaoconga wrote:

> I am combining https://bitbucket.org/pdo/axiom-environment/
> and AxiomEmacsMode/fricas.el, because both have very good features:
> - AxiomEmacsMode/fricas.el provide "axiom-yank/fricas-yank", can save
>   a pile to a temp file and ')read' it back automatically.
> - axiom-environment offers a very nice help system, and a spad-mode
>   which I can write programs in one buffer while execute part of it  
> in the
>   other buffer -- I think it's a work flow even better that REPL.
>
> axiom-environment doesn't support pile at all(which is very very  
> inconvenient),
> that's why I'm trying to combine them together.


\end{verbatim}
\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage
%\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{axiom}
\bibliography{axiom}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage
%\phantomsection
\addcontentsline{toc}{chapter}{Index}
\printindex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
