News for hackers. Stuff that matters.
Re:Code, Eval, Play, Loop – Common Lisp OpenGL Environment by orbifold on Sunday January 25, 2015 @09:24AM (#8942976)
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

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.

Re:Code, Eval, Play, Loop – Common Lisp OpenGL Environment by malisper on Sunday January 25, 2015 @10:28AM (#8943113)
> 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...