RE: [Haskell-cafe] Project postmortem

2005-12-02 Thread Simon Marlow
On 02 December 2005 12:11, Tomasz Zielonka wrote: On Fri, Dec 02, 2005 at 11:20:54AM -, Simon Marlow wrote: If anyone is interested, this turned out to be a bug in the Network.BSD module, namely that getHostByName isn't thread safe because it is based on the C library function

Re: [Haskell-cafe] Project postmortem

2005-12-02 Thread Tomasz Zielonka
On Fri, Dec 02, 2005 at 12:39:25PM -, Simon Marlow wrote: Do I understand correctly that another workaround is - don't compile your programs with -threaded ? No, the bug isn't related to -threaded. It still occurs without -threaded. Let's check that now I understand - so the

RE: [Haskell-cafe] Project postmortem

2005-12-02 Thread Simon Marlow
On 02 December 2005 12:49, Tomasz Zielonka wrote: On Fri, Dec 02, 2005 at 12:39:25PM -, Simon Marlow wrote: Do I understand correctly that another workaround is - don't compile your programs with -threaded ? No, the bug isn't related to -threaded. It still occurs without

RE: [Haskell-cafe] Project postmortem

2005-12-02 Thread Simon Marlow
On 02 December 2005 12:25, Joel Reymont wrote: I thought that if -threaded is not used then all the blocking IO is assigned a separate OS thread. No - the runtime is completely single-threaded without -threaded. Blocking I/O is managed by the runtime. With -threaded, blocking I/O is managed

Threaded runtime (was Re: [Haskell-cafe] Project postmortem)

2005-12-02 Thread Joel Reymont
Simon, On Dec 2, 2005, at 1:16 PM, Simon Marlow wrote: No - the runtime is completely single-threaded without -threaded. Blocking I/O is managed by the runtime. With -threaded, blocking I/ O is managed by a Haskell thread. The programmer shouldn't see any difference in the behaviour of

Re: [Haskell-cafe] Re: wxHaskell and do statements

2005-12-02 Thread Sven Panne
Am Dienstag, 29. November 2005 16:16 schrieb Sebastian Sylvan: IIRC Haskell assumes a tab is 8 spaces. Correctly, it is explicitly specified in the Haskell spec, see: http://haskell.org/onlinereport/syntax-iso.html#layout IMO that's way too much. Haskell tends to take up quite a bit of

[Haskell-cafe] Examining the Haskell stack (read at your own risk ; -))

2005-12-02 Thread Joel Reymont
Simon, You told me a bit about how to examine the Haskell stack by looking at R22 on the PowerPC and $ebx on Intel architectures. I looked at your .gdbinit but could not figure out which macros are to be used. The example below is a bit contrived in that I'm freeing the SSL context

[Haskell-cafe] RE: Examining the Haskell stack (read at your own risk ; -))

2005-12-02 Thread Simon Marlow
On 02 December 2005 14:03, Joel Reymont wrote: You told me a bit about how to examine the Haskell stack by looking at R22 on the PowerPC and $ebx on Intel architectures. I looked at your .gdbinit but could not figure out which macros are to be used. The example below is a bit contrived in

RE: Threaded runtime (was Re: [Haskell-cafe] Project postmortem)

2005-12-02 Thread Simon Marlow
On 02 December 2005 13:32, Joel Reymont wrote: I was going on this quote by Simon PJ: -- It should be find to have lots of threads, esp if most of them are asleep. The only thing to watch out for is that GHC's runtime system will consume one *OS* thread for each *blocked* foreign call.

[Haskell-cafe] Re: Examining the Haskell stack (read at your own risk ; -))

2005-12-02 Thread Joel Reymont
On Dec 2, 2005, at 2:08 PM, Simon Marlow wrote: It looks like your crash happened in the SSL library, and you have a useful stack trace there. This is contrived in that I already know where the error is and it clearly points to SSL_free. I'm trying to figure out how I would have gotten

[Haskell-cafe] RE: Examining the Haskell stack (read at your own risk ; -))

2005-12-02 Thread Simon Marlow
On 02 December 2005 14:17, Joel Reymont wrote: On Dec 2, 2005, at 2:08 PM, Simon Marlow wrote: It looks like your crash happened in the SSL library, and you have a useful stack trace there. This is contrived in that I already know where the error is and it clearly points to SSL_free. I'm

[Haskell-cafe] Re: returning lists

2005-12-02 Thread Scherrer, Chad
raptor [EMAIL PROTECTED] writes, ]- that is the problem :), 'cause such functions should accept Char and String, but return a Tuple of Strings, but it is recursive (so that it fetch next,next,next char :)) i.e. it is own consumer and should return String --this is wrong, just tring grab char

[Haskell-cafe] Re: Examining the Haskell stack (read at your own risk ; -))

2005-12-02 Thread Joel Reymont
Thank you Simon! This is very helpful and will take me a while to digest. On Dec 2, 2005, at 2:43 PM, Simon Marlow wrote: Ok, you want a crash course in reading the Haskell stack. Each xxx_info symbol is a return address. The other values are the contents of stack frames: values saved for

[Haskell-cafe] STM, Concurrent Haskell and network clients (long, code)

2005-12-02 Thread Joel Reymont
Folks, After two months with Haskell I think I'm starting to get the proper spirit. Inspired by Simon PJ's recent comments about lots of threads not hurting Haskell I introduced STM into my network client. I would like to run my architecture by you to see if there are any improvements to

[Haskell-cafe] Thread blocked indefinitely

2005-12-02 Thread Joel Reymont
Folks, I'm trying to learn more about this exception. Would someone with a subscription to ACM kindly send me this paper: http://portal.acm.org/ft_gateway.cfm?id=507655type=pdf? Thanks in advance, Joel -- http://wagerlabs.com/ ___

Re: [Haskell-cafe] Thread blocked indefinitely

2005-12-02 Thread Joel Reymont
I got a copy, thanks! On Dec 2, 2005, at 6:47 PM, Greg Woodhouse wrote: Did anyone ever send you a copy of this paper? I'm an ACM member, so I could forward it to you if need be. -- http://wagerlabs.com/ ___ Haskell-Cafe mailing list

[Haskell-cafe] syntactic sugar for comonads

2005-12-02 Thread Scherrer, Chad
Hi, I'm wondering about a syntactic sugar for comonads. These are still very new to me, but it seems like their usage will become much more common once manipulations are more convenient (I believe this was the case with monads and arrows, correct?). Here's an example for motivation. Consider

Re: [Haskell-cafe] Re: :t main

2005-12-02 Thread Cale Gibbard
See: http://haskell.org/pipermail/haskell-cafe/2003-January/003794.html The OI comonad as previously envisioned breaks referential transparency. I/O just doesn't seem to be something which one can easily do comonadically, since once coeval/extract is applied, you're back to plain values, and

RE: [Haskell-cafe] Re: :t main

2005-12-02 Thread Scherrer, Chad
From: Cale Gibbard [mailto:[EMAIL PROTECTED] See: http://haskell.org/pipermail/haskell-cafe/2003-January/003794.html The OI comonad as previously envisioned breaks referential transparency. I/O just doesn't seem to be something which one can easily do comonadically, since once