4 ms·
Could you elaborate on how we can change Lisp programs while they're running? Sounds interesting. I actually had heard something similar about how JPL used Lis
by bhnmmhmd 9y ago
Could you elaborate on how we can change Lisp programs while they're running? Sounds interesting.
I actually had heard something similar about how JPL used Lisp and they could just debug the satellite remotely from the earth.
- lispm 9y agoTake for example an Emacs editor written in Lisp, like for example GNU Emacs. The language used (here Emacs Lisp) is capable enough for a wide range of programming tasks. If you want to change the behavior of the editor, you can just load Lisp code into it. That could add new functionality or replace old. If you need an extension module, you can just load it. No need to restart the editor. Hard then is unloading. The editor includes a Lisp interpreter and a Lisp compiler to byte code of a virtual machine. It can also load new source and compiled code at runtime. Function calls often go through a symbol table and you can register new functions, delete them or replace them. There are lists of functions often used to be triggered at some point. You can add/remove functions to these lists. In something like Common Lisp you can do changes to the object-system at runtime, both to the program and the programming language. For example you can load a patch, which changes the class hierarchy, adds slots, ... Also existing objects can be changed - they can change their class or the list of slots, etc.