1. 37
  1. 4

    Author here! Let me know if you have any questions about the post, or about Fennel or the IRC server. I’ve got the server running at hey.technomancy.us:6667 (no TLS) if anyone wants to give it a test drive.

    1. 2

      Great post!

    2. 3

      Nice write-up for a journey of abstractions! Reminds me of two things:

      • How in Common Lisp CLOS, objects are updated lazily after a class redefinition. Ostensibly you can control this somehow, but right now I can’t find how.

      • How Erlang, famous for hot-reloading, has an interesting way to control the upgrade in a performant way: Calls to functions that are qualified with their module name refer to the latest version of the code, whereas calls with just the function name refers to the same version of the code as the caller. The latter can be compiled with no upgrade check.

      1. 3

        About common lisp: http://www.lispworks.com/documentation/HyperSpec/Body/f_upda_1.htm

        And: https://blog.cneufeld.ca/2014/05/the-less-familiar-parts-of-lisp-for-beginners-reinitialize-instance/

        Common lisp has hot-reloading baked in the standard, for example there are 2 ways of defining “global” variable: one that will re-assign the value to the variable when re-run and one that keeps the variable’s value if it already exists.

        1. 2

          I worked a couple years side by side with the author of the Learn you Some Erlang book linked in the post, which is how I learned this technique! Erlang’s approach really is a lot more sophisticated, but some of it becomes unnecessary if you only ever have a single OS thread as in my IRC server.