Re: [Haskell-cafe] "Rebox Package" or "To Hackage or not to Hackage"

2009-12-08 Thread Vitaliy Akimov
Hi John, I don't know if this is useful for you, but these are instances of Cofunctor's comap. For example if we use TypeCompose package we have: rebox f = unFlip . cofmap f . Flip The rest are also Cofunctors. There are a few options. You can either specify instances or use type combinators fro

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-18 Thread Vitaliy Akimov
failed (Resource temporarily unavailable (WSAEWOULDBLOCK)) [1] http://hpaste.org/6476 Vitaliy. 2008/3/18, Adam Langley <[EMAIL PROTECTED]>: > On Tue, Mar 18, 2008 at 3:41 AM, Vitaliy Akimov > > <[EMAIL PROTECTED]> wrote: > > > Unfortunally this way seems to be w

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-18 Thread Vitaliy Akimov
> So that's why it doesn't work on Windows, I think I should find some > way to make a socket unblocking after its creation. Unfortunally this way seems to be wrong. Error codes for winsockets and BSD-sockets are different. ___ Haskell-Cafe mailing lis

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-18 Thread Vitaliy Akimov
2008/3/17, Adam Langley <[EMAIL PROTECTED]>: > On Mon, Mar 17, 2008 at 2:29 AM, Vitaliy Akimov > > > The important point here is that the recvFrom calls in > Network.Socket[1] don't block. Yes, this is the answer. Network.Socket.socket calls System.Posix.Internals.setN

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-17 Thread Vitaliy Akimov
s/latest/html/libraries/base/Control-Concurrent.html#4 2008/3/14, Adam Langley <[EMAIL PROTECTED]>: > On Fri, Mar 14, 2008 at 8:51 AM, Vitaliy Akimov > > <[EMAIL PROTECTED]> wrote: > > > > I assume that you're binding the libc function directly here: > &g

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-14 Thread Vitaliy Akimov
> I assume that you're binding the libc function directly here: I'm using Network.Socket. Sory if it's not clear from my previous posts. > In that case, you need to have the RTS manage sleeping your thread for > you. You should make the socket non-blocking and handle the EAGAIN and > EWOULDBLO

[Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-14 Thread Vitaliy Akimov
er for non connection based protocols. 2008/3/14, Vitaliy Akimov <[EMAIL PROTECTED]>: > Hello, I have a problem with building multithreaded UDP server. If > main thread is waiting for new request in recvFrom all other threads > are blocked too. I've checked every variant with

[Haskell-cafe] all threads are blocked by recvFrom

2008-03-14 Thread Vitaliy Akimov
Hello, I have a problem with building multithreaded UDP server. If main thread is waiting for new request in recvFrom all other threads are blocked too. I've checked every variant with forkIO,forkOS,-threaded etc, nothing's helped. After reading GHC docs I've understood this is happened becouse fo

Re: [Haskell-cafe] Tutorial: Curry-Howard Correspondence

2007-10-17 Thread Vitaliy Akimov
Very clear tutorial indeed. But why isn't propCC shown as Pierce's Law? And Excluded middle is proven on such basis. Vitaliy. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] PROPOSAL: New efficient Unicode string library.

2007-09-25 Thread Vitaliy Akimov
Hi, thanks for proposal, Why questions connected with converting are considered only? The library i18n should give a number of other services such as normalization, comparison, sorting, etc. Furthermore it's not so easy to keep such library up to date. Why simply do not make a bindings to IBM ICU (

Re: [Haskell-cafe] Monad for Set?

2007-08-07 Thread Vitaliy Akimov
> > If you also read the rest of that thread, you'll see that with a recent > GHC HEAD, you should be able to avoid the need for the Teq witness. > http://www.cs.chalmers.se/~rjmh/Papers/restricted-datatypes.ps here is solution which doesn't require GADT and HEAD, but it does require changing of m