3 ms·
Well no, the representation of game state and input have to remain the same ^1. I guess in lisp you could more easily write a function that maps the previous re
by orbifold 12y ago
Well no, the representation of game state and input have to remain the same ^1. I guess in lisp you could more easily write a function that maps the previous representation into the new one.
Here is an example of what kind of interactive code reloading I have in mind:
https://www.youtube.com/watch?v=xrUSrVvB21c https://www.youtube.com/watch?v=xrUSrVvB21c
Admittedly it is more of a hack than in a Common Lisp system, but still.
1) EDIT: At least in the most simple design. Nothing prevents you from optionally stopping the simulation, serialize a snapshot of the sate to disk, change the representation of complex numbers or whatever, together with the data serialization routines and continue.
- malisper 12y ago> I guess in lisp you could more easily write a function that maps the previous representation into the new one. Lisp provides a simple way redefine classes. There is a generic function (basically a function that is extensible), update-instance-for-redefined-class[0], which is called on instances of the old representation to map them to the new one. All a programmer has to do is extend it with the behavior they want. Coincidentally, the link I gave shows how to do this to change the representation of a point from Cartesian coordinates to polar coordinates. [0] http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/stagenfun_upd_efined-class.html http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec...