Re: [elm-discuss] Re: elm + reactive programming

2017-03-22 Thread Răzvan Cosmin Rădulescu
Sadly this debate seems to have ended :) On Saturday, March 11, 2017 at 1:59:31 PM UTC+1, Răzvan Cosmin Rădulescu wrote: > > Interesting comparison, I need to check out this purescript some more. > Never heard of it before but it does look like there are libraries that > provide reactive

Re: [elm-discuss] Re: elm + reactive programming

2017-03-11 Thread Răzvan Cosmin Rădulescu
Interesting comparison, I need to check out this purescript some more. Never heard of it before but it does look like there are libraries that provide reactive functions or something, research time! Thanks :) On Friday, March 10, 2017 at 8:14:59 PM UTC+1, jphedley wrote: > > Here's a nice

Re: [elm-discuss] Re: elm + reactive programming

2017-03-11 Thread Martin Norbäck Olivers
Yes, this is what I was talking about, we can abstract away the gritty details in functions even though we have the state explicitly in our model. I hadn't seen your package but it absolutely makes sense to do it this way. Den fredag 10 mars 2017 kl. 19:33:03 UTC+1 skrev Matthieu Pizenberg: > >

Re: [elm-discuss] Re: elm + reactive programming

2017-03-10 Thread jphedley
Here's a nice balanced Pros & Cons Analysis of JavaScript vs Elm vs PureScript vs GHCjs vs Scalajs Functional UI Platforms, which includes Higher-Order Reflex FRP . On Friday, March 10, 2017

Re: [elm-discuss] Re: elm + reactive programming

2017-03-10 Thread jphedley
Thank you so much for this fascinating discussion. On Friday, March 10, 2017 at 9:52:02 AM UTC-8, Mark Hamburg wrote: > > Let's consider throttling. > > We'll assume that we want to throttle messages of a particular type to not > arrive more often than a particular interval. The exact rules are

Re: [elm-discuss] Re: elm + reactive programming

2017-03-10 Thread Matthieu Pizenberg
> Let's consider throttling. > ... > What you are describing here Mark is almost exactly what I implemented in mpizenberg/elm-debounce [1]. I have no experience in observables and unfortunately, do not know yet about effect managers so it is done with messages. I agree that it has been

Re: [elm-discuss] Re: elm + reactive programming

2017-03-10 Thread Răzvan Cosmin Rădulescu
Well, I have to say, I didn't think the discussion will last this long to be honest, I'm pleasantly surprised :). From here on I'm going to handle it to you guys as you have more experience than I am have. I hope it gets somewhere constructive! On Friday, March 10, 2017 at 7:09:36 PM UTC+1,

Re: [elm-discuss] Re: elm + reactive programming

2017-03-10 Thread Peter Damoc
On Fri, Mar 10, 2017 at 7:51 PM, Mark Hamburg wrote: > What it feels like one wants to write but can't is the function: > > throttle : Float -> Sub msg -> Sub msg > I think you might be able to do this kind of thing in an Effects Manager. -- There is NO FATE, we are

Re: [elm-discuss] Re: elm + reactive programming

2017-03-10 Thread Mark Hamburg
Let's consider throttling. We'll assume that we want to throttle messages of a particular type to not arrive more often than a particular interval. The exact rules are exactly the sort of thing we want to hide inside the throttle module. We've got some state to manage. The last time we let a

[elm-discuss] Re: elm + reactive programming

2017-03-10 Thread jphedley
Yeah, I hear you about TypeScript: Overall it's just not the same goodness as Elm. About a month ago, I conversed w/someone on Cycle.JS Gitter, who was planning to implement Cycle.JS architecture in PureScript, but I can't find a repository for it right now. On Thursday, March 9, 2017 at

Re: [elm-discuss] Re: elm + reactive programming

2017-03-10 Thread Mark Hamburg
The real test here for Elm isn't just "can you write a program that throttles input". Of course you can. It's can you write a library that would allow people who needed to throttle input or detect double-clicks or detect other more complicated gestures without needing to know the specifics of

[elm-discuss] Re: elm + reactive programming

2017-03-10 Thread Martin Norbäck Olivers
The point is not that I want to implement things "on my own" in Elm. The point is that we need to understand the problems before discussing solutions. Elm has high level tools, they're called functions, so any collection of Elm state manipulation and subscriptions etc that you need can be put

[elm-discuss] Re: elm + reactive programming

2017-03-10 Thread 'Rupert Smith' via Elm Discuss
On Thursday, March 9, 2017 at 9:43:41 PM UTC, Răzvan Cosmin Rădulescu wrote: > > Take for example debounce with 500ms interval, every 500ms it should > trigger the update function with the latest object from the stream, that's > it. > Would be interesting to implement this in Elm and see how it

[elm-discuss] Re: elm + reactive programming

