Fork me on GitHub

if i have a clojure app running behind an nginx reverse proxy, how can i achieve zero downtime deployments?


Have you done zero downtime deployments with nginx before?


I imagine the general process is to start clojure on a new, random port, and once you're happy it's started, to update the nginx config and do a reload.


but there's probably a more specific guide


I doubt zero-downtime for clojure w/ nginx looks any different than zero downtime for [lang] with nginx.


thanks! i'll dive into that!


you could also use e.g. a python script to do port forwarding


When writing a spec for my rest client How can I have a predicate over a map where the type of one key's value is dependent on another key's value? When “colors” then string; when “numbers” then Int ....

{:favorite “colors”
:data        “Blue”},
{:favorite “numbers”
:data        12}


@joefromct you could use a multispec


Ok I’ll reread that section of the guide. Thanks.


It's not an ideal situation though since you're reusing the same key to have two quite different meanings. The design of spec is intended to discourage this


Any Sublime Text users here? A major rework of the Clojure syntax is on its way, we're looking for feedback. Alternatively, just install and enjoy. Pending PR:, available standalone:


Cool, I'll bite, can I install thru the package manager?


Nice! Since it's intended to be merged into the built-in packages, it's not on Package Control, so you'll have to clone the repo


thanks, just did that- how exactly do i tell sublime to use this package for clj files?


Bottom right → language picker → open all with current extension as Clj


ah, clj rather than clojure, thanks!


i run sublime on a mix of fedora 27 and fedora 28 vms; fed 28 looks good, bunch of complaints from fed 27, so i'm upgrading those vms


Yeah unfortunately my client doesn’t have any control over the servers data structure. :/

kgofhedgehogs14:07:19 What's wrong? I try to receive results of request through httpkit. For other url everything is fine. I send request to With clj-http all is ok, args are the same, you can see them in the beggining of the snippet


P.S.: sry for pastebin link, I can't upload a code snippet for some reason


the top one isn't all ok either


:secure false


it seems that clj-http doesn't raise if something is wrong with your https


while http-kit does


never mind that was the cookie


I can remove :insecure? true from both, I added this line because it was suggested as possible fix here


Removing of this line doesnt changes anything btw


Hello everybody. I’m very excited about spec library and I’d like to enable instruments for everything that has spec. Is there a good way to do so? Just don’t want to write (instrument ‘my-fun) for every single function in my app


@denis_krivosheev according to the api docs if you just call (instrument) it will instrument all instrumentable vars


haven’t tried it myself tho


Oh, didn’t know . Great thanks


I have the following task and have no idea how to approach it (the brute-force solution is obvious, but very wordy): I have a list of similarly-shaped maps (with a bunch of special cases and little twists, but, say 80% of the keys are in every map), and I would like to apply a series of transformations on them. Most of the transformations are simple (for every map that has this key, and value of this key is matches that regexp, add the following key), some of them trickier (if we have two maps linked via some attribute, remove one, and add all the information to another). In a nutshell I have a bunch of pattern-matching operations with corresponding reductions, and would like to apply them all until none of the match anymore. Maybe there is a good library for this kind of stuff?


It sounds like an optimization phase in a compiler 🙂 In reality it is a normalization of a list of transactions from a bank whose exported data is not very structured.


bronsa did this in the passes in the tools.analyzer. you can see how he does it. he keeps a hashmap and keeps applying passes until there was no change


Right, now I wonder what's the good way to describe these normalization steps.


Is there any tooling around checking for updated versions of maven deps in deps.edn?


Something like lein ancient, but for the "post-lein" world.