It is possible to serialize entire Novika state (i.e. in the save/load, play/pause kind of way) by recursively serializing conts. A very fast serializer combined with a powerful diff engine and archive format would also allow to store not only current state, but also all preceding/future states somewhat efficiently, to have play/pause/rewind later. Such a solution won't be as fast as some of the more clever ones, but it'll work and that's what matters now.
Note that in Novika rev10 (and at the moment of writing this), Block is the only class. References to Blocks are not inline but refs into a block pool. The latter maps block uids (or hashes or object ids or whatever else) to blocks themselves. Everything else is inline, although for space efficiency we could employ pools for decimals, quotes etc. as well. Then the ref object would also need to have a pool type attached.
Using JSON to start off would be OK, but ideally, we'd like to a have a compact, diff & archive friendly byte representation. Speed of serialization matters more than that of deserialization. Dynamic diff could improve serialization speed (i.e. don't visit blocks that didn't change), and static diff could improve space use.
You could then deserialize using $ novika -i <path/to/image.nki>
It is possible to serialize entire Novika state (i.e. in the save/load, play/pause kind of way) by recursively serializing
conts
. A very fast serializer combined with a powerful diff engine and archive format would also allow to store not only current state, but also all preceding/future states somewhat efficiently, to have play/pause/rewind later. Such a solution won't be as fast as some of the more clever ones, but it'll work and that's what matters now.Note that in Novika rev10 (and at the moment of writing this), Block is the only
class
. References to Blocks are not inline butrefs
into a block pool. The latter maps block uids (or hashes or object ids or whatever else) to blocks themselves. Everything else is inline, although for space efficiency we could employ pools for decimals, quotes etc. as well. Then the ref object would also need to have a pool type attached.Using JSON to start off would be OK, but ideally, we'd like to a have a compact, diff & archive friendly byte representation. Speed of serialization matters more than that of deserialization. Dynamic diff could improve serialization speed (i.e. don't visit blocks that didn't change), and static diff could improve space use.
You could then deserialize using
$ novika -i <path/to/image.nki>