Page 1 of 1

Question about IO in Haskell

PostPosted: 18 Apr 2009, 15:47
by staraeries
Hi everybody, I am new on this forum.

I am writing a chess engine in Haskell as final year project for my computer course. The Engine is now done, except one thing, to connect my engine with Winboard. I have no clue which function should I use for input and output, I have been looking around but still can't figure out how it done, so anyone can give me an example how do I send a simple command to Winboard?

Can I just simply use putStr and getLine? (thats probably not works, since I have tried it ...)

Thnx in advance :D

Re: Question about IO in Haskell

PostPosted: 18 Apr 2009, 16:22
by F. Bluemers
staraeries wrote:Hi everybody, I am new on this forum.

I am writing a chess engine in Haskell as final year project for my computer course. The Engine is now done, except one thing, to connect my engine with Winboard. I have no clue which function should I use for input and output, I have been looking around but still can't figure out how it done, so anyone can give me an example how do I send a simple command to Winboard?

Can I just simply use putStr and getLine? (thats probably not works, since I have tried it ...)

Thnx in advance :D

Dunno Haskell but putStr and getLine sounds about right,I bet it is the buffering that gets in the way.
Maybe this helps:
http://www.haskell.org/onlinelibrary/io.html
"21.6 Buffering Operations"
Best
Fonzy

Re: Question about IO in Haskell

PostPosted: 22 Apr 2009, 20:59
by staraeries
Doh, yeah you were right, I just simply need to turn the buffering off. I didn't think that someone would answer that early and spend another day to finally figure out what the problem was :( .

Anyway, thank you for answer.