> < ^ From:

> < ^ Subject:

#I talked briefly about this with prof. Neubuser during the DAG

#day in Amiens, and he also thought it a good idea, and that

#possibly next spring could be a good time for such a workshop.

#

#What do other people think of this?

Given the rate at which GAP is currently growing such a meeting would seem

to be not only a good idea but also necessary.

Another aspect of GAP programming which I think needs to be discussed is

the implementation of 'utility functions' which would be useful additions

to many of the existing GAP functions. In particular, I think that functions

SaveTo() and TeX() described below are needed. Currently such functions are

either non-existent, implemented on an ad hoc basis, or written by

individual users and so not publically available.

1. SaveTo(): At present there is no uniform way to save

a GAP data structure for future retrieval. The most common way around this

is to print the structure to a file; however, this is often very

inefficient to read back in (eg. polynomials, sparse matrices). The SaveTo()

handler might look like this:

SaveTo:=function(arg)local save; save:=function(args)local a; for a in args do if IsRec(a) and IsBound(a.operations) and IsBound(a.operations.SaveTo) then a.operations.SaveTo(a); else Print(a); fi; od; end;if IsFunc(arg[1]) then arg[1](arg[2], save(arg{[3..Length(arg)]})); else PrintTo(arg[1], save(arg{[2..Length(arg)]})); fi; end;

Thus, SaveTo("fred", x) and SaveTo(AppendTo, "fred", x) are both valid

function calls (each having the obvious effect), and x.operations.SaveTo()

would use the Print() statement throughout.

2. TeX(): Obviously useful. I have written TeX functions for printing

polynomials, elements of the Hecke algebras (from the Weyl package), and

some other things. I am happy to make these available; however in order to

implement these functions properly there should be a TeX() handling function

which calls x.operations.TeX(); it would look something like this:

TeX:=function(arg) local a,i; for a in arg do if IsInt(a) or IsString(a) then Print(a); elif IsList(a) then for i in a do TeX(i); od; elif IsRec(a) and IsBound(a.operations) and IsBound(a.operations.TeX) then a.operations.TeX(a); else Print("*error*", "TeX(<a>), don't know how to TeX <a>\n"); fi; od; end;

3. Other candidates are a Maple() function and any functions which are common

to many areas of mathematics, such as InnerProduct(), Induce() and so on.

Andrew Mathas

> < [top]