These are chat archives for jdubray/sam

26th
Oct 2017
Jean-Jacques Dubray
@jdubray
Oct 26 2017 05:57
This presentation made my day, "everything mutable in your app IS-A model"
Paolo Furini
@pfurini
Oct 26 2017 07:41
Re the first post, it's interesting but something that I already coped with, because I always struggled to overcome the simplistic MVC model promoted by Apple, or every other mobile/desktop platform (as we know very well, sadly)
I'll read it thoroughly ASAP anyway BC it seems written with a more precise and theoretical foundation than other articles on the same matter
(a side note: have you seen the Swift syntax? Do you like it? Well, Kotlin has pretty much the same syntax, and even more smart shortcuts for writing concise and expressive code 🤓)
Paolo Furini
@pfurini
Oct 26 2017 07:49
Re the presentation on TLA+, that looks wonderful! I always struggle to come up with more correct definitions of concurrency.. I'll watch it today or tomorrow as soon as I have some spare time
@pfurini I just saw the SAM Pattern Swift Sample, and it was not love at first sight, but I just to love writing code in APL, so I may not be the best reference to judge if a syntax is good/better or not.
Paolo Furini
@pfurini
Oct 26 2017 07:59
Yes another thing I want to explore, is using plain js for some apps, but writing everything in kotlin (that compiles to plain js too), so to have a consistent code base for server side and client side
But it's only an experiment, not something I plan to use in production anytime soon
Jean-Jacques Dubray
@jdubray
Oct 26 2017 08:02
@pfurini the "invariant(s)" in TLA+/PlusCal are something that you would normally write in the State function (as a safety condition, i.e. a state that you cannot reach). You can catch it before it can be released. SAM is not as efficient for finding bugs as PlusCal => TLA+ => TLC, but it will find bugs if you care to write these invariants in the State function.
Paolo Furini
@pfurini
Oct 26 2017 08:09
I'll reason about that.. unfortunately I need to cope to somewhat legacy server side tech, like the ones that speak about clustering or session affinity.. 😓
But I plan to write down all of my ideas in a base stack I'm putting together myself.. maybe someday I'll be able to use it in production
Jean-Jacques Dubray
@jdubray
Oct 26 2017 08:16
:+1:
Janne Siera
@jannesiera
Oct 26 2017 14:04
@jdubray shouldn't invariants be written in the model as they are parts of the logic to reject a proposal, hence preventing an action from bringing the state machine in an invalid state.
Jean-Jacques Dubray
@jdubray
Oct 26 2017 16:02
That's a reasonable way to look at it, though safety conditions would be a "bug" in the mutation that cannot be detected in the model. That's why it is so important to distinguish the model from the state (representation). Personally I would feel that the state functions is a better place, because you get a full view of the model, once all mutations are complete. Safety conditions should not be used for something other than detecting bugs. I feel that's a very important value of SAM.
Jean-Jacques Dubray
@jdubray
Oct 26 2017 16:28
can't wait! (sorry :-)
Paolo Furini
@pfurini
Oct 26 2017 16:30
Finally something moving even in the legacy enterprise java world.. not that I'm a big fan of EE, but openness is always a good thing for everyone
Jean-Jacques Dubray
@jdubray
Oct 26 2017 16:43
it's interesting to see companies like IBM and Oracle (BEA) which made loads of money on that technology and never quite invested in it, they were just happy to milk the revenue. I was really excited when I saw SCA/SDO (service component architecture) emerging in 2005-2006, the first STAR-based programming model I knew of, but unfortunately it was dead-on-arrival.