scalaz-stream and iteratee

1
Daniel Spiewak @djspiewak

I’m tempted to submit an alternative iteratee framework to scalaz, just so I don’t have to rewrite said framework in all of my projects.

2014-01-23 03:30:36
John Langley @digeratus

@djspiewak Any chance of the scalaz and Play impls coming together and being standalone? Something like an Actors or Futures trajectory

2014-01-23 03:34:31
Daniel Spiewak @djspiewak

@digeratus Play’s iteratees are…very broken. Scalaz’s iteratees are…much more general, and also broken.

2014-01-23 03:36:36
Daniel Spiewak @djspiewak

@digeratus I don’t really want *either* implementation, though scalaz’s is closer to what I use.

2014-01-23 03:36:48
Daniel Spiewak @djspiewak

@mpilquist Really good for static state machines. Thus, better than iteratees for most problems.

2014-01-23 03:37:44
Daniel Spiewak @djspiewak

@mpilquist Dynamic state machines are doable with stream, but iteratees are generally more straightforward.

2014-01-23 03:38:04
Daniel Spiewak @djspiewak

@mpilquist Fundamentally, they’re different tools with different tradeoffs. Neither subsumes the other.

2014-01-23 03:38:18
mpilquist@fosstodon.org @mpilquist

@djspiewak Interesting; any references for dynamic state machines with iteratees? Or perhaps pointer to parts of open sourced precog code?

2014-01-23 03:43:41
Daniel Spiewak @djspiewak

@mpilquist We didn’t really use them at Precog, so I can’t point to there. :-)

2014-01-23 03:44:52
Daniel Spiewak @djspiewak

@mpilquist The intuition is basically if the *structure* of your state machine is static, use scalaz-streams.

2014-01-23 03:45:04
Daniel Spiewak @djspiewak

@mpilquist If the *structure* of your state machine is dynamically computed, use iteratees.

2014-01-23 03:45:16
Daniel Spiewak @djspiewak

@mpilquist Iteratees are also just plain simpler for some tasks (like event listeners).

2014-01-23 03:45:30
mandubian @mandubian

@djspiewak error management in iteratee isn't really the clearest thing and enumeratee are quite hard to conceive! @mpilquist

2014-01-23 06:05:42
mandubian @mandubian

@djspiewak but you're right about the static machine aspect for scalaz-stream! @mpilquist

2014-01-23 06:06:35
Rúnar @runarorama

@djspiewak @mpilquist It does though. An iteratee is just a Process that awaits a lot and emits once.

2014-01-23 06:09:35
mandubian @mandubian

@runarorama @djspiewak interesting views: I've just presented talk scalaz-stream & iteratees last week but I'm still gathering differences!

2014-01-23 06:18:16
Daniel Spiewak @djspiewak

@runarorama @mpilquist Except it is almost trivial to emit multiple times with enumeratees

2014-01-23 06:32:36
Daniel Spiewak @djspiewak

@runarorama @mpilquist Iteratees generally work best for cases of single output though.

2014-01-23 06:33:08
mandubian @mandubian

@djspiewak I like Process coz I can think in terms of producer and/or consumer independently w/ same data struct @runarorama @mpilquist

2014-01-23 06:58:14