i received the https://www.amazon.fr/Functional-Programming-Patterns-Scala-Clojure-ebook/dp/B00HUEG8KK/ref=sr_1_2?__mk_fr_FR=ÅMÅŽÕÑ&dchild=1&keywords=functional+programming+patterns&qid=1601707215&sr=8-2 Functional Programming Patterns in Scala and Clojure book form amazon recently. Has anyone read it? I must say, i was immediately disappointed, but perhaps I'll give it another shot??? The idea of the book is to implement a complicated program in Java, and then rewrite it in Scala and Clojure. Me, I don't know java, and really hoped to avoid having to learn it. I was more hoping for a book which compares Scala and Clojure, not which compares them both to Java. 😞
Can anyone suggest a good open source Clojure repo for a beginner to dig into?
@hewrin When just beginning with the language, I recommend some coding challenges https://practicalli.github.io/clojure/coding-challenges/ The 4Clojure challenges give excellent insight into the Clojure core functions. Once you have tried the 4Clojure challenges, I shared a GitHub repo that cover several different approaches to the solutions https://github.com/practicalli/four-clojure/ There are some very simpe project with code and video walk-throughs here https://practicalli.github.io/clojure/simple-projects/ If you are interested in building server side web applications, I am doing a series called Banking on Clojure https://practicalli.github.io/clojure-webapps/projects/banking-on-clojure/
Thanks a lot @jr0cket! I’m currently going through Programming Clojure. Coming from Ruby/JS, I’m still getting the hang of the (minimal) syntax
@hewrin Please ask lots of questions, we are here with friendly help and suggestions As you have JavaScript experience, you may want to look at https://shadow-cljs.github.io/docs/UsersGuide.html
@hewrin I think writing scripts might also be a nice way of getting to know Clojure, while also doing something useful
Question about structural editing in Cursive. How do I get from
(defn word-lengths
"Calculates the sequence of lengths of words in the given string"
[txt]
(map #(.length %) (split-ws txt)))
to
(defn word-lengths
"Calculates the sequence of lengths of words in the given string"
[txt]
(map #(mod (.length %) 10) (split-ws txt)))
?I don't know the keys or commands, but I would do a wrap with before the (length %)
part of the expression, then type mod and jump to the closing paren and type 10
The cursive docs seem a bit vague on this. This video suggests Ctrl+Shift+9 to wrap https://www.youtube.com/watch?v=18WtDzYHKCI
Thanks. I had originally gotten the parens wrong for what I thought I wanted, so that jammed me up I think. I'll check out that video.
I think I want to wrap .length
in parens and the slurp in the %
Hi everyone. I wanted to ask. How can Clojure been upgraded? I have used the Clojure installation script for Linux.
If you mean "How can I upgrade the version of the Clojure CLI tools", then you can download and run the latest version of the Clojure install script from https://clojure.org/guides/getting_started#_installation_on_linux
If you mean "How can I select which version of the Clojure language implementation I want to use in my project?", then you can do so by specifying it in your deps.edn file (if you use the Clojure CLI tools) or project.clj (if you use Leiningen)
Thank you so much @andy.fingerhut. I am starting with Clojure and I want to know the upgrade strategy that is popular for Clojurians! I also saw that Leiningen tool is a "must"!
What version are you on currently?
Leiningenn is definitely useful for following instructions to build and test existing Clojure projects that use them, but you can get by without it for your projects if you wish to use the Clojure Cli tools instead for those.
@dpsutton I am using 1.10
The most recent release is 1.10.1. Most likely if you just switch that that in whatever project file you specified your current version it will be the same or perhaps much faster on startup. The people that work on clojure take breaking behavior quite seriously and hardly ever make breaking changes
@dpsutton meaning that I need to just put the appropriate version into my project file as @andy.fingerhut wrote earlier?
Yes he asked some clarifying questions. I asked what version you are currently on as that would also answer what he was getting at. The “upgrade advice” I can give you is to just put the most recent version of clojure in your deps.edn or project.clj file and you will be fine
I am really glad for all the guidance! It's my first touch of this language! Up to now I am really glad of starting to learn it!
You may find this online book helpful https://practicalli.github.io/clojure/
I haven't used Leiningen for years but it is still popular and used in a lot of tutorials and books. I have been using the Clojure CLI since 2018 -- which is officially supported by the core Clojure team -- and it is what is documented on http://clojure.org
At work, we handle all our dev/test/build stuff with the Clojure CLI. We stopped using Leiningen in 2015 (switched to Boot, the the Clojure CLI).