3 ms·
Both the .Net Runtime and the JVM provide this functionality for all the languages they support ... I mean it requires a bit of work for the languages to acctua
by candiodari 5y ago
Both the .Net Runtime and the JVM provide this functionality for all the languages they support ... I mean it requires a bit of work for the languages to acctually enable this in a proper workflow, but C#, Java, Kotlin, Visual Basic, ... all support this (which I must say makes even testing a joy. Test not succeeding? Step through and if something goes wrong, just change the code, press F8 and it restarts at the function call or sometimes even the basic block you changed) I believe Visual Studio supports this even for a C++ without a .Net Runtime.
Microsoft calls it "edit and continue". Not sure what Oracle/IBM calls it but it works.
It's not guaranteed to work and there's edge cases where it silently corrupts stuff. Function pointers of course don't update, for example. The Clojure way is cleaner.
https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-use-edit-and-continue-csharp?view=vs-2022 https://docs.microsoft.com/en-us/visualstudio/debugger/how-t...
https://dzone.com/articles/hot-swap-java-bytecode-on-runtime https://dzone.com/articles/hot-swap-java-bytecode-on-runtime
There have been tech demos showing that LLVM can do this for C++ compiled to machine code. I don't know if it's really working anywhere, but it certainly can be made to work if someone puts in enough effort.
I once actually established a debugging connection from eclipse to a telephony server running on JVM that was actually serving calls and live-replaced the dialplan handling code, stopping a ddos without making things worse. It even works for that case. Not something I'd advise doing, but I love that this can actually work ...
- pjmlp 5y agoI has been superseded by Hot Reload on Visual Studio, and in both ways, C++ is also supported.
- candiodari 5y agoSucks you can't use it in VS Code ...
- deleted 5y ago[deleted]
- scns 5y agoSounds like live patching in Erlang. Kudos for pulling it off without support by the runtime. https://www.youtube.com/watch?v=BXmOlCy0oBM https://www.youtube.com/watch?v=BXmOlCy0oBM