2006-09-07
Serializable Gadgets
As Slava has noted, I've managed to get the serialization code to the point where it serializes user interface gadgets. To demonstrate it I serialized an in-progress game of Space Invaders, uploaded the serialized file to my web server and someone else on IRC downloaded it, deserialized it, and continued where the game left off.
Given the gadget on the stack, serialization to a file was as easy as:
[
"filename.ser" <file-writer> [
unparent serialize
] with-stream
] with-serialized
To get the instance running again:
[
"filename.ser" <file-writer> [
deserialize
] with-stream
] with-serialized "Space Invaders" open-titled-window