-
Notifications
You must be signed in to change notification settings - Fork 10
Added constants, functions, and rearranged sections. #119
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
base: main
Are you sure you want to change the base?
Conversation
set command, constants, functions, and rearranged sections.| Elements can be matched using a range construct which has the form | ||
| ```{code} yaml | ||
| <ele1>:<ele2> | ||
| ``` | ||
| where `<ele1>` marks the beginning of the range and `<ele2>` marks the end of the range. | ||
| Example: |
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.
Like set, I would discuss a matching syntax separately.
There is an argument to make if this belongs in PALS syntax or can be a language-specific API and we need to weight the pros and cons.
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.
(Not saying we do not need either. I just think this will need a separate discussion of options and syntax and it will get long if you mix it into a PR that defines constants and rearranges sections.)
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.
Let's start a discussion and if needed I can move.
Element selection is important to make PALS flexible in terms of parameter setting, etc. and to this end it is important to have a standard way to select things. A language-specific API here would create a tower of Babel.
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.
Simply put, if arithmetical expressions are to be part of PALS, there needs to be a standard syntax to select elements.
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.
Also if setting of element parameters after the element definition is to be part of PALS, there needs to be a standard syntax to select elements.
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.
Maybe I misremember, but I was always under the impression that selecting and manipulating a lattice file's definitions would be done outside of PALS in libraries/tools/frameworks.
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 depends upon what you mean by "manipulating". In any case, element matching is needed to simplify the setting of element parameters. The bottom line is that PALS is for promoting portability of machine information and element matching syntax is needed for this.
|
@meneken17 Thanks for the info. Do you have any ideas how this should fit in with the PALS standard itself considering that the PALS standard is language (YAML, XML, etc.) agnostic? |
|
Concerning element selectors: If we (instead of yaml) think of a pals file in xml structure, we can use CSS-selectors or XPath. Making up some not yet existing one could then select
and a lot more |
It is only language agnostic in terms of the file format. |
|
Maybe I misremember, but I was always under the impression that selecting and manipulating a lattice file's definitions would be done outside of the PALS standard, and instead in libraries/tools/frameworks. Example: pals-project/pals-python#26 That also has the benefit that we do not need to implement a custom syntax parser & manipulator, based on some strings we pop into attributes. But instead, we just define clean, documented APIs in reference implementations for this job. Imho, it is not important that the C++, Python and Julia select & manipulate syntax look the same, since we can exchange scripts and PALS files as needed. |
|
@ax3l I don't remember this being discussed. In any case, what would you have for an API for YAML files? |
I remember from early discussions, but am definitely open to revisit.
For YAML (or JSON or XML or any) files, you read it in the reference implementation (e.g., for Julia/Python/C++) and manipulate it there. It is super common that scripts (or tools) are used to generate/manipulate lattice files, we do not need to reinvent the wheel for this, I think, and can keep generation/selection/removal/manipulation outside of the PALS standard. If people disagree on the last aspect, we could just unify how we name central APIs (e.g., select/filter methods) and their arguments across languages. For example what @danielkallendorf wrote above is 90% identical to pals-project/pals-python#26 |
|
We need to have the capability to do element selection in lattice files and it is very important that this be standardized at least for a given language. |
There is certainly no problem with the PALS standard, to use some agnostic syntax like |
No description provided.