Bluish Coder

Programming Languages, Martials Arts and Computers. The Weblog of Chris Double.


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

Tags


This site is accessable over tor as hidden service 6vp5u25g4izec5c37wv52skvecikld6kysvsivnl6sdg6q7wy25lixad.onion, or Freenet using key:
USK@1ORdIvjL2H1bZblJcP8hu2LjjKtVB-rVzp8mLty~5N4,8hL85otZBbq0geDsSKkBK4sKESL2SrNVecFZz9NxGVQ,AQACAAE/bluishcoder/-61/


Tags

Archives
Links