-
Notifications
You must be signed in to change notification settings - Fork 55
Livelits #1465
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: dev
Are you sure you want to change the base?
Conversation
Co-authored-by: Gregory Croisdale <[email protected]>
My understanding is that a projector's local actions currently can only modify a projector's internal model, making it impossible for a livelit to change its syntax on an update (outside of the view function) -- @disconcision is there a way to circumvent this so that the update function can change syntax? This allows a livelit to take its update functions from the context. This is
seg is what the model segment should become, ideally === Update: I circumvented this by creating a callback the forwards the parent action handler, rather than the local handler -- it occurs to me that the Built-in Livelit API is strikingly similar to the Projectors API. It would be a good use of our time deciding what should be a projector vs. Built-In livelit :) |
https://github.com/hazelgrove/hazel/tree/livelit-lift-syntax I attempted to replace my model replacement function with the existing lift-syntax, and ran into some errors when replacing the model -- namely, a nebulous error called "Not_found"... I had these in earlier versions of my replace model function, eventually finding stability when I replaced the labels of the existing syntax without modifying the shape or ids of the syntax. Example: @disconcision Any ideas here? |
Co-authored-by: andrew blinn <[email protected]>
We now do a full replacement of the syntax (including the livelit name). What cause the previous crash in livelit-lift-syntax is still unknown, but is resolved for now. Thanks @disconcision! |
… converting from hazel Co-authored-by: alexander bandukwala <[email protected]>
For built-in livelits, we need a function to determine if an exp is a value, lives in Statics (static value checker) |
@cyrus- Made the changes we talked about earlier today, and a couple more for stability + error reporting |
This merge brings a implementation of Livelits, proposed by https://hazel.org/papers/livelits-pldi2021.pdf, with some built-in examples.
Examples:
Timestamp(Can't keep up)Issues:
Limitations of projectors, to be fixed in separate PR:
Future PRs:
Cannot define Livelits during runtime, Livelits don't have access to context -- this needs to be revealed to projectorsLivelit invocation must be directly surrounded by a parenthesis in order to be grouped in InfoExp; example:(^emotion(100))
-- this is a current limitation of projectors