-
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
Pragmas and REPL configuration #425
Comments
The The downside is that the evaluation is done only once. For example the |
From @vsbogd on Mattermost:
|
Two points here. First, I actually don't think we need to mix REPL specific configuration (like syntax highlighting or prompts) with execution configuration (like enabling syntax checker before adding atoms). I think these two should be separate configurations. I raised this issue specifically about execution configuration. Second point is that I think we could have both file configuration for the execution and pragmas in code but the settings should be kept in a same structure inside Rust process: either in atomspace or in The simplest thing we can do I think is to use pragmas inside REPL configuration file to configure execution environment. It is not very aligned with REPL specific configuration which is represented in a form of a equalities though. |
I feel like we understood words "execution configuration" differently when we were discussing #419 (comment) I provided an example of execution configuration setting above. Basically when I talk about "execution configuration" I mean flags which can be set by pragmas in current code and similar. |
So I will do the following: |
Looks good at a first glance. In fact I would also give a chance to an idea to keep results of pragmas in atomspace. Main point is that REPL specific and execution configuration should have different namespaces. @Necr0x0Der do you have any strong opinion here? |
I don't have a strong opinion, but I can make a few soft statements:
Thus, we can have other spaces with these settings. We can store execution and repl settings in different spaces if we wish (I tend to prefer using different spaces for such cases, but it depends on the presence of a clear boundary between these settings; if they turn out to be deeply interconnected then using one space is more sensible). REPL can just add this token by itself. Apparently, current |
Optionally loading a config file by repl if the default file exists, or directly loading a metta file into one or another config space sounds ok. The only problem is that some pragmas are potentially not just passive settings, but may require some immediate work. This may also be done via using |
I went to make this change to the repl, but the current For example, It seems to me that we'd want to loosen up the types pragma will accept. For example:
uses an expression atom to encode a tuple to express the styling of different levels of nested brackets. What do you think, @vsbogd or @Necr0x0Der ? |
I'm ok with loosen up the types for pragma, at least, at the moment. |
Repl config migrated to pragmas, and separated from MeTTa environment config in #433 I want to leave this issue open to track configuring the import search path however. |
After #419 we have two ways to configure execution environment REPL settings and Metta settings:
hyperon-experimental/lib/src/metta/runner/mod.rs
Line 34 in a66e830
hyperon-experimental/lib/src/metta/runner/stdlib.rs
Line 680 in a66e830
This issue is to merge and unify these configurations in order to have single source of truth for the execution configuration.
The text was updated successfully, but these errors were encountered: