Question about IO in Haskell

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Question about IO in Haskell

Postby staraeries » 18 Apr 2009, 15:47

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
staraeries
 
Posts: 2
Joined: 18 Apr 2009, 04:51

Re: Question about IO in Haskell

Postby F. Bluemers » 18 Apr 2009, 16:22

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
F. Bluemers
 
Posts: 175
Joined: 04 Sep 2008, 16:56
Location: Netherlands

Re: Question about IO in Haskell

Postby staraeries » 22 Apr 2009, 20:59

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.
staraeries
 
Posts: 2
Joined: 18 Apr 2009, 04:51


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 34 guests