-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odd behavior of chunkBy #86
Comments
This is a strictness bug in the Await constructor. It is fixed in the "lazy" branch and the "await" branch pending a merge into trunk.— On Sat, Feb 1, 2014 at 5:31 PM, Frank S. Thomas notifications@github.com
|
I checked this in the "lazy" and "await/trampolined" branches and the result of |
Oh, sorry, I didn't read your message carefully enough. I thought this was The behavior of chunkBy looks correct. The purpose of this method is to For example, if you had the stream "foo bar baz", chunkBy(_ != " ") would On Sat, Feb 1, 2014 at 5:47 PM, Frank S. Thomas notifications@github.comwrote:
|
Runar, du you think your laziness fix is tested enough for stack safety etc? I mean there is separate branch on switching signature of await to Await(rcv: Throwable/ R => Trampoline[Process[F,A]], clenup : Option[Throwable] => Trampoline[Process[F,Nothing]]) which is in middle of progress. I am just curious what will happened if we merge your code into master and if the effort with trampolining is worth of. P. On 02 Feb 2014, at 01:42, Rúnar notifications@github.com wrote:
|
Ok, now Btw, what would be a proper name for the |
Hi Pavel, I do not know how stack-safe it is. Do you have any specific suspicions The current behavior of chunk |> filter is totally wrong, and has been for Runar On Sun, Feb 2, 2014 at 2:05 AM, Pavel Chlupacek notifications@github.comwrote:
|
Yeah, not sure non that. Paul was bringing some issues with this before, so maybe he has something more on this. Anyhow I also solved the left-assotiated flatMap performance issues in trampoline branch (not sure if I can do it w/o trampoline), so maybe I gonna still take this path. Also one idea is if we should`t just drop case in Await and make his signature lazy I mean instead of case class Await[F[_],A,+O] private[stream](req: F[A], recv: A => Process[F,O], just do class Await[F[_],A,+O] private[stream](req: F[A], recv: A => Process[F,O], object Await { } That will maybe solve many issues w/o changing the signature heavily and still be non-strict ? ??? P. On 02 Feb 2014, at 15:15, Rúnar notifications@github.com wrote:
|
That works too, Pavel, although then wherever anyone is using Await, they On Sun, Feb 2, 2014 at 9:27 AM, Pavel Chlupacek notifications@github.comwrote:
|
Ok for this we can define Await.apply perhaps? P. On 02 Feb 2014, at 16:02, Rúnar notifications@github.com wrote:
|
That works. On Sun, Feb 2, 2014 at 10:03 AM, Pavel Chlupacek
|
WRT to naming
|
As I was writing more tests for
process1
processes I noticed an odd behavior ofchunkBy
:The emitted chunks contain elements that satisfy and that do not satisfy the predicate. Is this behavior intended? Because, I would have expected the following result:
Since there is no test for
chunkBy
I do not know what the result should have been. So either the documentation should be extended or the implementation should be fixed.Btw, here is a version of
chunkBy
that produces the result I had expected:The text was updated successfully, but these errors were encountered: