clojure-dev

Issues: https://clojure.atlassian.net/browse/CLJ | Guide: https://insideclojure.org/2015/05/01/contributing-clojure/
2020-07-12T13:27:51.388300Z

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

ikitommi 2020-07-12T16:15:59.388700Z

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')

ikitommi 2020-07-14T12:54:53.394800Z

thanks, just what I needed

alexmiller 2020-07-12T16:21:12.389300Z

The default comparator won’t work across types

alexmiller 2020-07-12T16:21:35.390Z

So you would need to supply a comparator that could compare strings and keywords

alexmiller 2020-07-12T16:22:35.390400Z

So, not a bug

2020-07-12T17:08:37.391100Z

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