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

Serialization of Values, Especially Environments #62

Open
pigworker opened this issue Apr 21, 2020 · 0 comments
Open

Serialization of Values, Especially Environments #62

pigworker opened this issue Apr 21, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed shonkier Everything related to the language

Comments

@pigworker
Copy link
Contributor

We're very close to being able to serialize values, as we can now prettyprint functions. The main thing missing is that we can't yet parse or prettyprint frames. Not that there's terribly much complexity involved in doing that. Given that environments are first class values mapping identifiers to values, it would be kind of awesome to be able to just save and load them from textfiles.

At some point, we'll need to do exactly that, to achieve cross-session persistence, configuration information and all that business.

Let us suppose we have some notion of .rho file representing a serialized environment. Perhaps we might be able to invoke

mary shonkier --env=foo.rho bar.shonkier

which prettyprints the value of

foo; main()

where foo is the environment given by deserializing foo.rho.

For simple queries, we might also want to be able to invoke

mary shonkier --env=foo.rho --main="<term>"

Now, exactly what should be the programmer's interface to serialization, I'm not sure. We have lots of options...

But if we have the underlying ability, we can conjure.

That said, we may in time prefer not to spend energy prettyprinting and parsing files which are not ultimately for human consumption. We may prefer a different format for pickling and unpickling (did someone ask how to preserve sharing?), but that's a problem to solve when we have it.

@pigworker pigworker added enhancement New feature or request help wanted Extra attention is needed shonkier Everything related to the language labels Apr 21, 2020
@pigworker pigworker self-assigned this May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed shonkier Everything related to the language
Projects
None yet
Development

No branches or pull requests

1 participant