2017-03-10 Thread Răzvan Cosmin Rădulescu
Here's an example of drag implemented in RxJS: https://github.com/Reactive-Extensions/RxJS/blob/master/examples/dragndrop/dragndrop.js. Look how simple it is. And there are a bunch of examples in that examples folder. I think you have the wrong mindset, it is not about "what problems it

[elm-discuss] Re: elm + reactive programming

2017-03-10 Thread 'Andrew Radford' via Elm Discuss
I think the double-click / swipe examples are actually the things that need addressing. Throttling events from the DOM is a hard thing to do in TEA, is a very common requirement, and the transient state of the throttling operation (i.e setting/resetting timers) is not of interest to the model

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Martin Norbäck Olivers
Yes, this is basically my understanding of observables. But I've yet to see a compelling example where they are "needed" in Elm. This is not an argument against them, it's just that with Elm we have a different paradigm. So if you want to make the case for additions to the Elm language or think

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Răzvan Cosmin Rădulescu
When you got some time give this a read: https://gist.github.com/staltz/868e7e9bc2a7b8c1f754#the-introduction-to-reactive-programming-youve-been-missing On Thursday, March 9, 2017 at 11:08:38 PM UTC+1, Martin Norbäck Olivers wrote: > > Well, it may very well be that I missed the point of

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Martin Norbäck Olivers
Well, it may very well be that I missed the point of observables, I'll have another look, but my somewhat limited experience using them was that it was easy to lose track of all the event going through a lot of streams. Maybe what you are looking for is something like the Process in Elm, which

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Răzvan Cosmin Rădulescu
I agree with you on mostly everything. I think the current architecture with one state, update etc. works really well. The only thing is I see streams (reactive objects in general) is that when they *fulfill* their objective they will call the update function. Take for example debounce with

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Martin Norbäck Olivers
The Elm architecture is that there is a single state which is only updated by messages, so observables (or signals) do not really fit into that. If you want to count the number of clicks, then you count the number of clicks and keep track of it in your model. If you want to handle a swipe then

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Răzvan Cosmin Rădulescu
True, I know about cycle.js, I played with it before I discovered Elm actually. But I would really like to have a language dedicated to this new technology :), that's why I am searching for solutions within Elm. Don't think there are any tho', not yet at least, except for building modules from

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread jphedley
Elm seemingly dropped Signals due to the limitations of First Order (Discrete) FRP. I'm loving Elm, but if you're truly interested in FRP, you might explore Higher-Order FRP, using Cycle.JS using TypeScript, which can give you some of the Compile Time Guarantees of Elm.

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread jphedley
Elm seemingly dropped Signals due to the limitations of First Order (Discrete) FRP. Elm is great, but if you're truly interested in FRP, you might explore Higher-Order FRP, using Cycle.JS . Elm & Cycle.JS are really fun Technologies. On Thursday, March 9, 2017 at 8:58:28

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Răzvan Cosmin Rădulescu
There's nothing in elm-packages like this :). But try not to limit yourself to only UI stuff, this has a whole range of applicability, say from the top of my head for example having a real-time database such as RethinkDB, I can think of a number of ways how reactive objects can be used to

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread 'Rupert Smith' via Elm Discuss
On Thursday, March 9, 2017 at 12:39:30 PM UTC, Răzvan Cosmin Rădulescu wrote: > > As far as I can tell in Elm there's no other way but to keep track of > state and do all sorts of "low level" calculations. > Sounds like something that could be put in a library package? I agree that losing FRP

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Alex Rice
On Thursday, March 9, 2017 at 7:52:20 AM UTC-7, Răzvan Cosmin Rădulescu wrote: > > Hey Alex. I've seen the post, but isn't any helpful. About the time travel > debugger, that just records state as it changes, the idea of reactive > objects is to be able to transform this state (not just

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Răzvan Cosmin Rădulescu
Hey Alex. I've seen the post, but isn't any helpful. About the time travel debugger, that just records state as it changes, the idea of reactive objects is to be able to transform this state (not just present but interact with past state as well). The debugger isn't doing any of this. On

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Alex Rice
Hey, I am also very new to Elm, but just had a couple of thoughts. Isn't the Time Travel Debugger an example of operations involving time? Also, did you see this blog post about reactive programming? http://elm-lang.org/blog/farewell-to-frp -- You received this message because you are

[elm-discuss] Re: elm + reactive programming

2017-03-09 Thread Răzvan Cosmin Rădulescu
Hi Martin, thanks for not bashing me from the start because I brought up reactive... Quite interesting it's happened a few times already. So, anything involving gestures for example. There is no Elm module for feature detection (swipe, tap, double tap etc.) so I wanted to learn by doing but

[elm-discuss] Re: elm + reactive programming

2017-03-08 Thread Martin Norbäck Olivers
Maybe you can give an example where you think that signals work well and we'll see how it can be implemented using the current Elm architecture? Den tisdag 7 mars 2017 kl. 17:17:30 UTC+1 skrev Răzvan Cosmin Rădulescu: > > I was quite disappointed to see that signals have been removed in Elm 0.17