Fork me on GitHub
Drew Verlee00:05:00

What's the state of the art for machine assisted code review? For clojure? In general? I feel like at the heart of it, were asking if two programs are equal. Which I know to runs into well researched issues. Im just not sure if there aren't improvements to reading GitHub code pull requests as the primary way if communicating change. Which seems to be the industry standard.


I’m not sure you mean by: > I feel like at the heart of it although sounds interesting. I think if you ask the question coming from the opposite direction, “what would be the optimal way of communicating changes?“, it’s clear there’s room for improvement. some interesting directions: 1. literate programming has also been an subject that I don’t think is fully explored 2. I can imagine a future where a pull request is accompanied by a sub program that illustrates the code change (maybe something like an ipython notebook). The notebook or sub-program would provide an interactive way to see the change in action in-line. 3. integrating other mediums other than writing(eg. images, sketches, diagrams, interactive examples, audio, etc) has always been awkward. it’s not that it’s impossible, but it’s annoying enough that it’s very uncommon

Drew Verlee01:05:33

I see what you mean. in my experience those are things you can do in addition to code changes. I'm brainstorming how tools dedicated to understand code changes could be better. Day to day I see most shops doing pull requests and looking at git diffs on GitHub. I know we can do more, can but can we do less. E.g can those diffs be more "clojure"aware.

Drew Verlee01:05:09

Far warning I'm most of the way through this growler, so the above is mostly musings

🍻 4

currently, code-diffs provide no other context besides the text itself, you could overlay higher level concepts onto the diffs. metrics like: • algorithmic complexity (when it can be figured out statically) • coupling to other code • cohesion • various measure of complexity • benchmarks • comparisons against diffs in the past (eg. 1. do certain parts of program that are in totally different files always get changed together 2. is this a problematic part of the code based that gets bug fixes frequently) • overlay of overall code flow


other than, that I’m not sure what other types of examples you might be considering


not sure i’m helping or just going on about something unrelated

Drew Verlee01:05:56

it's related. Good ideas, my original thought was around something like lamda islands diff but more all clojure code not just collections (I'm not actually sure what the limits are)


oh yea. structural diffing would definitively be a win over text diffing


@U0DJ4T5U1 I worked on a structural diffing GitHub action at some point but didn’t quite finish it — I feel like it might be close to be useful but isn’t quite there just yet


There’s an example of a diff here, once this is all running a bit more reliably I’d love to overhaul the styling a bit


that link currently doesn’t work because I’m uploading these files using the wrong API or so. But here’s a screenshot:

👀 4

"machine-assisted code review" brings to mind the notion of domain-specific linters. Linters like Eastwood or Kondo are super useful, but generally they only cover well-understood, uncontroversial aspects. While code reviews are often a bit more opinionated and/or specific to a given project. As I see it, to date still a good chunk of a code review is merely the mechanical application of some rules of thumb. So, I'd love to see that automated. Sadly atm crafting your own linters is bit of a hacky journey.

Drew Verlee14:05:39

Thanks very fascinating. What's defined as a structural difference? I feel like this is a topic that i would be excited to start collecting information about. I assume its been explored in the past but given the current state of things, its not clear any satisfactor improvements ever took hold. I feel like a good place to start would be putting something together like Parinfer did for structural editting. (not sure thats the most up to date record).


I’m not sure structural diffing has a common definition, but the way I was using it was as opposed to text diffing. For example, • text diffing: 4 characters were removed at line 12, offset 4 and then the characters “(+ foo 10)” were inserted at line 12, offset 4 • structural diffing: a list with the contents of + , foo, 10 was inserted in the 4th top level form at the associative path, [4 :foo 2] Currently, git diffs focus on text diffing rather than structural diffing. obviously, there would be better ways to visualize this rather than describing it.


[disclaimer I work on CodeScene] CodeScene has an interesting approach to code analysis in general and analysing code changes / pull requests in particular. You can check (somewhat obsolete) info here: We have the same thing in our cloud version integrated with GitHub PR checks - it may look like this: The basic idea that you can identify the most risky PRs and the most risky changes (files, functions, ...) in those PRs and focus your review efforts on them.

Drew Verlee00:05:12

Thanks @U06BE1L6T I'll get arrive around to reading this tommorow.

