Re: deriving (was Re: storing to a file)

2002-11-15 Thread Mark Carroll
On Thu, 14 Nov 2002, matt hellige wrote: (snip) well, here's one way it might work: http://research.microsoft.com/~simonpj/Papers/derive.htm I'll take a look at that - thanks - it might answer a few of my generic programming questions. although i'm not exactly sure what you mean by 'add your

RE: deriving (was Re: storing to a file)

2002-11-15 Thread Simon Peyton-Jones
| I was thinking that it might be nice to be able to write Haskell to add, | say, a deriving XML or deriving ASN1 feature whose instances provide | methods to convert between Haskell data structures and those formats, | instead of having to hack the compiler to achieve such automated method |

storing to a file

2002-11-14 Thread Johan Steunenberg
Hello, I am new to haskell, and to functional programming, and wondering how to store a Double, or any non-char, to a file. Do I have to make a char array of the double and store that? Or is it preferred to use the show and read functions? Thanks in advance, johan steunenberg

Re: storing to a file

2002-11-14 Thread Ferenc Wagner
Johan Steunenberg [EMAIL PROTECTED] writes: how to store a Double, or any non-char, to a file. I can give you a general advice: store it in ASCII format via show, unless you have *VERY* strong reasons against it. Yes, it results in bigger files (but you can compress them), and slower (what

Re: storing to a file

2002-11-14 Thread Johan Steunenberg
Hello Feri, thanks for your advice, I guess it sweetens the situation, though I really would like to know how to store in a binary format. Have a nice day, Johan Am Don, 2002-11-14 um 11.15 schrieb Ferenc Wagner: Johan Steunenberg [EMAIL PROTECTED] writes: how to store a Double, or any

Re: storing to a file

2002-11-14 Thread Mark Carroll
On 14 Nov 2002, Johan Steunenberg wrote: thanks for your advice, I guess it sweetens the situation, though I really would like to know how to store in a binary format. http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne/haskell_libs/Binary.html might be interesting for you. Actually,

Re: storing to a file

2002-11-14 Thread Christopher Milton
For some reason, the York ftp links never work for me, so here are the links for the Binary data papers (practically all of their webpages only point to ftp://; for papers): Heap Compression and Binary I/O in Haskell Malcolm Wallace and Colin Runciman

Re: storing to a file

2002-11-14 Thread Hal Daume III
There's been mention of a Binary module; there is also one in the GHC CVS repository under (I think) compiler/ghc/utils/Binary.hs. There is currently discussion on the libraries list about getting a Binary module into the standard libraries. We are currently working out some details, but it will

Re: storing to a file

2002-11-14 Thread C.Reinke
There's been mention of a Binary module; .. That said, there was also a post about using plain text. I tend to agree, except for certain cases. However, that is *not* to say that you should necessarily use Show/Read. | Actually, deriving binary would be a nice thing to have in general |

Binary read/write WAS [storing to a file]

2002-11-14 Thread Shawn P. Garbett
I've been fiddling with binary read/write in Haskell. I put together a little example demonstrating my lack of understanding. It creates a connection requestion XAtom and spits it out over a socket. My real hangup occurs when I get a String back from the Socket and would like it nicely

Re: Binary read/write WAS [storing to a file]

2002-11-14 Thread Alastair Reid
I've been fiddling with binary read/write in Haskell. I put together a little example demonstrating my lack of understanding. It creates a connection requestion XAtom and spits it out over a socket. My real hangup occurs when I get a String back from the Socket and would like it nicely