This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (1)
- # architecture (5)
- # beginners (43)
- # boot (23)
- # cider (5)
- # cljs-dev (143)
- # clojure (42)
- # clojure-austin (4)
- # clojure-dusseldorf (14)
- # clojure-italy (15)
- # clojure-norway (1)
- # clojure-russia (10)
- # clojure-spec (41)
- # clojure-uk (70)
- # clojurescript (262)
- # cursive (3)
- # data-science (18)
- # datomic (66)
- # figwheel (1)
- # fulcro (39)
- # hoplon (21)
- # jobs-rus (1)
- # juxt (4)
- # lein-figwheel (2)
- # leiningen (4)
- # lumo (26)
- # off-topic (4)
- # om (6)
- # onyx (19)
- # parinfer (50)
- # pedestal (9)
- # portkey (10)
- # re-frame (41)
- # schema (5)
- # spacemacs (2)
- # yada (35)
Hello all, I created my first github clojure project https://github.com/fdabrao/business_day_calc and my question is: Is there any particular pre-req needs to publish it to clojar?
@fabrao not particularly, although I'd suggest adding a group-id to your project
or some other domain that you own
if put! fails on a sink for some reason, is there way to report this error? Without having to deref the put at a later date?
Not for an arbitrary sink afaik. You can of course make your own sink by implementing
There's some macros that help with this in manifold.stream.core
is there a way to tell clojure.test to ignore single testing context, or a whole test function?
ok, that seems to help, though it doesn't report on how many tests were ignored. Its sorta like commenting it out, but with less work
you can provide metadata on tests and tell lein test to only run tests with a given metadata
you can easily make a function for the repl that does this, via
ns-publics, a filter that checks for
:test metadata plus whichever other metadata you care about, and finally passing the remaining items to
clojure.test/test-vars which takes care of fixtures and reporting etc.
@jonpither With manifold you can use
d/chain, or register a callback on the returned deferred with
if I have an array containing mutable data, is better to just stick that in an ArrayList instead to make it obvious that everything is mutable?
both are mutable, though it's easier to perform certain manipulations with an ArrayList
sure, it’s more that I’ve come to expect that everything that uses Clojures data structures is 100% immutable
@schmee erm arrays aren’t clojure data structures and they are always mutable
do you mean vector? vectors are never mutable
but you are suggesting putting the vector into an ArrayList since the things in it are mutable, is that what you are saying?
what I meant is that I have a Clojure vector containing mutable Swing JLabels which I muck around with using
and I’m thinking about replacing the vector with an ArrayList to make it more obvious that everything is mutable
@schmee I would recommend keeping a pure-data representation of the jLabels in a vector and treat that immutably, then have a translation function that applies whatever is in your vector to the jLabels all at once.
so you get the benefit of working with data immutably and also isolate the places where you actually interact with the mutable part
rather than keeping a vector around and all of your functions mutating stuff in it, which sounds bad
that’s pretty much what I’m doing right now, but where should I put the JLabels themselves?
Right, at the outermost point you can you have a state map containing all your mutable stuff. Call the function that computes your label changes in a pure way, then apply them to the JLabels there
I have never been able to make an application without having some kind of state map at the outermost level, even if it just contains configuration read in at initialization time
I’m trying to solve
lein uberjar problem in my project. Which is clearly solved here for java: https://stackoverflow.com/questions/6364333/jax-ws-when-apache-cxf-is-installed-it-steals-default-jdk-jax-ws-implementat
So, trick is
How can I do the same in clojure project? Can I add
For the default implementation put: com.sun.xml.internal.ws.spi.ProviderImpl inside /src/main/resources/META-INF/services/javax.xml.ws.spi.Provider
META-INF/…file to it