Fork me on GitHub
#clojure
<
2019-12-06
>
Akiz12:12:37

Hello everyone, would you recommend some tool for visualizing clojure project like a graph? I am thinking about flowchart (DAG) that will show me which function calls another function etc. so it will be easier to understand a messy code 🙂. Thank you

sogaiu14:12:46

@zikajk i tried https://github.com/jpmonettas/clograms by @jpmonettas recently -- it does let one express functions (and some other things) as nodes and make connections among them. fwiw, he was pretty responsive about a few issues i encountered.

Alex Miller (Clojure team)14:12:18

there have been some graph things like that in the past

Alex Miller (Clojure team)14:12:50

having a hard time finding it now though

Alex Miller (Clojure team)14:12:52

<https://gitlab.com/200ok/codegraph> is one

Alex Miller (Clojure team)14:12:31

the analysis is really light in that one, really you'd want to use tools.analyzer for this.

arohner15:12:29

In (I believe) ring, there is a function to do constant-time string comparisons for checking passwords, but I can’t find it atm. Can anyone point me in the right direction?

manutter5115:12:15

I don’t know about ring, but maybe buddy hashers? https://github.com/funcool/buddy-hashers

Nick McCurdy18:12:44

Hey, does anyone know how I can check the version number of Kondo bundled with Calva?

sogaiu18:12:50

may be people in #calva-dev or #clj-kondo might know?

noisesmith18:12:43

is Kondo in the running repl process? if so you can find it via the "java.class.path" system property

user=> (-> "java.class.path" System/getProperty (string/split #":") (->> (filter #(re-find #"clojure/clojure" %))))
("/Users/justin.smith/.m2/repository/org/clojure/clojure/1.10.0/clojure-1.10.0.jar")

noisesmith18:12:27

where for this case looking for #"kondo" probably suffices

lilactown18:12:00

kondo likely runs as a native binary with calva, since calva can’t rely on a connected REPL always

borkdude18:12:12

Clj-kondo does not run as a binary with Calva, but as an LSP server

borkdude18:12:24

You can check the kondo version by viewing the clj-kondo plugin README

👍 8
Nick McCurdy19:12:41

Thanks, I’ll move to #clj-kondo

lilactown23:12:03

has anyone used clojure.inspector/inspect-tree in CIDER?

lilactown23:12:19

I can invoke it at the REPL, but it doesn’t seem to show the GUI