|Subject:||[Haskell-cafe] Re: [darcs-users] Iteratees, streams, and mmap|
|Date:||Sat, 12 Dec 2009 10:13:44 -0800|
On Sat, Dec 12, 2009 at 2:42 AM, Heinrich Apfelmus <[email protected]> wrote:
I would say it does help, but it doesn't make it perfect.
Right. And the iteratee library points out that your iteratees have to be well-behaved (I think there they say "bounded"). I'm well aware of this issue and thanks for pointing it out for others who are reading along.
I'm still on the fence as to whether this style of writing it will add value greater than the complexity it brings. I am certainly considering it :) The darcs source does other things that are also fairly complex.
I realize it's not perfect, but the problem we have now is that it's too easy to write things that have dismal space usage. If we can't force proper space usage, how can we make it more natural to have bounded space? Or at least a good approximation.
It seems that:
* foldl'-style helps
* rank-n can help
* no approach I've seen *forces* the behavior we want
* existing code and bug reports demonstrate we need to improve the situation
I'm open to suggestions on how to ensure the code has the space behavior I want. Lazy IO* and streams of patches is more compositional and natural to Haskell programmers, but it seems that it's too hard to ensure the code has reasonable space usage. At least where the darcs source is concerned. Therefore, I think the status quo demonstrates that in the darcs source it's worth experimenting with alternatives to lazy io and streams. In other words, the human effort to make the code behave how we want is currently too high and that's the issue I want to address. I don't know how we could make it impossible to have space leaks, although that would be interesting.
(*) Note: Lazy IO itself is used in very few places in darcs these days because it has lead to serious bugs. These days me point is more about big streams getting retained. Finding where and why has proven difficult.
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: [Haskell-cafe] GHC 6.12 status and features, Tom Tobin|
|Next by Date:||Re: [Haskell-cafe] Preserving data type information, Andrey Popp|
|Previous by Thread:||[Haskell-cafe] Preserving data type information, Andrey Popp|
|Next by Thread:||[Haskell-cafe] Re: [darcs-users] Iteratees, streams, and mmap, Johann Höchtl|
|Indexes:||[Date] [Thread] [Top] [All Lists]|