These are chat archives for jdubray/sam

17th
Dec 2016
Jean-Jacques Dubray
@jdubray
Dec 17 2016 01:14
@edmulraney I am just surprised that there are concepts like class, method, function that nobody has problem having a common definition and there are other concepts where everyone is perfectly having a different/conflicting definition. I am not sure I understand the logic behind this approach both from the community and the thought leaders who create their own definition.
All I have been saying is that I use the definition from a formalism called TLA+ (Temporal Logic of Action). I didn't come up with it, so this is not "mine". I have asked Lee and Dan where they got their definition from, but got no answer, I have asked why they had a different definition and I got no (real) answer.
blob
You can paint me as the bad guy if you want or try to question my motives but let me be very very clear:
  • I would like our industry/community to come up with a single definition of what an action is, I believe at this point in time this is a legitimate question
  • not answering that question hampers progress and creates confusion in frameworks and libraries
  • I have encouraged people to look at TLA+ even come up with their interpretation, I never asked people to trust my interpretation
  • I believe anyone with a dose of integrity would at least take a look at TLA+ if they work in that field
Jean-Jacques Dubray
@jdubray
Dec 17 2016 01:20
This message was deleted
Several people have come to this forum to question my knowledge (mostly focusing on showing I don't even know "what a function is"), but that's ok, that's completely standard in this kind of discussion.
Jean-Jacques Dubray
@jdubray
Dec 17 2016 01:32
Humor asside, I do think the cup-of-coffee gif is very enlightning about how people think about actions (exactly the definition of Lee Byron) why they side on "pass-by-value" (aka immutable) side.
TLA+ introduces a 3rd option which I could try to represent as: (State) => State' => State but that may be confusing. In other words, use an immutable structure to calculate the property values and update these values by reference.
TLA+ calls the function (State) => State' an action and it calls the State' => State the next state function (i.e. not part of the action).
You might find these distinctions minimal, but I find them important because they define key boundaries of your code. Imagine if I had the similar fuzzy semantics on what a function or a class is. Would you be happy about it?
Fred Daoud
@foxdonut
Dec 17 2016 02:42
Ask 5 redux users what an action is and you might get 5 different answers
Jean-Jacques Dubray
@jdubray
Dec 17 2016 04:14
I won't hold my breadth, I have been in these kinds of discussions before, so I don't expect people like Dan or even Lee would want to participate, they'll pick any reason they can to explain why they don't want to talk about it. Interestingly they are the ones implying everyone else got it wrong, at least I am happy to have a discussion about it.
devin ivy
@devinivy
Dec 17 2016 17:42
@foxdonut really? i thought in the context of redux it was at least well-understood. it's the actual object that is dispatch()ed to the reducers. anything that generates that object is an "action-creator."
when applying SAM to redux, a SAM proposal is a redux action.
a SAM action is roughly a redux thunk or action-creator.
devin ivy
@devinivy
Dec 17 2016 18:19
i may be mislead that everyone agrees on it though! lol
Fred Daoud
@foxdonut
Dec 17 2016 18:34
@devinivy you are most probably right and what I said was just a quip 😉
devin ivy
@devinivy
Dec 17 2016 18:36
i appreciate the sentiment, though– people are using redux in all sorts of very different ways.
@foxdonut what do you think of "ducks"?
i always found the one-to-one pairing of actions and sub-reducers scary. but perhaps you've had more experience with this, esp working on meiosis.
Fred Daoud
@foxdonut
Dec 17 2016 21:09
@devinivy I agree with your sentiment about the one-to-one pairings. In practice, I have found it useful to have other, "parent" components responding to some of its childrens' actions.
I like the idea of being able to write "self-contained" components that manage their own state, and making it easy to have more than one instance of such components, all the while keeping the single root model principle. This is one of the goals I am trying to reach with Meiosis.
Fred Daoud
@foxdonut
Dec 17 2016 21:14
I wrote the temperatures and random-gif examples to demonstrate this. However, I am not satisfied with the solution, I think it can be improved. Especially dealing with a list of child components that is added to/removed from at runtime. I am currently experimenting, trying to find a better solution.