Fork me on GitHub
#clojure
<
2023-02-14
>
dpsutton00:02:34

can someone help me find a deprecated library? It was a clever lein plugin that offered a repl as a breakpoint. You would put (debug-repl) or something similar and it would open a sub repl there with all of the locals added into a namespace for you. Want to find it if that rings a bell for anyone

dpsutton00:02:26

close. that one is tied to nrepl it seems. but very similar to what i’m thinking of

Derek00:02:07

Gary’s README mentions prior art here: https://github.com/georgejahad/debug-repl

dpsutton00:02:55

yeah i glanced at that one and that’s not it either

dpsutton00:02:59

it might have been technomancy?

jpmonettas12:02:43

@U11BV7MTK don't know if you have tried, but you can accomplish kind of the same thing with https://github.com/jpmonettas/flow-storm-debugger/ def value. You don't need to modify your code and It will also work for things you don't run from your repl, like a browser request debugging, etc you have a demo of it here https://www.youtube.com/watch?v=2nH59edD5Uo&amp;t=2290s

👀 4
dpsutton17:02:25

I have a memory that there are specs for clojure core? Is there a spec for def and defn that i could reuse?

dpsutton17:02:27

ah but not the form itself?

dpsutton17:02:46

i had a vague memory of a spec validating the fn-tail and such

Alex Miller (Clojure team)17:02:09

that's all part of what I linked

dpsutton17:02:19

i see. thank you

dpsutton17:02:38

oh you are right! i was confused by the fdef vs def for a second

Alex Miller (Clojure team)17:02:01

no spec defined for def there, but it's mostly (def simple-symbol? any?) so not very interesting

dpsutton17:02:29

(s/explain ::s.a/defn-args '(defn foo []))
foo - failed: vector? in: [1] at: [:fn-tail :arity-1 :params] spec: :clojure.core.specs.alpha/param-list
foo - failed: (or (nil? %) (sequential? %)) in: [1] at: [:fn-tail :arity-n :bodies] spec: :clojure.core.specs.alpha/params+body

dpsutton17:02:54

ah it’s the args to defn, not the whole form