Fork me on GitHub

any recommendations for sending email from clojure? I was looking at postal but wanted to check if there was anything else I should consider


hi folks, I want some help, recently sometimes I can't ssh my server that run a clojure application(the only one). the error is shell request failed on channel 0, after some searching, I think it may because somewhere is leaking process? I'm not sure how to investigate further. any suggestion will be very helpful. thanks!


Hello - where can I get help on using the Clojure CLI? It's not picking up the location of .m2/repository properly and I'm not sure why...


It's trying to access /var/empty/.m2/repository/ instead of $HOME/.m2/repository


@felix.mulder try inspecting your environment variables, if they set some alternative location for m2?


There are 0 env vars, this is building inside a nix environment


Is there an env var that clojure looks at for the location of m2?


is there a settings.xml in .m2 maybe?


env of system could be redirected by export M2_REPO=


and if you use lein, the key [:local-repo :repositories] in the profiles.clj also could redirect to other folders


If I google on var/empty nix maven I find some stuff. maybe it’s the home dir location in the nix shell that’s set to /var/empty


export M2_REPO=$HOME/.m2
clojure -A:test
Still has the clojure cli go toward /var/empty/.m2 and HOME is set to a proper non /var/empty/ location 😕


is M2_REPO a thing? You could try this: Configuring your Local Repository The location of your local repository can be changed in your user configuration. The default value is




yeup, it doesn't pick it up - placed the settings file in both $HOME/.m2 and $HOME/.m2/repository just to be safe


if I introduce syntax errors in the XML, it complains


but doesn't obey the local repo setting


Already when doing mvn -X help:effective-settings it's not able to populate due to trying to go against /var/empty


so that's at least one positive, it's not a clojure specific thing 🙂


ty for the halp!

Alex Miller (Clojure team)13:01:25

clj uses the Java system property user.home to build the maven repo location

Alex Miller (Clojure team)13:01:00

I’m not sure how that would be off but that’s likely why

Alex Miller (Clojure team)13:01:01

You can hardcode in your deps.edn though with :mvn/local-repo attribute at the root

Alex Miller (Clojure team)13:01:19

If that lets you move forward


We ended up being able to globally set the user.home property and now everything is gucci


thanks for the help folks 👋


Hi! Quick request for advice: what would you say is the most “modern”/“well maintained” way of working with a Postgres database in Clojure? HugSQL? Something else? (I lean towards a raw SQL approach over ORM)


I don’t know about “well maintained”, but I forked yesql some years ago and am actively using it in production


I personally like hugsql, but I think different people have different preferences. Seems like a variety of solid choices available.


Also, but that’s not “raw SQL”


@U11SJ6Q0K thanks! I’ll check it out


@U5ZAJ15P0 I’m loving HugSQL. yesql is dead to me 😉


If you want your SQL external to your code, use HugSQL. If you want a DSL to builds SQL, use HoneySQL. With both of those, use org.clojure/java.jdbc.


Thanks! Do you use HugSQL or HoneySQL yourself? I’m not quite sure which approach to go for


We use HoneySQL extensively (and I took over as maintainer recently).


My former colleague, Fumiko Hanreich, gave a talk at Clojure/West about our use of HoneySQL (in 2012? 2013? I'll get you the link).


I like my SQL in my code where I can see it alongside the code that uses it which is why I don't use HugSQL.


Some people love that separation tho'...


@U04V70XH6 thanks! I might use HoneySQL then. My use case is fairly basic, but I don’t want it to get in the way of using some postgres-specific features


(and I don’t want it to be too smart; just build the queries I expect it to build)

seancorfield16:01:58 -- 30 minute talk from 2015 (I was off by several years)


There's a Postgres-specific extension project for HoneySQL you might want then.


(if you just want raw SQL strings in your code, you don't need anything beyond the latter)

Daniel Hines20:01:38

Is there a tool to generate a visual graph of my clojure dependencies, a la

Daniel Hines20:01:51

Actually, I know there is, it just escapes me atm.

Daniel Hines21:01:19

I’m sorry, I said dependencies, implying libraries, but I meant namespaces.


I’m good at googling 😛


I think I’ve used it in the distant past

Daniel Hines21:01:14

Awesome! Thanks. Because there’s a Lein plug in for everything!


also, making a graph of references between namespaces and using it to generate a graphiz input is a fun weekend hack

Lennart Buit21:01:03

GraphViz is a very easy format to generate in general


Anyone knows where I can read or have any tips regarding polling and clustering. Lets say I make an api call and create something. I get an ID back and there is another endpoint which I must call every 6 minutes to poll for a status. If I have node A and B and B goes down while executing the polling I want node A to take over. Afaik one can use a MQ for this.


yeah - clojure on its own isn't opinionated about IPC, you can use the same libs you would with Java, or in most cases the same lib you would use with NodeJS or Ruby


I would like at something like aws step functions

👍 10

in general what you'll want to do is have some kind of shared(between A and B) transactional store, represent the polling as a simple fsm, and keep the state in the store


And a watchdog service running health checks on the nodes you want watched


the simplest case would be to, instead of having fail over between A and B, having A and B running concurrently(which is why the transactional store), which would avoid the need for some kind of watchdog and failover check


I will have a look at the ☝️ thanks. I will have one node A. When I get more traffic I will pop up another node, and another... and when the traffic goes down I will kill them.


if you are on aws, I would look at directly using step functions