These are chat archives for jdubray/sam

10th
Jun 2017
Jean-Jacques Dubray
@jdubray
Jun 10 2017 02:00
yes, you could do that, though that would be better to implement it as a nap() action
I usually set a flag to prevent invoking the State function. Once the promise resolves (the async calls completes) I mutate the model and invoke the state function. In general not too much should happen in the model, you are just persisting the model and it's either success or error, in either case there is no complex mutation that are expected to happen.
Again, the theory is all this should be modeled as actions, but I don't believe you are breaking the patterns semantics if you do it that way, you should not abuse that optimization. If a complex mutation is expected to happen once the call completes, it's preferable to do it as a next-action and proper proposal.
Jean-Jacques Dubray
@jdubray
Jun 10 2017 15:13
Johan Alkstål
@johanalkstal
Jun 10 2017 16:00
No. https://electron.atom.io/ won the write-JS-DOM-for-desktop-war and that's what I see people using.
I've never given nwjs a go due to Electron
Jean-Jacques Dubray
@jdubray
Jun 10 2017 16:04
Yes, I had never heard of nwjs until today.
Johan Alkstål
@johanalkstal
Jun 10 2017 16:04
Intrigued? :)
Jean-Jacques Dubray
@jdubray
Jun 10 2017 16:05
Always intrigued with "web based thick/native client" technologies, now they provide similar UX compared to native. That's a big step forward for our industry.
JavaScript being my favorite language for reasons that make nearly all the other languages unattractive (lack of a JSON-like data structure), I am also interested in any technology that extend the reach of the language.
Johan Alkstål
@johanalkstal
Jun 10 2017 16:10
Have you fallen for any of the JS flavors that are available? TypeScript?
Jean-Jacques Dubray
@jdubray
Jun 10 2017 16:21
TypeScript is a non event for me, as long as they support the type any and don't get in the way of what makes JavaScript great, they add just a tiny amount of value to the language. I am in general opposed to OOP. It is the problem, not the solution.
Elm for instance is a massive step backwards.
Johan Alkstål
@johanalkstal
Jun 10 2017 16:24
I dislike TypeScript for similar reasons. I'm not a fan of OOP and when I was in a TS project, it just got in my way. Spent more time pleasing the TS compiler than writing code with value.
Jean-Jacques Dubray
@jdubray
Jun 10 2017 16:24
The funny part about Elm is that it claims to have "semantic versioning" and yet, you cannot make a change to a function signature that is not breaking. Evan Czaplicki is certainly a bright kid, but it's one thing to write a cool thesis, it's another thing to build something that is actually useful.
Johan Alkstål
@johanalkstal
Jun 10 2017 16:25
I'm giving Flow a try at home and it is better. It stays out of my way and lets me write JS with types where I want them.
I like Elm personally
Jean-Jacques Dubray
@jdubray
Jun 10 2017 16:28
Conceptually, I can assure you that's a major step backwards.
I never considered data structures to be the core problem of programming. Learning on the OOP debacle we should take enough time to make sure we are not walking the same path with FP or RFP.