no, like monthly downloads or something
They're a bit meaningless, because you don't really "download" Clojure, you depend on it and it's up to individual Maven-like installations whether they need to download it or not.
If your local repo has a copy, you don't need to download it. If you're starting fresh every time, you'll download it every time.
Probably even less meaningful than Maven stats, but I've seen this link around multiple times when the topic of Clojure has come up in another forum (http://lobste.rs, HN, company chat, etc.): https://trends.google.com/trends/explore?date=all&q=%2Fm%2F03yb8hb
Apart from that, there's this regarding Maven download stats (from a year ago): https://pay.reddit.com/r/Clojure/comments/eakyfu/is_clojure_on_the_decline/favzns1/
why does this not work?
(#(+ %&) 1 2 3)
Execution error (ClassCastException) at java.lang.Class/cast (Class.java:3068).
Cannot cast class clojure.lang.ArraySeq to class java.lang.Number
(#(apply + %&) 1 2 3)
6
(apply + [1 2 3])
6
(+ [1 2 3])
Execution error (ClassCastException) at java.lang.Class/cast (Class.java:3816).
Cannot cast clojure.lang.PersistentVector to java.lang.Number
yea, %& is a seq:
> (#(prn %&) 1 2 3)
(1 2 3)
how is (+ 1 2 3)
different?
thank you for the replies
(+ 1 2 3)
calls + with three arguments. (+ [1 2 3])
calls + with only argument (of the wrong type, so it gives an error).
Hence you need apply
- you can see some examples here https://clojuredocs.org/clojure.core/apply
I understand now, thank you @djm_uk
You're welcome
where did the clojure logo come from? I get the lambda in the middle, but why on top of a green-blue yin-yang?
And lets not forget the clear reference to the international peace symbol ☮️. A truly genius logo!
thanks!
Did someone already tried to, when execute a lein test
or lein midje
. It also executes a docker-compose up
for integration testing?
Might also be a reference to eval / apply. http://www.sicp-book.com/book-Z-H-26.html#%_sec_4.1.1
^ yep, reference to an iconic book, look at the crystal ball in the mage's hand
How do EDN and JSON compare to each other? Thoughts and resources?
I wrote this comparison of edn, transit, and fressian long ago, but I think it's still a good overview https://groups.google.com/g/clojure/c/9ESqyT6G5nU/m/2Ne9X6JBUh8J
for edn vs JSON, edn has a richer base set of data types and importantly is extensible so you can define your "date" or anything else (via tagged literals). it also tends to be more concise (mostly due to the absence of : and , in maps/arrays)
edn is imo strictly better than JSON, yaml, or whatever as a human-centered data format for configuration etc
but, you're going to find much higher performance parsers for json than for edn (particularly in the browser) so then I'd consider transit (or fressian)
What does the last c
in .cljc
stand for? "Common"?
or "c"onditional?
Do other programming languages have good ways to interpret and use EDN?
Lots of them do. I have personally used EDN libraries in C++, Haskell, Ruby, and Python. I have seen more out there that I have not used.
hey all, qq on sorted maps… is it expected that this should throw?
((sorted-map 0 2) :face)
class java.lang.Long cannot be cast to class clojure.lang.Keyword (java.lang.Long is in module java.base of loader 'bootstrap'; clojure.lang.Keyword is in unnamed module of loader 'app')
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentTreeMap.java#L313-L326
ah, it’s happening here. it’s because the sorted map keeps an internal comparator, so (compare 0 :face)
fails for the same reason
common
yes
sorted maps/sets should have a comparator that handles whatever you put in it (or you should not put that stuff in it)
a format you expect people to read/write/edit in a file
👍 thank you!
Thanks. :thumbsup::skin-tone-2:
I have this problem, that our WebSocket messages over 64 kB in size break the connection. The message seems to go to the server, where Sente + Aleph somehow drop the ball: https://github.com/ptaoussanis/sente/issues/389 @ptaoussanis Is there some hard limit somewhere that could be tweaked or worked around?
This seems to happen both when using EDN and/or Transit as well
https://github.com/clj-commons/aleph/blob/master/src/aleph/http/server.clj#L728