sogaiu:
please let us know if you take a look -- last time i looked at nrepl i got pretty confused and i didn't find the docs that i found to be that helpful for me.
alex fowler:
Ok, so I checked. I checked in Calva the VSCode Clojure IDE, and in JeeJah, which is the nREPL implementation for Fennel. And yes, no. They don't update line numbers. They are a victim to the same line number drift. Which makes me think that either I have false memories from the past, or CCW, the ancient Eclipse-based Clojure IDE, had some tricks for this. I don't remember now, it was like 10 years ago, and I don't really use Clojure much these days. You're mentioning alter-meta!, and I remember I heard about it, but I can't find any meaningful usage of it in the CCW's code. It just evals through the nREPL messaging.
Babashka is the same, I think. I used it from Calva, and it forgets line numbers when you re-eval a particular top-level form.
However, this is quite ridiculous. Being unable to trace functions because they happen to be coupled to the text of the file where they happen to be written is nonsense. It's like building a car with square wheels, wondering how well would it roll, while being fully aware of the modern technology. Yes, as you're saying, folks keep just reloading whole files, inventing special defines that are not re-evaluated in such case. The anachronism of such stuff in modern development is astonishing. Just to be clear: I'm not talking about the notebook-like/judge-like appoach, which is a different paradigm, but I mean just the blunt reload-the-lisp-file approach.
sogaiu:
afaik the latter cannot be mutated via ordinary means.
alex fowler:
Yeah, I think that such stuff should be supported by the core runtime of a language, without any hacks or workarounds. Otherwise it's not really havable. Full support would mean full support from the VM in case of Janet. Not saying that this is something that we will ever get though. However, while lisps don't seem to generally have that, I'm yet to hear a reason why anybody thinks this is a good state of things, considering how much lisps boast with this dynamic REPL iteration approach.