Re: [Haskell-cafe] GHC ignores RTS options

2005-11-16 Thread Tomasz Zielonka
On Wed, Nov 16, 2005 at 08:53:18AM +0100, Dusan Kolar wrote: I wonder whether anybody could advise me how to pass correctly RTS options to ghc? I've tried You have to pass these options to the program, not to GHC. BTW - it would be nice if it was easier to override the default RTS options

Re: [Haskell-cafe] doc/html - wiki - xml

2005-11-16 Thread Ketil Malde
Wolfgang Jeltsch wrote: Oh no! Converting LaTeX to HTML is terrible, in my opinion. One reason for this is that LaTeX isn't a markup language and provides a mixture of logical and visual macros. Conversely, I've occasionally tried to convert stuff - I think a TMR issue was one example,

Re: [Haskell-cafe] doc/html - wiki - xml

2005-11-16 Thread Wolfgang Jeltsch
Am Mittwoch, 16. November 2005 10:10 schrieben Sie: [...] The ideal is to have a simple, rigid, semantic markup in the source document. While I dislike XML at least as much as the next guy, it is probably the best choice for this. Ideally, the DTD should be a lot simpler than DocBook,

Re: [Haskell-cafe] waitForProcess: sytem call interrupted

2005-11-16 Thread Joel Reymont
The thing is that I'm launching threads, not processes. The message is printed by runhaskell now that I think about it. On Nov 16, 2005, at 1:54 AM, Donald Bruce Stewart wrote: I've been getting this in lambdabot with waitForProcess since 6.4.1 (I think). Seems harmless though (I think). Try

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Manuel M T Chakravarty
Matijs Erisson: Malcolm Wallace [EMAIL PROTECTED] writes: ... And avoid getting screwed up by malicious folk? ... but I believe there are a number of people who regularly review all the Recent Changes and undertake to 'undo' any malicious/inaccurate modifications.

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Neil Mitchell
I don't think restricting editing to registered users is a significant turn off if registration is simple. It really really is a turn off. Sometimes when I spot a mistake, and I'm at a computer where I haven't logged in to hawiki, I don't bother fixing it. No one wants to have yet another

Re: [Haskell-cafe] waitForProcess: sytem call interrupted

2005-11-16 Thread Joel Reymont
I think runhaskell reports that when the program has crashed violently with a segmentation violation. On Nov 16, 2005, at 1:54 AM, Donald Bruce Stewart wrote: I've been getting this in lambdabot with waitForProcess since 6.4.1 (I think). Seems harmless though (I think). Try catching the

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Scott Weeks
The public comment/wiki spam problem is easily solved. Use JavaScript to generate a value and put it in a hidden form field. Check for that value server side, if it's there then allow the post otherwise disallow. Most if not all bots don't have JavaScript engines. On 16/11/2005, at 10:15

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Shae Matijs Erisson
Neil Mitchell [EMAIL PROTECTED] writes: It really really is a turn off. Sometimes when I spot a mistake, and I'm at a computer where I haven't logged in to hawiki, I don't bother fixing it. No one wants to have yet another account, to fill in their personal details yet again. I appreciate

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Wolfgang Jeltsch
Am Mittwoch, 16. November 2005 12:33 schrieb Scott Weeks: The public comment/wiki spam problem is easily solved. Use JavaScript to generate a value and put it in a hidden form field. Check for that value server side, if it's there then allow the post otherwise disallow. Most if not all bots

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Arthur van Leeuwen
On 16-nov-2005, at 13:14, Wolfgang Jeltsch wrote: Am Mittwoch, 16. November 2005 12:33 schrieb Scott Weeks: The public comment/wiki spam problem is easily solved. Use JavaScript to generate a value and put it in a hidden form field. Check for that value server side, if it's there then allow

[Haskell-cafe] Hackage or Where to Host Haskell projects, and simple darcsforge description was Re: Making Haskell more open

