[Haskell-cafe] Tutorial for using the state monad or a better suggestion?

2008-02-22 Thread Jefferson Heard
So the reason I keep pinging the list so much of late is I'm currently writing a GLUT program to visualize a heirarchical clustering of 18,000+ protein-protein interaction pairs (and associated gene-ontology terms). Thanks for the help on reading CSVs, those who wrote me back... my program

Re: [Haskell-cafe] Tutorial for using the state monad or a better suggestion?

2008-02-22 Thread Antoine Latter
I was trying to solve a similar problem while learning the FastCGI package. The regular CGI package allows the use of ReaderT to hold config data. Because FastCGI does the running of the passed in CGI action within a few calls to alloca :: (Ptr a - IO b) - IO b, I couldn't figure out a way to

Re: [Haskell-cafe] Tutorial for using the state monad or a better suggestion?

2008-02-22 Thread Brandon S. Allbery KF8NH
On Feb 22, 2008, at 9:15 , Jefferson Heard wrote: Now I'm to the point of making this thing interactive, and I I'm trying to figure out the Haskell way of doing this. Last time I wrote a program like this, I made a record data type with all the state and placed it into an IORef and curried it

Re: [Haskell-cafe] Tutorial for using the state monad or a better suggestion?

2008-02-22 Thread Jefferson Heard
Thanks. There seems to be some consensus developing around using IORefs to hold all the program state. -- Jeff On Fri, Feb 22, 2008 at 12:11 PM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On Feb 22, 2008, at 9:15 , Jefferson Heard wrote: Now I'm to the point of making this thing

Re: [Haskell-cafe] Tutorial for using the state monad or a better suggestion?

2008-02-22 Thread Don Stewart
jefferson.r.heard: So the reason I keep pinging the list so much of late is I'm currently writing a GLUT program to visualize a heirarchical clustering of 18,000+ protein-protein interaction pairs (and associated gene-ontology terms). Thanks for the help on reading CSVs, those who wrote me