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 ::

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 haskel

Re: [Haskell-cafe] Basic binary IO

2008-01-19 Thread Brandon S. Allbery KF8NH
On Jan 20, 2008, at 2:26 , Jamie Love wrote: I'm wondering if anyone has a reference to any binary IO and data conversion tutorials. You want the binary package: http://hackage.haskell.org/cgi-bin/ hackage-scripts/package/binary-0.4.1 -- brandon s. allbery [solaris,freebsd,perl,pugs,hask

[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[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_I

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 exa

[Haskell-cafe] Basic Binary IO

2006-11-01 Thread Nuno Pinto
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 opening file "somefile" and sepa