2005-11-16 Thread Shae Matijs Erisson
Wolfgang Jeltsch [EMAIL PROTECTED] writes: Would it be intended that every Haskell-related project is hosted under haskell.org? This might be not so nice. And it might be not so nice if most Haskell-related projects are hosted under haskell.org so that potential users might only look under

RE: [Haskell-cafe] GHC ignores RTS options

2005-11-16 Thread Simon Marlow
On 16 November 2005 08:12, Tomasz Zielonka wrote: On Wed, Nov 16, 2005 at 08:53:18AM +0100, Dusan Kolar wrote: I wonder whether anybody could advise me how to pass correctly RTS options to ghc? I've tried You have to pass these options to the program, not to GHC. BTW - it would be nice

Re: [Haskell-cafe] GHC ignores RTS options

2005-11-16 Thread Tomasz Zielonka
On Wed, Nov 16, 2005 at 01:09:07PM -, Simon Marlow wrote: BTW - it would be nice if it was easier to override the default RTS options when compiling the program. Perhaps a nice task for a newbie GHC developer? Already possible, see:

[Haskell-cafe] IO exception not being caught

2005-11-16 Thread Joel Reymont
Folks, I have a problem catching my IO exception with the code below. The intent is to catch either the IO exception from connectTo (connection refused, etc.) or the timeout. type EngineState = ErrorT String (StateT World IO) fromIOError err = ioeGetErrorString err liftIOTrap :: IO a -

RE: [Haskell-cafe] Re: Bring down the house (was Re: GHC cannot compilemy code)

2005-11-16 Thread Simon Peyton-Jones
I've fixed the HEAD so that it behaves decently on this now. Thanks for reporting it. It's in the test suite! S | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel | Reymont | Sent: 09 November 2005 19:27 | To: Haskell Cafe | Subject:

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Philippa Cowderoy
On Wed, 16 Nov 2005, Arthur van Leeuwen wrote: A nicer solution might be to have the server generate a distorted image of a key (as is done with user registration to combat automated user generation) that should be typed in for an edit to be accepted (if you are not logged in). This comes

[Haskell-cafe] Re: IO exception not being caught

