This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-24
Channels
- # beginners (12)
- # boot (15)
- # chestnut (1)
- # cljs-dev (24)
- # cljsrn (2)
- # clojure (32)
- # clojure-dev (9)
- # clojure-news (1)
- # clojure-spec (7)
- # clojurescript (17)
- # cursive (12)
- # datomic (13)
- # hoplon (13)
- # instaparse (8)
- # jobs (3)
- # luminus (11)
- # lumo (10)
- # off-topic (2)
- # parinfer (2)
- # pedestal (2)
- # protorepl (3)
- # slack-help (1)
- # sql (6)
- # vim (1)
Does anyone happen to know of any decent OAuth2 client libraries? There’s a lot around, but all the ones I’ve found are weirdly designed 😕
yada seem to have implemented something themselves https://github.com/juxt/yada/blob/master/ext/oauth2/src/yada/oauth.clj. Maybe its time we see a new repository appearing under your github account 😉
in clojure/match, can I do [x & ys] // x matches first elem of vector, ys matches rest or do I have to do ([x & ys] :seq) ?
I have e.g. -m 4 -y 2016
and want to end up with [["-m" 4] ["-y" 2016]]
or maybe a map
I've not used zip in Clojure at this point, but in my experience zip functions pair 2 values together
oh yea I remember that one. I think that's the reverse operation. let me try the partition.
clojure has "zippers" which are an abstraction for navigating complex nested structures, and zipmap which creates a hash-map out of a collection of keys and a collection of values
zippers are for driving a turtle around a nested structure, optionally editing it along the way. so for example xml-zip gives you a zipper that can walk through the data structure returned by clojure.xml/parse. you can go next-next-next, or at any node you can ask what are all the parent/ancestor nodes, etc.
Thanks, I'll check it out. This is more to teach myself a few things anyway, and it seems like partitioning a vector sounds like a useful thing to know.
Use zipmap
Is this a good place for a total noob to learn or should i check elsewhere?
@anicholslcsw there's a #beginners channel
Hey guys, trying to setup a connection pool with c3p0. It seems to have trouble connecting to the production database using ssl (heroku, needs sslmode=require). I’ve tried
(.setJdbcUrl my-datasource (format "jdbc:%s:%s?sslmode=require" (:subprotocol dbspec) (:subname dbspec)))
and
(.setProperties my-datasource
(doto (java.util.Properties.)
[...]
(.setProperty "sslmode" "require")))
C3p0 doesn’t seem to pick this up, I keep getting SQLException: Connections could not be acquired from the underlying database!
. Getting a connection for the db-url string with the sslmode query-params does indeed work. Has anyone else experienced this?where my-datasource
an instance is of om.mchange.v2.c3p0.ComboPooledDataSource
Update: just tried with apache’s DBCP2
, and that seems to pick the sslmode just fine. Is there an issue with c3p0 I’m not aware of?
You might also try HikariCP for pooling, it's rock solid. https://github.com/brettwooldridge/HikariCP
Thanks @mikeb. Already looked at it, looks great indeed 🙂