Live data from Hacker News

Clojure from the ground-up: debugging

aphyr.com

11–20 of 22 posts

Re: Clojure from the ground-up: debugging

#11
SBCL at compile time:

    * (defun bake (pie temp time)
      "Bakes a cake for a certain amount of time, returning a cake with a new
      :tastiness level."
      (setf (tastiness pie)
            (condp (* temp time) #'
    ;   (LET ((#:PREDICATE2 (* TEMP TIME)) (#:EXPRESSION3 #'
Pretty cool...

Re: Clojure from the ground-up: debugging

#12
post #2

Error messages and stack traces look pretty ugly. In Common Lisp: CL-USER 51 > (bake (make-instance 'pie :flavor :blackberry) 375 10.25) Error: The value 3843.75 of #:|predicate1555| is not a predicate in CONDP. 1 (continue) Supply a new value of #:|predicate1555|. 2 (abort) Return to level 0. 3 Return to top loop level 0. A clear error message and a way to repair it. A stack frame: Call to BAKE {offset 394} PIE : #…

Which CL is that?

Re: Clojure from the ground-up: debugging

#13
post #12
post #2

Error messages and stack traces look pretty ugly. In Common Lisp: CL-USER 51 > (bake (make-instance 'pie :flavor :blackberry) 375 10.25) Error: The value 3843.75 of #:|predicate1555| is not a predicate in CONDP. 1 (continue) Supply a new value of #:|predicate1555|. 2 (abort) Return to level 0. 3 Return to top loop level 0. A clear error message and a way to repair it. A stack frame: Call to BAKE {offset 394} PIE : #…

Which CL is that?

LispWorks, the one Rich Hickey used for quite some time... ;-)

Re: Clojure from the ground-up: debugging

#15

Kyle's suggestions have a ton of value, but do note that debugging Clojure(Script) can also be a pedestrian activity if you so desire. All the usual mainstream bell/whistles IDE-based interactive debugging is available today in CursiveClojure - break on all exceptions, eval in frame, etc. Also ClojureScript has had accurate source mapping in Safari, Chrome, Firefox, and Node.js for quite a long time now and recently…

And if you favour open source IDEs the Eclipse based Counterclockwise http://doc.ccw-ide.org/ will provide the same debugging experience for Clojure.

Re: Clojure from the ground-up: debugging

#16
post #15

Kyle's suggestions have a ton of value, but do note that debugging Clojure(Script) can also be a pedestrian activity if you so desire. All the usual mainstream bell/whistles IDE-based interactive debugging is available today in CursiveClojure - break on all exceptions, eval in frame, etc. Also ClojureScript has had accurate source mapping in Safari, Chrome, Firefox, and Node.js for quite a long time now and recently…

And if you favour open source IDEs the Eclipse based Counterclockwise http://doc.ccw-ide.org/ will provide the same debugging experience for Clojure.

My debugging experience with Counterclockwise wasn't very positive. But admittedly the last time I tried was a very long time ago and things may have changed significantly.

Re: Clojure from the ground-up: debugging

#18
post #15

Kyle's suggestions have a ton of value, but do note that debugging Clojure(Script) can also be a pedestrian activity if you so desire. All the usual mainstream bell/whistles IDE-based interactive debugging is available today in CursiveClojure - break on all exceptions, eval in frame, etc. Also ClojureScript has had accurate source mapping in Safari, Chrome, Firefox, and Node.js for quite a long time now and recently…

And if you favour open source IDEs the Eclipse based Counterclockwise http://doc.ccw-ide.org/ will provide the same debugging experience for Clojure.

I love ccw as a coding tool and the full editor repl is great too but I haven't been able to get breakpoints to work on it ever. Another thing that irks me about it lately is no real clojurescript support! That said it is still my primary clojure tool and things like figwheel help close the gap.

Re: Clojure from the ground-up: debugging

#19

I'm trying so hard to love Clojure, but I keep running into examples of code like this in the world: http://imgur.com/79FlpTL . I don't write dense Lisp code like that, but unfortunately a lot of other people do. And I spend far more time reading code than writing it.

These are fairly common functions in clojure. You might not be there yet as it is pretty readable. My personal preference would be to work in some let expressions for extra clarity.

Re: Clojure from the ground-up: debugging

#20
post #15

Kyle's suggestions have a ton of value, but do note that debugging Clojure(Script) can also be a pedestrian activity if you so desire. All the usual mainstream bell/whistles IDE-based interactive debugging is available today in CursiveClojure - break on all exceptions, eval in frame, etc. Also ClojureScript has had accurate source mapping in Safari, Chrome, Firefox, and Node.js for quite a long time now and recently…

And if you favour open source IDEs the Eclipse based Counterclockwise http://doc.ccw-ide.org/ will provide the same debugging experience for Clojure.

I find debugging with Cursiveclojure to be easier.
Post reply on HN