Re[2]: [Haskell-cafe] State Variables

2006-05-29 Thread Bulat Ziganshin
Hello Matthew, Monday, May 29, 2006, 10:54:36 PM, you wrote: > If possible I'd like to memory manage on the Haskell side. All of the > calls to BLAS and LAPACK that I'm aware of assume that > all arrays are allocated outside of the C or Fortran that implement the > matrix algorithms. They never

Re: [Haskell-cafe] State Variables

2006-05-29 Thread Matthew Bromberg
If possible I'd like to memory manage on the Haskell side. All of the calls to BLAS and LAPACK that I'm aware of assume that all arrays are allocated outside of the C or Fortran that implement the matrix algorithms. They never return buffers to newly allocated arrays. So what I'd like to do is

Re[2]: [Haskell-cafe] State Variables

2006-05-29 Thread Bulat Ziganshin
Hello Matthew, Monday, May 29, 2006, 8:04:56 PM, you wrote: > What is the difference between the ForeignArray defined in this source > and the StorableArray? The source code of both modules are very similar. the devil in details :) - StorableArray in 6.4 is slow because it uses ForeignPtr. ther

Re: [Haskell-cafe] State Variables

2006-05-29 Thread Matthew Bromberg
What is the difference between the ForeignArray defined in this source and the StorableArray? The source code of both modules are very similar. Bulat Ziganshin wrote: Hello minh, Monday, May 29, 2006, 2:01:29 PM, you wrote: hi, Bulat, i quote the doc for Data.Array.Storable

Re[2]: [Haskell-cafe] State Variables

2006-05-29 Thread Bulat Ziganshin
Hello Matthew, Monday, May 29, 2006, 7:38:40 PM, you wrote: > How hard would it be to build 6.5 on a windows box without visual studio > 2003? there are prebuilt installations at GHC site, last of those is http://www.haskell.org/ghc/dist/current/dist/ghc-6.5.20060328-i386-unknown-mingw32.tar.gz

Re: [Haskell-cafe] State Variables

2006-05-29 Thread Matthew Bromberg
How hard would it be to build 6.5 on a windows box without visual studio 2003? Regards Bulat Ziganshin wrote: Hello minh, Monday, May 29, 2006, 2:01:29 PM, you wrote: hi, Bulat, i quote the doc for Data.Array.Storable : "It is similar to IOUArray but slower. Its advantage is t

Re: [Haskell-cafe] State Variables

2006-05-29 Thread Matthew Bromberg
Yes that's true, if the problem could be formulated as monolothic operations on large matrices, then Matlab will be as fast as anything else. My current Matlab implementation, however, generates hundreds of 'small' matrices (say 32 x 32 complex roughly) and does nasty order cubic operations on

Re[2]: [Haskell-cafe] State Variables

2006-05-29 Thread Bulat Ziganshin
Hello minh, Monday, May 29, 2006, 2:01:29 PM, you wrote: > hi, > Bulat, i quote the doc for Data.Array.Storable : > "It is similar to IOUArray but slower. Its advantage is that it's > compatible with C." > So you speak about Storable because Matthew wants to use BLAS and LAPACK ? of course. IOU

Re: [Haskell-cafe] State Variables

2006-05-29 Thread minh thu
hi, Bulat, i quote the doc for Data.Array.Storable : "It is similar to IOUArray but slower. Its advantage is that it's compatible with C." So you speak about Storable because Matthew wants to use BLAS and LAPACK ? Cheers, mt 2006/5/29, Bulat Ziganshin <[EMAIL PROTECTED]>: Hello Matthew, Monda

Re: [Haskell-cafe] State Variables

2006-05-29 Thread Bulat Ziganshin
Hello Matthew, Monday, May 29, 2006, 1:38:38 AM, you wrote: > The third and final concern is the point of this post. How does one > handle state efficiently in Haskell? > I've seen the various state monads and gained a superficial enough > understanding to be concerned about > how useful they a

Re: [Haskell-cafe] State Variables

2006-05-29 Thread minh thu
ah... simulation in haskell ... that's a thing i thought a bit of .. (disclaimer : i'm not so good at haskell, so... :) here how i've started : you have your global state : it's a bunch of IORef or STRef. Each one maps to one of the individual thing you want to update. You can choose the hierarc

Re: [Haskell-cafe] State Variables

2006-05-29 Thread Alberto Ruiz
On Sunday 28 May 2006 23:38, Matthew Bromberg wrote: > I've been toying with the idea of using Haskell to write a medium sized > simulation > of a wireless network. However I have a number of concerns as I've > begun to > program a bit more in Haskell. > > The first concern is that the simulation

[Haskell-cafe] State Variables

2006-05-28 Thread Matthew Bromberg
I've been toying with the idea of using Haskell to write a medium sized simulation of a wireless network. However I have a number of concerns as I've begun to program a bit more in Haskell. The first concern is that the simulation needs to be fast, much faster than Matlab for example, to jus