[Haskell-beginners] command-line interaction with running process
Elise Huard
haskell at elisehuard.be
Wed Mar 4 09:32:53 UTC 2015
Hi,
I'm trying to do the following: implementing a command-line interface
to directly interact with the state or the parameters of a
looping/running process (a game, to be specific).
My first thought is to fork a thread, passing in a TChan/TVar or
similar to enable communication, and to have the command-line
interface on the thread (getLine or haskelline ...).
Another option would be to have a bona fide server-client interface
(with sockets or others), to fork a thread again to run the server and
to connect using the client library - which would allow me to use ghci
and have transparent serialization under the hood.
Are there known use cases? Am I missing something, for instance is it
possible to interact with a running process directly using ghci?
Any tips?
Thank you,
Elise
More information about the Beginners
mailing list