Balaji Sivaramgari02:05:43

Need your suggestions to integrate Clojure (Leiningen) with Blackduck scanning tool

Balaji Sivaramgari02:05:51

Do you have any suggestions for me to integrate Leiningen with Black Duck security scanning tool?


Hey all, how does HTTP/CDN caching work for pathom/transit?


Can it be done?


If yes, is purging the cache straight forward?


You said Netlify was easy, but I didn’t understand how easy. Clojure is installed, JVM is installed, what magic is this.

🎉 24

I'm looking for event queues which support something like kafka's retention period. The basic idea is that I want to be able to replay the last 30 days worth of events. I'm struggling to find the terminology to navigate the message-oriented world effectively. Preferably something with dead letter queues built in.


NATS Streaming is basically the only alternative I'm aware of. The difference in terminology is basically commit log (retention with offset) vs queue (ack with timeout).


Hmm. Feels like I want a hybrid. I'm in a position where I can replay old messages and delete my last 30 days of data. But I really want to treat it like a queue otherwise.


Maybe I need to treat the input to the queue as something with a commit log, and then feed that into the queue.


In Kafka, the topic will present itself and behave as a queue to all consumers in the same consumer unless the offset is reset.


When I say queue, I really mean along with all the features of a queue. Like dead letter queues.


That's really the only feature I'm missing. Well, kinda. I also want to distribute my messages across many consumers.


So I guess what I want is a queue with "last N days replay" built-in.

dominicm15:05:34 looks like this might be supported by Google's pubsub


Yeah, that's the closest solution I know of to what you're looking for.


I think that's only supported up to 7 days though.


Yeah. It is.


If you use the Connect framework with Kafka you get DLQ for free


We use Kafka with a DLQ. It's just another topic that things get dumped into if an exception (business or otherwise) is raised.


i.e., foo topic and foo-dlq topic


@U11EL3P9U how do events get onto the dlq? Does the application forward them?

Daniel Tan15:05:00

i think you can use datomic as something like this as well?


I don't think datomic would be usable for this use-case.


Yeah. covers your three options in dealing with this in Kafka.


I feel deeply suspect about doing this in software from exceptions. I can't put my finger on why though. It just seems like something that could still get lost. e.g. if you shut down the server between the exception being thrown & requeuing the event onto the dlq.


Yeah, that's the problem. Data consistency for cases like that.


I have a Thread/setDefaultUncaughtExceptionHandler registered that catches all then shoves into the topic. Of course, there could the case that the issue is with kafka itself, but I haven't observed that yet.


If you haven't committed it'll restart with the same message. As long as you commit as a final step, this is fault tolerant. It is at risk for a dev doing it wrong, so I'd probably create a library layer for my devs to use personally.


ah, so there's a commit thing that handles the case I'm thinking of.


the example in the article doesn't seem to cover commits.


step 1: do the thing or on-error write to dlq step 2: commit


Hmm, you could get dupes in the dlq that way


Feels wrong to be thinking at this level. I really want to buy a prepackaged solution & not design something custom here. I have enough things to be thinking about without spending time modelling all the different ways in which I haven't handled errors correctly.


This also gets trickier if I want retries as well. Then I have to write to a replay queue first...


All of your concerns are perfectly sane and reasonable. There isn't anything that fits all of your requirements out of the box though, at least to my knowledge.


Yeah, makes sense. It's a shame.


I wonder if I can do something simple by going the other way, use a queue and write to it via S3.


Then to "replay" I just retrigger the s3 events somehow.


Something like that anyway.

dominicm15:05:37 looks like AWS has a build-your-own solution using this approach of having durability feeding into a queue (although using sns)


oh nice find


@UCHV4JZ7A do you use it? I'd love to know how you're finding it :)


