This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-12
Channels
- # announcements (4)
- # asami (3)
- # babashka (18)
- # babashka-sci-dev (2)
- # beginners (55)
- # calva (18)
- # clj-commons (23)
- # clj-kondo (2)
- # cljfx (7)
- # cljs-dev (15)
- # clojure (96)
- # clojure-europe (43)
- # clojure-losangeles (3)
- # clojure-nl (2)
- # clojure-uk (11)
- # clojurescript (1)
- # datalevin (2)
- # datomic (10)
- # events (1)
- # google-cloud (4)
- # gratitude (16)
- # helix (3)
- # hyperfiddle (63)
- # inf-clojure (13)
- # introduce-yourself (4)
- # ipfs (2)
- # jobs (2)
- # jobs-discuss (12)
- # leiningen (7)
- # lsp (15)
- # off-topic (38)
- # polylith (24)
- # portal (27)
- # remote-jobs (8)
- # sci (27)
- # spacemacs (5)
- # specter (1)
- # sql (5)
- # xtdb (41)
Grateful to @daslu for https://github.com/scicloj/clay. Makes the feedback in my Clerk document a joy (which I'm also grateful for) 🙏 Also didn't know about https://echarts.apache.org/ which the Clay docs mention, which looks super capable.
That is so kind, @U03B2SRNYTY 🙏 , and helps to know. It is still in alpha stage. Feedback, feature requests, etc., would help in taking it to useful directions.
I love that the echarts example just works out the box (copy and paste with a require) 😍
Just grateful that Clojure exists really. Feels awesome to write stuff that used to take up lots of LOCs in just a few Clojure lines.
I feel particular gratitude today for clj-kondo
which has helped me confirm/track down three different bugs in the last 24 hours!
That is amazing! And makes me realize I must not know how to really use clj-kondo at all — I have it enabled for use in Cursive, and I get some amazing benefits of checking that appears in IDE. Can you describe in a little more detail the category of error, and then how you used clj-kondo to confirm/track down? Thank you!
@U6VPZS1EK Sure! The one error was in some new code still being worked on by a colleague that isn't being executed yet and clj-kondo
flagged a function call that was missing an argument -- which led us to realize the code was actually calling the wrong function (similarly-named, which didn't need the missing argument). The other bugs were in some code that was calling nth
with (different) bad arguments in different situations and I was just kinda noodling around with small fragments of code in a Rich Comment Form, which I use a lot, and looking at what various expressions produced, and happened to write out (nth nil nil)
and (nth nil ::s/invalid)
in the comment
, since I suspected those might be what the buggy code was ultimately calling -- and clj-kondo
flagged both, saying the second argument should be a number... and then I was "Oh! Duh! Of course, that's not going to just produce nil
!" I hadn't even pressed alt-enter
to evaluate them to confirm the result 🙂
Ha! Super helpful — I love these categories of errors. How was clj-kondo being executed? Was it always from inside VSCode, or also from command-line in build/test script (it sounds like the first error of calling the wrong function was not detected in the IDE?)? Thank you!
Always in VS Code for me. That's how I dev/run/test everything locally. LSP/clj-kondo. REPL. Portal.
My colleague uses Emacs (and has a very lightweight setup with very few packages).
Super cool — thank you! (And I'm delighted I'm probably already getting many of the same benefits already in Cursive — love it!) (FWIW, I try to keep a kaocha test runner with file system watching, so I get desktop notification for errors that don't show up in REPL — changed name of function, and missed a caller; ideally, clj-kondo errors, but I haven't actually done that yet.)
I run tests via hotkeys as I'm working. I have hotkeys for: run all tests in this (test) file, run the current test (that the cursor is in), run all tests in the -test
namespace associated with the current (source) file. I don't run tests from the command-line very often these days -- I leave that up to CI when a PR goes up (or I push to a branch and manually kick off the CI pipeline for that branch, if I really want a thorough test before making a PR).
@U6VPZS1EK You can run clj-kondo in IntelliJ/Cursive with #clj-extras-plugin - have you tried that?
@U04V15CAJ YES! I love clj-extras plugin — that it runs clj-kondo
is the main reason I started using it, and that is the main reason I use it all the time. (I thought it would be inline REPL evaluation, but no way, having clj-kondo
output in editor all the time was 🔥). Thank you!