This is a bit long-winded, but it may have some relevance to the architecture of CL-Statistics
The other day, I was writing this as part of a sequence generating library documentation that I hope to release soon:
At that point, I went to google what Rossini was up to, and came upon this list. It was up for only a day or so when I found it.
The reason for this post is that I am using Liam Healy's gsll and antik libraries. These use his grid library for representing vectors, matrices, etc. It is unfortunate that at the time Liam was releasing grid, Tamas released his xarray.
Personally, I dislike fragmentation (grid vs xarray), but now nothing can be done about it. And some competition is good.
The interesting part of Liam's antik is that antik shadows several of CL's symobls: many math functions, and also aref and aref*. He reimplements these as generic functions, allowing extension for other data types (such as grids). In a way, Liam is on his way to creating what I would call Numerical Lisp: Extension of CL for numerical computing that may be incompatible with CL. But the extension is a relatively thin layer on top of CL, leaving all of CL accessible.
Futhermore, Numerical-Lisp (NL) can unify grid and xarray using the following three-layered structure:
- Application layer, such as CL-Statistics
- Numerical-Lisp layer
- Raw libraries (grid/xarray)
The numerical lisp layer would consist of Liam's redefinitions of CL mathematics related functions via generic functions. The raw libraries would hook into this via methods. In addition to CL mathematics functions, NL can define interface to higher mathematics functions also using generic functions. Then the raw libraries can plug in using packages such as GSL, LAPACK, etc.
What needs to be done is
- creation of the Numerical-Lisp library
- hooks in grid and xarray
- write the application layer to use Numerical-Lisp interface.
It seems to me that much of this should be relatively straightforward. I would be glad to help in testing (sbcl, clisp) and documenting.
Finally, what does this have to do with CL-statistics? Well, I am suggesting that the code be organized in a way to make it easy to transition from interfacing to CL & xarray into NL.
Best,
Mirko
PS - and in the end, when all is said and done, someone writes a great book: Practical Numerical Lisp