-
Notifications
You must be signed in to change notification settings - Fork 56
WIP: Claims and Wishes #76
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
base: master
Are you sure you want to change the base?
Conversation
| } | ||
| ); | ||
|
|
||
| When`{_} wishes {someone} sets persisten state {key} to {valu}`(({ someone, key, value }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| When`{_} wishes {someone} sets persisten state {key} to {valu}`(({ someone, key, value }) => { | |
| When`{_} wishes {someone} sets persistent state {key} to {value}`(({ someone, key, value }) => { |
|
I've actually been working on this for my own edification the past few months—and it looks very similar to this. It was a lot of work, but I just don't feel comfortable releasing it. I guess we should talk about it again though. Previous discussion on problems with implementing Realtalk. @janpaul123 said:
|
|
I've reached out to @osnr to get in contact with the people at Dynamicland. I think it's a good idea to have a dialog but I don't think it's a good idea to build a completely different system in Paper Programs just for the sake of doing things differently. I think the Claims and Wishes systems is very powerfull and there is still a lot of room for experimentation. Some examples of things I would like to experiment which are different from the current version of Dynamicland (at least to my knowledge) :
For example: You have the paper 123 with the following claims
You can pull out the claim '{123} has center point {{x: 50, y: 150}}' and replace the specific value '123' with a variable to get all things which have a center point. I have a tremendous amount of respect for Bret Victor and his team for the work they have done. But unfortunately I'm not close to Oakland so contributing to Dynamicland directly is not an option for me. A more specific question for you @shaunlebron: Have you implemented ToKnowWhens? |
Thanks for reopening this conversation, and working on this! It would be good to talk to @osnr as I haven't really been in touch with the Dynamicland folks lately, since I've been focusing on my job more instead. I'd be personally comfortable with implementing things like this now that they've secured some funding again, which means that Paper Programs is not an existential threat. But definitely check with them to see if they have any suggestions or concerns. I like the overall approach you took here. Keeping it true to JS syntax is nice for sure, though it is a bit of a weird syntax. 😄 I'll let you know if I get any ideas. Let me know when you want me to have a deeper look at the source code! |
|
And also curious about your implementation @shaunlebron! |
|
A couple thoughts on the implementation:
Notes for future documentation:
|
After my visit to Dynamicland I was very inspired by all the cool things they have beyond what Paper Programs currently offers, most importantly the claims and wishes system. I've decided to implement my own version of that I've called it FactLog. I would like to get your feedback about it.
How the Claims and Wishes system works in Dynamicland
@osnr wrote a great blog post explaining his GeoKit project, you should definitely read it to get a more in depth introduction to how the claims and wishes system works in dynamicland.
Here is the short cheat sheet:

FactLog in PaperPrograms
I've tried to emulate the syntax in Dynamicland with JavaScript, this is what it looks like. If you want to see some real examples you should look at the "/client/projector/core" folder or the bouncy example
Wish
Claim
When
Changes
the programs all run in the same context instead of the
improve developer experience in editor (this part is still very buggy)
I mostly switched because I wanted to have inline widgets https://codemirror.net/doc/manual.html#addLineWidget
This is still a work in progress, there are a lot of ugly hacks and the setup crashes sometimes.