Re:Thinking with Lazy Evaluation
by LukeHoersten on Thursday June 18, 2015 @11:46AM
(#9739322)
Haskell has some great solutions for lazy IO: io-streams or pipes for example. Check them out! It's a great way to code IO.
[ Parent
| on HN ]
Re:Thinking with Lazy Evaluation
by BlanketLogic on Thursday June 18, 2015 @12:38PM
(#9739802)
Yes. Conduits and iteratees too, for that matter. And I believe, there was some talk about "Machines", which I did not understand at all. Am not sure what is the current status of that approach.
I thought conduits and io-streams are preferred over pipes.
As I understand it in the Haskell community right now.
1. Pipes | Conduit
2. io-streams (perhaps not in 1 only because of a lack of popularity and it is new)
3. Iteratees (have some issue Pipes/Conduit do not which I can't recall)
Not sure where Machines comes in here.
Re:Thinking with Lazy Evaluation
by LukeHoersten on Sunday June 21, 2015 @01:38PM
(#9754218)
io-streams is built specifically for IO and is in the IO monad. This allows for performance benefits as well as simplified API like using normal IO functions for error and resource handling (ex: `bracket` can be used)