This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-06
Channels
- # announcements (12)
- # babashka (34)
- # beginners (85)
- # calva (76)
- # cider (14)
- # clj-kondo (49)
- # cljs-dev (32)
- # clojure (418)
- # clojure-europe (3)
- # clojure-france (4)
- # clojure-italy (17)
- # clojure-losangeles (8)
- # clojure-nl (5)
- # clojure-norway (2)
- # clojure-spec (2)
- # clojure-uk (88)
- # clojuredesign-podcast (4)
- # clojurescript (49)
- # clojurex (75)
- # clr (2)
- # core-async (13)
- # cursive (6)
- # datomic (57)
- # duct (31)
- # emacs (6)
- # fulcro (25)
- # graalvm (67)
- # graphql (13)
- # hoplon (1)
- # java (6)
- # juxt (11)
- # kaocha (5)
- # keechma (2)
- # leiningen (16)
- # mount (1)
- # off-topic (19)
- # pathom (2)
- # pedestal (1)
- # re-frame (11)
- # reagent (21)
- # reitit (22)
- # rewrite-clj (1)
- # shadow-cljs (98)
- # spacemacs (5)
- # sql (16)
- # tools-deps (8)
- # vim (28)
- # xtdb (4)
Interestingly Toyota also do FP, only in Elixir. Maybe we should ask them how they manage those teams XD
måning
if each of those 1500 μsvcs has its own cassandra keyspace in a single cassandra cluster then they are quite a long way outside cassandra's documented limits for # of active tables (a few hundred)
although i guess many of those tables may be small and low traffic, so it might be ok
bad news == didn't listen
poor Cassandra
oh I only just read the wikipedia page > According to legend, Cassandra had dark brown curly hair and dark brown eyes, and though beautiful and clever, was considered insane
Keepin It Simple
Would you be interested in attending ClojureX if it still went ahead? Please fill out this form to gauge interest, thanks https://forms.gle/YCCBzPuUKxNnRT2p9
@dharrigan i like cassandra... there's lots of stuff it's not good for though. what prompted your shift ?
In the end, we found that postgresql does what we need, plus it's far easier to query
yeah, we're dumping from cassandra to redshift for analytics queries. postgresql window functions are a thing of wonder
slight tangent; what's feeling here about database triggers in Postgres? Personally I dislike them and I'm trying to untangle a project that has used them in unexpectted places
i've always been a bit nervous of them, but i might use them. i suspect that used well they could be simplifying things, and they can probably dig you out of a hole too... but they are quite opaque and could lead to difficult to comprehend emergent behaviours
I've had systems fall over because another team inserted a trigger (that then started to fail), aborting the entire transaction and that soured me on them
hmm perhaps that scales out into how I feel about reactive programming generally
I'd rather play 'Follow the leader' than 'Chinese Whispers' Easier to troubleshooot
why choose a trigger, rather that do it from the clojure code?
whereas, with the tigger, it happens within the same transaction of the insert, and happens there and then on the instance
for when INSERT... ON CONFLICT ...
just doesn't cut it
re:cassie - it is really good at what it is good at, but not good for things like adhoc analysis (but then you don't really want to do analysis on your operational db anyway)
We have a breakfast event on the 21st of Nov coming up in Canary Wharf, aimed at the FinTech audience https://www.linkedin.com/events/6592788975490998272 - please come along if you'd find it useful.
Guys / Girls - I am having a senior moment and a complete failure of Google-Fu at the same time. How do I run a REPL using Tools / Deps that has pulled in my dependencies..?
https://clojure.org/guides/deps_and_cli#_running_a_repl_and_using_libraries here’s the relevant docs
at the moment I run clj
and I know that the dependencies are not coming down 'cos the REPL starts immediately without a download notice, but I have never used this library ever before.
should just be clj
is your deps file correct?
{:paths ["src"]
:deps
{org.clojure/clojure {:mvn/version "1.10.0"}}
{libpython-clj {:mvn/version "1.6-SNAPSHOT"}}
}
ah the deps need to be in a single map
{:paths ["src"]
:deps
{org.clojure/clojure {:mvn/version "1.10.0"}
libpython-clj {:mvn/version "1.6-SNAPSHOT"}}}
Oh shit... Thx - rubber ducking strikes another victory for time-savings, but also unmasks n00bs...
we’re all n00bs at toos.deps I think
can I lower the tone with a Postgres windowing question; I want to run somethin like
SELECT max(reg.id), reg.zone
FROM
...
GROUP BY reg.zone;
only I don't actually want the max
value, I want 3rd from the top
I can run
SELECT NTH_VALUE(reg.id, 3)
OVER (PARTITION BY reg.zone ORDER BY reg.id DESC),
reg.zone
FROM ...
but this gives me a bunch of duplicate answers, presumably due to the moving window
I've not quite got my head around this windowing stuff, so am probably overlooking the obvious solution
any suggestions?and I can abuse rank()
to do something similiar; but that seems a bit inefficient too
SELECT *
FROM (SELECT reg.zone, reg.id,
rank() OVER (PARTITION BY reg.zone ORDER BY reg.id DESC) as r
FROM ...
) rr
WHERE rr.r = 3;
similiarly
SELECT * FROM (
SELECT DISTINCT NTH_VALUE(reg.id, 3)
OVER (PARTITION BY reg.zone ORDER BY reg.id DESC) as threshold,
reg.zone
FROM ...)) rr
WHERE rr.threshold IS NOT NULL;
gets me to the right outcome, but feels clumsymaybe that's my best bet
it's been a while... but iirc NTH_VALUE
will give you a result for each row (i've not used NTH_VALUE
before, but i have used LEAD
and LAG
to great effect), whereas you want to filter out just a single row from each partition - so your approach using rank
seems reasonable
ah right. thanks
SELECT NTH_VALUE(reg.id, 3)
OVER (PARTITION BY reg.zone ORDER BY reg.id DESC RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING),
reg.zone
FROM ...
gets me lots of duplicates, but I can just DISTINCT themAnyone here heard from @guy recently? I haven't seen him online in a while and want to check that he's okay
I've worked somewhere that did - the BBC - but I have no idea how it was implemented I just know that I installed my cert and I was good to go.
@yogidevbear I'll drop him a facebook message if you like.
Thanks @wesley.hall 👍
I've tested out my own using certs rather than authorized keys, seems to be the way forward!
@yogidevbear He's OK. Got some personal stuff going on that's keeping him a bit occupied, but he's doing alright.