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

Refactor cps functions #933

Merged
merged 7 commits into from Jan 21, 2024
Merged

Refactor cps functions #933

merged 7 commits into from Jan 21, 2024

Conversation

felixroos
Copy link
Collaborator

@felixroos felixroos commented Jan 21, 2024

following #932 , the remaining functions that depend on scheduler cps ( fit / loopAt ) are now receiving the cps through pattern state, which gets the cps from the scheduler at query time.

Additionally, the functions that interact with the scheduler ( all , hush , setcps , setcpm ) did not work with multiple repls on the same page, because the last repl that was initialized got to set those functions on the eval scope. so any of those functions running in another repl would interact only with the last loaded scheduler. i fixed this by setting the functions on the eval scope right before evaluation, to make sure the Pattern is talking to the correct scheduler. This still feels a bit hacky, but it should work reliably (as long as 2 repls are not evaluated simultaneously)

this fixes the most annoying part of #922 so I've also now added mini repls to the community bakery

@felixroos
Copy link
Collaborator Author

fixes #930

@felixroos felixroos mentioned this pull request Jan 21, 2024
3 tasks
@felixroos felixroos merged commit 0cf0c1c into main Jan 21, 2024
2 checks passed
@felixroos felixroos deleted the refactor-cps-functions branch January 21, 2024 00:30
@felixroos felixroos mentioned this pull request Jan 23, 2024
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

Successfully merging this pull request may close these issues.

None yet

1 participant