This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-12
Channels
- # babashka (6)
- # beginners (23)
- # calva (27)
- # cider (1)
- # clj-kondo (23)
- # cljsrn (2)
- # clojars (4)
- # clojure (90)
- # clojure-dev (8)
- # clojure-europe (1)
- # clojure-serbia (1)
- # clojure-spec (2)
- # clojurescript (9)
- # code-reviews (7)
- # core-async (1)
- # cursive (4)
- # datomic (13)
- # emacs (2)
- # hoplon (28)
- # juxt (12)
- # leiningen (1)
- # malli (22)
- # nrepl (3)
- # off-topic (51)
- # reitit (8)
- # shadow-cljs (16)
- # spacemacs (25)
- # sql (4)
- # test-check (5)
- # tools-deps (5)
I have written a few published research articles in the area of computer networking, but nothing that has been cited terribly often. I was looking at a site that keeps track of your articles and citations for a job application recently, and just today came across one I never expected: a research article that cites the Clojure cheat sheet! https://www.bjmc.lu.lv/fileadmin/user_upload/lu_portal/projekti/bjmc/Contents/6_1_02_Vanags.pdf
Is this a bug or a feature?
(sort ["kikka" :kukka "kakka"])
;Execution error (ClassCastException) at java.util.TimSort/countRunAndMakeAscending (TimSort.java:355).
;class java.lang.String cannot be cast to class clojure.lang.Keyword (java.lang.String is in module java.base of loader 'bootstrap'; clojure.lang.Keyword is in unnamed module of loader 'app')
clj-arrangement is useful for cases like this https://github.com/greglook/clj-arrangement
The default comparator won’t work across types
So you would need to supply a comparator that could compare strings and keywords
So, not a bug
Maybe more detail than you care to read in this article, including some speculative stuff at the end about a function that is 50% of the way towards a 'universal comparator': https://clojure.org/guides/comparators