Re: [Haskell-cafe] Basic binary IO

2008-01-20 Thread Jamie Love
Ah, thanks Don, Brandon, I looked at this but neglected to read through and understand the example enough. Thanks for the tips, they're a great help. Don Stewart wrote: jamie.love: bmpHeader = runPut $ do put 'B' put 'M' put (0 :: Int32) put (0 ::

[Haskell-cafe] Basic binary IO

2008-01-19 Thread Jamie Love
Hello all, I'm wondering if anyone has a reference to any binary IO and data conversion tutorials. I'm playing around with generating a BMP file in haskell, and am a little stuck on the best way to go about the simple task of creating the BMP header. The header is BM + 4 bytes for file

Re: [Haskell-cafe] Basic binary IO

2008-01-19 Thread Don Stewart
jamie.love: Hello all, I'm wondering if anyone has a reference to any binary IO and data conversion tutorials. A good place to start looking is Data.Binary, http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary I'm playing around with generating a BMP file in haskell,

[Haskell-cafe] Basic Binary IO

2006-11-01 Thread Nuno Pinto
Hi all! Todayi was reading System.IO and didn't manage to understand how it works just by reading it. I looked the internet for some help on this, but only "advanced" information is available. Can anyone show me how to use openBinaryFile ? Just an example, like opening file "somefile" and

Re: [Haskell-cafe] Basic Binary IO

2006-11-01 Thread Donald Bruce Stewart
nuno: Hi all! Today i was reading System.IO and didn't manage to understand how it works just by reading it. I looked the internet for some help on this, but only advanced information is available. Can anyone show me how to use openBinaryFile ? Just an example, like

Re[2]: [Haskell-cafe] Basic Binary IO

2006-11-01 Thread Bulat Ziganshin
Hello Donald, Thursday, November 2, 2006, 4:31:31 AM, you wrote: Just an example, like opening file somefile and separating it into something that can be edited in the code (like 8 bit words) then go to word nr12 and edit the last bit? http://haskell.org/haskellwiki/Binary_IO For