次のScalazでIOの実装が変わるかもしれない話とか

1
Daniel Spiewak @djspiewak

Scalaz has the worst iteratee implementation ever. Well, actually that’s not true. It’s a lot better than most. Still terrible though.

2014-01-31 05:11:16
Daniel Spiewak @djspiewak

Random musing: if I wrote a replacement iteratee framework for scalaz that didn’t restrict abstraction, would it be accepted?

2014-01-31 05:11:55
Daniel Spiewak @djspiewak

@runarorama I may get on that then. Not sure if it will happen before or after I rewrite Scalaz’s IO monad, but it should happen.

2014-01-31 05:13:06
Daniel Spiewak @djspiewak

@runarorama Regarding IO: I want the following function: IO[A] => IO[Future[A]] And I want it to parallelize applicative composition.

2014-01-31 05:13:48
Rúnar @runarorama

@djspiewak http://t.co/1xDPL2JwoQ is being replaced by scalaz.concurrent.Task in the near future.

2014-01-31 05:14:47
Daniel Spiewak @djspiewak

@runarorama Ooooh. That’s almost certainly going to be very nice.

2014-01-31 05:15:01
Daniel Spiewak @djspiewak

@runarorama The Scalaz 6 iteratees are among the iteratee frameworks that are worse than the Scalaz 7 ones.

2014-01-31 05:15:18
Rúnar @runarorama

@djspiewak In the new scheme, IO[A] is roughly Free[Future, Throwable \/ A].

2014-01-31 05:17:45
Daniel Spiewak @djspiewak

@runarorama Unfortunately, that’s absolutely not going to do what I want. Free is the problem, not IO.

2014-01-31 05:18:08
Daniel Spiewak @djspiewak

@runarorama I need a three-state Free: Suspend, Parallel and Pure.

2014-01-31 05:18:16
Rúnar @runarorama

@djspiewak What is it that you want then, and why is it a problem?

2014-01-31 05:18:54
Daniel Spiewak @djspiewak

@runarorama I don’t think Future quite does what I want.

2014-01-31 05:21:27
Daniel Spiewak @djspiewak

@runarorama Maybe it does. It’s hard to see. I want an IO that I can write a concurrent interpreter for.

2014-01-31 05:21:42
Daniel Spiewak @djspiewak

@runarorama I can’t do that *usefully* with IO as it stands, because it doesn’t preserve applicative composition.

2014-01-31 05:21:58
Rúnar @runarorama

@djspiewak Future in the Scalaz sense is a three-constructor thing: Later, Now, Parallel. Free adds recursion, substitution, normalization.

2014-01-31 05:22:09
Daniel Spiewak @djspiewak

@runarorama Later, Now and Parallel sound much more complex than what I want.

2014-01-31 05:22:38
Rúnar @runarorama

@djspiewak Task is absolutely what you want.

2014-01-31 05:22:41
Daniel Spiewak @djspiewak

@runarorama I basically want to compose actions just like I do with IO, except that when I apply2, I want that to be distinct from >>=.

2014-01-31 05:23:11
Rúnar @runarorama

@djspiewak Two units, one lazy one strict, and a binary combinator for nondeterministic choice. It cannot be simpler.

2014-01-31 05:23:36
Daniel Spiewak @djspiewak

@runarorama Except why would I want nondeterministic choice? Why would I want strictness?

2014-01-31 05:23:57
1 ・・ 4 次へ