This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (11)
- # babashka (66)
- # beginners (19)
- # calva (4)
- # clj-kondo (26)
- # cljsrn (33)
- # clojure (38)
- # clojure-australia (10)
- # clojure-dev (3)
- # clojurescript (18)
- # conjure (8)
- # crux (21)
- # data-science (2)
- # datahike (1)
- # datascript (5)
- # defnpodcast (3)
- # emacs (3)
- # events (2)
- # fulcro (17)
- # funcool (66)
- # girouette (28)
- # jobs-discuss (1)
- # lsp (33)
- # malli (1)
- # membrane (11)
- # off-topic (2)
- # practicalli (1)
- # re-frame (141)
- # rewrite-clj (6)
- # sci (1)
- # shadow-cljs (68)
- # sql (5)
- # startup-in-a-month (7)
- # vim (1)
Any of you have experiences with Gorilla REPL, do you still use it? And in what situations.
I used it a bit for some calculations where I wanted interactive visualizations. I mostly make due without it but when doing more mathy things I'd use it again. Probably with nrepl tho.
Is there a link to download the latest Linux install script for CLI tools? For example in a update-everything script I'm able to Curl https://github.com/clojure-lsp/clojure-lsp/releases/*latest*/download/clojure-lsp-native-linux-amd64.zip but for CLI tools I have to modify the script every time new version is available.
If you use Homebrew, you could do
brew upgrade clojure/tools/clojure to get the latest released version.
No, not yet, still not convinced to use homebrew on LInux 🙂 Maybe it's time to give it a try.
If you want an unchanging URL for curl, that is up to Clojure maintainers whether they plan to provide such a thing (or perhaps already do). @U064X3EF3 would know.
This URL exists right now, and appears to be an alias to the latest version of the install script, but I don't know if that is promised to continue to exist: https://download.clojure.org/install/linux-install.sh
I use brew on Ubuntu - so much nicer than dealing with shell script installation every time.
@U8279M970 You could also scrape the brew recipe and then use that to get the newest linux script ;)
It's important to know which distribution you're using, as each distro (family) has it's own package managers
that download link above is NOT something we officially publish or guarantee will work
if it would be helpful to publish a file in a known place with the current stable version (or link), I'd be happy to think about what to do there
this file is basically that https://github.com/clojure/brew-install/blob/1.10.2/stable.properties but it's branch-specific so probably not stable enough
Silly question, probably one of those cases where the answer is obvious 😅
Say I have a keyword
(def kw :example) and I want a function or macro that takes the keyword as an argument and returns a quoted list with the value of that argument in the second position, something like
'[?a :example ?b] what would be the best way to do so?
Here is a way to write a function that returns what you describe:
user=> (defn template1 [kw] ['?a kw '?b]) #'user/template1 user=> (def kw :example) #'user/kw user=> (template1 kw) [?a :example ?b]
That returns the same value you describe that would be read if you typed
'[?a :example ?b] at a REPL
yeah that seems to work, thanks! I was a little bit confused about the
'[?a ?b ?c] vs
['?a b '?c]
thanks 🙂 somehow my mind was tricked into thinking the position of the quotes mattered in this case
If you put quote before the
[ of a vector, the entire thing is quoted, and will not be evaluated.
If you want some of the vector elements evaluated, and some not, then don't put a
' before the
[, but do put it before any elements that you do not want to be evaluated
yes of course, the problem is that the thing I want to put that in is itself quoted
You mean, you want the return value of the function to be included in part of a larger collection, which is currently quoted in your code?
To do that, you must make that larger collection no longer quoted as a whole. Or use a function like
vector to build that collection instead of a literal
[ ... ] expression, if it is a vector. Similarly
set if it is a map or set.
Quoting an entire collection with
' does not let you pick and choose pieces of it to be evaluated.
is an order of magnitude faster than
(conj '[:find (count ?x) . :in $ ?table :with ?v :where [?table :example ?record]] ['?record attr '?v])
so this silly workaround will do for now
'[:find (count ?x) . :in $ ?table ?attr :with ?v :where [?table :example ?record] [?record ?attr ?v]]
@U0508P8EK There is also this, hidden in the dark corners of the clojure std libs:
$ bb -e "(require '[clojure.template :as t]) (t/apply-template '[?x] '[:foo ?x :bar] [:baz])" [:foo :baz :bar]