在 rebol 中编写沙盒环境有点像 Spoon.net
http://spoon.net 让您可以通过从网络下载桌面应用程序来执行它们。当您退出时,它会恢复系统。
在 http://askpoweruser.com 我想做同样的事情。我的想法是将整个系统层次结构保留在磁盘上,然后在执行结束时恢复它。
一行代码就足够了(对于如此复杂的功能来说似乎太容易了,这就是我怀疑的原因:)):
save %system.txt system
什么是序列化细化?在这种情况下有用吗?
要恢复系统我会这样做
load %system.txt
http://spoon.net let's you execute desktop application by downloading them from the web. When you quit it restores the system.
On http://askpoweruser.com I'd like to do the same thing. My idea would be to persist the whole system hierarchy on disk and then restore it at the end of execution.
Is a single line of code would be enough (seems like too easy for such complex feature that's why I doubt :)):
save %system.txt system
what is serialize refinement ? would it be usefull in that case ?
to restore system would I then just do
load %system.txt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是我的目标:
更改函数 f 中的某些内容:
看起来一切正常。但当然这只是一次测试。
here is my object:
change something in function f:
it looks everything is ok. But of course this is just a single test.
目前您无法像这样保存整个 Rebol 图像。您可以使用“mold/all”序列化 Rebol 值,并使用“save”保存值。但据我所知,序列化不能正确地将函数保存在对象内。
You can't currently save the entire Rebol image like this. You can serialize Rebol values by using 'mold/all and save values by using 'save. But AFAIK the serialization doesn't properly save functions inside objects.
您可以使用 CryoPID 之类的东西:
http://cryopid.berlios.de/
这将在该过程中起作用级别,你可以用它来做 Rebol 以外的事情。但这是特定于操作系统的。
You could use something like CryoPID:
http://cryopid.berlios.de/
That would work at the process level, and you could use it for things besides Rebol. But it would be OS-specific.