Re: [pure-lang-users] case
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-08-29 20:57:31
|
On Fri, 2008-08-29 at 22:43 +0200, Albert Graef wrote: > To avoid having Pure depend on GSL, I can hopefully just replicate the > memory allocation and view functionality from GSL and massage them for > my needs (I probably need to add a reference counter to the gsl_matrix > and vector structs in order to support contiguous slices in an efficient > way). I'll also expose the interface to the Pure matrix and vector data > in the public runtime API, so that you have easy access to it from C, too. > > I still have some other stuff on my TODO list right now (specifically, I > want to add a basic stream implementation a la SICP to the library), but > I can hopefully start working on the vector/matrix stuff some time next > week. > > > I think that maybe some of the primitive operations like addition, > > subtraction, multiplication, and a reciprocal function might be handled > > best internally in Pure though. Before you say no too quickly, let me > > point out that GSL_BLAS has a bunch of steps involved just to multiply > > two matrices. > > If we want to replicate this kind of functionality, it can be done just > as well in the Pure GSL wrapper. I really think that all linear algebra > functionality belongs there, so that we have a clear cut between the > interpreter's basic matrix/vector container support and the GSL > wrapper's more advanced functionality. Otherwise we'll just end up > duplicating stuff. > > So in the Pure vector/matrix support, I want to concentrate on the basic > container functionality, including efficient element access and slicing. > Pure programmers will then be able to do basic vector/matrix stuff using > these operations and the array comprehensions, or they can fire up the > GSL wrapper once it's available, to do more advanced stuff and take > advantage of the speedy C implementation. All sounds good to me. While you work toward that end, I'm going to go a head and wrap the statistical distribution functions. I need those for work. Would you be offended if I tried to port your Q ODBC module to Pure? e.r. |