unrepl

discussing specification of an edn-based repl and its implementations.
cgrand 2017-07-04T13:27:31.257749Z

Does anybody use a JVM debugger with Clojure!?

richiardiandrea 2017-07-04T13:40:44.543725Z

@cgrand occasionally, very occasionally I use cider, but not an actual JVM debugger

cgrand 2017-07-04T13:41:03.550951Z

thanks

cgrand 2017-07-04T13:41:43.565689Z

I wasted time during lunch figuring out why argnames wheren’t always available...

cgrand 2017-07-04T13:42:21.580017Z

the answer: the stubs invoke which delegate to invokeStatic don’t have this information...

cgrand 2017-07-04T13:43:18.600489Z

which leads me to think that almost nobody use debuggers

pesterhazy 2017-07-04T13:52:32.806664Z

I've tried visualvm in the past for profiling, but couldn't ever get it to work properly (with boot)

richiardiandrea 2017-07-04T13:52:40.809899Z

well I don't really know what cider does there but I really rarely use debuggers

cgrand 2017-07-04T14:13:39.283477Z

@richiardiandrea I think that cider don’t use a “true” (jvm) debugger. Can you step in java code? (eg in Clojure hash maps)

cgrand 2017-07-04T14:14:27.301122Z

@pesterhazy visualvm works but most defaults are off (haven’t tried with boot though)

richiardiandrea 2017-07-04T14:24:58.530469Z

Yeah you might be right, I actually never debugged java code with cider

cgrand 2017-07-04T15:21:54.737676Z

Not an unrepl yet (but it’s a standard “sub” repl, so upgradable):

Clojure 1.8.0
user=> (require '[net.cgrand.poucet :refer [trace break]])nil
user=> (defn fact ([n] (fact n 1)) ([n p] (if (pos? n) (fact (dec n) (* n p)) p)))
#'user/fact
user=> (break fact)
#object[com.sun.tools.jdi.EventRequestManagerImpl$MethodEntryRequestImpl 0x6edc4161 "method entry request  (enabled)"]
user=> (fact 4)
arguments n: 4
"user$fact" "invoke" "<no source>" => :cont
arguments n: 4, p: 1
"user$fact" "invoke" "<no source>" => :cont
arguments n: 3, p: 4
"user$fact" "invoke" "<no source>" => :cont
arguments n: 2, p: 12
"user$fact" "invoke" "<no source>" => :cont
arguments n: 1, p: 24
"user$fact" "invoke" "<no source>" => :cont
arguments n: 0, p: 24
"user$fact" "invoke" "<no source>" => :cont
24
user=>

pesterhazy 2017-07-04T15:23:49.773581Z

cool!

cgrand 2017-07-04T19:15:17.811196Z

I thought we were aiming at