Wed Feb 12 06:14:26 CET 2003
"Vlad Dumitrescu (EAW)" <> writes:
> An image that popped up in my mind was that we could send a "freeze"
> command to a process and then be able to retrieve the process
> heap. It could then be moved to another VM, and the process could be
> thawed... it wouldn't notice a thing :-) Maybe some of this can be
> included in the gen_ behaviours, but for the heap
> retrieval/restoration the runtime will have to cooperate.
A friend has done a nice virtual machine called Idel with this fun
feature. He has an opcode called 'freeze', which is kinda similar to
fork() in Unix: it saves the current "world" to a file, and then
returns 0 and keeps running. You can email the frozen program file to
another machine or whatever, and when you run it again it will restart
from the same place but return 1 instead.
For a little while we had a competition to write robots to play
Roshambo (rock-paper-scissors) against each other, using the
Forth-like Idel assembly language - quite fun :-)
More information about the erlang-questions