(Crudely) mmap the ST image to a 100GB file and just change pages. Let the OS flush the pages back and forth.
Maybe full boat, heap sweeping GCs would be Bad as it pages the entirety of the heap in and out. But we have (had) lots of RAM these days. We have generational GCs that leave idle stuff alone. Its no doubt impractical, but I think it would be neat to have the entirety of my historical email in the global "mailbox" array, and I can build indexes off it as I wished. But the mail isn't "on disk", it's all marshalled up as first class objects.
I don't know enough about it, no doubt it "won't work", but the idea of simply mapping the entire, large, ST VM heap to a persistent backing store, just be interesting I would think.
Dangerous too, as there is a demarcation between "running image" and "saved image". But, still think it could be interesting.
The core pattern was that the Proxy, which was under Nil and above all other Objects regarding inheritance I think.
It re-implemented `doesNotUnterstand:` by: 1) First loading the actual object from the persistent storage and 2) sending the not understood message to the actual loaded object (which might be able to answer the message instead of calling `doesNotUnderstand:` for every message, like Proxy did.
There where if course optimisations and so on, but that was the gist of it.
What I really like about this system was that it was completely transparent to the sender of the message whether they were talking to a proxy, or the already-loaded object, all while being robust, easy to maintain and so ob. Dealing with collections was tricky though (how much to load at once? what about searching for a particular object?...), and would have been aswell for deeply nested object (which they successfully avoided though because as a SaaS-company, they could model the data exactly to their needs).
You don't persist the state of the full image continuously to the host disk, but any given state (new programs, new runtime state, filesystem) can be saved via a delta, not a full rewrite, due to this representation.
So this is a little different than what you are talking about, but I'd say it's possible.
I think also IBM has or had somewhat similar concepts.
https://en.wikipedia.org/wiki/InterSystems_Cach%C3%A9
Which I heard about from a friend who was using it at work.
https://en.wikipedia.org/wiki/Comparison_of_object_database_...
Caché is first one in the table.
I remember object or object relational databases were popular at one time. maybe they still are to some extent.
(Yes, clearly I don't "get it". Happy to hear explanations.)
> break it irreversibly
Nope. "Cuis-Smalltalk records any action occurring in the environment: the code you edit in the System Browser, the code you execute in a Workspace. Therefore, in the event of a Cuis-Smalltalk crash you can restore unsaved changes when you launch the same Cuis-Smalltalk image again."
https://drcuis.github.io/TheCuisBook/The-Change-Log.html
> bespoke and unreproducible
So there have been all manner of ways to save code changes as plain text in files (or other formats in databases).
When you launch the Emacs editor, you're loading an Emacs Lisp image that was populated at build time by running Lisp code, with the resident Lisp definitions "dumped" to make an image file.
The image file used to actually be the `emacs` executable you'd run, using a clever but non-portable mechanism called `unexec` to make an executable.
But as of version 27.1 (in 2020), the image file is separate from the executable for portability reasons.
NixOS by contrast takes the entire Linux userland and makes it an immutable, dead compiler artifact. So it is to debian like C or Rust are to Lisp.
But the perspective you put forward again also makes sense to me too, I don't think there is any right or wrong here :) Thanks for sharing it at least!
or my language https://github.com/timbran-project/mica
The LLM terminal/chat is the repl, and the shell language is natural text input.
Something like that?