Going through the data using getWord8 is a no-go. It is just too slow.
My solution so far has been to get the underlying bytestring and work
with that, but obviously defeats the purpose of using the Get monad.
What might be a better solution?
hGetArray with IOUArrays goes perty fast.
Last time I tried something like this [on Windows], it didn't seem to
work. I wanted to trap arrow keys and so forth, but they seem to be being
used for input history. (I.e., pressing the up-arrow produces
previously-entered lines of text, and none of this appears to be reaching
the Haskell
Yeah, it's broken in windows. Here's the workaround
courtesy of Alistar Bayley. (ticket 2189)
{-# LANGUAGE ForeignFunctionInterface #-}
import Data.Char
import Control.Monad (liftM, forever)
import Foreign.C.Types
getHiddenChar = liftM (chr.fromEnum) c_getch
foreign import ccall unsafe
Graphics are fun.
Here's my version.
http://s201.photobucket.com/albums/aa280/Zakardis/?action=viewcurrent=lambda_haskell_platform.png
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe