Fork me on GitHub

Elements of Clojure has a great chapter on naming


just for the line

""To know a thing is to name it," you advise. True names have power. The K language was invented by Ursula K. Le Guin, and is among the oldest and tersest forms of magic. To imbue a language with a letter of your own name is to give up an element of your self. Your own initials ache at the memory."


What's the last variable name you created




nvm, looks like it's still not feature complete anyways

Daniel Hines20:10:38

What happened to This looks amazing, but there hasn't been activity in many years. It seems like a kind of essential analysis one would want to perform to understand a large code base, so where is its replacement?


In the gleam of someone's eye, waiting to be developed.

Alex Miller (Clojure team)21:10:54

there's a v2, but not public (yet)

🎉 20

... very interesting, especially if the (yet) part were to change 🙂

Alex Miller (Clojure team)21:10:36

it's a lot easier to query now, but just one of many things in the fire waiting for an opportune time :)

parrot 4
Daniel Hines21:10:00

Unfortunately the particularl repo I'm analyzing is a JS project, so codeq won't help beyond inspiration. I'm just surprised this isn't something everyone's doing. Git has been standard for many years now.


@d4hines It's a different thing but we do a sort of similar things (and much more) with CodeScene: It's a complete product though and not an open source This book talks more about the general ideas behind it:

Daniel Hines12:10:52

Can you talk about code scene over something like Git Prime or Velocity?


@d4hines I'm not super familiar with those products but in general, both GitPrime and Velocity seems to be (micro?)management tools tailored to measure individual “productivity”.


If you are interested in this stuff I suggest watching;


Also, a limited set of functionalit is available in this open source tool (prior work):

Daniel Hines13:10:34

I'll check it out! THanks!


That looks interesting but a quite different and limited thing. In particular I didn't see any mention about analyzing evolution of code.

Daniel Hines14:10:57

It can map git diff's back to the AST, and thus you can identify which language-level constructs were affected by a commit (and from there you can, walk up or down the call graph). It's a lower level tool than Codeq, but it's in a similar space. I'm excited to check out CodeScene though.


Feel free to DM me if you have any questions

Daniel Hines14:10:01

:thumbsup: Thanks!


@alexmiller are you at liberty to talk about how analysis works on v2? That was the research topic that took my interest.

Alex Miller (Clojure team)21:10:57

@d4hines codeq is designed to be language agnostic if you provide the right analyzer

Daniel Hines21:10:07

That's awesome, I missed that!

Alex Miller (Clojure team)21:10:09

@dominicm it's a Rich thing, so I haven't looked at it, but it's based of some I wrote for a different unreleased project, which was originally based off the first codeq. what aspect are you interested in?

Alex Miller (Clojure team)21:10:44

I don't think that part is substantially different than the original codeq, the differences are mostly in how it's stored for analysis and querying


@alexmiller my understanding was that tools.analyzer might be used instead of matching on def*

Alex Miller (Clojure team)21:10:54

oh, it does that in codeq 2. it's been years since I looked at either

Alex Miller (Clojure team)21:10:30

I didn't remember codeq not using tools.analyzer


Just to check I'm following (too much double negative), codeq 2 uses tools.analyzer?

Alex Miller (Clojure team)21:10:16

that's the part he swiped from me :)

Alex Miller (Clojure team)21:10:31

at least that is my recollection


Cool. I had thought there was some reason not to use it, so I was interested to see what the middle ground was between def* and tools.a

Daniel Hines21:10:57

Does anyone use Codeq v1 at present? Would it fool-hearty to start a new DB in v1?

Alex Miller (Clojure team)21:10:01

actually, I looked and it doesn't :)


Probably tools.analyzer had a lot more bugs circa 2012-2013, before I filed a few dozen against it, and bronsa fixed all of them tirelessly, while I was beating on tools.analyzer through my testing of Eastwood.


what an apt avatar 🙂


probably took way less effort to fix the bugs than the time you put in to find them @U0CMVHBL2 simple_smile


I think it is safe to say we are a small mutual appreciation society 🙂


tools.analyzer does have one semi-notable limitation, by design if I recall correctly, of not handling the deeper uses of &env in macro definitions that a few Clojure libraries use.