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

Question about this package #1

Open
wants to merge 1 commit into
base: tris.bak
Choose a base branch
from

Conversation

dabrahams
Copy link

Hi @tonyfreeman,

Sorry to abuse a PR this way but it's the only way I could find to get in touch. I was wondering about the suitability of this code for something I'm working on. It's a little language interpreter written in "trampolined continuation-passing style.” The key point is that the interpreter's user gets control back after each unit of work. CPS can be awkward, and it would be much cleaner to intersperse yields in a regular eager recursive interpreter implementation, run as a fiber, and just keep poking the fiber to move to the next step. But the examples I see here don't make it clear whether I can build such a structure. Channel looks kind of close; I wonder if you can offer any insight? Thanks!

Hi @tonyfreeman,

Sorry to abuse a PR this way but it's the only way I could find to get in touch.  I was wondering about the suitability of this code for something I'm working on.  It's a little language interpreter written in "trampolined continuation-passing style.”  The key point is that the interpreter's user gets control back after each unit of work.  CPS can be awkward, and it would be much cleaner to intersperse `yield`s in a regular eager recursive interpreter implementation, run as a fiber, and just keep poking the fiber to move to the next step.  But the examples I see here don't make it clear whether I can build such a structure.  `Channel` looks kind of close; I wonder if you can offer any insight?  Thanks!
@dabrahams
Copy link
Author

To further clarify, I am not interested in getting any actual parallelism. Nothing really needs to be asynchronous in my application. I just need the ability to, essentially, suspend and resume execution of a stack of function calls.

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.

1 participant