Skip to content

Add parsed files and read them...#1815

Draft
rocky wants to merge 2 commits intomasterfrom
parse-save-internal-M-expression
Draft

Add parsed files and read them...#1815
rocky wants to merge 2 commits intomasterfrom
parse-save-internal-M-expression

Conversation

@rocky
Copy link
Copy Markdown
Member

@rocky rocky commented Apr 25, 2026

Add DumpParse to read Mathics3 source text and write it Python pickled to a file. Extend Get so that it will unpickle a file.

Add DumpParse to read Mathics3 source text and write it Python pickled
to a file. Extend Get so that it will unpickle a file.
@rocky rocky marked this pull request as draft April 25, 2026 02:49
@rocky
Copy link
Copy Markdown
Member Author

rocky commented Apr 25, 2026

This might be one way to run source text programs that have copyrighted source text.

However, I see that many copyrighted source texts are distributed under an MIT license.

Still, this may lead to a convenient way to bundle several files making up a package into one file.

@rocky rocky force-pushed the parse-save-internal-M-expression branch from 39470ce to 1c3503d Compare April 25, 2026 11:00
and add a return value to DumpParse
@rocky rocky force-pushed the parse-save-internal-M-expression branch from 1c3503d to 60a519d Compare April 25, 2026 11:04
@rocky
Copy link
Copy Markdown
Member Author

rocky commented Apr 25, 2026

  • Give an error message if the Pickle'd filename does not end in .mx3
  • Allow optional .mx3 file? Use the basename of input Mathics3 file for automatic output file creation?
  • DRY Get and DumpParse code?
  • Add magic number in mx3 file, and version information.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant