[Haskell] ANNOUNCE: Another Haskell MIME Library

2006-12-03 Thread Dominic Steinitz
What's the betting they all have Base64 in them. Base64 is like a virus; everyone seems to have their own copy. I put it in the crypto library (along with MD5 another virus-like module) in the hope that we would end up with one version of both. Clearly that hasn't worked. Any suggestions? Dom

Re: [Haskell] Using putStrLn/printf from DLL in GUI application

2006-12-03 Thread Krasimir Angelov
withConsole doesn't make much sense. The meaning of allocConsole/freeConsole is more like showConsole/hideConsole. You may want to show the console from DllMain when the dll is loaded and to hide it when it is unloaded. You can't do this with withConsole. Cheers, Krasimir On 12/2/06, Sven Panne

Re: [Haskell] Using putStrLn/printf from DLL in GUI application

2006-12-03 Thread Sven Panne
Am Sonntag, 3. Dezember 2006 12:07 schrieb Krasimir Angelov: > withConsole doesn't make much sense. The meaning of > allocConsole/freeConsole is more like showConsole/hideConsole. You may > want to show the console from DllMain when the dll is loaded and to > hide it when it is unloaded. You can't

Re: [Haskell] Help needed interrupting accepting a network connection

2006-12-03 Thread Chris Kuklewicz
Cat Dancer wrote: >> > I'd certainly be most happy not to use asynchronous exceptions as the >> > signalling mechanism, but how would you break out of the accept, >> > except by receiving an asynchronous exception? >> >> Short Version: You trigger a graceful exit using a TVar... >> ...and then you

Re: [Haskell] Help needed interrupting accepting a network connection

2006-12-03 Thread Chris Kuklewicz
I realized there is another problem, since my code holds onto the ThreadId's the thread data structures may or may not be getting garbage collected and for a long running server the list of children grows without bound. So I changed it to periodically clean out the finished child threads from th

[Haskell] Safe forking question

2006-12-03 Thread Chris Kuklewicz
In response to question by Cat Dancer <[EMAIL PROTECTED]> I wrote a few tests of sending asynchronous signal to a thread using GHC 6.6 The goal was to run a child thread via forkIO and use handle or finally to respond to the thread's demise. Unfortunately, it seems that there is an irreducible w

Re: [Haskell] Help needed interrupting accepting a network connection

2006-12-03 Thread Chris Kuklewicz
After more testing I found an ugly problem that a child could be killed before the finally installed the handler that calls (putMVar doneMVar ()) Thus I have added slightly more paranoid code to ensure that the child is running before exposing the (T)MVar/ThreadId to the rest of the application.

[Haskell] Jones-optimal, typed, symbolic differentiation of (compiled) functions

2006-12-03 Thread oleg
We show symbolic differentiation of a wide class of numeric functions without any interpretative overhead. The functions to symbolically differentiate can be given to us in a compiled form (in .hi files); their source code is not needed. We produce a (compiled, if needed) function that is an exact