1. 35
  1.  

  2. 8

    Honestly, it’s probably easier to fork a new process with the updated library, devise a fast serialization mechanism for your data, ship it from the old process to the new, then cutover to the new.

    For some value of easy, of course.

    1. 1

      If I remember correctly this is how xmonad handles configuration changes.

      1. 1

        I’ve thought about using Cap’n Proto for that.

      2. 5

        On the same topic - handmade hero live reloading of c++ game engine:

        1. 2

          This was long, but I loved basically every moment, and the payoff at the end, where a library drawing into a graphical framebuffer gets hot reloaded every time a buildable program is saved to disk, is amazing. Be sure to check out the YouTube demo that shows more of what you can do there, if only by writing bytes into memory that represents color channels of a grid of pixels.

          1. 1

            Everything was ruined when thread-local storage combined with destructors.