Hacker News new | ask | show | jobs
by nateglims 443 days ago
Javascript hotloading development setups are about the closest you can get to the REPL development loop outside of lisp. I'd imagine lua is similar if the embedding is set up for it.
4 comments

Revise.jl in Julia (https://docs.julialang.org/en/v1/manual/workflow-tips/#Revis...) also gives a really neat REPL development experience. It allows tracking changes to any source code file, module, even standard libraries or the Julia compiler itself!
I hate to be that guy but a ton of languages have REPLs. The whole collection of smalltalks out there are basically an interactive environment. All of them forth languages do it too. Factor, Racket, LiveCode, there are so many. And for most of them, watching files and hotreloading is not how they do it.
Pretty sure they are just filesystem watchers. Correct me if I am wrong. Filesystem watching is NOT hot loading.
To whoever down-voted me, please do explain how HMRs are comparable to Erlang's true hot code swapping or even Lisp's live redefinition.

HMR is limited to modules (almost or always UI components), and there is no native VM support (module boundaries, side effects, and global state complicates it further) for it, and there is no multi-version coexistence either, and it is absolutely not suitable for production.

To call "hot module replacement" hot loading is very generous, and quite an overstatement.

It is only very superficially similar to hot code swapping. It is a developer tool, not a foundation for live, fault-tolerant systems.

It is absurd to call hot module replacement (HMR) "hot reloading". It might sound fancier, but it is nowhere close to true hot code swapping.

Peak redefinition of terminology. Call it what it is: hot module replacement, at best.

>To whoever down-voted me, please do explain how HMRs are comparable to Erlang's true hot code swapping or even Lisp's live redefinition.

based

Hot module reloading is common in JS land and does things like trying to preserve running state as opposed to just watching a dir and restarting everything.
Have you used `bun --hot`?