3 ms·
Came here to say this. In Lisp, you can just compile a function, or load a file and it just works. It's not even sold as a hot feature, not the way Erlang sells
by lamuswawir 2y ago
Came here to say this. In Lisp, you can just compile a function, or load a file and it just works. It's not even sold as a hot feature, not the way Erlang sells it. It's just a feature.
I manage a few websites written in Lisp, and updating them is as simple as push code, recompile and it works.
- davidw 2y agoBut what if the system is running and the new function takes different arguments or something? What if there is data loaded in the system, what happens to it? Simply loading new code is easy, ensuring the whole system works seems to require a bit more effort.
- fiddlerwoaroof 2y agoCommon Lisp has a bunch of features designed to enable migrating the system. e.g. update-instance-for-redefined-class ( https://www.lispworks.com/documentation/HyperSpec/Body/f_upda_1.htm https://www.lispworks.com/documentation/HyperSpec/Body/f_upd... ) lets you write code to update instance data between class versions when a class definition is reloaded. It turns out, though, that making hot-code reloading work well is mainly a question of how you design your system: designing for hot code reloading isn't all that hard for 90% of cases once you figure out the relevant techniques.
- deleted 2y ago[deleted]
- leprechaun1066 2y agoWe do this in q/kdb+ systems often for patches. An important thing about these languages is that this kind of workflow is part of the core for solving problems. So when you are building a system one of the aspects of its design will always allow for this update method. Then when you push a patch you both know the impact of the change (because you've tested the exact same steps in a dev/QA/UAT/Beta environment) and the work required to do it safely. Major releases do go through a full shutdown and release cycle though.
- osmano807 2y agoThose sites have something like Phoenix LiveView or it's something ad hoc like a simple SSR template engine? Would be nice to have something to handle migrations in the client side code to match the server side API.