This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (190)
- # bangalore-clj (4)
- # beginners (31)
- # boot (127)
- # braid-chat (2)
- # cider (2)
- # cljs-dev (79)
- # cljsrn (7)
- # clojure (81)
- # clojure-dev (1)
- # clojure-greece (40)
- # clojure-italy (3)
- # clojure-korea (8)
- # clojure-new-zealand (5)
- # clojure-russia (5)
- # clojure-spec (87)
- # clojure-uk (13)
- # clojurescript (50)
- # cloverage (10)
- # component (4)
- # core-async (37)
- # cursive (26)
- # datascript (20)
- # datomic (29)
- # editors (2)
- # emacs (12)
- # hoplon (63)
- # jobs (2)
- # lein-figwheel (1)
- # leiningen (17)
- # liberator (2)
- # off-topic (19)
- # om (31)
- # onyx (9)
- # pedestal (4)
- # proton (1)
- # re-frame (22)
- # reagent (13)
- # ring (1)
- # ring-swagger (9)
- # spacemacs (5)
- # specter (4)
- # untangled (24)
- # vim (29)
@juliobarros: Is everything working fine on alpha12? Everything working on alpha13 on non-windows?
I'm working on some code that uses a protocol and a record. I'm thinking that I need to stub out a method (so that it doesn't make an http call). Would the typical way of handling this be to make my own implementation of the protocol and then reify the method I'd like to stub?
@kidpollo : >>I don’t want to have a flamewar here but is there some definitive place where the clojure indentation style is defined?<< Emacs. (Grins, ducks, runs…)
@derwolfe generally we would just reify the protocol as a stub object. this is a pretty common pattern when using component
@dvorme clojure style guide is the closest. There are a few open issues of interest disputing small parts.
https://github.com/bbatsov/clojure-style-guide/issues/126 this is the one I fall on the side of de raen on.
The two-space gives more rapid parsing, imo, since I don't have to check if it's a nested vs. sequential element.
Hi guys, I have an issue with futures that I just can wrap my head around. Calling future-cancel on a future I have, refuses to set Thread/interupted to true. If im not mistaken this is the expected behaviour?
(future (try (do (while (not (Thread/interrupted)) (println (Thread/interrupted)) (let [tmp-buffer (byte-array 10000) cnt (.read target-data-line tmp-buffer 0 (alength tmp-buffer))] (when (> cnt 0) (s/put! stream tmp-buffer)))) ;(.write output-stream tmp-buffer 0 cnt))) (s/close! stream)) ;(.close output-stream)) (catch Exception e (println e))))
If anyone out there is using artifactory as a clojure maven repository with jenkins, I’d love to chat for a few minutes. I’m having no problem deploying to artifactory with leiningen, but I’m having some problems using the jenkins plugin.
@petrounias I’ve played with future-cancel which basically does
Thread/interrupt. This only works when the underlying thread is checking for it. So e.g. if you are calculating the fibonacci sequence and you dont have intermediate checks, future-cancel does nothing
So in your case, maybe something else is holding up before it gets to the check?
@jeroenvandijk I am checking it… (while (not (Thread/interrupted)) and this loop is running a few times a second. Weird. Ill try explicitly call interupt. but from what ive read, future-cancel should do this
Thread/interrupted clears the status: https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#interrupted()
@lvh I see it only supports clojure.test … we use Expectations so that may be too many variables (although the Expectations folks are looking at ways to work better with test tooling and that means supporting the clojure.test "API").
Reminds me… I need to prod the Expectations folks about moving under the clojure-expectations organization umbrella!
@alexisvincent some time ago I was also struggling with Java thread interruption, found this article to have the best explanation - https://www.ibm.com/developerworks/java/library/j-jtp05236/index.html
@lvh We’re going to try to implement the clojure.test protocol in Expectations at some point https://github.com/jaycfields/expectations/issues/70 (note: it’ll be moving to https://github.com/clojure-expectations soon).
Is there any way to make a call to
(date? #inst "2016-13-14") return
false instead of throwing a weird runtime exception?
(defn date? [d] (try (instance? java.util.Date d) (catch Exception e false)))
A Clojure newbie question - as someone interested in reactive programming with Clojure, I noticed that RxClojure (reactivex extensions for Clojure) isn't an active project. Could some of the Clojurians share your thoughts on what is the best way to approach reactive programming with Clojure?
@stand probably not, using an incorrect reader literal is basically a syntax error, so it's gunna blow up
@habanerao: Have you read https://www.packtpub.com/web-development/clojure-reactive-programming ? It's an excellent book and should give you lots to work with.
@habanerao: If you have any interest in ClojureScript, there is a lot that essentially reactive programming there as well (or at least heavily inspired by it depending on your definition)
Ugh! How can you, for example validate reader literal input from an edn file then or create a spec for a map key with a reader literal?
well, if you think it's likely that people will mistype that literal then I would not use it, and have them enter data which you can validate and coerce to a date instead
@shaun-mahood: I reviewed the book briefly recently - it indeed was a good book and helped me gain some practical knowledge on the topic. However, it depends heavily on RxClojure - almost every example uses it. Wondering if RxClojure is not active because it is a contained bridge between Clojure and RxJava or if the community has gone in a different direction...
@habanerao : for cljs web applications in a reactive style, I can’t recommend Hoplon and its companion projects highly enough. One thing I like: Hoplon isn’t a framework so it integrates nicely with other Clojure/cljs tools.
I'm getting different timestamps from my db depending upon which machine i'm reading from, whether it be windows or a ubuntu 16.04 box
@dpsutton Windows does its own daylight saving time management, and does not respect that your BIOS does that, too.
is there a good way to handle the fact that these two platforms fundamentally disagree about what timestamp is in a database?
@habanerao This might not be what you want, please let me know if you already considered it, but core.async is used to create channels and the type of pipeline you would typically make with observables doesn't pay attention to the objects themselves, but the channels. Then you have parts of the system put things on and take them off, with varying types of coordination.
Has anyone here successfully been able to use a “dockerized” kafka & Zookeeper set up with clojure?
I’m trying to produce messages to a really trivial kafka set up (1 broker, 1 topic, 1 partition) but every time I try to produce a message it says that there was an invalid record exception
@shayanjm not sure if this will help, but this is what’s in our
zookeeper: image: zookeeper:3.4 network_mode: "service:backend" kafka: image: wurstmeister/kafka:0.10.0.1 network_mode: "service:backend" environment: KAFKA_ADVERTISED_PORT: 9092
@bostonaholic that’s almost exactly what’s in mine - did you dockerize your clojure application as well?
Interesting. I have a feeling this is a network issue but I can’t wrap my brain around it. I just dockerized my clj app and I’m still getting the exception despite the request coming from another docker container
Neither do I. My assumption here is that docker is doing something funky with the message content in some way that Kafka isn’t expecting
so I can send data to the service just fine via the bound port, but the request is malformed by the time it hits Kafka