[Haskell-cafe] Space leaks in function that uses Data.Vector.Mutable

2013-01-23 Thread Andrey Yankin
Hi! I have a low-level function for insertion element into mutable vector. It looks like this: place :: (PrimMonad m) = MV.MVector (PrimState m) (Int, t) - (Int, t) - Int - m () place v max@(val1,_) i = place' i where place' i = do let j = i - 1 if j 0 then return ()

Re: [Haskell-cafe] Repa: traverse delayed array multiple times

2013-01-14 Thread Andrey Yankin
up further as you won't be testing the boundary conditions on every loop. Sadly, there are much more sophisticated formulae and more than one boundary conditions on each side (and these conditions are moving)... 2013/1/14 Dominic Steinitz domi...@steinitz.org Andrey Yankin yankin013 at gmail.com

[Haskell-cafe] Repa: traverse delayed array multiple times

2013-01-13 Thread Andrey Yankin
Greetings to all! Currently I'm trying to do physical simulations using finite difference method. To accomplish this I need to repeat some manipulations on 2-dimensional grid several thousands or millions times, you know. Is it possible to do using repa? I wrote this rough sketch that shows what

Re: [Haskell-cafe] What's wrong with these foreign calls?

2012-07-12 Thread Andrey Yankin
For me it seems like calls to GLFW are normal but when I use indirectly GL (through GLFW) I see a mess. How could not they be connected properly? Please, give me any hint... I use Ubuntu 12.04 and The Glorious Glasgow Haskell Compilation System, version 7.4.1 2012/7/11 Андрей Янкин

Re: [Haskell-cafe] What's wrong with these foreign calls?

2012-07-12 Thread Andrey Yankin
... done. Loading package GLFW-b-0.1.0.2 ... linking ... done. DefaultProfile Version {versionBranch = [2,7,2], versionTags = []} Version {versionBranch = [0,1944,1342031663], versionTags = []} Trying to open the window False 2012/7/12 Andrey Yankin yankin...@gmail.com For me it seems like calls

[Haskell-cafe] Another topic of ghc --make/ghci differences

2012-07-12 Thread Andrey Yankin
1. I wrote this: -8- test.hs --- module Main where import qualified Graphics.UI.GLFW as GLFW main = do True - GLFW.initialize print = GLFW.openGLProfile print = GLFW.getGlfwVersion print = GLFW.getGlVersion print Trying to open the window result -

Re: [Haskell-cafe] Another topic of ghc --make/ghci differences

2012-07-12 Thread Andrey Yankin
OK This is my answer: http://stackoverflow.com/questions/7867290/freeglut-does-not-work-in-ghci Linux Nvidia drivers doesn't work with ghci somehow... 2012/7/12 Andrey Yankin yankin...@gmail.com 1. I wrote this: -8- test.hs --- module Main where import qualified Graphics.UI.GLFW