<div dir="ltr">I took a different approach in the science collection. I actually reimplemented the code entirely in PLT Scheme. This is almost certainly slower than an FFI interface to the C code - but it is much faster in V4 where the JIT compiler deals with floating point directly. [Matthew can correct me if I got the details wrong there.] But, it allows me to better integrate with the (PLT) Scheme numerical hierarchy, error handling, etc. So, it takes me more on the order of a week to port a moderately complex unit of functionality.<br>
<br>I avoided porting the linear algebra routines until I get a better underlying array abstraction implemented. I've already prototyped one that sits on top of SRFI 4 homogeneous vector types. [Basically a homogeneous array is mapped onto an appropriate vector type; array references can include various slicing operations, effecient reuse of underlying vectors (avoids copying), and array operations can also return slices, etc.] I also need to interface it with the new iterators in V4. But, I haven't been able to devote as much time to it as I'd like.<br>
<br>Anyway, adding the appropriate FFI interfaces to Will's code base would be much quicker.<br><br>If you, or anyone else, wants to add to the science collection, it is hosted on the Schematics project at Sourceforge. [Or, of course, the code is on PLaneT.]<br>
<br>Doug<br><br><div class="gmail_quote">On Fri, Aug 15, 2008 at 8:18 AM, Will Farr <span dir="ltr"><<a href="mailto:farr@mit.edu">farr@mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Atmam,<br>
<br>
I wrote the mzgsl package, and, as Doug said with the science collection, I only wrapped the functionality I needed at the time. It was my hope that people who needed more from the GSL would add to the package as necessary.<br>
<br>
For linear algebra (i.e. bindings to LAPACK and BLAS), Noel encouraged you to take a look at the plt-linalg package, and I second that (I wrote that one, too, with some help from Noel and others).<br>
<br>
If you would like to wrap the GSL functionality you need, I would encourage you to add to the current mzgsl package. If you would like, I'd be happy to give you my Darcs repository for that code and pull patches back from you to add to PLaneT (i.e. if you don't want to be bothered with the details of releasing the code). PLT's foreign function interface is really easy to use (the existing mzgsl code should give you a good idea how it works, and, of course, the help-desk documentation is excellent); writing the initial version of the mzgsl package, which contained all the current functionality, took me about two hours.<br>
<font color="#888888">
<br>
Will</font><div><div></div><div class="Wj3C7c"><br>
<br>
<br>
On Aug 15, 2008, at 7:58 AM, Atmam Ta wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Hi,<br>
<br>
when I chose the language for my current project a few months ago I had some "must have" requirements in mind, like the language should have basic scientific computing support (matrix and linear algebra, fft, least squares fitting and some statistics packages).<br>
After scanning the Planet repository, I thought plt-scheme passes as it had an interface to the Gnu Scientific Library listed. Now I am very surprised to see that the mzgsl library contains only an interface to the random number generation sublibrary of GSL, and the science collection has less than half of the GSL functionality.<br>
<br>
Does anyone know of plt-scheme interace code to fft, linear algebra, least-squares fitting, and non-basic statistics? I can see that there is a "fit" function in the plot library for least squares fitting...<br>
<br>
Cheers,<br>
<br>
Atmam<br></div></div><div class="Ih2E3d">
_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme" target="_blank">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br>
</div></blockquote><div><div></div><div class="Wj3C7c">
<br>
_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme" target="_blank">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br>
</div></div></blockquote></div><br></div>