These are chat archives for jdubray/sam

23rd
Dec 2016
Vincent Jo
@inrix-vincent-jo
Dec 23 2016 00:11
hey JJ, what would be the programming model in the node-machine case? ..
Jean-Jacques Dubray
@jdubray
Dec 23 2016 00:26
just a function
Fred Daoud
@foxdonut
Dec 23 2016 01:59
@jdubray not sure what you mean by
but in plain JavaScript
the function-tree example is also just plain JavaScript...
or maybe I misunderstood what you were referring to.
As for node-machine, the ideas on web site sound interesting, but from looking at the sample code, I don't see how these claims are being upheld. Haven't dug into it though so keeping an open mind, but there wasn't anything that clicked for me (yet) and the code just looks like it has a lot of tedious overhead.
Fred Daoud
@foxdonut
Dec 23 2016 02:10
@jdubray I do like what you said about wiring vs programming model, and why not rethink how a function is wired?
code "lego blocks" that can easily be assembled will always be interesting to me.
Jean-Jacques Dubray
@jdubray
Dec 23 2016 02:28
@foxdonut sorry, I misinterpreted your code sample as metadata.
yes, wiring vs programming model is a key distinction, not sure why several people have pushed back in this forum.
Vincent Jo
@chiwoojo
Dec 23 2016 03:52
How would you define a programming model? I just dunno know.. wanna figure it out.. is a function and variable part of program model? Can one language have several programming models? Do different programming languages have different programming models?
Jean-Jacques Dubray
@jdubray
Dec 23 2016 04:10
Sorry, it's a bit hard to explain (not necessarily a good excuse), but the programming model relates to the factoring/building blocks of the code (data and instruction) vs the wiring which have no incidence on the factoring (how the building blocks are assembled).
If you look at OOP, the basic programming model is Classes and methods, then you start having refinements such as abstract classes, interfaces and static methods, not to mention public, protected and private. C# has more refinement such as partial classes. Patterns such as MVC or SAM also fit in the programming model category since they also suggest an opinionated factoring of your code, albeit not at the programming language level. That being said, Elm brought its programming model at the programming language level, which is not necessarily a good thing… Consider JavaScript’s programming model has a lot of nuances, which is both good and bad, offering a lot of ways to define your own programming model as a subset.
The wiring clearly has to deal with connecting the building blocks together.
Edward Mulraney
@edmulraney
Dec 23 2016 10:50
@jdubray very interested in comparing a SAM/redux implementation of the clock problem - however I'm not sure I fully understand the problem. is it simply make a DST capable clock?
Fred Daoud
@foxdonut
Dec 23 2016 16:02
Friends, just wanted to wish you Happy Holidays! :christmas_tree: :snowflake:
Jean-Jacques Dubray
@jdubray
Dec 23 2016 21:26
@edmulraney Actually, the important aspect is the leap second, not DST. DST is just ancillary to illustrate the utlization of the State function.
Let me write/publish a spec and see if other people want to join.
@foxdonut thank you! Happy Holidays, best wishes for the new year!
Jean-Jacques Dubray
@jdubray
Dec 23 2016 22:44