Re:The Lola Programming Language
by 7373737373 on Friday June 25, 2021 @05:08PM
(#27636305)
These are indeed rare features, only very few languages have them:
Stackless Python: https://stackless.readthedocs.io/en/2.7-slp/library/stackles...
Also Tcl and some special versions of Java and WebAssembly VMs, Lua with some ugly hacks. I tried to find systems like these: https://github.com/void4/notes/issues/16
Challenge for language designers: make this kind of sandboxing work recursively, and 100% securely: https://www.reddit.com/r/ProgrammingLanguages/comments/jxo92...
"10.4 The image file provides a frozen in time snapshot of a running Pharo system. This is the file where all objects are stored and as such it's a cross platform format. An image file contains the live state of all objects of the system (including classes and compiled methods, since they are objects too) at a given point. An image is a virtual object container."
https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExa...
When the Smalltalk implementation provides lightweight processes, snapshot saves the state of the lightweight processes — so when Smalltalk is restarted, the lightweight processes restart and continue doing whatever they were doing.
Re:The Lola Programming Language
by 7373737373 on Friday June 25, 2021 @05:12PM
(#27636341)
Unfortunately, Smalltalk will never have the protection aspect simultaneously due to its global access system.
Many Common Lisp implementations allow you to dump the program state to an image, which can then be loaded later.
What do they do about open file descriptors?
Store the path, position and open mode. Pipes will fail.
Dynamic modules (shared libs) are also tried be re-opened.
Re:The Lola Programming Language
by tompazourek on Friday June 25, 2021 @03:37PM
(#27635300)
R does something like that, it's pretty cool.
Could you elaborate?
Re:The Lola Programming Language
by tompazourek on Saturday June 26, 2021 @01:44AM
(#27639442)
R has this concept of workspaces. A workspace contains the loaded modules as well as the state of all user-defined variables, their values, etc. And a common workflow is that the entire workspace state is persisted in an RData file. It's like you were working in some REPL, but the last state of the REPL is persisted in between your sessions. So it's a different kind of programming, it's more interactive if you don't need to start from scratch every time. That means if something takes a while to compute, it's OK, because you only run it once, not every time you "run the program".
Ah. I use R a lot but gotten so used to not saving RData and Rhistory that I forgot why they were useful.
Re:The Lola Programming Language
by paulddraper on Friday June 25, 2021 @05:58PM
(#27636774)
Different of course, but virtual machines do this.
This seems pretty cool. Don't know if this is more common in game scripting languages, but I've never seen it before