-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Algorithm #37
New Algorithm #37
Conversation
Does the flux challenge you've written use CQRS/redux? |
Neither, although the approach is very similar indeed. The main difference from Redux is that the actions are implicit so they're not serializable. The reducer pattern is more-or-less intact. Porting the code to redux should be super easy. |
I'll just give that a look and maybe convert it to Redux as an exercise. |
More precise flow typings
So close now! When will this land? |
Not sure. I was planning to make nice new docs and a respectable-looking landing page before pushing out a 1.0.0 release. This was partly done, then summer happened and I got put on a very fulfilling project at work so my motivation to code on evenings and weekends has been waning. However I've lately been learning the value of MVPs and thinking that it would be better to put out something more lean (docs-wise) to begin with at least. But still need to wait until I have some spare time at a weekend, which is looking like early October right now. |
Can you shortly explain about breaking changes in feature release? What should be avoided in the current version? |
The main breaking change is that the The top-level Behaviour-wise, laziness is now only provided for 'active' derivations (which are upstream of an 'active' reactor). I might still change this back to the old behaviour (always lazy) before 1.0.0 is released if I can find a way to do it without impacting performance for active derivations. I think everything else is the same. |
I try to test 1.0.0-beta11, but catch strange bug: derive does not cache result, each get recalculate value again. It's some optimizations or bug? const a = atom({p: 1})
const b = a.derive((p) => {
console.log('test')
})
b.get() // "test"
b.get() // error: "test" again |
This is expected behaviour. Derivations are now only cached when the On Tue, 4 Oct 2016, 01:22 Stefan, notifications@github.com wrote:
|
Any idea how to achieve that? I'd be interested to work on a pull request. |
@andreypopp The epochal system I started this PR with would work if kind-of superimposed over the current setup. That could end up being quite complex to implement and test, but it should add only a small amount of constant overhead. A PR would be super cool if you're feeling intrepid :) Let me know if you want any help figuring stuff out! |
How is the rewrite coming along? |
Oh gosh. Well the code is pretty tight (currently released as beta), but I
haven't had the extra-curricular moxie to finish off the docs and landing
page in recent months. I've got a big 5-week chunk of holiday coming up in
February; maybe that with replenish my OSS mana.
…On 14 Dec 2016 8:14 am, "Oskar Börjesson" ***@***.***> wrote:
How is the rewrite coming along?
|
Ill send you a mana potion for Christmas 🎅
On Wed, Dec 14, 2016, 10:10 David Sheldrick <notifications@github.com>
wrote:
… Oh gosh. Well the code is pretty tight (currently released as beta), but I
haven't had the extra-curricular moxie to finish off the docs and landing
page in recent months. I've got a big 5-week chunk of holiday coming up in
February; maybe that with replenish my OSS mana.
On 14 Dec 2016 8:14 am, "Oskar Börjesson" ***@***.***>
wrote:
> How is the rewrite coming along?
|
derivable as arg to untill, from, and when functions in reactor options
This PR is ridiculous. I'm just gonna merge it into master and start doing feature and release branches. |
Up until now, DerivableJS used a mark-and-sweep style algorithm to both propagate change and free unused memory.
This had a couple of minor performance implications, and one obscure-but-serious memory leak vulnerability (see #36).
This reimplementation of DerivableJS' core data structures removes the mark-and-sweep stuff, replacing it with a significantly simpler system inspired by Clojure's epochal STM.
The practical implications are:
The progress of this reimplementation is as follows: