[Haskell-cafe] Library API design: functional objects VS type classes

2013-03-04 Thread Rob Stewart
Hi, I have a question about API design for Haskell libraries. It is a simple one: functional object data structures encapsulating mutable state VS type classes encapsulating mutable state Here is a simple example. I present an API: using a type class `FooC`, and aso as a data structure `FooT`.

[Haskell-cafe] Exceeding OS limits for simultaneous socket connections

2012-01-30 Thread Rob Stewart
indeed cause an error on the receiving node, by pushing the number of open connections to the same socket on the master node, beyond the 1024 limit permitted by the OS. Am I missing something? One would have thought such a problem occurs frequently with Haskell web servers and the like.. ? -- Rob

Re: [Haskell-cafe] STM atomic blocks in IO functions

2012-01-14 Thread Rob Stewart
On 14 January 2012 18:05, Steffen Schuldenzucker sschuldenzuc...@uni-bonn.de wrote: I think consistent state here means that you can be sure no other thread has modified a, say, TVar, within the current 'atomically' block. OK, well take a modified example, where I am wanting to call an IO

[Haskell-cafe] STM atomic blocks in IO functions

2012-01-13 Thread Rob Stewart
guaranteed thread safety if, say, I have a number of atomically blocks in an IO function. Here's my example: http://pastebin.com/Hit5vKmk . Is this example permissible? thanks, -- Rob Stewart ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http