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

Window.localStorage for persistence #1

Open
vassilmladenov opened this issue Aug 1, 2022 · 4 comments
Open

Window.localStorage for persistence #1

vassilmladenov opened this issue Aug 1, 2022 · 4 comments

Comments

@vassilmladenov
Copy link

Hi, I found this project from this thread and I love it, thank you for building this! This is so much easier and more portable than installing opam and Coq if you just want to do a few examples. Would you be willing to add support for something like Chrome's local storage to save filled-out proofs and keep track of progress?

@corwin-of-amber
Copy link
Member

Hi, thanks! This is definitely in our to-do list. In fact, localStorage is utilized in jsCoq's scratchpad, which is a single-file editor, and we've discussed with @bcpierce00 some options on how to integrate it into literate pages. What's stopping us now is mainly the fact that the SF books are constantly evolving, by design, and this potentially causes some impedance between what the learner types in and changes made to the book itself. A git-style conflict resolution scheme would be quite an undertaking and might be an overkill in this context. We are considering some lightweight solutions. Would love to hear your ideas!

@vassilmladenov
Copy link
Author

A git-style conflict resolution scheme would be quite an undertaking and might be an overkill in this context. We are considering some lightweight solutions. Would love to hear your ideas!

Honestly, I wasn't even thinking about conflict resolution. I'd be more fine if it was just indexed by the hash of the file and if the content changes I lose my saved stuff / I have to manually recover it from localStorage. Just wanted to be able to refresh to reset Coq's state if something screws up!

@ejgallego
Copy link
Member

@vassilmladenov , a possible way to go forward is to add an IRMIN backend where users can save the (textual) pages.

Users could configure were to place IRMIN's data (either a git repos, or local storage)

@vassilmladenov
Copy link
Author

@ejgallego I haven’t heard of this package before! Looks neat, lots of reading to do

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

No branches or pull requests

3 participants