3 ms·
> when you've been running a long old calculation for 20 minutes and it chokes on a misspelled variable name. If you are writing C++, you can't hot edit and co
by est 13y ago
> when you've been running a long old calculation for 20 minutes and it chokes on a misspelled variable name.
If you are writing C++, you can't hot edit and continue without re-compilation. With a scripting language and proper flow control, you can edit upon exception and resume.
- viraptor 13y ago> you can't hot edit and continue without re-compilation But with recompilation you can. watcom allowed stepping back during debugging as long as the operation was possible to revert. From there patching up the code to include a new version of the function shouldn't be that hard. Not sure if anyone's actually done it, but it's certainly not impossible. Ksplice works similar way if I'm not mistaken to do reboot-less kernel upgrades. (patching the functions part that is, not recovering the code that's already running them)
- est 13y agoKsplice is basically a binary (in ELF format) swap in kernel memory space. What happens if your binary is faulty?
- tehwalrus 13y agoI do often break into a REPL on a python exception; but I mostly use that to diagnose the problem and restart from scratch, rather than actually editing the code inside the REPL. This is probably because I don't have the setup required to persist the changes back down to the source file, even when that source file is different from the one actually loaded (eg in my development folder rather than the installed site-packages version.)