Giter Club home page Giter Club logo

Comments (7)

the-real-blackh avatar the-real-blackh commented on September 14, 2024

You may be right. I think it may be possible to force the person always to deal with simultaneity by making only mergeWith available, not merge. I really haven't thought this through.

P.S. I'm not sure how it works right now, but I'd also define sync such that no changes
caused by the transaction itself are observable within the transaction.

It does work that way.

from sodium.

pyrtsa avatar pyrtsa commented on September 14, 2024

I strongly recommend reopening this issue. Life is just too complicated with this design where Streams can have multiple firings per transaction:

type S a = [(T, a)]         -- for non-decreasing T values
type C a = (a, [(T, a)])    -- for increasing T values

Why not make them both require increasing T values?

Additionally, at least accum and collectE seem to be broken in the Haskell implementation. They both ignore all but the last firing per transaction.

from sodium.

HeinrichApfelmus avatar HeinrichApfelmus commented on September 14, 2024

In reactive-banana, I have also used the "multiple occurrences per Event" model, but I now intend to switch to the proposed "one occurrence per Event" model as well. It forces the programmer to think about simultaneous occurrences explicitly, which I think is a good thing.

from sodium.

the-real-blackh avatar the-real-blackh commented on September 14, 2024

All right - I'm persuaded. Let's do it. Now's the time to do it - before I've finished the book. Any counter-arguments?

from sodium.

HeinrichApfelmus avatar HeinrichApfelmus commented on September 14, 2024

The only counterargument I can think of is that we lose the completely general instance Monoid (Event a), but I think that's a fair price to pay.

from sodium.

pyrtsa avatar pyrtsa commented on September 14, 2024

Yeah, already mentioned in my first comment. Fortunately, we can still define

instance Monoid a => Monoid (Event a)

or theoretically even

instance Semigroup a => Monoid (Event a)

from sodium.

the-real-blackh avatar the-real-blackh commented on September 14, 2024

94d2653

commit 94d26530c44ef98bce27a78fa1074486a04dcaf1
Author: Stephen Blackheath <[email protected]>
Date:   Fri Jul 24 10:41:10 2015 +1200

    Issue #39: Why support many firings of one Event in a transaction?
    With this change, now we don't in the denotational semantics and in the Java
    version of Sodium. Other versions will follow as they get revamped to be in
    line with the Java version.

from sodium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.