Settings

Theme

Parallel streaming in Haskell: Part 4 – Conditionals and non-blocking evaluation

channable.com

75 points by yoricksijsling 3 years ago · 8 comments

Reader

onceiwasthere 3 years ago

Irrelevant to article content, but did anyone else find the cookie UX on this site infuriating?

  • hosh 3 years ago

    Yes. I could not tell whether I was enabling or disabling cookies. I don't know whether that was badly done, or a dark pattern.

hosh 3 years ago

I thought that Arrows (https://www.haskell.org/arrows/) can handle conditionals, and the splitting and joining of concurrent streams of computation?

Is there something novel about this approach that is distinct from Arrows?

  • yoricksijslingOP 3 years ago

    Arrows don’t really _do_ anything. Just like monads, they’re just a generic interface and their behaviour depends entirely on the instance implementation.

    You can have stream transformers that fit in de arrow class, and parallel composition might then mean that things are done concurrently. How that compares to our approach entirely depends on the exact stream transformer implementation.

    Note that the ConduitT type that we use doesn’t really fit in the Arrow class, due to the additional parameter for the return type.

    • grumpyprole 3 years ago

      Arrows do imply certain behaviours, if the laws are to be satisfied. For example, they require synchronous streams. This means one can't really do things like coalescing very easily.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection