On Tue, Sep 3, 2013 at 6:56 PM, Simon Yarde simonya...@me.com wrote:
I'm new to Haskell and have reached an impasse in understanding the
behaviour of sockets.
The crux of my line of enquiry is this; how can my application know when
to pause in generating its chunked output if send doesn't
On Wed, Aug 21, 2013 at 4:55 AM, Rogan Creswick cresw...@gmail.com wrote:
Does anyone have PPC binaries for GHC 7.x?
I've been trying to help a PPC user compile a large haskell application,
and it (and it's dependencies) require a newer ghc; the latest ppc binaries
we've found are for 6.10,
On Thu, Aug 8, 2013 at 12:22 PM, Lyle Kopnicky li...@qseep.net wrote:
...
So I went to the Data.Hashable page and looked up examples on how to
derive a Hashable instance for my datatype:
http://hackage.haskell.org/packages/archive/hashable/latest/doc/html/Data-Hashable.html
The problem
On Sun, Jul 14, 2013 at 7:31 AM, Clark Gaebel cgae...@uwaterloo.ca wrote:
Similarly, I've always used:
import qualified Data.HashSet as S
nub :: Hashable a = [a] - [a]
nub = S.toList . S.fromList
And i can't think of any type which i can't write a Hashable instance, so
this is extremely
On Mon, Jul 8, 2013 at 9:03 PM, Leon Smith leon.p.sm...@gmail.com wrote:
I just fixed a fairly serious performance problem with postgresql-libpq's
binding to PQescapeStringConn; in was exhibiting a non-linear slowdown
when more strings are escaped and retained.
I'd like to point out a
I've been struggling with a similar situation: a client and server that
communicate with binary-encoded messages, sending heartbeats (dummy
messages) every 30 seconds, and timing out the connection if no response is
received in 3 minutes. The client sends data to the server, while also
listening
On Wed, Mar 6, 2013 at 1:42 AM, Michael Snoyman mich...@snoyman.com wrote:
I'm still not sure I follow this. In the example I linked to, the go
function within breaker could arbitrarily modify the data before it gets
passed on to the inner Conduit. So it seems like it should be possible to
On Mon, Mar 4, 2013 at 5:50 PM, Rob Stewart robstewar...@gmail.com wrote:
...
-
import Control.Concurrent
-- API approach 1: Using type classes
class FooC a where
mkFooC :: IO a
readFooC :: a - IO Int
incrFooC :: a - IO ()
I recommend taking 'mkFooC' out of the typeclass. It
On Tue, Mar 5, 2013 at 9:24 AM, Michael Snoyman mich...@snoyman.com wrote:
...
I'm not sure if I entirely understand your use case, but in general it
should be possible to have multiple Conduits running one after the other.
Here's an example of restarting an accumulator after every multiple
On Sun, Mar 3, 2013 at 10:24 PM, Joey Adams joeyadams3.14...@gmail.comwrote:
...
Here's a possible API for a resumable Conduit:
newtype ResumableConduit i m o = -- hidden --
newResumableConduit :: Monad m = Conduit i m o - ResumableConduit i
m o
-- | Feed the 'Source' through
Thanks for the response. I spent some time thinking about leftovers and
understand the Category issue now. Thanks for clearing that up.
While trying to work conduits into a program I'm working on, I find myself
wanting something more powerful: a resumable Conduit.
For example, consider
On Thu, Feb 28, 2013 at 9:18 PM, Joey Adams joeyadams3.14...@gmail.comwrote:
Can I transform a conduit so some values are passed through unchanged, but
others go through the conduit? For example:
right :: Conduit i m o - Conduit (Either x i) m (Either x o)
Actually, I didn't need
On Tue, Oct 23, 2012 at 5:03 PM, José A. Lopes jose.lo...@ist.utl.pt wrote:
Hey everyone,
I changed my code I now I get the following error message
Main: thread blocked indefinitely in an MVar operation
Before the change, I was using the State monad with runState.
Then, I changed the
On Sat, Sep 29, 2012 at 8:46 PM, KC kc1...@gmail.com wrote:
http://martinfowler.com/eaaDev/EventSourcing.html
http://martinfowler.com/articles/lmax.html
This notion of Capture all changes to an application state as a
sequence of events sounds a lot like what John Carmack did in Quake 3
[1]:
On Wed, Aug 15, 2012 at 3:38 PM, Bryan O'Sullivan b...@serpentine.com wrote:
I propose that the sense of the recommendation around upper bounds in the
PVP be reversed: upper bounds should be specified only when there is a known
problem with a new version of a depended-upon package.
I, too,
On Tue, Aug 7, 2012 at 2:03 PM, Daniel Trstenjak
daniel.trsten...@gmail.com wrote:
Data structure containing elements which are instances of the same type class
Are you looking for existential quantification [1]?
data SomeFoo = forall a. Foo a = a
[1]:
system-time-monotonic [1] provides access to the system's monotonic
clock. Usage looks like this:
* Use 'newClock' to create a new monotonic clock
* Use 'clockGetTime' to see how much time has elapsed since the clock
was created.
This package currently supports Linux and Windows. It might
This package provides a bounded channel type for STM. TBChan (in
stm-chans) and TBQueue (introduced in stm 2.4) are bounded channels
that limit the number of items in the channel. SBChan, on the other
hand, limits the total size of items in the channel, where size is
defined by providing an
On Fri, Jul 27, 2012 at 9:52 AM, Marco Túlio Gontijo e Silva
marcotmar...@gmail.com wrote:
I thought that the only thing I needed to take care while using
unsafePerformIO was knowing that the time of execution is undetermined
and that it could even run more than once. This is not a problem for
Here's a useful little function:
-- | Fork a thread, but wait for the main thread to perform a setup action
-- using the child's 'ThreadID' before beginning work in the child thread.
forkSetup :: (ThreadId - IO (Maybe a, r))
-- ^ Setup action to be called before the
On Fri, Jul 13, 2012 at 2:26 PM, Joey Hess j...@kitenet.net wrote:
Are there any common gotchas with converting to the threaded runtime
that might provide a hint to what's wrong? My code does not currently
use Control.Concurrent or threads, although it does use some libraries
like MissingH
On Mon, Jul 9, 2012 at 8:28 AM, Roman Cheplyaka r...@ro-che.info wrote:
Very nice!
Here's a patch to generalize foreach to any Foldable:
https://github.com/joeyadams/haskell-control-monad-loop/pull/1
Thanks for the patch! I merged it, but I plan to wait a little while
before uploading
On Mon, Jul 9, 2012 at 3:56 AM, Eugene Dzhurinsky jdeve...@gmail.com wrote:
Hi all!
I created simple application, which uses sqlite3 as it's datastore back-end. I
faced no problems when building and running it on Linux, but after I tried to
build it on Windows, I see weird linking error:
You
This package provides imperative-style loops supporting continue and
break. For example:
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Loop
import Control.Monad.Trans.Class
main :: IO ()
main =
foreach [0..] $ \i -
foreach
On Sat, Apr 28, 2012 at 2:23 PM, H. M. h._h._...@hotmail.com wrote:
There are two threads, one which is waits on input via
hGetLine
and another, which should terminate this thread or close this handle.
hClose
as well as
killThread
doesn't seem to work, caused by the fact, that the thread
On Sun, Mar 4, 2012 at 1:27 PM, Arnaud Bailly arnaud.oq...@gmail.com wrote:
Hello Cafe,
I am looking for a data structure that would have the following
informal properties:
- allow efficient retrieval of minimum element for some ordering
relation on a computed property of the elements
-
On Fri, Mar 2, 2012 at 3:04 PM, Alexander V Vershilov
alexander.vershi...@gmail.com wrote:
Hello, Paul.
It seems you should not use 3 threads, but run in a data-driven behaviour with
one thread per client.
I don't think this will work for Paul's situation. He needs to be
able to send
On Fri, Mar 2, 2012 at 7:34 PM, Joey Adams joeyadams3.14...@gmail.com wrote:
I'll try to put together a simple chat server example, like the one I
wrote for stm-channelize.
Here it is:
https://github.com/joeyadams/haskell-chat-server-example
See, in particular, the serveLoop function
On Wed, Feb 22, 2012 at 10:23 PM, Johan Tibell johan.tib...@gmail.com wrote:
But the network package doesn't try to let you work with raw file
descriptors elsewhere (e.g. send and recv.) I'm not saying that
functions on Fds aren't useful, they are, just that the network
package is the wrong
On Wed, Feb 22, 2012 at 5:56 AM, L Corbijn aspergesoe...@gmail.com wrote:
On Wed, Feb 22, 2012 at 5:58 AM, Joey Adams joeyadams3.14...@gmail.com
wrote:
I released network-socket-options 0.2, adding setSocketTimeouts and
setHandleTimeouts. I'll post an announcement in a separate thread
once
Thanks for the review!
On Wed, Feb 22, 2012 at 11:15 AM, Johan Tibell johan.tib...@gmail.com wrote:
The API looks fine except:
HasSocket - I don't think we want to abstract over sockets here, as we
don't do so in the rest of the module.
I know it's a bit ugly, but not having it makes it hard
On Tue, Feb 21, 2012 at 7:36 PM, Conrad Parker con...@metadecks.org wrote:
awesome! I've prepared some patches for network to add this module and
its tests, in this branch:
https://github.com/kfish/network/tree/options
Cool, thanks!
I didn't modify any other modules, perhaps
I released network-socket-options 0.2, adding setSocketTimeouts and
setHandleTimeouts. I'll post an announcement in a separate thread
once the Haddock documentation is generated.
-Joey
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
with network-bytestring.
-Joey Adams
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Tue, Jan 17, 2012 at 3:20 PM, David Barbour dmbarb...@gmail.com wrote:
I'd say use of asynchronous exceptions should be a last resort. ...
I agree. However, network libraries in Haskell (e.g. Handle,
Network.TLS) generally don't provide the primitives needed to do that
on the receiving end.
I uploaded a package that creates an STM layer over a network connection:
http://hackage.haskell.org/package/stm-channelize
I haven't used it in anger yet, but I hope it's a step in the right
direction. I included a sample chat client and server. The client is
pretty cute:
main =
On Sat, Jan 14, 2012 at 1:29 AM, Bardur Arantsson s...@scientician.net wrote:
So, the API becomes something like:
runSocketServer :: ((Chan a, Chan b) - IO ()) - ... - IO ()
where the first parameter contains the client logic and A is the type of
the messages from the client and B is the
I'm not happy with asynchronous I/O in Haskell. It's hard to reason
about, and doesn't compose well. At least in my code.
I'm currently trying to build a networking layer for my application
using Network.TLS. Here is a rather minimalist API:
newtype Connection = Connection (TLSCtx Handle)
On Thu, Jan 12, 2012 at 7:48 AM, Johan Brinch brin...@gmail.com wrote:
Hi all,
I'm seeing the Control.Concurrent.STM.atomically was nested error,
but I just can't figure out what's happening. I'm not using any unsafe
IO (only for debug printing), and the test program is only running one
On Wed, Oct 26, 2011 at 4:24 PM, Bas van Dijk v.dijk@gmail.com wrote:
I have one question regarding your use of atomicModifyIORef:
x - atomicModifyIORef ref (\_ - (tmstr, ()))
x `seq` return ()
Can't you write that as just: writeIORef ref tmstr? If you're not
using the previous value
40 matches
Mail list logo