4 ms·
Actually, I wonder why we dont have yet a programming language and runtime which, after a shutdown, reload exactly like it was.
by quadcore 8y ago
Actually, I wonder why we dont have yet a programming language and runtime which, after a shutdown, reload exactly like it was.
- jon-wood 8y agoI believe you're thinking of Smalltalk there - https://en.wikipedia.org/wiki/Smalltalk#Image-based_persistence https://en.wikipedia.org/wiki/Smalltalk#Image-based_persiste...
- ovi256 8y agoeLisp (and others!) do this. It's very slow because memory and disk sizes got larger, but disk transfer bandwidth didn't keep up.
- tonyarkles 8y agoIf I recall correctly, Emacs currently does this. During the build it (slowly) loads all of the elisp into memory and then dumps out the memory image of it after it’s all been compiled. I’m a bit hazy on the details, but I think it involves calling unexec(). https://lwn.net/Articles/673724/ https://lwn.net/Articles/673724/ Edit: just noticed a sibling comment mentioned this too...
- Nullabillity 8y agoOnly for built-in elisp, as part of the build process. User configuration (including packages) is reloaded from scratch on each start.
- golergka 8y agoWhat strategy do you use to migrate old data to new codebase? Different business logic would probably want different answers in this regard, so I doubt that there's a one size fits all solution.
- mc_mike 8y agoSome lisps do this. like sbcl's sb-ext:save-lisp-and-die function is a "quit" that also persists the memory state. When you load this image later, you get it as it was when you "quit" last time.
- thaumaturgy 8y agoUnisys/Burroughs mainframes running COBOL ca. 1992 (and probably earlier) had this as a feature by default. You could walk up to one of these boxes right in the middle of a scary finance, payroll, whatever job, yank the cord out (not recommended), plug it back in, and the machine would boot up and return to what it was doing, usually with no ill effect. Despite switching to a dozen new fad languages since then, programmers have yet to get around to replicating this in any broadly-adopted modern system. If you want to put the effort in to engineering it yourself, of course, you can. But it was nice to not have to engineer it at all. When greybeards seem cranky, it's because of stuff like that.
- jerf 8y ago"Actually, I wonder why we dont have yet a programming language and runtime which, after a shutdown, reload exactly like it was." It's been tried many times, but you die the death of a million cuts. (Not just a thousand.) After you're shutdown, the world moves on, and then you get restarted. Now you're hardware has changed, your network connections have all changed, your version may have changed so the stored data may be all different, and perhaps surprisingly, worst of all, once something gets corrupted, it's corrupted forever. No "reboot" for you. It turns out that "reboot" step is inconvenient in the short term, but in the long term, enforced a minimum amount of discipline on programmers to make sure they don't get into an unrecoverable state. You'll note that if anything, the trend continues in that direction. All the recent operational work lately, in Docker, in things like ansible and chef and puppet, in "serverless", in reproducible builds for binaries, etc. can all be read through the lens of taking things that were previously images of unknown provenance, and ensuring that we can always rebuild them from an initial definition. We're in fact headed even farther away from image-based systems that reload in their previous state.