How to Generate Self-Referential Programs
malisper.me
malisper.me
Here's a JavaScript one that's pretty neat: http://aem1k.com/world/
I found this an interesting read anyways especially when they start parametrizing the quine by a function F near the end. Although my interest shouldn't be that much of a surprise given my username:
asrp: a self-referential person/program/place
https://github.com/asrp/pymetaterp The boot portion of this parser can its own AST from its own grammar and its own AST
https://github.com/asrp/tkui This GUI editor can modify and (re)generate itself. Its the "generate UI code" button.
https://asrp.github.io/blog/gui_toolkit This toolkit maker can (and is required to) make itself.
I was doing some reading about Metaprogramming and Self-modifying code at Wikipedia, a fascinating topic with many uses from optimization, patching, and genetic programming.
And it reminded me of my days during the early 1990s working as a software engineer on the Space Shuttle operating system (FCOS). Many people don’t know that the Space Shuttle OS implements self-modifying code for the purpose of “fault-tolerance”.
...
An alternative to self-modifying or patching code is to use conditions (if statements) and local store (such as in-memory) to store flags that are used determine the paths to take (assuming such paths are known ahead of time, which might not be the case on genetic programming). Being the Space Shuttle a memory-limited, non-dynamic memory map and management environment, it is cheaper, less complex, and safer to patch specific instructions directly. """
http://weblog.cenriqueortiz.com/computing/2007/08/18/on-self...
It sounds useful in the appropriate contexts, much like every other technique.