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

commands that affect the REPL state #36

Closed
cgrand opened this issue Feb 23, 2018 · 1 comment
Closed

commands that affect the REPL state #36

cgrand opened this issue Feb 23, 2018 · 1 comment

Comments

@cgrand
Copy link
Member

cgrand commented Feb 23, 2018

for example changing ns or setting print limits affects the command.
Related to #7 and #17.

They can't be sent on the user connection because it's hard to determine a safe point in the input stream for the client to send them.

So somehow they must be queued until the target REPL reaches a safe point (in the R.E.P. loop) to process them.

@cgrand
Copy link
Member Author

cgrand commented Mar 9, 2018

As of 7fbecaa such "safe points" do exist.
Actions to be performed on the main thread are queued.
Right before prompt the queue is checked, if present the first item is executed and the prompt printed. Then comes reading (or rather seeking that is when the repl consumes top level blanks (or comments) until it finds a char that may be the start of a form). If while the REPL seeks there's something in the queue, then the seek aborts and we loop back to the prompt. Thus each queued action is going to trigger a prompt (not committing to this 1:1 behavior atm).

@cgrand cgrand closed this as completed Mar 9, 2018
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

1 participant