[Haskell-cafe] How to translate Repa 2 program to efficient Repa 3 code?

2012-05-26 Thread Michael Serra
Hi Haskellers, I've posted this question (and my code) to stack overflow as well ( http://stackoverflow.com/questions/10747079/what-are-the-key-differences-between-the-repa-2-and-3-apis), so if anyone here has the answer, I'll post it to that site for the world's reference. Using the Repa 2 API, I

[Haskell-cafe] How to translate Repa 2 program to efficient Repa 3 code?

2012-05-26 Thread Michael Serra
Hi Haskellers, I've posted this question (and my code) to stack overflow as well ( http://stackoverflow.com/questions/10747079/what-are-the-key-differences-between-the-repa-2-and-3-apis), so if anyone here has the answer, I'll post it to that site for the world's reference. Using the Repa 2 API, I

[Haskell-cafe] Mitigating state-threading through an application loop

2011-12-20 Thread Michael Serra
Hello Haskellers, I'm implementing a simple tree-manipulating (for sports tournaments) application prototype, with SDL for graphics and simple user interaction. For reference, I've posted the code on hpaste. My question is about code organization: everything was simple a

Re: [Haskell-cafe] Inconsistent window updates with SDL library

2011-05-16 Thread Michael Serra
Oh, in case the code would be helpful.. ;) import Data.Set (toList, fromList, intersection, size) import Data.List ((\\)) import System.Random (randomRIO) import Data.Word (Word32) import Graphics.UI.SDL as SDL main = do SDL.init [InitVideo, InitTimer, InitEventthread] w <- setVideoMode 1440

[Haskell-cafe] Inconsistent window updates with SDL library

2011-05-16 Thread Michael Serra
Greetings Haskellers, I'm relatively new to the language and I'm writing a basic game of life simulation to try out the SDL bindings. The program updates the window with the next generation of cells each time you press 'n', and the problem I'm finding is that every so often the window stops upda