10

Does Scala have any well developed libraries in the spirit of Haskell's pipes, or at least iteratee?

I found Play's iteratee library first, but I couldn't make it work, and it seems tightly coupled with Play's concurrency primitive Promise, which could be inappropriate in many cases.

Scalaz has some iteratee support (like IterV), but it seems there are only core classes with no additional support functions, predefined iteratees/enumerators etc. Also I couldn't find any documentation, even scaladoc is very sparse, so it's quite difficult to use properly.

And I couldn't find anything similar to pipes.

Petr
  • 62,528
  • 13
  • 153
  • 317
  • 2
    +1 (and not sure why people are voting to close). Have you had a look at the [`iteratee` package in Scalaz 7](https://github.com/scalaz/scalaz/tree/scalaz-seven/iteratee/src/main/scala/scalaz/iteratee)? It doesn't have as many batteries included as the Haskell iteratee libraries, but it's much more usable than the Scalaz 6 version. – Travis Brown Feb 06 '13 at 01:02
  • 2
    Also, there is [a Scala port](https://github.com/arjanblokzijl/scala-conduits) of Michael Snoyman's [Conduit library](https://github.com/snoyberg/conduit) (which I've personally found clearer than pipes, coming from iteratees—but I've not yet tried the Scala port). – Travis Brown Feb 06 '13 at 01:14
  • 1
    there is an awesome lib based on play iteratees http://blog.greweb.fr/2013/01/playcli-play-iteratees-unix-pipe/ – OlegYch Feb 14 '13 at 01:18

1 Answers1

6

Building up on comments from Travis, currently there are:

George
  • 8,368
  • 12
  • 65
  • 106
  • 2
    Runar's machines look very interesting, I'll look into it. Unfortunately, as they're in development, they seem to lack documentation (as AFAIK Scalaz 7 iteratee does). The port of _conduit_ seems promising, but I'm not sure if it's being developed or if it's meant to be finished. Its development [seems to have stopped](https://github.com/arjanblokzijl/scala-conduits/graphs/commit-activity) about 6 months ago and there is no sign of pronouncing it ready or finished. – Petr Feb 06 '13 at 09:07
  • 2
    For Scalaz 7, I've got an example [here](http://stackoverflow.com/a/13389530/334519) with a fair amount of detail, and my question [here](http://stackoverflow.com/q/13422756/334519) (with [this solution](https://gist.github.com/travisbrown/4091180)) is about making it work a little more like Millikin's Haskell library. – Travis Brown Feb 06 '13 at 16:04