question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clarify semantics of set/modState

See original GitHub issue

Was: BackendScope’s state callback returns state from when callback is constructed rather than from when it’s executed

BackendScope has a state function that returns a callback. However, it returns the state as of callback construction rather than callback execution. This breaks the callback’s composability. e.g.

case class Backend($: BackendScope[Unit, State]) {
  def submit = $.modState(s => if(s.username=="") s.copy(usernameMissing = true) else s.copy(usernameMissing = false)) >> 
    $.modState(s => if(s.password=="") s.copy(passwordMissing = true) else s.copy(passwordMissing = false)) >>
    $.state.map{
      state =>
        if(!state.usernameMissing && !state.passwordMissing) dom.window.alert("Submitted")
    }

will popup “Submitted” even if username and password are "" if usernameMissing and passwordMissing hadn’t already been set. The effects of the $.modstates are not seen by $.state (but $.modstates effects are seen by eachother, meaning this can be worked around by replacing $.state with $.modstate)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
japgollycommented, Oct 3, 2017

My friend, you’ve rejected my explanations with no logical refutations of your own, and you’ve just doubled-down on your original opinions. In many places you’ve just strengthened your language and even used bold but your logic is still the same and often just an appeal to satisfy your expectations. That’s not going to convince me of anything. From my perspective, I’ve already responded to all of your opinions, and I don’t have anywhere near the time required to do so again, especially when it’s just going to be the same as my previous reply. I appreciate the time you’ve taken to write up your views but I think it’s time we agree to disagree.

0reactions
japgollycommented, Mar 31, 2018

I’m not your work and I don’t get paid to argue with you. I do this entirely in my free time. To spend it in the Issues tab of github arguing in circles without any progress is a terrible waste of the time that I can spend on scalajs-react. If we were getting somewhere productive, then great, but I answered your concerns to the best of my ability and at least from my perspective, you keep reiterating the same points over and over again seemingly without hearing or comprehending my response. Enough time and patience on this now: if you’d like to see a change in the documentation, you submit a PR and I’ll review it. Now if you didn’t feel respected by our discourse, well firstly I’m sorry to hear that as it was my every intention to be respectful, but on the other hand it changes nothing in regards to this issue. You don’t have a right to be agreed with (if that’s what’s leading you to feel disrespected) so maybe try different arguments, further consider my refutations and “internalise” them as you expect me to do with your arguments, and/or confront what seems to be your own sense of entitlement and readjust your expectations from a volunteer offering you years of free work on a free library (multiple really), and additional one-on-one free time volunteering to discuss this issue with you. We both argued in good faith but now the amount of time and effort has well exceeded the payoff.

Hmmm, it appears I’m similarly “taken aback” by your response. How harmonious.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clarifying semantic confusion | Global Strategies & Solutions
Clarifying semantic confusion. Context: Semantics is the study of meanings, particularly the the relations between signs (including words and language) and ...
Read more >
The ethics of semantics: do we clarify or obfuscate reality to ...
What is clear is that the semantic obfuscations rampant in the language of modern farm animal production reflect underlying ambivalence about transparency ...
Read more >
Diminuendo al bottom—Clarifying the semantics of music ...
This article applies standard techniques for computer languages to reconstruct a precise model for the syntax and semantics of the historically ...
Read more >
What is Semantics? - Video & Lesson Transcript | Study.com
Learn the semantics definition and compare the different types. ... we look at the context, the surrounding text that clarifies meaning.
Read more >
Clarify semantics of preserveDrawingBuffer #891 - GitHub
This is identical to the behavior of the WebGL context's default framebuffer. Implicitly, this means ignoring preserveDrawingBuffer , but ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found