Re: [elm-discuss] Simple way to screen-share an application written in Elm?

2017-03-03 Thread Noah Hall
Sure, in that case you just namespace the event by the device it came
from. There's an open-source repo here, containing an implementation
for 0.16 -> https://github.com/eeue56/elm-debugger. It should only
really be used for inspiration.

If you need more help implementing it, then Slack is generally the
best way to get it :)

On Fri, Mar 3, 2017 at 1:09 PM, 'Rupert Smith' via Elm Discuss
 wrote:
> On Friday, March 3, 2017 at 10:55:30 AM UTC, Noah Hall wrote:
>>
>> Like oh-so-many things, I implemented this about 1.5 years ago now. I even
>> gave 2 talks on it. With Elm 0.17, you can implement it in under 30 lines of
>> code, using firebase as a host. Sadly, the recordings of both the talks I
>> gave on it are lost. But you can read it here ->
>> https://github.com/eeue56/talks/tree/master/experiments_in_elm#the-future-of-debugging-with-elm
>
>
> You are oh-so-ahead-of-the-curve! Don't suppose you still have the code for
> it lurking in some github repo by any chance?
>
> I thinking that a straightforward replay of messages across the whole
> application will probably not be a magic solution to writing a multi-user
> collaborative application. For example, in code I am working with currently,
> I render some stuff in a fixed position overlay, and its position will
> depend on how the client window is sized and scrolled - so a straightforward
> replay will likely see things end up in the wrong position. I think for
> collaborative work I would need to look into Operational Transformation
> (https://en.wikipedia.org/wiki/Operational_transformation) which is the
> technique that made Google Wave work. The idea would be to replicate a
> carefully chosen subset of events across all clients, and to ensure that
> they communicate the users intentions rather than details which are wholly
> specific to one client rendering or another. OT also deals with interleaving
> events without applying a global sequential ordering.
>
> I thinks Elms update-model-view structure would be very convenient for OT.
> It still might be fun to try out a straightforward event replay across
> clients with 30 lines of code though.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Simple way to screen-share an application written in Elm?

2017-03-03 Thread 'Rupert Smith' via Elm Discuss
On Friday, March 3, 2017 at 10:55:30 AM UTC, Noah Hall wrote:
>
> Like oh-so-many things, I implemented this about 1.5 years ago now. I even 
> gave 2 talks on it. With Elm 0.17, you can implement it in under 30 lines 
> of code, using firebase as a host. Sadly, the recordings of both the talks 
> I gave on it are lost. But you can read it here -> 
> https://github.com/eeue56/talks/tree/master/experiments_in_elm#the-future-of-debugging-with-elm
>

You are oh-so-ahead-of-the-curve! Don't suppose you still have the code for 
it lurking in some github repo by any chance?

I thinking that a straightforward replay of messages across the whole 
application will probably not be a magic solution to writing a multi-user 
collaborative application. For example, in code I am working with 
currently, I render some stuff in a fixed position overlay, and its 
position will depend on how the client window is sized and scrolled - so a 
straightforward replay will likely see things end up in the wrong position. 
I think for collaborative work I would need to look into Operational 
Transformation (https://en.wikipedia.org/wiki/Operational_transformation) 
which is the technique that made Google Wave work. The idea would be to 
replicate a carefully chosen subset of events across all clients, and to 
ensure that they communicate the users intentions rather than details which 
are wholly specific to one client rendering or another. OT also deals with 
interleaving events without applying a global sequential ordering.

I thinks Elms update-model-view structure would be very convenient for OT. 
It still might be fun to try out a straightforward event replay across 
clients with 30 lines of code though.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Simple way to screen-share an application written in Elm?

2017-03-03 Thread Noah Hall
Like oh-so-many things, I implemented this about 1.5 years ago now. I even
gave 2 talks on it. With Elm 0.17, you can implement it in under 30 lines
of code, using firebase as a host. Sadly, the recordings of both the talks
I gave on it are lost. But you can read it here ->
https://github.com/eeue56/talks/tree/master/experiments_in_elm#the-future-of-debugging-with-elm

On Fri, Mar 3, 2017 at 7:15 AM, Zachary Kessin  wrote:

> No but that would be a really cool idea, I can think of several places
> that this could be useful, for example checking that things work the same
> on all browsers. Or being able to generate a sequence of events from a
> quickcheck type thing and play them in a browser.
>
> Zach
> ᐧ
>
> On Thu, Mar 2, 2017 at 5:57 PM, 'Rupert Smith' via Elm Discuss <
> elm-discuss@googlegroups.com> wrote:
>
>> Anyone tried something along these lines:
>>
>> The state of an application in Elm can be re-built by starting from its
>> 'init' state, then replaying all messages to a given state. This is called
>> event sourcing.
>>
>> If I am using some application written in Elm, and I want to share what I
>> am doing with someone else, all I need is for them to start up the same
>> application, the replay my event stream over it. Something like AMQP over
>> Web Sockets could provide the transport layer.
>>
>> There might need to be a way on the slave application to ignore all of
>> the local users events, and only update the model from the event source
>> from the master. That should be fairly easy to achieve by wrapping the
>> Program with one that does this.
>>
>> For a multi-user application, a simple but perhaps too inefficient way of
>> keeping things in sync would be for all user events to be round-tripped
>> through a message queue in order to put them in a sequential order that is
>> the same for all participants. So local input events would not go straight
>> to the update function, but be round tripped over the network. Would
>> probably work well enough for a small number of users on the LAN.
>>
>> Just curious to know if anyone has ever experimented with Elm along these
>> lines.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to elm-discuss+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Zach Kessin
> Skype: zachkessin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Simple way to screen-share an application written in Elm?

2017-03-02 Thread Zachary Kessin
No but that would be a really cool idea, I can think of several places that
this could be useful, for example checking that things work the same on all
browsers. Or being able to generate a sequence of events from a quickcheck
type thing and play them in a browser.

Zach
ᐧ

On Thu, Mar 2, 2017 at 5:57 PM, 'Rupert Smith' via Elm Discuss <
elm-discuss@googlegroups.com> wrote:

> Anyone tried something along these lines:
>
> The state of an application in Elm can be re-built by starting from its
> 'init' state, then replaying all messages to a given state. This is called
> event sourcing.
>
> If I am using some application written in Elm, and I want to share what I
> am doing with someone else, all I need is for them to start up the same
> application, the replay my event stream over it. Something like AMQP over
> Web Sockets could provide the transport layer.
>
> There might need to be a way on the slave application to ignore all of the
> local users events, and only update the model from the event source from
> the master. That should be fairly easy to achieve by wrapping the Program
> with one that does this.
>
> For a multi-user application, a simple but perhaps too inefficient way of
> keeping things in sync would be for all user events to be round-tripped
> through a message queue in order to put them in a sequential order that is
> the same for all participants. So local input events would not go straight
> to the update function, but be round tripped over the network. Would
> probably work well enough for a small number of users on the LAN.
>
> Just curious to know if anyone has ever experimented with Elm along these
> lines.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Zach Kessin
Skype: zachkessin

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Simple way to screen-share an application written in Elm?

2017-03-02 Thread 'Rupert Smith' via Elm Discuss
Anyone tried something along these lines:

The state of an application in Elm can be re-built by starting from its 
'init' state, then replaying all messages to a given state. This is called 
event sourcing.

If I am using some application written in Elm, and I want to share what I 
am doing with someone else, all I need is for them to start up the same 
application, the replay my event stream over it. Something like AMQP over 
Web Sockets could provide the transport layer.

There might need to be a way on the slave application to ignore all of the 
local users events, and only update the model from the event source from 
the master. That should be fairly easy to achieve by wrapping the Program 
with one that does this.

For a multi-user application, a simple but perhaps too inefficient way of 
keeping things in sync would be for all user events to be round-tripped 
through a message queue in order to put them in a sequential order that is 
the same for all participants. So local input events would not go straight 
to the update function, but be round tripped over the network. Would 
probably work well enough for a small number of users on the LAN.

Just curious to know if anyone has ever experimented with Elm along these 
lines.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.