A couple of questions



However cynical your answer was, I will comment on it. My discussion  
is aimed towards improving maxima, I wasn't trying to say it's not  
usable in current state - it certainly is.

On 11. Mar, 2009, at 12:35 PM, R Fateman wrote:

> I don't know the answers to all your questions, but here are a  
> few...  I think that people who have been working with arrays  
> should have more comments.
>
> iga Lenar?i? wrote:
>>  It would be interesting to have  maxima on JVM with reasonable  
>> speed (at least in the range of GC
>
> This is unlikely to be as fast as a lisp compiled to machine code.

I agree. SBCL I think would be the best lisp if it worked properly in  
Windows. It rivals commercial lisps in the speed department, is much  
more CL compliant than GCL and supports CFFI. However I don't know  
how soon SBCL will be working properly on windows... ABCL on the  
other hand doesn't care about the OS..
>
>> it would mean that maxima would work on 90% of computers on this   
>> planet (though JVM is not opensource if I'm not mistaken).
> 90% of the machines are probably window/intel machines so this has  
> been achieved.
> (plus the linux/intel machines.)
Through GCL, yes, but it's rather slow, doesn't support FFI (as far  
as I know) and is more or less a dead project.

>>  Accessing  java classes could alse be very beneficiary to maxima  
>> in various ways  (faster plotting, interactive features, gui,  
>> numerical libraries...)
> I doubt that there is a benefit to using java for plotting compared  
> to using gnuplot, at least for speed.
I thought speed could be gained from omitting writing the text file  
and loading it into gnuplot - if maxima could plot directly, one  
could simply pass a pointer to an array.. ofcourse I don't know how  
much of a speed up this would bring to the table. But it most  
certainly would allow quasi realtime manipulation of plots and  
interactivity.

>> Also has anyone been successful with running maxima in SBCL on   
>> windows?
> I think the answer is yes, but there are deficiencies in SBCL that  
> could be a problem
So SBCL will never be a solution for maxima on windows? Is it likely  
that SBCL gets improved to the point where it works flawlessly on  
windows?

>> I think Maxima could benefit a lot from calling external  libraries
> definitely, yes.  This can be done with other Lisps, and does not  
> require ABCL.
> I use external libraries from Lisp often.
It would be great if a common user had the benefit of external  
libraries .. as long as maxima runs on windows on gcl (for a common  
user) this can't be done..

>> - that's how all the big ones get their numerical speed  (MATLAB,  
>> Mathematica, Octave, R) - via calling BLAS+Lapack. Sadly  most of  
>> the users are running gcl on windows so it's kind of  impossible  
>> to work in this direction until we have a Maxima+lisp  combination  
>> that runs well on all common platforms (windows, linux,  mac os x).
> There are several.  The one I use is not open source.  The trial  
> version is free, and can run Maxima.
>
>> I think supporting many different lisps is not good in a  sense  
>> that developers' time would be much better spent on other  things  
>> and prevents them from implementing new things that wouldn't  be  
>> compatible with all the lisps.
>>
>
> If only people agreed on one religion, think about how much time  
> could be spent on better things.
Very cynical...

>> 2) Regarding matrix implementation in maxima: Currently matrices  
>> are  lists of lists.
> This is not the only way.  You can also use lisp arrays, as you  
> mention.  though I don't know the details.
>
>
>>  Perhaps even maxima lists can be implemented as arrays?
>>
> This is probably a bad idea. Adding an object to the front of a  
> list takes very little time.  Adding
> an object to the front of an array requires copying the whole array.
Just saying it's a bad idea because you can cons lists quickly is  
perhaps not the best argument. Perhaps the speed gained by quicker  
aref outweights the cons benefit. If mathematica does it with arrays  
it is probably better :D If one has a list of 100000 numbers and  
wants to multiply it with a number, arrays are probably much faster...

>
>>  in Mathematica everything is a  list,
> no, in Mathematica, the word List means "1-dimensional array".
I was talking about the user's point of view of things. Of course it  
is an array but the user doesn't care about how mathematica does what  
it does.

I've looked again at the amatrix package and I think it's brilliant.  
Indexing possibilities are very advanced and useful. I think if  
amatrix replaced current matrix implementation it would be great. It  
it supported 1d , 2d, 3d, .. nd cases it would then be even better.

Ziga