This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-09
Channels
- # adventofcode (95)
- # announcements (22)
- # aws (2)
- # babashka (14)
- # beginners (133)
- # bristol-clojurians (2)
- # calva (43)
- # cider (11)
- # clj-kondo (82)
- # cljsrn (20)
- # clojure (100)
- # clojure-europe (12)
- # clojure-italy (9)
- # clojure-nl (7)
- # clojure-poland (1)
- # clojure-spec (4)
- # clojure-uk (105)
- # clojurescript (42)
- # cryogen (1)
- # cursive (6)
- # data-science (1)
- # datomic (5)
- # euroclojure (2)
- # figwheel (4)
- # fulcro (4)
- # garden (1)
- # graphql (3)
- # hoplon (4)
- # jobs (1)
- # joker (3)
- # luminus (4)
- # malli (15)
- # off-topic (129)
- # pathom (10)
- # re-frame (43)
- # reagent (7)
- # reitit (3)
- # shadow-cljs (31)
- # vim (6)
- # yada (39)
expectations/clojure-test {:mvn/version "1.2.1"}
-- clojure.test
-compatible version of Expectations -- all new documentation https://cljdoc.org/d/expectations/clojure-test/1.2.1/doc/readme -- several enhancements https://cljdoc.org/d/expectations/clojure-test/1.2.1/doc/changes -- follow-up on #expectations (expect a lot more activity on this library going forward!)
Iāve just published Postmortem, a tiny value-oriented debugging tool for Clojure(Script)! https://github.com/athos/postmortem ā¢ Postmortem is heavily inspired by scope-capture and miracle.save, but focuses more on āpostmortem debuggingā as its name suggests. ā¢ Integration with transducers enables various flexible logging strategies ā¢ Instrumentation on vars makes it easier to debug functions without touching their code ā¢ Supports Clojure/ClojureScript/self-hosted ClojureScript If youāre interested, give it a shot! Any feedback is welcome.
Interesting!
Perhaps a Rationale
section would help, explaining how it compares to alternatives
(I see that hinted in Features
, but still... ^^)
I was looking for something of this sort, although now I know scope-capture also existed
postmortem seems more full featured though
and also seems to have a bit more focus on working with cljs
the instrumentation bit also looks right like what I really wanted
@U45T93RA6 Hi, thanks! Yeah, I admit the current document is still hard to grasp what the library does really aim at, so Iāll try to improve it sometime soon. @UJVKWJTGE Thank you for the feedback! I hope itāll be useful for your use case.
@U0508956F Hello, scope-capture's author here (thanks for mentioning it, I'm glad it gave you some inspiration!)
I don't see much overlap between both libraries. scope-capture
is above all about recreating the context of your code and projecting your REPL into it, and really not much about dealing with saved values. As such, Postmortem seems more akin to tracing debuggers, like tools.trace or Sayid (which is also very feature complete!).
@UJVKWJTGE: FYI scope-capture
does work with ClojureScript.
Might want to add Postmortem to the Clojure Toolbox! https://www.clojure-toolbox.com/
Also, I think not everyone knows about this, but there's a section about debugging in the REPL guide on http://clojure.org, it might be useful as an overview of the available options: https://clojure.org/guides/repl/enhancing_your_repl_workflow#debugging-tools-and-techniques
@U06GS6P1N Hi, thanks for your suggestions! Yes, I know the Clojure Toolbox, but I thought for no reason that itās not actively maintained anymore. I will file a PR for Postmortem later š
> I donāt see much overlap between both libraries. scope-capture is above all about recreating the context of your code and projecting your REPL into it, and really not much about dealing with saved values.
Once you save a local context as data, you can freely use that data later. Evaluating an expression in a reproduced context is one of the use cases for the saved data. Although Postmortem does not provide dedicated APIs for that, it could be done with relatively small effort using the existing APIs for most simple cases.
For example, the last expression in the following code effectively works like scope-captureās letsc
:
(require '[postmortem.core :as pm])
(defn sum [n]
(loop [n n sum 0]
(pm/dump :sum)
(if (= n 0)
sum
(recur (dec n) (+ sum n)))))
(sum 10) ;=> 55
;; This evaluates (+ sum n) with the local context of the 7th iteration
(let [{:keys [sum n]} (-> (pm/log-for :sum) (nth 7))]
(+ sum n))
didn't know about that section, but unfortunately tools.trace
doesn't seem to support cljs and that's one of the most useful ones I feel š
in fact, in clojure-toolsbox I see that scope-capture is the only debugging tool marked as cljs even
@U0508956F some would argue that for the most simple cases, you don't need a lib at all, you can just use the inline-def trick
https://clojurians.slack.com/archives/C06MAR553/p1576237425427800?thread_ts=1575899422.378000&cid=C06MAR553 That's far from the truth though, with dirac and all
I meant the "Debugging" section though
dirac is listed in "ClojureScript Development" it seems
Clojure/north call for papers is open š https://www.papercall.io/clojure-north-2020
New release of libpython-clj (1.20)!
Thanks to help by jjtolton, joinr, and gilch and a few others we have two large new pieces that move us measurably closer to having a great Python development/production environment in Clojure.
The changelog has the details but we now support require-python
that works just like require
. It does an initialize call if one isn't done already, loads the module into a namespace, and then does the 'require' of that namespace into your current one. It supports 'reload' for when you are developing a new python module to make it smoother to develop new functionality in Python.
We also support creating python classes in clojure. So you can create a new python class purely in clojure that will call into your clojure functions including the 'self' argument. This allows us to interact with toolkits that require extension-by-derivation and is also just kind of fun to use.
It's up on Clojars now, Enjoy!!
<https://github.com/cnuernber/libpython-clj/blob/master/CHANGELOG.md>
State of JavaScript survey is out (For the past 3 years, ClojureScript users who answered the survey made up 1% of the respondents. Maybe this year we can top that hint, hint š) https://survey.stateofjs.com/