Hello Bulat,
Bulat Ziganshin wrote:
> the fastest way to calculate dot product is:
>
> dot :: STUArray s Int Double -> STUArray s Int Double -> ST s Double
> dot x y = do
> let (l,r) = bounds x
> cycle sum i | sum `seq` i>r = return sum
> cycle sum i = do xi
Hello Gunnar,
Thursday, April 20, 2006, 7:34:33 PM, you wrote:
> Thanks a lot, it works now. I believed that writeSTRef would always
> evaluate its arguments because ST is strict, but apparently I was
> mistaken :)
strict ST monad means that all operations inside it are performed
immediately and
On 4/20/06, Gunnar Kedenburg <[EMAIL PROTECTED]> wrote:
> Hello,
>
> a friend and I were recently experimenting with mutable arrays. We tried
> to implement a simple dot product on STUArrays using a 'while' loop.
> Unfortunately, every implementation we p
Hello Bulat,
Bulat Ziganshin wrote:
> it seems that you just construct huge unevaluated thunk. making things
> stricter is a whole art, in this case try the following:
> [...]
Thanks a lot, it works now. I believed that writeSTRef would always
evaluate its arguments because ST is strict, but appa
Hello Gunnar,
Thursday, April 20, 2006, 4:29:29 PM, you wrote:
> a friend and I were recently experimenting with mutable arrays. We tried
> to implement a simple dot product on STUArrays using a 'while' loop.
> Unfortunately, every implementation we produced caused a stack
Hello,
a friend and I were recently experimenting with mutable arrays. We tried
to implement a simple dot product on STUArrays using a 'while' loop.
Unfortunately, every implementation we produced caused a stack overflow.
Switching to other implementations of 'while' or to IO
Michael Weber ([EMAIL PROTECTED]) wrote:
[...]
: $ cvs log ghc/lib/std/PrelArr.lhs
:
: revision 1.19
: date: 2000/03/14 12:16:00; author: simonmar; state: Exp; lines: +57 -57
: Simplfy the mutable array story:
: - rename MutableArray to STArray (and similarly
: for all oper
On Tue, May 09, 2000 at 11:37:46 +0100, Marc van Dongen wrote:
> What does one have to do to use mutable arrays?
> An old program won't compile anymore with a very
> recent ghc from CVS. I am using GlaExts.
$ cvs log ghc/lib/std/PrelArr.lhs
revision 1.19
date: 2000/03/14 12:
Hello again,
Sorry for asking again but I can't find the
answer in the on line user manual.
What does one have to do to use mutable arrays?
An old program won't compile anymore with a very
recent ghc from CVS. I am using GlaExts.
Thanks in advance.
Regards,
Marc van Dongen
--
Hello all,
I wanted to recompile some old programs with the
latest ghc from CVS. MutableArray wasn't known any
more. I do import GlaExts. What am I missing?
Regards,
Marc van Dongen
--
Marc van Dongen, CS Dept | phone: +353 21 4903578
University College Cork, NUIC | Fax:+353 21 49
10 matches
Mail list logo