Skip to main content
7 events
when toggle format what by license comment
Jan 10, 2015 at 9:36 history edited Petr CC BY-SA 3.0
added links to conduit and pipes
Jan 10, 2015 at 9:03 comment added Giorgio I recently had this problem and my program was running out of file descriptors. So I replaced lazy IO with strict IO using strict ByteString.
Oct 16, 2012 at 11:31 vote accept Giorgio
Oct 16, 2012 at 5:07 comment added Petr @Giorgio I added a link to Haskell Wiki about problems with Lazy IO. With lazy IO you can have very hard time managing resources. For example, if you don't fully read the input (like due to lazy evaluation), the file handle remains open. And if you go and close the file handle manually, it often happens that due to lazy evaluation reading it is postponed and you close the handle before reading the whole input. And, it's often quite hard to avoid memory problems with lazy IO.
Oct 16, 2012 at 5:01 history edited Petr CC BY-SA 3.0
added 111 characters in body
Oct 15, 2012 at 21:05 comment added Giorgio +1: Thanks for the useful hints and links. Point 3 seems quite interesting (and the easiest solution for me to use right now). Regarding suggestion 1, I do not see how avoiding lazy IO can improve things: As far as I understand lazy IO should be better for a filter that is supposed to process a (possibly very long) stream of data.
Oct 8, 2012 at 21:16 history answered Petr CC BY-SA 3.0