These are chat archives for jdubray/sam

3rd
May 2018
Janne Siera
@jannesiera
May 03 2018 11:53
I don't see what parts got updated, at first sight it seems the same as I've seen before.
Although I re-watched the introduction and this quote is quite relevant I think:
"In programs, different parts of the state are represented differently. They're represented differently because they're implemented differently. State machines eliminate those low-level implementation details. They provide a single simple abstraction."
Btw by 'parts of the state' he means the stack, heap, program counter of imperative languages, etc
Daniel Neveux
@dagatsoin
May 03 2018 11:57
This message was deleted
Fred Daoud
@foxdonut
May 03 2018 12:02
meiosis-sam.gif
Good morning, I've updated the SAM with Meiosis example.
As @jdubray has explained, the state representation is separate from the model. The example above shows how you can have a function that produces the state from the model.
In this example it's just adding a comment property that is COLD! or HOT! depending on the temperature. Of course, your state representation can be much more sophisticated.
In the tracer, you see the model in the first box and the state in the second box. Even as you type values into the model box, you see the resulting state representation in the second box and the resulting view.
devin ivy
@devinivy
May 03 2018 18:35
yeah! they've been going that direction. lit-html is too good :)
html imports also going away, replaced by js import