This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-28
Channels
- # admin-announcements (4)
- # beginners (11)
- # boot (148)
- # cider (74)
- # cljs-dev (31)
- # cljsrn (30)
- # clojure (55)
- # clojure-berlin (15)
- # clojure-greece (1)
- # clojure-japan (18)
- # clojure-poland (35)
- # clojure-russia (72)
- # clojure-spec (35)
- # clojure-uk (34)
- # clojurescript (134)
- # cursive (26)
- # datomic (42)
- # dirac (7)
- # editors-rus (1)
- # emacs (17)
- # hoplon (29)
- # jobs-rus (3)
- # juxt (1)
- # luminus (11)
- # off-topic (9)
- # om (66)
- # onyx (49)
- # pedestal (1)
- # perun (19)
- # proton (13)
- # protorepl (5)
- # re-frame (31)
- # reagent (13)
- # ring (2)
- # spacemacs (1)
- # specter (40)
- # spirituality-ethics (2)
- # test-check (41)
- # untangled (7)
- # yada (17)
has anyone done a boot setup where their clj files shared the directory with the test files?
@theeternalpulse: Curious why you would do that? All the project templates (and all the docs / examples) have tests in a separate folder tree -- and that's what the build tools tend to expect.
right @seancorfield I was curious because I dislike that from a folder structure and navigation aspect
granted tooling helps, but I was wondering if boot allowed for excluding/including patterns so I can do it manually
to have file.clj
and file.test.clj
isolated from one another during build, and I can have a task that builds the test paths seperately
@theeternalpulse: I've no idea how you'd support that layout (in Boot or Leiningen) to be honest. There are very practical reasons for separating source and test code, for example building deployable artifacts (where you only want source -- or compiled versions of source -- in the JAR).
Quick clojure.data.xml question: the [readme](https://github.com/clojure/data.xml) mentions a qname
function, but no such function seems to exist in clojure.core or clojure.data.xml. Where should I be looking for this fn? Is it deprecated?
@daveliepmann: maybe only in the beta release?
@weavejester: is there a way to run a command (ex load specs) prior to codox running (via the lein plugin)? I'd like to have the specs included in docstrings before codox generates the files
@hans: Ah yes, the README commit history indicates the namespace feature is for the new version.
@weavejester: I just noticed https://github.com/weavejester/codox/issues/128 - that would be nice indeed
@daveliepmann: makes sense to use that, namespaces can't really be ignored anyway.
hi. I am new to functional programming. I was implementing comp
function on 4clojure and wrote the following code
(defn COMP [f & rest]
(if (nil? rest)
f
(f (COMP rest))))
Looks nice and neat. Of course, it does not work (meh). Why? to me, it looks quite logical: composition is applying some fn to the result of the previous fn call and that is what I am doing here. btw, with apply
my version does not work, either. original comp
looks much more complicated, can not understand why do I need that complexitya quick note: (nil? rest)
makes no sense, rest will be always a sequence of remaining args, possibly empty one
@darwin: hmm I get this
(defn temp [f & rest] (nil? rest))
=> #'user/temp
(temp :a)
=> true
but OK, that is not the main pointit seems to do something completely different from what I want, but I can not understand what, exactly...
just wondering: what was wrong with my code? my line of thinking was that at some point I will arrive to calling f
and then repeatedly call fns in stack
user=> ((COMP str +) 1 2 3) java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn user=> ((comp str +) 1 2 3) "6"
user=> ((str (+)) 1 2 3) java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn
aha, that is why comp
is returning a fn, my idea (sequential fns calling) could have been possible with a macro only... or not.. anyway, the definition I googled: compose(f, g) (x) = f(g(x))
was what confused me. fn composition is not calling fns sequentially, it is more like compose(f,g) (x) = h(x)
Macros return code, which is evaluated into a function
hello all, is there any way to solve the nested map? Like (map #(conj %) (map #(conj %) ["1" "2"])) ?
fabrao: not sure what you mean by "solve", but maybe clojure.walk is for you? https://clojure.github.io/clojure/clojure.walk-api.html
Hello, have anyone tried to use com.taoensso/tower
with clojure 1.9? I get some errors like java.lang.AssertionError: Condition failed in
taoensso.encore:?` [pred-form, val]: [([:or nil? pos-int?] ttl-ms), 60000]` and compilation halts. Does anyone know if there's an easy workaround for this?
Is there a naming convention for schema checkers, given that schemas themselves are camel cased?
just a confirmation, in core.async
, I see that I cannot really do: (async/timeout 0)
right? I see the timeout channel never closes..
mmm no I am wrong, probably the issue is somewhere else
yeah thanks for confirming @dg