This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-11
Channels
- # beginners (132)
- # boot (2)
- # cider (17)
- # cljs-dev (6)
- # cljsrn (24)
- # clojure (134)
- # clojure-austin (2)
- # clojure-dusseldorf (11)
- # clojure-france (1)
- # clojure-greece (27)
- # clojure-italy (17)
- # clojure-madison (1)
- # clojure-russia (31)
- # clojure-serbia (1)
- # clojure-sg (2)
- # clojure-spec (30)
- # clojure-uk (66)
- # clojurescript (73)
- # core-async (2)
- # cursive (8)
- # data-science (2)
- # datomic (23)
- # dirac (8)
- # emacs (18)
- # gsoc (1)
- # hoplon (36)
- # immutant (26)
- # leiningen (6)
- # off-topic (21)
- # om (19)
- # onyx (6)
- # other-languages (1)
- # pedestal (3)
- # proton (2)
- # random (1)
- # re-frame (1)
- # reagent (2)
- # remote-jobs (2)
- # ring-swagger (8)
- # rum (21)
- # slack-help (1)
- # spacemacs (4)
- # specter (16)
- # untangled (6)
not a bad idea... but I suspect most people don't care enough about details like that.
ObClojure - well, sort of - I’ve been quite enjoying coding in es6, mostly as they seem to have taken a bunch of clojure-y features. JavaScript is vastly nicer with lambdas, and especially with destructuring.
I’m doing lots of things I used to be only able to do in clojure, like returning a map from a function and destructuring it into variables.
function doSomethingWith(elements) {
const {
deploymentTimesEl,
xAxisGroup,
xGridGroup,
yAxisGroup,
tooltip,
} = elements;
well, everything is rubbish compared to clojure. But compared to Java, or es5, or a bunch of other languages I have to use…
There are some real ugly things though. Map keys are broken:
const foo = new Map();
foo.set([1,2], "whee!");
foo.get([1,2]); // undefined!
x = [1,2]
=> Array [ 1, 2 ]
y = new Map()
=> Map { }
y.set(x, 'foo')
=> Map { Array[2]: "foo" }
y.get(x)
=> "foo"
y.get([1,2])
=> undefined
I think the lambda syntax is a bit strange, but I got used to it pretty quickly. No stranger than Ruby blocks, or Python … well, whatever Python does, I forget
Bore da
morning!
an 'async' implementation which allocates a thread to poll each subscription
unfortunately @thomas i currently depend on this lib 😞 looks like i'm going to have to rewrite it with some sensible concurrency primitives
would make sense @mccraigmccraig, but that could be a lot of work 😞
i can probably use a lot of message-parsing stuff straight from the java client, but yeah
but i have at least one subscription per active user on my APIs, so 10k users>=10GB RAM right now which seems rather unnecessary
(a Thread on a 64-bit vm allocates 1MB stack by default)
I heard that there was a good jvm library with some decent concurrency primitives, began with a ‘C’ I think…
ooo i know this one, it's on the tip of my tongue @peterwestmacott, 'cl' something...
maybe they heard Rich Hickey say that they were ‘programming in space’ and decided not to worry about how much memory 10k threads use?
there's no 'cl' in 'lux' either
that's much better @minimal
it’s the sound you make when you have to use it?
Am I missing something, or are datomic schema pure data structure(s)? I mean the ones I am looking at look like a vector of maps... I am just wondering if I can "put" my schema in .edn files and de-clutter my code a bit...
Thanks @U09LZR36F
We use conformity (have a 'legacy' in-house method of applying schema migrations we are moving away from gradually). It's really useful if you need to set up test data too.
My favourite part of conformity is this: https://github.com/rkneufeld/conformity/blob/9064c47894d641df1c6e4bc0f9cab75b10e2b187/src/io/rkn/conformity.clj#L5 though it looks like they fixed it somewhat now
ooo i think i need an agent - and i can't remember when i last said that
@mccraigmccraig - That sounds awfully exciting! 🙂
(I gather that in the end, people don't use them that often. I've never needed one myself)
(Or have you managed to get someone interested in your book / comic / film script / comedy act to the point that you__ need an agent__ ?)
@maleghast not very exciting and it's the clojurey agent rather than the secret or media agent
Seriously though @mccraigmccraig, what are you doing to use a Clojure Agent?
i was using an atom, but the fn i was using to set the value was getting called multiple times and since it was side-effecty (creating my ioc map) it meant multiple lots of db connections etc were getting created