-
Notifications
You must be signed in to change notification settings - Fork 18
Add an interpreter REPL mode #61
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This also moves a lot of display code to its own file
It's unclear whether the displayed code should also change. Leaving it unchanged helps indicate that execution will still proceed from the lowest level of the stack. Showing it changed helps provide the context of the call stack. This shows it changed.
Contributor
|
Owner
Author
Contributor
|
Just pressing |
Owner
Author
|
Not anymore 😄 |
Contributor
|
Entering |
Owner
Author
|
Thanks! Should be better now? EDIT: argh, not yet... |
Owner
Author
|
Should be better now. Thanks for trying it! |
It can be very confusing to see the full body of the method but actually
be in a method that does something like this:
%1 = (#self#)(x, default_args...)
return %1
because as soon as you step a line you discover you're done with the
call.
This takes a much stricter approach: any line number not observed is missing. It then performs some analysis of missings and replaces them with values when there is only one possible answer. For truly unknown lines, no line number is printed. (And no breakpoint info.)
e914f76 to
1350c94
Compare
This came up in a method that had nested conditionals and/or loops
This is pretty complicated so it's worth testing & explaining. Also generalizes the line number correction to allow any number of skipped lines as long as they remain in register.
This has long been needed. Obviously this is just a stub, needs many more tests (for edit mode as well as interpret mode)
This is more consistent with Debugger and probably easier to see.
This is particularly needed when Base.active_repl doesn't exist.
Contributor
|
🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


This adds a new mode that's rather fun. Try entering a command at the REPL and then hit Meta-i (on the same line, don't hit Enter). Then, for an intro to what can be done type
?.This requires timholy/Revise.jl#243, fully up-to-date JuliaInterpreter, and incorporates #60.