Fork me on GitHub
#announcements
<
2019-12-09
>
seancorfield09:12:21

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!)

šŸ™Œ 16
athos13:12:22

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.

šŸ‘ 28
šŸ‘€ 8
vemv14:12:23

Interesting! Perhaps a Rationale section would help, explaining how it compares to alternatives (I see that hinted in Features, but still... ^^)

āž• 8
Filipe Silva14:12:26

I was looking for something of this sort, although now I know scope-capture also existed

Filipe Silva14:12:37

postmortem seems more full featured though

Filipe Silva14:12:39

and also seems to have a bit more focus on working with cljs

Filipe Silva14:12:40

the instrumentation bit also looks right like what I really wanted

athos14:12:12

@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.

āœŒļø 4
val_waeselynck01:12:58

@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.

val_waeselynck01:12:53

Might want to add Postmortem to the Clojure Toolbox! https://www.clojure-toolbox.com/

val_waeselynck01:12:05

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

athos07:12:48

@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 šŸ˜‰

athos07:12:35

> 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))

Filipe Silva11:12:45

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 šŸ˜ž

Filipe Silva11:12:45

in fact, in clojure-toolsbox I see that scope-capture is the only debugging tool marked as cljs even

val_waeselynck15:12:13

@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

Filipe Silva15:12:53

I meant the "Debugging" section though

Filipe Silva15:12:24

dirac is listed in "ClojureScript Development" it seems

yogthos14:12:29

Clojure/north call for papers is open šŸŽ‰ https://www.papercall.io/clojure-north-2020

šŸ‘€ 12
šŸ 16
chrisn17:12:34

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>

šŸ‘ 56
šŸ‘ 20
šŸ™ 4
šŸ™ˆ 4
dotemacs20:12:19

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/

šŸ‘ 20