-
Notifications
You must be signed in to change notification settings - Fork 49
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
Change parser to build syntax tree, which is used for syntax highlighting, add config.metta to repl #419
Conversation
…ntax highlighting Adding syntax highlighting and bracket-blink to repl
…ms. Long term I think this is a better foundation for MeTTa tooling
Also added runner interruptibility for both interactive and arg-invoked modes. |
… a MeTTa operation was finishing could cause the next operation to be skipped
…d interpreter Getting one step closer to an interruptible interpreter loop
Interruptibility now goes all the way into the interpreter loop, not just the runner outer-loop |
//Run the config.metta file | ||
let repl_params = repl_params.borrow(); | ||
let config_metta_path = repl_params.config_metta_path(); | ||
new_shim.load_metta_module(config_metta_path.clone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably makes sense in interactive mode but I believe doesn't make sense in script execution mode. At least now this configuration contains only highlighter settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want this config file to contain all the settings for both interactive and script-execution mode. However, there are currently only interactive settings because I don't see a way to do the string manipulation for import paths using MeTTa's current stdlib.
Is you point that running these setup statements is a waste of time if they don't matter for the execution mode? We could do something to separate them.
What do you think? A separate repl.metta file (runs only in interactive mode), in addition to the config.metta file (runs always)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I think it intersects heavily with pragmas which was implemented by @Necr0x0Der , thus we need to think what we should keep or how we can merge these two ways of configuration. I don't like we have two different mechanisms to tune the execution. Keeping settings inside an atomspace looks more logical to me. But then we need to align pragma syntax to change these settings inside this atomspace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will wait for your discussion with Alexey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have raised #425 to address this in future
Typo Co-authored-by: Vitaly Bogdanov <[email protected]>
…nt of incompatible version formats
Looks like on my system repl cannot create the directory to put config file:
|
Hmmm. Is it a permissions issue? I should definitely improve that error message! |
No just |
Looks like 21708ca fixes it thanks! |
… syntax error only if they attempt to submit an erroneous line twice.
…ociated with specific config module
…en to accept a newline and when to report syntax errors
Changing enter-key behavior when cursor isn't at the end
Luke, I am happy with it, please feel free to merge it if you don't have any additions. Thank you! |
No description provided.