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

Generating prototypes from Atlas population #1469

Open
stefjoosten opened this issue Feb 26, 2024 · 4 comments
Open

Generating prototypes from Atlas population #1469

stefjoosten opened this issue Feb 26, 2024 · 4 comments
Assignees

Comments

@stefjoosten
Copy link
Contributor

stefjoosten commented Feb 26, 2024

Is your feature request related to a problem? Please describe.
Simon's research is about using the Atlas as an editor, so users can edit scripts without knowing the Ampersand syntax.
For this purpose, we need to generate functional specs and prototypes from a population in the MySQL database. This issue is meant to discuss that topic.

Describe the solution you'd like
A lot of the software is already present. Here is a picture:
afbeelding
Describe alternatives you've considered

Additional context

@hanjoosten
Copy link
Member

hanjoosten commented Feb 26, 2024

That shouldn't be too difficult, but it should be something like jSON2Pstruct :: RIO env() -> Guarded P_Context.
The hard part probably is to find out what requirements there should be on the input JSON.

@stefjoosten
Copy link
Contributor Author

To inject the database population into the compiler stream feels much like what we did to inject an xlsx-population into the compiler stream. So there is further inspiration on how to do this.

@hanjoosten
Copy link
Member

According to @Michiel-s the json-export from the atlas contains the populations of the concepts/relations of FormalAmpersand. In that case we need to write a "reverse meatgrinder". I guess that this is much easier than a general parser of .json as I suggested above, for the structure of FormalAmpersand is already known.

For @Svroozendaal I suggest to have a look at both the .json file that is exported by the ampersand generator as input for the Atlas. It contains the population of concepts and relations. Also, have a look at the .json file that is result of exporting contents from an Atlas. Inspection should give a good idea of the structure of both files.

The reverse meatgrinder is something that should be built as part of the ampersand generator. That means Haskell. To get started with Haskell you can use this codespace template. You can start learning Haskell by creating a web spidering application. Use these sheets. I will be happy to help you along the way.

@Michiel-s
Copy link
Member

Discussed today with @Svroozendaal and we figured out that exporting Atlas population from RAP application for a given script version can be best done by using a regular Ampersand interface with SRC I[ScriptVersion].

The resulting API provides the atlas population by means of a json structure. Usually used by the frontend, but now used as input for the reverse meatgrinder as @hanjoosten explained above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants