Skip to content
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

Closed
Gozala opened this issue Oct 21, 2012 · 8 comments
Closed

Example of time widget #5

Gozala opened this issue Oct 21, 2012 · 8 comments

Comments

@Gozala
Copy link
Contributor

Gozala commented Oct 21, 2012

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.

@Raynos
Copy link
Collaborator

Raynos commented Oct 21, 2012

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.

@Gozala
Copy link
Contributor Author

Gozala commented Oct 21, 2012

Well you just calculate inverse of last upadate and push that to the app state that will cause the revert.

@Raynos
Copy link
Collaborator

Raynos commented Oct 21, 2012

That feels dirty, it would work though.

@Raynos
Copy link
Collaborator

Raynos commented Oct 21, 2012

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

@Gozala
Copy link
Contributor Author

Gozala commented Oct 21, 2012

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.

@gordonbrander
Copy link

Agreed. This seems like the right mechanic. We should be able to factor out the mechanics and not have to worry about it.

@Gozala
Copy link
Contributor Author

Gozala commented Oct 25, 2012

I wanna this: http://worrydream.com/LearnableProgramming/ and I think it should be possible too!!!

@Raynos
Copy link
Collaborator

Raynos commented Oct 25, 2012

@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.

@Gozala Gozala closed this as completed Oct 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants