In Erlang there is a semantic difference between a local function call
and a remote function call. A remote call, that is a call to
a function in a named module, is guaranteed to go to the latest loaded
version of that module. A local call, an unqualified call to
a function within the same module, is guaranteed to go to the same
version of the code as the caller.
and we wanted reloads to be tracked and triggered by git history
updates, here are some thots on how to scratch at this:
This has been on the idea backlog for a long while, obviously in pursuit of something like what's in
erlang's OTP
and consequentlyelixer
:Theoretical
Ideas for a MVP:
Presuming we were to take the same protocol as
erlang
namely, https://blog.stenmans.org/theBeamBook/#_hot_code_loading:and we wanted reloads to be tracked and triggered by
git
history updates, here are some thots on how to scratch at this:use
watchfiles
: https://watchfiles.helpmanual.io/ to auto-reload changed filesanyio
async support will work withtrio
: https://watchfiles.helpmanual.io/#how-watchfiles-worksrust
-python
integrations for hot loading code maybe using something likerustpython
or awasm
related exporter: https://github.com/RustPython/RustPython#wasitokio
repl: https://tokio.rs/blog/2021-12-announcing-tokio-consolefigure out how to get full python code reload workin:
ipython
rsyscall
'swish
APIptk
has utils for not clobbering stdout which would be super handy for having multiple actors logging while your in the middle of debugging a crash.Further related resources from #113:
REPL driven dev from a
lisp
persepctive: https://mikelevins.github.io/posts/2020-12-18-repl-driven/more
erlang
/elixer
links: