Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Peter J. Jones 402c023744 Style changes so the code fits on slides for a presentation pirms 5 gadiem
src Style changes so the code fits on slides for a presentation pirms 5 gadiem
util @ 36a98650ac Clean a few things up, implement reading from STDIN or several files pirms 5 gadiem
.gitignore Bring in the haskell-util submodule pirms 5 gadiem
.gitmodules Bring in the haskell-util submodule pirms 5 gadiem
GNUmakefile Bring in the haskell-util submodule pirms 5 gadiem
LICENSE Initial commit pirms 5 gadiem
README.md Add basic README file pirms 5 gadiem
Setup.hs Initial commit pirms 5 gadiem
wc-streams.cabal Clean a few things up, implement reading from STDIN or several files pirms 5 gadiem

README.md

Haskell / io-streams Implementation of wc

This repository contains an implementation of the POSIX wc utility written in Haskell using the io-streams library. It was written to demonstrate the io-streams library for the Boulder Haskell Programmers user group.

The Basics of the io-streams Library

The io-streams library allows you to write stream processing code that runs in constant space. It’s a streaming library similar to Conduit and Pipes but with significantly fewer features.

Basic features:

  • Values are read from an InputStream
  • InputStreams produce a Maybe a; Nothing means EOF
  • Values are written to an OutputStream
  • OutputStreams accept a Maybe a
  • Streams can be files, sockets, vectors, parsers, etc.

Pros and Cons

  • io-streams is great because…

    • It’s really easy to learn and use
    • Stream processing is very fast
    • It’s easy to compose stream functions together
  • io-streams is less desirable because…

    • It makes heavy use of the IO type
    • Limited functionality compared to Conduit and Pipes