This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-15
Channels
- # adventofcode (10)
- # babashka (28)
- # beginners (27)
- # calva (5)
- # cljs-dev (7)
- # clojure (134)
- # clojuredesign-podcast (3)
- # clojurescript (7)
- # cryogen (3)
- # cursive (12)
- # datomic (8)
- # devops (1)
- # figwheel (1)
- # fulcro (1)
- # graalvm (2)
- # jobs (6)
- # malli (2)
- # off-topic (43)
- # pathom (1)
- # reagent (4)
- # shadow-cljs (11)
For those of you using Aero (https://github.com/juxt/aero) for configuration, do you use #profile
within a single configuration file, or do you maintain per-environment configs and then load the appropriate file based on the specified environment profile?
@UGTAV6LR2 I use #profile
within a single configuration file, because I think repeating configuration keys in different files is error prone.
if I'm passing an optional function as an argument and want that optional function to just return false otherwise, how can I make it so I don't have to specify all the arguments that function takes in the default declaration? so I'd like to do something like this:
(defn foo []
([s] (foo s #(identity false)))
([s bar?] (if (bar? s) s nil)))
but i'm receiving multi arity exception. so instead i have to make the inline function declares its args:
(defn foo []
([s] (foo s (fn [_] false))
([s bar?] (if (bar? s) s nil)))
i wouldn't even mind listing out the optional args but then i get linter errors so instead in second example i use underscore
hi folks, I'm having what I suspect is a Leiningen or environment issue but I'm having a hard time figuring out what is going on. My dependencies in my project.clj file are getting downloaded and appear to exist on my class path. however, when I try to include them through a require statement, either as part of (ns) or just a straight up (require)
(require '[clj-time :as t])
Execution error (FileNotFoundException) Could not locate clj_time__init.class, clj_time.clj or clj_time.cljc on classpath.
here is my project.clj file
(defproject test_project "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url " "}
:dependencies [[org.clojure/clojure "1.10.0"]
[clj-time "0.15.2"]]
:main ^:skip-aot test_project.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
I am able to import the clj-time library if I create an empty folder with a deps.edn file that has that dependency defined and then run the repl from that folder. Any thoughts on how to troubleshoot?The namespace names will be something different and you will have to look at the documentation for the libraries your using to find the namespaces it provides
ah ok! thank you. looks like I needed to use clj-time.core as the namespace
@UQV85KLF5 FWIW, the clj-time
README shows how to require
the library https://github.com/clj-time/clj-time#clj-timecore but, as Ghadi says, it's is deprecated and we recommend Java Time instead (I'm one of the clj-time
maintainers).