This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-16
Channels
- # aws-lambda (3)
- # beginners (20)
- # boot (201)
- # cljs-dev (45)
- # cljsrn (9)
- # clojars (19)
- # clojure (141)
- # clojure-china (2)
- # clojure-dev (11)
- # clojure-greece (6)
- # clojure-italy (1)
- # clojure-new-zealand (1)
- # clojure-romania (1)
- # clojure-russia (55)
- # clojure-spec (58)
- # clojure-taiwan (1)
- # clojure-uk (97)
- # clojure-ukraine (40)
- # clojurescript (77)
- # core-async (5)
- # core-typed (1)
- # cursive (35)
- # datomic (9)
- # jobs (2)
- # jobs-rus (25)
- # juxt (8)
- # lein-figwheel (14)
- # luminus (24)
- # mount (16)
- # off-topic (56)
- # om (36)
- # onyx (22)
- # pedestal (3)
- # perun (14)
- # re-frame (111)
- # reagent (5)
- # remote-jobs (6)
- # ring-swagger (3)
- # slack-help (1)
- # specter (17)
- # unrepl (12)
- # untangled (56)
Morning
Good Morning!
Bore da
@agile_geek the Welsh flag is missing from the emoji's 😞
@thomas it's more disappointing to me that there's no massive Welsh dragon right in the middle of the Union flag...but that's what you get for being a conquered Principality.
true... it always kinda bothered me as well that Wales isn't recognised in the Union Flag.
Maybe once Scotland and NI become a separate country they can have St. Andrew's and St. Patricks cross and England/Wales can have a St. George's cross with a big badass dragon on it.
<<NI become a separate country>> as declarations of war goes, that's a pretty good one.
I wonder if Scotland (or Wales or whoever) don't have a union jack on their flag - maybe Australia can finally lose theirs?
@korny hey, Australia had it's chance to become a Republic...
and interesting that NZ didn't ditch the Union flag bit of the flag either
yeah. It was a lesson in how to run a referendum while simultaneously undermining it. Why didn't the #brexit planners learn how to do that?
If the majority of people want to do X, put up a vote with "do nothing", "do a poor version of X", and "do a different poor version of X" as options. \
The sad thing about brexit is, it was precisely the opposite - "do nothing" vs "do a vague idealistic undefined version of X"
Hi all, if anyone wants to spread some UK Clojure love and good feelings the way of this company, allow me to plug for a RT: https://twitter.com/juxtpro/status/842307041309913088
thanks for setting up @glenjamin
@glenjamin you do look like you're about to be eaten by the revolving door tho!!
I have a rather weird problem.... I am getting a stacktrace in our Immutant app. but not when I call the same function from the repl.
removing keys from records can turn them into ordinary maps?
postwalk
but only once
You'll likely find that the inputs are subtly different when using Immutant. If you're using CIDER I suggest plugging the debugger into the web request itself if you can. If not, it's time to sprinkle in some printlns 🙂.
Types can subtly change with maps & # of keys. But I would hope the code isn't coded to clojure.lang.TheLargerPersistentMap or something similar to that.
I found a few examples that change particular values in a map.. but I need to do it in nested maps as well... postwalk
would be really good for this.
@thomas of course you could also look at traversy and spectre for that.
Specter is targetted at mostly known deep paths into a structure (Update every odd element, nested 5 levels deep inside this structure)
a java.lang.AbstractMethodError
of all things... doesn't even make sense (at the moment at least)
And we can't really switch to Spectre either... running an older version of clj at the moment.
Your getting some strange things here....could this be some odd AOT side effect?
I can run it locally... but then I don't see it... I am running a newer version of Java though. and yes Datomic is involved.
at the moment we do this (clojure.walk/postwalk (fn [x] (if (map? x) (into {} (map f x)) x)) m)))
where f is our function
If you perform (d/pull db '[*] eid)
it will get all the attributes off the member and put them into a map (which passes map?
)
or you can do what we do a style and specify only the attributes required in the pattern
@agile_geek It depends.
and you can use pull syntax in the query too
Not if they pass the pattern
not if they're remote
You'd have to be more explicit about what remote means. But I suppose yes. Though I'd still make that an endpoint feature rather than db.
@thomas So yeah, the answer is to either add an extra (into {})
into your postwalk, or explicitly update that key before passing it in (with (update :page #(into {} %))
. Which you do depends on the appropriate level of abstraction for yourr use-case.
@dominicm I agree it's definitely an end point feature to allow fine control over what a client can 'pull' rather than just exposing the datalog syntax to a client but having pull syntax type semantics across the client-server boundaries can be useful
You need control at the end point if only for validation and security (which also involves validation btw to ensure you can't do the equivalent of SQL injection)
@agile_geek The database functions should probably be agnostic of whether they're being exposed to the world or just used internally in the same JVM. The Endpoint can do the (d/pull)
equivalent on the entity it receives if it chooses.
Hmm, what's the overhead in terms of memory or performance if you have to map the pull
over a large collection of entities rather than asking datomic to resolve it in one query? (I don't know Datomic's internals well enough to judge)