Comments (7)
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.
I strongly recommend reopening this issue. Life is just too complicated with this design where Stream
s 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.
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.
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.
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.
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.
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)
- Add Test For Transaction Regen To C# Version
- Fix Transaction Regen Bug In C# Version
- Add Test For Transaction Regen to Java Version
- Add Test For Transaction Regen To Scala Version
- Improve Transaction.Post
- Fix Send allowed in Operator
- Fix Send allowed in Operator
- Fix Send allowed in Operator
- Fix Send allowed in Operator
- More aggressive cleanup for switchC / switchS HOT 2
- FRP book, javascript code refactoring HOT 1
- Check whether rank bug needs to be fixed in Java version
- Check whether rank bug needs to be fixed in C# version HOT 1
- C# Cell Lift firing twice, but only propogating value from single execution HOT 2
- [1.17/dev] Game crashed after joined the server HOT 1
- Simultaneous timer events HOT 4
- Causality in the Haskell denotational semantics
- Alternative to ranks & priority queue
- Cannot create account on sodium.nz because https is down
- Cell WPF binding HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sodium.