Fork me on GitHub
#off-topic
<
2019-10-22
>
plexus05:10:30

Elements of Clojure has a great chapter on naming

danielneal12:10:54

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

sova-soars-the-sora15:10:54

What's the last variable name you created

benzap17:10:24

accumulate-votes

benzap17:10:41

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

Daniel Hines20:10:38

What happened to https://github.com/Datomic/codeq? 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?

andy.fingerhut20:10:51

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
andy.fingerhut21:10:44

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

jumar05:10:40

@d4hines It's a different thing but we do a sort of similar things (and much more) with CodeScene: https://codescene.io It's a complete product though and not an open source This book talks more about the general ideas behind it: https://pragprog.com/book/atevol/software-design-x-rays

Daniel Hines12:10:52

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

jumar03:10:49

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

jumar03:10:45

If you are interested in this stuff I suggest watching https://www.youtube.com/watch?v=KV75YcFoWTo&amp;feature=youtu.be

jumar07:10:20

Also, a limited set of functionalit is available in this open source tool (prior work): https://www.adamtornhill.com/code/codemaat.htm

Daniel Hines13:10:34

I'll check it out! THanks!

jumar14:10:32

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.

jumar14:10:53

Feel free to DM me if you have any questions

Daniel Hines14:10:01

:thumbsup: Thanks!

dominicm21:10:03

@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

dominicm21:10:22

@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

dominicm21:10:16

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

dominicm21:10:50

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

andy.fingerhut21:10:04

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.

sogaiu11:10:12

what an apt avatar 🙂

bronsa15:10:07

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

andy.fingerhut15:10:11

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

andy.fingerhut21:10:33

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.