Re: [Haskell-cafe] Array Binary IO & molecular simulation

2009-05-03 Thread Grigory Sarnitskiy
To sum up here is the example that can write two arrays in one file and then read this two arrays back. To restore written data it just reads the file into bytestring, then splits the bytestring into equal parts. The parts are decoded. I suppose the method is suitable for decoding files with unboxe

Re: [Haskell-cafe] Array Binary IO & molecular simulation

2009-05-03 Thread Grigory Sarnitskiy
To sum up here is the example that can write two arrays in one file and then read this two arrays back. To restore written data it just reads the file into bytestring, then splits the bytestring into equal parts. The parts are decoded. I suppose the method is suitable for decoding files with unb

Re: [Haskell-cafe] Array Binary IO & molecular simulation

2009-05-02 Thread Jason Dusek
2009/05/02 Grigory Sarnitskiy : > 2009/05/02 Jason Dusek : >> The original poster should try serializing a tuple of arrays >> instead of serializing each array individually. > > Maybe, but I have some doubts. I have to operate with > thousands of arrays --- are tuples good in such case? No, they

Re: [Haskell-cafe] Array Binary IO & molecular simulation

2009-05-02 Thread Grigory Sarnitskiy
> 2009/05/02 Jason Dusek :>The original poster should try serializing a tuple of> arrays instead of serializing each array individually.Maybe, but I have some doubts.  I have to operate with thousands of arrays --- are tuples good in such case? Moreover it is desirable to write data as it is calcul

Re: [Haskell-cafe] Array Binary IO & molecular simulation

2009-05-02 Thread Jason Dusek
2009/05/02 Krzysztof Skrzętnicki : > 2009/05/02 Jason Dusek : >> I believe Data.Binary includes a header with the data it >> serializes. In consequence, the second and all following >> arrays will be invisible. > > I didn't check the Binary instance for arrays, however I > belive it's not true. Con

Re: [Haskell-cafe] Array Binary IO & molecular simulation

2009-05-02 Thread Krzysztof Skrzętnicki
On Sat, May 2, 2009 at 11:12, Jason Dusek wrote: >  I believe Data.Binary includes a header with the data >  it serializes. In consequence, the second and all following >  arrays will be invisible. [Apologies for Jason for sending this twice to him] I didn't check the Binary instance for arrays,

Re: [Haskell-cafe] Array Binary IO & molecular simulation

2009-05-02 Thread Jason Dusek
I believe Data.Binary includes a header with the data it serializes. In consequence, the second and all following arrays will be invisible. Sorry I can not be of more help. -- Jason Dusek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org ht

Re: [Haskell-cafe] Array Binary IO & molecular simulation

2009-05-01 Thread Claus Reinke
So I wonder of existing projects of such type, both Molecular dynamics and Monte Carlo methods. The fastest Haskell Monte Carlo code I've seen in action is Simon's port of a Monte Carlo Go engine: http://www.haskell.org/pipermail/haskell-cafe/2009-March/057982.html http://www.haskell.org/pipe