TY - GEN
T1 - Iteratees
AU - Kiselyov, Oleg
PY - 2012/6/6
Y1 - 2012/6/6
N2 - Iteratee IO is a style of incremental input processing with precise resource control. The style encourages building input processors from a user-extensible set of primitives by chaining, layering, pairing and other modes of compositions. The programmer is still able, where needed, to precisely control look-ahead, the allocation of buffers, file descriptors and other resources. The style is especially suitable for processing of communication streams, large amount of data, and data undergone several levels of encoding such as pickling, compression, chunking, framing. It has been used for programming high-performance (HTTP) servers and web frameworks, in computational linguistics and financial trading. We exposit programming with iteratees, contrasting them with Lazy IO and the Handle-based, |stdio|-like IO. We relate them to online parser combinators. We introduce a simple implementation as free monads, which lets us formally reason with iteratees. As an example, we validate several equational laws and use them to optimize iteratee programs. The simple implementation helps understand existing implementations of iteratees and derive new ones.
AB - Iteratee IO is a style of incremental input processing with precise resource control. The style encourages building input processors from a user-extensible set of primitives by chaining, layering, pairing and other modes of compositions. The programmer is still able, where needed, to precisely control look-ahead, the allocation of buffers, file descriptors and other resources. The style is especially suitable for processing of communication streams, large amount of data, and data undergone several levels of encoding such as pickling, compression, chunking, framing. It has been used for programming high-performance (HTTP) servers and web frameworks, in computational linguistics and financial trading. We exposit programming with iteratees, contrasting them with Lazy IO and the Handle-based, |stdio|-like IO. We relate them to online parser combinators. We introduce a simple implementation as free monads, which lets us formally reason with iteratees. As an example, we validate several equational laws and use them to optimize iteratee programs. The simple implementation helps understand existing implementations of iteratees and derive new ones.
UR - http://www.scopus.com/inward/record.url?scp=84861758205&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84861758205&partnerID=8YFLogxK
U2 - 10.1007/978-3-642-29822-6_15
DO - 10.1007/978-3-642-29822-6_15
M3 - Conference contribution
AN - SCOPUS:84861758205
SN - 9783642298219
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 166
EP - 181
BT - Functional and Logic Programming - 11th International Symposium, FLOPS 2012, Proceedings
T2 - 11th International Symposium onFunctional and Logic Programming, FLOPS 2012
Y2 - 23 May 2012 through 25 May 2012
ER -