This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-18
Channels
- # aleph (1)
- # announcements (2)
- # aws (4)
- # beginners (73)
- # boot (2)
- # boot-dev (3)
- # cider (6)
- # cljs-dev (40)
- # clojure (64)
- # clojure-austin (2)
- # clojure-belgium (1)
- # clojure-dev (25)
- # clojure-estonia (1)
- # clojure-europe (16)
- # clojure-italy (11)
- # clojure-nl (4)
- # clojure-spec (90)
- # clojure-sweden (2)
- # clojure-uk (105)
- # clojurescript (58)
- # core-async (10)
- # cursive (23)
- # data-science (1)
- # datascript (3)
- # datomic (14)
- # duct (11)
- # fulcro (48)
- # graphql (1)
- # hyperfiddle (3)
- # kaocha (95)
- # liberator (1)
- # lumo (6)
- # nrepl (1)
- # off-topic (14)
- # onyx (2)
- # overtone (8)
- # portkey (3)
- # re-frame (31)
- # reagent (6)
- # shadow-cljs (185)
- # sql (12)
- # tools-deps (6)
- # vim (6)
- # yada (224)
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?
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
HOME=$PWD
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: https://maven.apache.org/guides/mini/guide-configuring-maven.html
Configuring your Local Repository
The location of your local repository can be changed in your user configuration. The default value is
${user.home}/.m2/repository/.
<settings>
...
<localRepository>/path/to/local/repo/</localRepository>
...
</settings>
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!
clj uses the Java system property user.home to build the maven repo location
I’m not sure how that would be off but that’s likely why
You can hardcode in your deps.edn though with :mvn/local-repo attribute at the root
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 https://github.com/tatut/jeesql
I personally like hugsql, but I think different people have different preferences. Seems like a variety of solid choices available.
Also https://github.com/tatut/specql, but that’s not “raw SQL”
@U11SJ6Q0K thanks! I’ll check it out
@U5ZAJ15P0 I’m loving HugSQL. yesql is dead to me 😉
@U5ZAJ15P0 have you looked at Walkable? https://walkable.gitlab.io/
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
https://www.youtube.com/watch?v=alkcjyhesjI -- 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)
Is there a tool to generate a visual graph of my clojure dependencies, a la https://github.com/pahen/madge
Actually, I know there is, it just escapes me atm.
@d4hines I believe @hlship had something like that: https://github.com/walmartlabs/vizdeps
I’m sorry, I said dependencies, implying libraries, but I meant namespaces.
oh that. maybe https://github.com/hilverd/lein-ns-dep-graph?
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
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
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
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 https://docs.aws.amazon.com/step-functions/latest/dg/sample-project-job-poller.html