[Haskell-cafe] Re: Left fold enumerator - a real pearl overlooked?

G?uenther Schmidt redcom at fedoms.com
Sat Feb 28 18:16:52 EST 2009


thank you all for your responses. I see now that the subject did indeed 
register with some haskellers. :-)

I had hoped that is will eventually become the tested and approved 
method for certain types of problems that do arise.

Maybe some of you have read my earlier posts that I was developing an 
application, which is now finished btw.

An initial design was using HAppS-IxSet instead of an SQL database, but 
it had hit performance problems, one a stack overflow and another a not 
enough RAM problem. The stack overflow problem I was eventually able to 
solve, though all kinds of strictness primitives would not help (!, seq 
and strict data constructors), following several different leads here on 
this list. But finally the not enough RAM problem occurred which I can't 
really explain why that happened, the memory consumption was so not 
linear to the input size, I may have caused that with my tricks of 
avoiding the stack overflow.

Anyway, I eventually gave up and used SQLite.

So I was hopeful the above mentioned left-fold-enumerator was some sort 
of general purpose resource preserving technique. I'm looking forward to 
study its implementation in the future release of takusen and see if I 
grasp it enough to translate it to other problems as well.

And special thanks to you Don and your co-authors, your book saved my 
neck, with its help I was actually able to develop the application in an 
entirely new to me language and with a mere 3 months past deadline.


Don Stewart schrieb:
> jwlato:
>> Hello Günther,
>> I think the largest reason Haskellers don't use left-fold enumerators
>> is that there isn't a ready-to-use package on Hackage.  Oleg's code is
>> extremely well commented and easy to follow, but it's not cabalized.
>> In addition to Takusen, Johan Tibbe's hyena application server uses
>> enumerators for IO:
>> http://github.com/tibbe/hyena/tree/master
>> There is a darcs repo of a cabalized iteratee package available at
>> http://inmachina.net/~jwlato/haskell/iteratee/
>> This is essentially Oleg's code, slightly modified and reorganized.
>> If anyone is interested in using left-fold enumerators for IO, please
>> give it a look and let me know what you think.  I'd like to put this
>> on hackage in about a week or so, if possible.  I would especially
>> appreciate build reports.
>> There are a few iteratee/enumerator design questions that remain,
>> which Oleg and others would like to explore more fully.  The results
>> of that research will likely find there way into this library.
> I agree. There's no left-fold 'bytestring' equivalent. So it remains a
> special purpose technique.
> -- Don

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090301/3ac867d4/attachment.htm

More information about the Haskell-Cafe mailing list