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
Example of time widget #5
Comments
Time widget sounds awesome. My question is how do go backwards. How do you unapply changes in the state stream. What you really want is a way to rip out the last 10 states and force everyone to re-reduce their logic, I don't know how to do that. Going forwards is easy you buffer and apply one by one. What I'm trying to say is state is write only how do you go backwards in that paradigm. |
Well you just calculate inverse of last upadate and push that to the app state that will cause the revert. |
That feels dirty, it would work though. |
The other issue is persisting only the current snapshot vs the entire history to be able to do the timeline. You can't just JSON save the current state and load it back up again on page refresh if you want the timeline to work |
I don't think it's dirty I think that's exactly what git does when you revert a change, it calculates inverse of the change you revert and then creates new commit with it. I think it's right way to go about this. |
Agreed. This seems like the right mechanic. We should be able to factor out the mechanics and not have to worry about it. |
I wanna this: http://worrydream.com/LearnableProgramming/ and I think it should be possible too!!! |
@Gozala yes. That's my inspiration. I want reflex to be the groundwork infrastructure to build the necessary in browser tooling (REPL, editor, GUI) to do that. |
We talked yesterday about how great it is to have a central app-state stream, one of the most exciting things about it was an ability to buffer updates and state snapshots so that you could interactively manipulate timeline. Well we should do it! We should make a timeline widget that does exactly that, to show off how easy and great it is.
It should be pretty simple to implement too, it will just take an app state as an argument, and keep buffer of last
n
deltas when slider moves, inverse delta will be pushed to the app state that's all about it. Maybe it should even have a save /load button to let you save it in form of JSON or load in that form.The text was updated successfully, but these errors were encountered: