This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # asami (10)
- # aws (1)
- # babashka (1)
- # beginners (105)
- # cider (13)
- # cljsrn (6)
- # clojure (42)
- # clojure-australia (4)
- # clojure-dev (7)
- # clojure-europe (26)
- # clojure-nl (2)
- # clojure-uk (13)
- # clojurescript (19)
- # code-reviews (3)
- # conjure (18)
- # core-async (4)
- # core-matrix (5)
- # cryogen (3)
- # datomic (27)
- # depstar (21)
- # emacs (2)
- # figwheel-main (9)
- # fulcro (18)
- # helix (7)
- # jobs (3)
- # jobs-discuss (15)
- # juxt (7)
- # kaocha (4)
- # lambdaisland (2)
- # leiningen (11)
- # luminus (1)
- # malli (6)
- # meander (9)
- # minimallist (4)
- # mount (3)
- # off-topic (3)
- # pathom (8)
- # pedestal (28)
- # rdf (13)
- # re-frame (7)
- # reagent (5)
- # shadow-cljs (3)
Two related questions: (1) Do you agree that a lot of ex-Rubyists became clojurians? (2) If true, why do you think it happened?
https://de.surveymonkey.com/results/SM-CDBF7CYT7/ check Q3 looks like only 9% of clojure developers recognize ruby as primary
here you can get links to the results of other years https://clojure.org/news/2020/02/20/state-of-clojure-2020
That's only the recent questionnaire. You should probably look at the timeframe 2007-2012 to see if Clojure converted Rubyists to it.
Because after that time, it wasn't a sudden surprise that there was such an an alternative
fyi it was Relevance, not Relevant. there was definitely a surge at one point (around when Rich did the talk at RuPy)
generally people comfortable with dynamic typing but in need of better performance for server apps
It definitely was a trend 7-5 years ago (my team moved from Ruby to Clojure around that time) and I remember "Clojure vs Ruby" type talks happening at various meetups and what not. Puppet for example wrote Puppet server in Clojure around that time (IIRC) while puppet core is still a DSL written in Ruby etc etc
I've definitely worked full time for multiple companies that did their first draft in ruby but switched to clojure for performance / server resource reasons
I think that could indicate that Clojure is just all around better than Ruby, and since Ruby has no killer ecosystem like Python, it make sense that Clojure would attract Rubyist. You get access to a larger eco-system (jvm/js), better safety (immutable/functional), better performance (multi-threaded/JIT), better interactivity (REPL), and I'm skipping on the details.
I think if Clojure had have a RAILS competitor, there'd be even more of an exodus. Now I think, since Elixir has created a RAILS competitor (Pheonix), I think Rubyist are now moving to Elixir over Clojure
This discussion strikes me as interesting. I never considered Clojure because of runtime performance. My projects are typical custom web based software/tools/sites. The reason I initially got into learning it and now using it for real is that I got increasingly frustrated by other languages. The paradigms, the boilerplate, the weird workarounds… Then I remembered Scheme and Racket and looked for something that is like those but with a stronger focus on production.
For those of you who use spec, how has adopting spec affected your usage of records? Do you find yourselves now preferring maps over records, or has your use of records continued unchanged?
I haven’t used records much either apart from components (and it looks like that’s not necessary anymore), but I recently picked up Clojure Applied and noticed that records are used for data modeling there. ¯\(ツ)/¯
In my applications, I've not used Records yet, it's been maps all the way 🙂 (with a few vectors for good measure)
I will not put words in @U064X3EF3's mouth, but I have a dim recollection of him commenting on whether he would emphasize them as much if he wrote the book today.
Yup, Alex has said that if he were writing Clojure Applied today, he would use maps more and records less.
I've rewritten clojure.spec from a protocol based impl to a map based impl because babashka couldn't handle protocols back then :)
What’s the fastest way to logically compare two data-structures containing values of different types?
(compare [:a "a"] [:a 1]) Execution error (ClassCastException) at java.lang.String/compareTo (String.java:134). class java.lang.Long cannot be cast to class java.lang.String (java.lang.Long and java.lang.String are in module java.base of loader 'bootstrap')
for ordering, you'll need to make a custom comparator that can handle whatever types you want to handle (lots of choices to make there)
Clojure's = is a deep operation, checking all nested collection values
:) I was gonna show
user=> (= [1 (reify Object (equals [_ _] (assert false)))] [2 3]) false
but as @bronsa shows, it's up to each object to define how it implements an equality check - most collections short circuit before checking the full input
you can use eg. lein or mvn to install it to the local cache, but usually you'd want to also have that jar propagate to a maven repository somewhere (so other devs, or ci, can use the same artifacts)
I've used a maven store that works over s3, and "artifactory" (a saas artifact repository that works with maven) in the past