This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-02
Channels
- # aleph (25)
- # announcements (17)
- # aws (2)
- # babashka (72)
- # beginners (44)
- # calva (6)
- # cider (3)
- # clj-kondo (109)
- # cljfx (1)
- # cljsrn (31)
- # clojure (151)
- # clojure-austin (1)
- # clojure-europe (36)
- # clojure-nl (5)
- # clojure-norway (2)
- # clojure-spec (17)
- # clojure-uk (12)
- # clojurescript (74)
- # cursive (57)
- # data-science (1)
- # datascript (28)
- # datomic (40)
- # depstar (15)
- # gratitude (3)
- # helix (3)
- # introduce-yourself (1)
- # joker (1)
- # kaocha (2)
- # leiningen (2)
- # lsp (70)
- # lumo (2)
- # malli (2)
- # meander (4)
- # off-topic (10)
- # polylith (27)
- # quil (4)
- # re-frame (18)
- # reagent (24)
- # ring (4)
- # rum (1)
- # shadow-cljs (102)
- # sql (2)
- # tools-deps (48)
- # web-security (8)
- # xtdb (5)
@harsjoshi1614 To augment the great resources above, here's hands-on material that drills the REPL-oriented habit (among other things important for newcomers): https://github.com/inclojure-org/clojure-by-example (I'm the primary author of the workshop. We teach it at IN/Clojure every year.)

That's a lovely and wonderful README! I have completely missed this resource. Will give it a spin!

Thanks! I love Calva, by the way. It's become my go-to choice for absolute newcomers, because it's so lightweight to set up out of the box, and ... smooth ... especially with the inline eval + display of results. It makes me not miss LightTable any more. The very first avatar of our workshop used LT for similar reasons. Personally, I'm firmly in the Emacs world. You'll have to pry it from my cold dead hands, but overall I love how far Clojure IDEs have come. It's awesome! IntelliJ + Cursive, VSCode + Calva, and Emacs + CIDER (+EVIL for Vimmers) is the holy trinity for me. I use all three with my Emacs keybindings :)

Has anyone looked at the Learn Reagent, Learn Re-frame, and Learn Reitit courses? Are they worth recommending to someone who wants to jump in quickly?
I can only speak from my own experience. As a beginner I spent a long time just learning clojure first. Once you have wrapped your head around clojure, reagent or other frameworks are easier... IMHO!! I started with the usual books Clojure for the brave, http://learn-clojurescript.com etc. Then after a lot of experimentation got my head around reagent. I am not brave enought to start with Re-frame or reitit yet... best of luck to you!!
Actually, it’s not for me. I have a decent understanding of Clojure, have been toying with it for several years as a research tool. It’s just that a fellow company is exploring quick learning opportunities related to “full stack Clojure”.
They all seem very high quality courses, although I suggest some general experience of Clojure first will make them easier to understand. I don't believe they are ment to teach Clojure, outside the specific needs of their subject. So yes, if someone want to know the specific topic quickly, they seem very good.
is there a way to check using clojure.spec if an entity is a function?
I'm not sure what you mean by entity but there is the ifn?
predicate
Thanks Alex. By entity I mean the variable?... value? we are checking in spec... (s/valid? ::function <entity>)
then yes, ifn?
is the best predicate for that
is it possible to add a path to the clj
repl invocation without using -Sdeps
? i can say clj -Sdeps {:example {:extra-paths ["test"]}} -M:example
, but that’s much more verbose than something like clj -Spaths ["test"]
or similar
to be clear, i want to add to the existing :paths
vector that already exists in the deps.edn
, not replace
the reason i ask is because i have an alias :test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.861"}} :extra-paths ["test"] :main-opts ["-m" "kaocha.runner"]}
, and the :main-opts
is run when i use clj -M:test
, when what i’m looking for is to just pull in the deps and path
@UEENNMX0T Do you mean "I just want to pull down the deps and not run anything" or "I want to pull down the deps and run something other than Kaocha's -
-main` function"?
First one. I don’t want to run anything, just pull in the deps and paths
The former can be done using the -P
option (before -M
).
Oh, I’m sorry, I mean that the repl loads
“Run something other” yes, the repl lol
Eventually -A
will stop running :main-opts
and will just start a REPL. Right @U064X3EF3?
eventually, yes
I tend to use -X
to run most stuff now, so when I use -A
it "does the right thing" because there's no :main-opts
anymore. I don't know if Kaocha has an exec fn entry point tho'?
Oh yeah, I forgot about exec-fn. That isn’t run when using -M, right? Just -X. That’s a good way to handle this
A quick clarification on specs and instrumentation. Am I correct if I'm under the assumption that instrumentation means that all used functions get their inputs validated and no other checks are generated?
if I understand you correctly, yes, but there can be surprises, eg. an arg that is a function can get called with generated args to verify it has the expected type
a-huh.. hence the problems with higher-order-functions
Hi all, does clojure.tools.cli support not having short flags? I couldn't find any reference of anyone doing something like that
(def cli-opts
[["-d", "--boot-disk-size SIZE", "Size of boot disk (format: 150GB)"]
["-b", "--boot-disk-type TYPE", "Type of disk (eg. pd-ssd)"]
["-n", "--name NAME", "Name of instance"]
["-t", "--machine-type TYPE", "Type of instance"]
["-i", "--image-family IMAGE", "Name of OS image to boot"]
["-z", "--zone ZONE", "Region to boot instance"]
["-x", "--no-address", "No address?"]
["-h", "--help", "Display help"]])
I'd like to do away with those short flags if possible> Option specifications are a sequence of vectors with the following format: > [short-opt long-opt-with-required-description description > :property value] > The first three string parameters in an option spec are positional and > optional, and may be nil in order to specify a later parameter.
ah! great thank you @dpsutton
Is it common to assign a global binding with def when performing interactive / repl development, even if it's intended to be assigned with a defonce? Is this the preferred route during iteration to avoid restarting the jvm?
I’m trying to work with Playwright in CLojure and they have a Java line that looks like this
Browser browser = chromium.launch(new BrowserType.LaunchOptions() .setIgnoreDefaultArgs(Arrays.asList("--mute-audio")));
How would I translate that to Clojure?I think I have something. I can import it with
(import com.microsoft.playwright.BrowserType$LaunchOptions)
Then I can instantiate it w/ the name BrowserType$LaunchOptions
(.launch chromium (-> (BrowserType$LaunchOptions.)
(.setIgnoreDefaultArgs ["--mute-audio]))
something like that