Re: [Haskell-cafe] [Haskell] Branch Streaming (was GHC is a monopoly compiler)

12 views
Skip to first unread message

Tony Day

unread,
Sep 28, 2016, 5:21:01 PM9/28/16
to Carter Schonwald, Tom Ellis, haskel...@haskell.org
I've actually looked down that particular rabbit hole.  Here's a link to a monoid for pipes that represents a branch:

https://github.com/tonyday567/pipes-extended/blob/master/src/Pipes/Monoid.hs#L81

For flavour, the computation involves hoisting and lifting back and forth over several layers, as the various meta-physical wires cross.  That was years ago, but I haven't seen anything since.  It looks like Pipes is the wrong abstraction point to stream with branching.  I wonder what is?

On Wed, Sep 28, 2016 at 9:59 PM, Carter Schonwald <carter.s...@gmail.com> wrote:
Nope :)

And I think we are still learning how to do stream.  Have have streaming in a line down pat, but streaming with a DAG or general graphs wendontnhave yet ;)


On Wednesday, September 28, 2016, Tom Ellis <tom-lists-haskell-cafe-2013@jaguarpaw.co.uk> wrote:
On Mon, Sep 26, 2016 at 08:56:55PM -0500, Christopher Allen wrote:
> Streaming is a good example here. It's not "obvious" how to do many
> things in Haskell that are "obvious" in other languages. Partly
> because industry hasn't used languages like Haskell much, partly
> because the canvas we work with permits more structure.

Is it obvious how to do streaming in other languages?
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

Alan & Kim Zimmerman

unread,
Sep 28, 2016, 5:23:44 PM9/28/16
to Tony Day, Tom Ellis, haskel...@haskell.org

For flavour, the computation involves hoisting and lifting back and forth over several layers, as the various meta-physical wires cross.  That was years ago, but I haven't seen anything since.  It looks like Pipes is the wrong abstraction point to stream with branching.  I wonder what is?

Tony Day

unread,
Sep 28, 2016, 6:09:50 PM9/28/16
to Alan & Kim Zimmerman, Tom Ellis, haskel...@haskell.org
A lot of the Pipes trickery is making a branch without the abstraction of state.  It's easy to remember the last stream value and send it elsewhere.  If state is easy (doesn't stuff up streaming), then Moore and Mealy are good places to start tinkering.  The whole machines abstraction (branch of DFA etc, not the kmett library) is a bit clunky but.  A Mealy machine's output is independent of its input - it can fire anytime, not just when a new stream value arrives.  If you have a linear pull request line, like pipes does so well, there is full coupling of the input and output - this is a Moore not a Mealy machine.  The stream machine is created by linking up all the states of a Moore and making them fire every stream value.  Contrary to much of the DFA narrative, we have a wire hanging out of state as well.  The importance of distinguishing between a wire connected to state and what is an output wire that exists within state machines seems a touch artificial.

Mario Blažević

unread,
Sep 30, 2016, 4:50:18 PM9/30/16
to haskel...@haskell.org
On 2016-09-28 05:20 PM, Tony Day wrote:
> I've actually looked down that particular rabbit hole. Here's a link to
> a monoid for pipes that represents a branch:
>
> https://github.com/tonyday567/pipes-extended/blob/master/src/Pipes/Monoid.hs#L81
>
> For flavour, the computation involves hoisting and lifting back and
> forth over several layers, as the various meta-physical wires cross.
> That was years ago, but I haven't seen anything since. It looks like
> Pipes is the wrong abstraction point to stream with branching. I wonder
> what is?

I'm not working on it any longer, but that's what SCC [1] was set up to
explore.

[1] http://hackage.haskell.org/package/scc

Reply all
Reply to author
Forward
0 new messages