Re: [Haskell-cafe] uvector and the stream interface

2008-07-17 Thread Evan Laforge
An abstraction stack: Impure Pure How about strict vs. lazy? I ask because I assumed there were lazy variants of uvector or storablevector, using the bytestring list of chunks approach, but apparently not? Making a lazy version seems pretty easy, but rewriting all the basic

Re: [Haskell-cafe] uvector and the stream interface

2008-07-17 Thread Henning Thielemann
On Thu, 17 Jul 2008, Evan Laforge wrote: An abstraction stack: Impure Pure How about strict vs. lazy? I ask because I assumed there were lazy variants of uvector or storablevector, using the bytestring list of chunks approach, but apparently not? For storablevector there

Re: [Haskell-cafe] uvector and the stream interface

2008-07-17 Thread Isaac Dupree
Evan Laforge wrote: An abstraction stack: Impure Pure How about strict vs. lazy? I ask because I assumed there were lazy variants of uvector or storablevector, using the bytestring list of chunks approach, but apparently not? wait list of chunks makes something that

Re: [Haskell-cafe] uvector and the stream interface

2008-07-16 Thread stefan kersten
On 14.07.2008, at 20:48, Don Stewart wrote: Yes, we have long been discussing a generic Stream library to which the various sequence structures can be translated to and from. Already it is useful to say, stream bytestrings into uvectors and out to lists. could the Stream interface be made

[Haskell-cafe] uvector and the stream interface

2008-07-14 Thread stefan kersten
currently i'm working on stuff that looks something like this: 1 read soundfile from disk in blocks of N samples (IOCArray, hsndfile package) 2 convert to CArray with unsafeFreeze (simple O(1) cast, carray package) 3 perform FFT (CArray, fftw package) 4 convert to UArr (uvector package) 5 do

Re: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread Don Stewart
sk: currently i'm working on stuff that looks something like this: 1 read soundfile from disk in blocks of N samples (IOCArray, hsndfile package) 2 convert to CArray with unsafeFreeze (simple O(1) cast, carray package) 3 perform FFT (CArray, fftw package) 4 convert to UArr (uvector

Re: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread Jules Bean
Don Stewart wrote: sk: currently i'm working on stuff that looks something like this: 1 read soundfile from disk in blocks of N samples (IOCArray, hsndfile package) 2 convert to CArray with unsafeFreeze (simple O(1) cast, carray package) 3 perform FFT (CArray, fftw package) 4 convert to

Re: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread stefan kersten
On 14.07.2008, at 18:42, Jules Bean wrote: It would be helpful to see the programs people are writing with uvector, so I can polish up the API some more :) It would also be helpful to have someone explain why we have: Ptr a ByteString IOUArray IOCArray Data.Storable.StorableArray UArr Of

Re: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread Don Stewart
jules: Don Stewart wrote: sk: currently i'm working on stuff that looks something like this: 1 read soundfile from disk in blocks of N samples (IOCArray, hsndfile package) 2 convert to CArray with unsafeFreeze (simple O(1) cast, carray package) 3 perform FFT (CArray, fftw package) 4

Re[2]: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread Bulat Ziganshin
Hello Don, Monday, July 14, 2008, 9:19:19 PM, you wrote: An abstraction stack: it would be great to document these things on wiki like we've documented old arrays -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___

Re: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread Don Stewart
sk: On 14.07.2008, at 18:42, Jules Bean wrote: It would be helpful to see the programs people are writing with uvector, so I can polish up the API some more :) It would also be helpful to have someone explain why we have: Ptr a ByteString IOUArray IOCArray

Re: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread Lyle Kopnicky
Don Stewart wrote: Yes, we have long been discussing a generic Stream library to which the various sequence structures can be translated to and from. Already it is useful to say, stream bytestrings into uvectors and out to lists. Isn't there already such a thing?

Re: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread Don Stewart
lists: Don Stewart wrote: Yes, we have long been discussing a generic Stream library to which the various sequence structures can be translated to and from. Already it is useful to say, stream bytestrings into uvectors and out to lists. Isn't there already such a thing?

Re: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread Roman Leshchinskiy
Jules Bean wrote: It would also be helpful to have someone explain why we have: Ptr a ByteString IOUArray IOCArray Data.Storable.StorableArray UArr Of course, I know the answers to some of those questions, ByteString is obviously less polymorphic than all the others there, and Ptr a doesn't

Re: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread Roman Leshchinskiy
stefan kersten wrote: (2) personally i much prefer the list-like interface provided by the stream-fusion powered libraries (ndp, uvector, vector). can't the stream-fusion framework and correspondingly the vector interface be separated from the memory representation, provided a particular