2005-11-16 Thread Joel Reymont
I fixed up my timeout function to look like this: timeout :: forall a.Show a = Int - IO a - IO a timeout secs fun = mdo mvar - newEmptyMVar tid1 - forkIO $ do result - try fun putMVar mvar $ either (Left . show) (Right .

[Haskell-cafe] Re: IO exception not being caught

2005-11-16 Thread Joel Reymont
After almost two months with Haskell I'm starting to understand why its use is not as widespread as... well pick a favorite language of your own. My issue was that of indentation. Compare this working version: liftIOTrap io = do mx - liftIO (do x - io return

RE: [Haskell-cafe] GHC ignores RTS options

2005-11-16 Thread Simon Marlow
On 16 November 2005 13:24, Tomasz Zielonka wrote: On Wed, Nov 16, 2005 at 01:09:07PM -, Simon Marlow wrote: BTW - it would be nice if it was easier to override the default RTS options when compiling the program. Perhaps a nice task for a newbie GHC developer? Already possible, see:

RE: [Haskell-cafe] Re: IO exception not being caught

2005-11-16 Thread Simon Peyton-Jones
Indeed! I always use braces and semicolons with do-notation. You are free to do so too! Nothing requires you to use layout. Indeed, you can freely mix the two. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel | Reymont | Sent: 16

RE: [Haskell-cafe] waitForProcess: sytem call interrupted

2005-11-16 Thread Simon Marlow
On 16 November 2005 11:26, Joel Reymont wrote: I think runhaskell reports that when the program has crashed violently with a segmentation violation. It does, and that's a bug. I fixed it last week. Cheers, Simon On Nov 16, 2005, at 1:54 AM, Donald Bruce Stewart wrote: I've

RE: [Haskell-cafe] Re: [Haskell] Making Haskell more open

2005-11-16 Thread Simon Marlow
On 14 November 2005 08:32, Gour wrote: Nobody said that DocBook does not work fine. However let me quote SPJ's message: quote However, I still wonder if there are things we could do that would make it easier for people to contribute. Here are two concrete suggestions: ^^^ - Make

[Haskell-cafe] ReaderT and concurrency

2005-11-16 Thread Kurt Hutchinson
I'm writing a program that will be using multiple threads to handle network activity on multiple ports in a responsive way. The treads will all need access to some shared data, so I'm using an MVar. So far so good. The problem is that passing the MVar around everywhere is kind of a pain, so I was

Re: [Haskell-cafe] layout problem

2005-11-16 Thread Christian Maeder
Simon Peyton-Jones wrote: Indeed! I always use braces and semicolons with do-notation. You are free to do so too! Nothing requires you to use layout. Indeed, you can freely mix the two. I would not recommend braces and semicolons, because these allow a bad layout (easy to parse for a

[Haskell-cafe] Spurious program crashes

2005-11-16 Thread Joel Reymont
I'm getting crashes like this and I cannot figure out what the problem is. I'm launching a bunch of threads that connect to a server via TCP and exchange packets. I am running operations like connect and receive in a timeout function that launches two threads and uses an MVar to figure out

Re: [Haskell-cafe] ReaderT and concurrency

2005-11-16 Thread Andrew Pimlott
On Wed, Nov 16, 2005 at 11:51:19AM -0500, Kurt Hutchinson wrote: I have to perform another runReaderT when forking? Or is there a way to get the ReaderT environment automatically carried over to the newly created Set B thread? This is an unavoidable pain as far as I know. It would be nice if

Re: [Haskell-cafe] Spurious program crashes

2005-11-16 Thread Tomasz Zielonka
On Wed, Nov 16, 2005 at 05:37:34PM +, Joel Reymont wrote: I'm getting crashes like this and I cannot figure out what the problem is. I'm launching a bunch of threads that connect to a server via TCP and exchange packets. I am running operations like connect and receive in a timeout

Re: [Haskell-cafe] Spurious program crashes

2005-11-16 Thread Joel Reymont
I really don't use more FFI than needed to send and receive binary packets over the network. I don't even use FPS these days and all the allocaBytes code checks for nullPtr. My hunch is that this is to do with killing threads that perform FFI in my timeout code. It would kill blocking

Re: [Haskell-cafe] ReaderT and concurrency

2005-11-16 Thread Tomasz Zielonka
On Wed, Nov 16, 2005 at 09:45:17AM -0800, Andrew Pimlott wrote: On Wed, Nov 16, 2005 at 11:51:19AM -0500, Kurt Hutchinson wrote: I have to perform another runReaderT when forking? Or is there a way to get the ReaderT environment automatically carried over to the newly created Set B thread?

Re: [Haskell-cafe] Spurious program crashes

2005-11-16 Thread Tomasz Zielonka
On Wed, Nov 16, 2005 at 06:16:48PM +, Joel Reymont wrote: I really don't use more FFI than needed to send and receive binary packets over the network. I don't even use FPS these days and all the allocaBytes code checks for nullPtr. Then please accept my apologies. I may have confused

Re: [Haskell-cafe] ReaderT and concurrency

2005-11-16 Thread Andrew Pimlott
On Wed, Nov 16, 2005 at 07:20:48PM +0100, Tomasz Zielonka wrote: On Wed, Nov 16, 2005 at 09:45:17AM -0800, Andrew Pimlott wrote: On Wed, Nov 16, 2005 at 11:51:19AM -0500, Kurt Hutchinson wrote: I have to perform another runReaderT when forking? Or is there a way to get the ReaderT

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Cale Gibbard
On 16/11/05, Philippa Cowderoy [EMAIL PROTECTED] wrote: On Wed, 16 Nov 2005, Arthur van Leeuwen wrote: A nicer solution might be to have the server generate a distorted image of a key (as is done with user registration to combat automated user generation) that should be typed in for an

Re: [Haskell-cafe] ReaderT and concurrency

2005-11-16 Thread Tomasz Zielonka
On Wed, Nov 16, 2005 at 10:53:17AM -0800, Andrew Pimlott wrote: On Wed, Nov 16, 2005 at 07:20:48PM +0100, Tomasz Zielonka wrote: I think it wouldn't be possible using only methods in MonadIO. Here's what I had in mind for forkProcess. Recall that the fork syscall returns 0 to the child and

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Scott Weeks
Most if not all bots don't have JavaScript engines. But not all users use JavaScript. I can certainly understand that some users don't have JavaScript but it's the vast minority. The choice is between usability. With captchas you can exclude the disabled and people with poor eyesight (as

Re: [Haskell-cafe] ReaderT and concurrency

2005-11-16 Thread Bulat Ziganshin
Hello Kurt, Wednesday, November 16, 2005, 7:51:19 PM, you wrote: KH I'm writing a program that will be using multiple threads to handle KH network activity on multiple ports in a responsive way. The treads KH will all need access to some shared data, so I'm using an MVar. So far KH so good. The

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Manuel M T Chakravarty
Neil Mitchell: I don't think restricting editing to registered users is a significant turn off if registration is simple. It really really is a turn off. Sometimes when I spot a mistake, and I'm at a computer where I haven't logged in to hawiki, I don't bother fixing it. No one wants to

Re: [Haskell-cafe] Re: IO exception not being caught

2005-11-16 Thread Bulat Ziganshin
Hello Joel, Wednesday, November 16, 2005, 6:37:25 PM, you wrote: JR After almost two months with Haskell I'm starting to understand why JR its use is not as widespread as... well pick a favorite language of JR your own. My issue was that of indentation. just enclose potentially problematic

[Haskell-cafe] Reducing # of context switches

2005-11-16 Thread Joel Reymont
Folks, The latest GHC docs mention that the -C option takes a seconds value whereas prior docs mention microseconds. Which is it? Also, do I pass +RTS -Cxxx or is it just -C? Thanks, Joel -- http://wagerlabs.com/ ___ Haskell-Cafe

Re: [Haskell-cafe] Hackage or Where to Host Haskell projects, and simple darcsforge description was Re: Making Haskell more open

2005-11-16 Thread Manuel M T Chakravarty
Shae Matijs Erisson: I have a simple plan for a darcsforge as well: If Cabal includes a darcs-repository field, developers will be able to upload their project.cabal file to Hackage or to a darcsforge server. That server will run darcs pull on the repositories once a night or so. The

[Haskell-cafe] updated_fwd: unknown/strange object 0

2005-11-16 Thread Joel Reymont
internal error: update_fwd: unknown/strange object 0 Please report this as a bug to glasgow-haskell-bugs@haskell.org, or http://www.sourceforge.net/projects/ghc/ This happened when I tried running with +RTS -C0 -c I think. -- http://wagerlabs.com/

[Haskell-cafe] Re: layout problem

2005-11-16 Thread Stefan Monnier
Indeed! I always use braces and semicolons with do-notation. You are free to do so too! Nothing requires you to use layout. Indeed, you can freely mix the two. I would not recommend braces and semicolons, because these allow a bad layout (easy to parse for a compiler, but hard to read for

Re: [Haskell-cafe] Re: layout problem

2005-11-16 Thread Cale Gibbard
On 16/11/05, Stefan Monnier [EMAIL PROTECTED] wrote: Indeed! I always use braces and semicolons with do-notation. You are free to do so too! Nothing requires you to use layout. Indeed, you can freely mix the two. I would not recommend braces and semicolons, because these allow a bad

Re: [Haskell-cafe] ReaderT and concurrency

2005-11-16 Thread Thomas Jäger
Kurt, There are basically two ways of doing that, namely monad transformers and implicit parameters (we actually use both techniques in lambdabot). Implicit parameters save you a lot of conversions or explicit passing of variables because you only need one monad (the IO monad); however they are