This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-17
Channels
- # aleph (3)
- # bangalore-clj (2)
- # beginners (76)
- # boot (37)
- # braid-chat (7)
- # business (1)
- # clara (1)
- # cljsrn (45)
- # clojure (36)
- # clojure-android (1)
- # clojure-austin (2)
- # clojure-dusseldorf (4)
- # clojure-spec (2)
- # clojure-uk (2)
- # clojurebridge-ams (4)
- # clojurescript (79)
- # clr (1)
- # community-development (5)
- # core-async (1)
- # cursive (4)
- # data-science (1)
- # funcool (3)
- # hoplon (3)
- # om (107)
- # om-next (6)
- # other-lisps (1)
- # overtone (1)
- # planck (2)
- # reagent (24)
- # rum (1)
- # specter (7)
- # yada (46)
anybody using mount? how do I check the state of a mount? I have a running thread in a defstate and want to exit it when the mount is stopped
what percentage of clj.spec is consistent across clojure and cljs? Are there docs describing their variances?
@kaosko whatever you refer to will be an instance of mount.core.NotStartedState
if not started. check out the #mount channel too
@alexyakushev: maybe take a look at http://stackoverflow.com/questions/37953401/where-is-the-memory-leak-when-mapcat-breaks-backpressure-in-core-async
or #core-async ?
I created an issue on JIRA: http://dev.clojure.org/jira/browse/ASYNC-178
For the time being, I replaced the cat transducer in my program with an explicit put! loop
yep, that’s what I did when I hit it too
@artur i looked into it a while ago. You need the oracle JVM because the ARM JIT isn't open source (or wasn't at the time)
i kind of quickly switched to installing an NES emulator and bought some USB nintendo controllers so my wife could destroy me at Dr. Mario
i ran at some point clojure on raspberry pi. wouldn't do it anymore since the bootup time of the jvm is just so long.
hi, can anyone easily explain item 8 on http://clojure.org/reference/refs? > If a constraint on the validity of a value of a Ref that is being changed depends upon the simultaneous value of a Ref that is not being changed, that second Ref can be protected from modification by calling ensure. Refs 'ensured' this way will be protected (item #3), but don’t change the world (item #2).
I get it all until "don't change the world" where my understanding crumbles like a house of cards
How can they change the world if they are protected from changing? surely my core understanding is lacking
@matan The protection is due to snapshot isolation and maintaining history — the txn may be retried if anything changes, hence the protection — ensure
is like asking other concurrent txns to not touch that particular ref
From ensure
docstring: “Protects the ref from modification by other transactions. Returns the in-transaction-value of ref. Allows for more concurrency than (ref-set ref @ref)”
I have just made the channel #composition, the purpose of which is discussion of math and logic around making things compose, combinators, this aspect of transducers, and so forth.
Hi guys, do you know how to use prismatic schema to match:
- a vector, [s/Keyword [s/Keyword s/Keyword]]
, for example
- and have a schema that check for required keys only, so that (def MySchema {:required …})
pass with {:required … :more-value …}
[(s/one s/Keyword) (s/one [(s/one s/Keyword) (s/one s/Keyword)])]
and {:require ..., s/Keyword s/Any}
@gfredericks thanks a lot! with names it works perfectly (s/one s/Keyword :a-field)
@kumarshantanu thanks. to be used sparingly then I guess, as it pretty much locks down any other transaction from touching the ensure
d ref.
Still no clue why this says "Ref that is not being changed" and "but don't change the world" together. Feels like a conundrum, so I am probably missing something big. >If a constraint on the validity of a value of a Ref that is being changed depends upon the simultaneous value of a Ref that is not being changed, that second Ref can be protected from modification by calling ensure. Refs 'ensured' this way will be protected (item #3), but don’t change the world (item #2).
@matan I’ve realized the utility of ensure
is in creating invariants, among other things. Let’s say there are two refs A
and B
each referring to respective integers, and the invariant is: their sum must never go out of the range 10-to-20 at any point of time. Transaction t1
reads A
and updates B
, whereas transaction t2
reads B
and updates A
. Since t1
and t2
may run concurrently they may not be coordinated to maintain the invariant. In such cases you can use ensure
to stop the other txns from touching certain refs (instead of resorting to a coarse-grained lock) hence improving concurrency.
Retried transactions would see a consistent ref world, but ensure
may often cause a cheaper retry
anyone use puget.printer and understand how to customize its :color-scheme property?