@U09LZR36F I haven’t used it in production 🙂. I’ve been working to see if there are any operationally-simpler alternatives to Pulsar that would fit my needs (I’m not sure if I should be wary of running a few Zookeeper clusters myself, but at the moment I’m wary despite having some Kubernetes experience). Pulsar excites me because it decouples message storage from the message brokers (Pulsar’s data is stored by Apache Bookkeeper’s distributed ledger, which can use a mix of block and object storage e.g. EBS + S3). Decoupling the brokers from the storage makes it easier to retain events indefinitely, since you aren’t limited to the maximum size of disks that can attached to a single VM. You can have Pulsar store a minimal amount of events on disk, and automatically offload all but the “working set” to S3/GCS, saving on disk storage costs. To me Pulsar just seems much more flexible and feature-ful than Kafka (having not personally used either in production). FYI: But Confluent seems to be undertaking a major project to evolve Kafka in the same direction (, At first-glance, I’m assuming my use-case is different than yours: I’m building a greenfield app. I’ve been doing a research project for awhile to evaluate tools for designing entire multi-region systems that are built around an event log (a la, So far I’m planning to build around Crux, and I’m working on figuring out what datastores to use with it, with a focus on minimizing operational complexity. Crux typically uses Kafka as a core component, and I don’t want to use Kafka. (am currently evaluating utilizing GCP’s multi-region serverless datastores with Crux,, e.g. Google Cloud Firestore (in Datastore mode), Cloud Pub/Sub, etc).


Crux has been on my mind, but they've recently decoupled the document storage anyway.


We're Greenfield, I'm looking to process external events (eg slack messages, emails, whatever. Webhooks). Update an analytical set, and then not have to store it indefinitely, but hold onto it long enough to make corrections.


We could copy the crux idea with some work. Store references in kafka, store events in s3, and periodically expire s3


👍 Exactly, Crux recently gained an s3 document store implementation If you’re already using something that supports JDBC, Crux can also keep its transaction log in there instead of Kafka (assuming your event volume doesn’t require Kafka for the transaction log).


I guess I still don't want to build something to expire s3, stuff like that. Boring stuff is better.

dominicm20:05:44 this looks like it's exactly what I'm trying to achieve.

👍 8
Daniel Tan01:05:33

isn’t this similar to datomic?

Daniel Tan01:05:50

stream of events, immutable transaction logs etc


Datomic doesn't give you access to that stream of events. Your stream of events is in terms of datomic operations, as opposed to in terms of my events.


that bytepack service is very exciting


I have a lot of ideas for software tools that I can’t justify the time/$$$ doing it purely open source, but would love a way to do a split open source license + $ license if you use it for work


To be honest, I still don't really understand why any service is needed here. Split licenses (or whatever the correct term is) have been around for quite some time. Nothing prevents you from using them by yourself. The only hiccup is that you will have to set up some way for the customers to pay you.


yeah that’s the thing that I think bytepack is offering


it’s an easy payment processor + distribution channel


So I guess it would be useful for something like Cursive or even IDEA. But not as useful for something like Highcharts. Right?


that conclusion doesn’t seem supported by the website at all


it’s an integrated package repository + payment processor and a bunch more


I don't understand. Both IDEA and Cursive have licensing servers and payment processors. So two services. Highcharts has just one. At least, it was that way the last time I checked. There were no license keys, there was just a license to use it commercially, that's all. And you could by it. So just one service for payment. Now if Highcharts decided to switch to Bytepack, it would still be one single service. And I see no benefit. They would still use CDN. The library would still be OS and would still be packaged via NPM. So what would Bytepack be able to improve here?


OK, I guess I was thinking about it from the perspective of a company and not individual.


I’m just guessing based on their landing page the benefits, but I am imagining it would help with things like • I want to have a lead time where paying customers get new features sooner than OSS users • I want the ability to build custom features for enterprise customers • I want to deploy a lib that isn’t OSS at all and not have to run my own npm/maven infra or whatever


but I think that the landing page motivates it enough even if those things aren’t there at first


yes I’m coming at this from the perspective of a single developer building a tool that businesses could pay me money for, and I think that the landing page is from that perspective as well


I see, thanks!


these problems are less burdensome if you are a larger company that can afford to handle more of this on their own ofc


that is, an easy way to do it - dealing with licensing servers, payment processors, 💫


Has anyone tried to build a CMS with Clojure(script)? I haven't tried it yet but I'm guessing Clojure would be a great tool for that.


I have actually worked on a couple of CMS applications using Clojure backend and Clojurescript frontend. It was fun and much more manageable than a similar system I had worked on before that was written in Groovy/Java

Diego Bassani19:05:54


🐈 32
🐕 20