Arc Forumnew | comments | leaders | submitlogin
1 point by lark 4790 days ago | link | parent

A related question: how can I connect to the repl and upgrade the app without killing the process?


2 points by akkartik 4790 days ago | link

In general there's no way to do this, but you can simulate hot-swapping with thread and a little code organization. In readwarp.com, for example, I arrange the code so loading a file multiple times doesn't break behavior. Among other things it requires not reinitializing global variables, only functions. See http://arclanguage.org/item?id=11103, expecially tips 1 and 2.

-----

1 point by lark 4788 days ago | link

How would one hot-swap continuations?

-----

1 point by akkartik 4788 days ago | link

You mean like fnids? They're just data, so you should be able to reuse them as is. If you change the html for the frontpage old continuations to the next page may not reflect the change, but they'll gradually expire and get replaced with the updated versions.

-----