[Haskell-cafe] Stack space overflow in HaskellNet

Manfred Lotz manfred.lotz at arcor.de
Wed Jul 27 19:14:46 CEST 2011


On Wed, 27 Jul 2011 09:47:52 -0700 (PDT)
Donn Cave <donn at avvanta.com> wrote:

> Quoth Manfred Lotz <manfred.lotz at arcor.de>,
> ...
> > The problem seems to lie in the HaskellNet package. If for example I
> > only fetch a specific message 
> >    m <- fetch con 2092
> > having a size of some 1.2m then I get the same stack overflow.
> >
> > If at runtime I specify +RTS -K40M -RTS it works but takes over 40
> > seconds to fetch the message. 
> 
> That's not so good, but I wouldn't be surprised if it's a natural
> parsing problem, I mean it's just a lot of data to run through a
> Haskell parser.
> 

Yep, I agree. Perhaps the library should provide a fetchRaw function to
get the whole message without much parsing. Perhaps I could tell the
package author what the problem is, and he is happy to provide a
solution.


In the end the only thing I need is to get the full message because I
want to feed bogofilter to learn that a message is ham or spam.


For the time being I decided to write my own program to fetch the data
because it is a good exercise for a Haskell beginner as I am.



-- 
Manfred





More information about the Haskell-Cafe mailing list