Deklan Webster
05/19/2019, 4:26 PMstevekrouse
Deklan Webster
05/19/2019, 6:18 PMDeklan Webster
05/19/2019, 7:35 PMThus we can expect Elm applications to grow entangled and stay that way
elm docs do recommend splitting up into modules when you have a type with a lot of helpers. Each module has its own update/view/model, I think. Although, I think Redux people, e.g., do keep a global store, so... idk
2)
In Reflex, you’d accomplish this by first describing a list of buttons of Dynamic length. This would emit a Dynamic list of Events, a higher-order stream. If you flattened the higher-order stream, counted all click Event occurrences, and added 1 for the original button, you’d get the desired length of the Dynamic list of buttons. Reflex would let you cyclically feed this Dynamic value back as the length of the list of buttons.
Does cyclical-ness always go with higher-orderness? Why? In other words, are there FRP libraries that use one but not the other?
3) This paragraph stuck out to me as needing more explanation (at least for me),
While Reflex enables understanding states via a single place in the code, Elm enables understanding messages via a single place in the code. If one wanted to understand the impact of a Reflex stream on downstream states, one would have to play the reverse of the Ctl-F game that we played in Elm. While this duality might seem equivalent, Reflex’s style is more comprehensible because understanding the behaviors of states is much more important than understanding the effects of messages.
Is the first part saying like, "Seeing all the effects of a 'command' is difficult with Reflex. But, tracking an individual piece of state is easy." Maybe like, a 'verb' vs 'noun' orientation?
And, anyway, it's not obvious to me why one would be better than the other. Except for maybe.. see next point
4) Is it possible to autogenerate these cycle diagram thingies with this approach? Is that part of your goal? Let the editor make these diagrams for you?
5) Looking at the diagrams it occurred to me "Man, this is complicated". But, maybe, rightfully so: TodoMVC, despite appearances, IS that complicated. God help us with something more complicated.
6) Are you still interested in all this, in particular Turbine?Deklan Webster
05/21/2019, 5:18 PMstevekrouse
Deklan Webster
05/21/2019, 6:15 PMstevekrouse
Thus we can expect Elm applications to grow entangled and stay that way
elm docs do recommend splitting up into modules when you have a type with a lot of helpers. Each module has its own update/view/model, I think. Although, I think Redux people, e.g., do keep a global store, so... idk
Steve: I'm not sure where the question is.
In Reflex, you’d accomplish this by first describing a list of buttons of Dynamic length. This would emit a Dynamic list of Events, a higher-order stream. If you flattened the higher-order stream, counted all click Event occurrences, and added 1 for the original button, you’d get the desired length of the Dynamic list of buttons. Reflex would let you cyclically feed this Dynamic value back as the length of the list of buttons.
Does cyclical-ness always go with higher-orderness? Why? In other words, are there FRP libraries that use one but not the other?
Steve: Higher-order streams are common, such as in Rx or xstream, both without cycles. Cyclic streams are quite rare, usually just in Conal-style original FRP.
3) This paragraph stuck out to me as needing more explanation (at least for me),
While Reflex enables understanding states via a single place in the code, Elm enables understanding messages via a single place in the code. If one wanted to understand the impact of a Reflex stream on downstream states, one would have to play the reverse of the Ctl-F game that we played in Elm. While this duality might seem equivalent, Reflex’s style is more comprehensible because understanding the behaviors of states is much more important than understanding the effects of messages.
Is the first part saying like, "Seeing all the effects of a 'command' is difficult with Reflex. But, tracking an individual piece of state is easy." Maybe like, a 'verb' vs 'noun' orientation?
And, anyway, it's not obvious to me why one would be better than the other. Except for maybe.. see next point
Steve: One analogy I make is the distinction between a dictionary or encyclopedia on one hand and an essay or piece of prose on the other. The Reflex approach is definitional like a dictionary or encyclopedia: each term is self-contained in a recursive way. The Elm approach is like imperative programming: you have to read through the entire text in order to piece the story together, even if you’re only curious about one or two characters.
4) Is it possible to autogenerate these cycle diagram thingies with this approach? Is that part of your goal? Let the editor make these diagrams for you?
Steve: yes, one of the benefits of this definitional approach is that it better lens itself to comprehensibility through tools. As you noted those diagrams aren’t particularly helpful, but they point towards this sorts of visualizations that could be created.
5) Looking at the diagrams it occurred to me "Man, this is complicated". But, maybe, rightfully so: TodoMVC, despite appearances, IS that complicated. God help us with something more complicated.
Steve: yes! This is essential to the point I’m trying to make. Software is really complicated but we mostly shove the complexity under the rug where it comes back to bite us twice as hard. I’m advocating that we be honest about the complexity we face, which might seem more difficult in the short run but pays dividends in the long run.
6) Are you still interested in all this, in particular Turbine?
Yes and no. I really love the Turbine project, but it’s a bit too young to build tooling for because it’s API is changing so quickly. A couple of months ago I decided to put my FRP visualization projects on hold because they felt a bit too low level of a problem to work on.Deklan Webster
06/14/2019, 1:47 PMstevekrouse
My point with 1) was just that if you minimize your 'global' store, and keep many smaller contained, local stores the problems you outline can be mitigated. I was asking if you agree. (This pattern is now being encouraged in React also: Context plus many useReducers)Possibly, but I don't think so. My gut says that we should only lump together that data which must be lumped together because pieces are dependent on each other. Any time we put data in the same store for convenience, we create a grouping where one doesn't need to exist. But my intuition on this is developing. I read a really great post recently that pushed forward my understanding on what I'm trying to get at here: https://blog.statebox.org/modularity-vs-compositionality-a-history-of-misunderstandings-be0150033568. I'm also going through the category theory for programmers course with #CKC6FM9DF which is really helping me get clearer on what I mean by compositionality. One key point: the IO Monad, while technically composible, isn't meaningfully composible because it doesn't have simple or precise semantics. Other monads are better at this, but if you use a monad to create global state, you're back to imperitive programming...
are you still an FRP-believer, as it were?Glad you're pushing the Turbine guys still! Yes I'm a huge believer in FRP. At this point it seems so obviously right to me, but it still needs to be extended. I spent a little while in the past weeks brainstorming what an distributed, mixed-ownership FRP operating system for all our devices could look like. (You can find scattered notes on futureofcoding.org/log but I wouldn't recommend it.)
Is there other stuff here besides Turbine that one should keep their eye on?I'm still trying to make sense of Conal's work. So you can always spend more time there. And #CKC6FM9DF if you haven't already. Seems almost like required reading for people looking to push the OG FRP paradigm
Deklan Webster
06/22/2019, 1:16 AMstevekrouse
stevekrouse
Deklan Webster
06/22/2019, 5:54 PMDeklan Webster
06/22/2019, 5:55 PMstevekrouse
stevekrouse
Deklan Webster
06/22/2019, 10:08 PMDeklan Webster
06/22/2019, 10:14 PMDeklan Webster
06/22/2019, 10:15 PM