Hacker News new | ask | show | jobs
by zrkrlc 1260 days ago
I wonder what it would take to bring these things to Clojure. Its REPL experience is miles ahead of non-lispy languages but I do feel a pang of grass-is-greener whenever I hear about CL's debugging tooling. Hell, the JVM has a great debugger as well (or so I hear), so why is that difficult to port over?
4 comments

Same, I've been torn between learning Clojure—which I think is brilliantly designed, but I dislike its reliance on the JVM and exceptions vs conditions/restarts—and Common Lisp, that comes with a standard library that feels older than POSIX and C, but a REPL experience that is unrivalled and decades ahead any compiled language.

I decided to go with Common Lisp for its REPL and inside-out development experience, and just hope there's someone that will eventually take Clojure and CL, and fuse the two together.

The more I dive into Lisp and Smalltalk, the more I am convinced we are in the stone age of computing. We have reached the local maximum of UNIX and the basic abstractions over machine code we call compiled languages.

There's some good debugging tooling for Clojure as well. A recent entrant is https://github.com/jpmonettas/flow-storm-debugger and of course there's the estabilished pretty full featured debugging features in CIDER [1](Emacs), Calva [2] (VS Code) and Cursive (IntelliJ, using std Java JDI debugging). And for barebones tracing from REPL there's goo old clojure.tools.trace. And a bunch of others (sayid, postmortem, cljs-devtools for ClojureScript together with browser debugger, etc)

What CL has over Clojure is mostly the condition system I think.

[1] https://docs.cider.mx/cider/debugging/debugger.html

[2] https://calva.io/debugger/

I would love to know the answer to this! It sounds like something that would be both possible and very useful. I assume there's a good reason why it can't be done based on how the Clojure / JVM execution model works, but I don't know nearly enough about it to hazard a guess.
You can just use e.g. Intellij's debugger with Clojure? What exactly do you need ported?

Personally, I don't really see the value though. I prefer to create modules of mostly pure functions, testing them in the REPL using Rich comment blocks.

One thing is that when an unhandled exception occurs the clojure program is terminated, where as lisps usually does allow one to restart the program at the point of exception after examining what caused the exception and changing the values of local variables to rectify that. Can the intellij debugger do that?