Hacker News new | past | comments | ask | show | jobs | submit login

I fear Lisp had already a better debugging experience in the mid to late 60s...



Clojure also has better debugging experience. This is a bare-bones workflow of a guy who doesn't use the best tools available in Clojure.


Better debugging experience than Common Lisp? Are you sure? Do you know what happens when you hit a runtime error in Common Lisp? You get a full backtrace of all the calls that lead to the error, the error code, the error explanation, and THEN a lot of options that you can do to make your code keep working "on the fly", for example the runtime environment will give you the following options:

   0: [KEEP-OLD] Keep symbols already accessible FOO (shadowing others).
   1: [TAKE-NEW] Make newly exposed symbols accessible in FOO, uninterning old ones.
   2: [RESOLVE-CONFLICT] Resolve conflict.
   3: [RETRY] Retry SLIME REPL evaluation request.
   4: [*ABORT] Return to SLIME's top level.
   5: [ABORT] Abort thread (#<THREAD "new-repl-thread" RUNNING {10060E47B3}>)


Could you provide links to this better debugger


Found them in other comments, I don't see anything that's native to clojure though, not like pdb is for python at least


Debugging, like most things in clojure, is a library. You can view the implementation (as an nREPL middleware) here[1]. It's possible to use this debug middleware from any random nrepl client, but I'm not aware of any that actually implement a command-line debugger such as you get with python's pdb. I suspect, but don't have any time or inclination to verify, that implementing a basic command-line debugger using this library would be a weekend hack. I suspect this debugger is far more useful integrated into your editor than stand-alone since clojure isn't really a file/line-oriented language (which would make selecting forms hard).

[1] https://github.com/clojure-emacs/cider-nrepl/blob/master/src...


Could you elaborate on this for newbies like me?


Interpreter (Clojure does not have one, so some debug functionality is painful to implement/use), readable error messages / stack traces, resident structure editor, clever break/trace packages, debug levels, ... were relatively sophisticated in, say, BBN Lisp.

See for example BBN Lisp manual from 1971:

http://www.softwarepreservation.org/projects/LISP/bbnlisp/Te...

See the chapter 9 on the editor, 15 on the break package, 16 on error handling, 17 on error correction, 19 on advising, 22 on the programmer's assistant, ...

In 1992 the developers of BBN Lisp / Interlisp got an ACM Software Systems award for:

> ... their pioneering work in programming environments that integrated source-language debuggers, fully compatible integrated interpreter/compiler, automatic change management, structure-based editing, logging facilities, interactive graphics, and analysis/profiling tools in the Interlisp system.


Read this 5-part short series: https://web.archive.org/web/20160304033445/http://malisper.m...

Having compile/break/continue/trace as part of the language standard makes for a nice built-in debugging experience independent of IDE, even if some dev envs are better than others.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: