Re: [elm-discuss] Re: Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-16 Thread Wojciech Piekutowski
There's also https://github.com/fbonetti/elm-phoenix-socket/. It doesn't use an effect manager, but apparently because of that doesn't notify about disconnection. On Wed, 17 May 2017 at 01:39, Oliver Searle-Barnes wrote: > You might find https://github.com/saschatimme/elm-phoenix useful to look

Re: [elm-discuss] Re: Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-16 Thread Mark Hamburg
The Phoenix code is interesting but it is not an example of one effects manager using another. It bypasses the web socket effects manager and talks to the low level API. Mark > On May 16, 2017, at 4:38 PM, Oliver Searle-Barnes wrote: > > You might find https://github.com/saschatimme/elm-phoen

[elm-discuss] Re: Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-16 Thread Oliver Searle-Barnes
You might find https://github.com/saschatimme/elm-phoenix useful to look at, it's an effects manager phoenix channels built on top of the websocket effects manager. On Tuesday, 16 May 2017 15:30:18 UTC+1, Christophe de Vienne wrote: > > Hi everyone, > > I am attempting to implement the pub/sub

Re: [elm-discuss] Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-16 Thread Aaron VonderHaar
I think another question worth asking is what Tasks should to official WebSocket package expose to be useful to protocol module authors? Originally, someone was going to implement a Phoenix channels package on top of websockets as a real-world example of a websockets protocol, but afaik that never

Re: [elm-discuss] Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-16 Thread Christophe de Vienne
Hi Mark, What you describe as an alternative to an effect module is more or less what I am building right now (well, I am attempting to anyway), which is encouraging :-) thanks for the feedback ! The question of effect modules using other effect modules also came up when reading some effect modul

Re: [elm-discuss] Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-16 Thread Mark Hamburg
I've been looking at similar issues for protocol handling. As I understand it — and I would welcome someone pointing to evidence otherwise — effects modules can't use other effects modules. That means that if you want to use web sockets, you either don't use some of the services that effects mo

Re: [elm-discuss] Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-16 Thread Christophe de Vienne
Le 16/05/2017 à 17:17, Christophe de Vienne a écrit : > Thank you for the feedback. > > I am still trying to find a non-effect based API. Did not find anything > satisfying so far. > > The WebSocket.LowLevel module is interesting for send batches, but my > main issue is how to associate a custo

Re: [elm-discuss] Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-16 Thread Christophe de Vienne
Thank you for the feedback. I am still trying to find a non-effect based API. Did not find anything satisfying so far. The WebSocket.LowLevel module is interesting for send batches, but my main issue is how to associate a custom message translator to each subscription in a global protocol state.

Re: [elm-discuss] Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-16 Thread Aaron VonderHaar
Hi, I haven't played much with WebSockets, but I have been building a protocol on top of HTTP. I haven't yet run into an issue that made me think to try an effects module. Instead of having custom subscriptions, my package has an `update` function that takes any msgs resulting from its commands a

[elm-discuss] Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-16 Thread Christophe de Vienne
Hi everyone, I am attempting to implement the pub/sub NATS (https://nats.io) protocol on top of the WebSocket API as a TEA component. I have a hard time finding an API for subscriptions: for each subscription some context must be kept, a unique subscription ID generated and in some case a unique

[elm-discuss] Re: How would you code a search in Elm?

2017-05-16 Thread 'Rupert Smith' via Elm Discuss
On Saturday, May 13, 2017 at 11:40:59 PM UTC+1, Rupert Smith wrote: > > But I can see that I can build different searches over this state space by > replacing the explicit infinite listing of it. Instead defining a monad > that will give me operations to 'succeed' on a goal state and to list a >