I’ve got a question and then observations about my own process learning Clojure.
In the new series “Understanding Re-frame” series, it recommends running
lein figwheel to get things started. That works, but then I only have a REPL in the terminal, not in the editor. I am trying to use Cursive for this, since it supposedly has better support for Clojurescript than Atom proto-repl.
I see this tutorial: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL
But it requires modifying the project.clj file. This won’t work the way Eric suggests using
git checkout -f 013 which wipes out changes every lesson (or dealing with merge conflicts if you don’t use the
- I could use Lighttable (not sure how well this works with figwheel). But Lighttable is pretty limited. I am trying to settle on an editor that I can stick with, customize key bindings and become proficient at.
- I could learn Emacs - I started that way a couple years ago and gave up. Every experienced Clojure dev has said it’s pretty hard to learn Clojure & Emacs at the same time. I know Emacs is good but I don’t think it’s necessary to be really proficient at Clojure, since there are many examples of proficient devs that don’t use it. It feels like an unnecessary investment. And I have other languages that I would prefer to use my old editor for (Atom) and not have 2 completely different set of muscle memories. I’m not even sure if I learned Emacs this particular problem would be solved.
- I could use the terminal, but as far as I can tell it’s really clunky. I’m trying to get proficient, not just do a proof of concept. How do you send expressions to it from your editor?
So I don’t know what to do except just watch the videos instead of code along with them.
Now my observations:
This is my 3rd time I’ve seriously tried to learn Clojure over 3 years. I own a software company and I see the value of Clojure and Clojurescript. But I have a business to run and deliver for, so all of the friction I find in Clojure is really blocking it’s adoption in my small world. It’s really frustrating.
I know that the REPL is a remote process and and isn’t necessarily tied to the editor. But as a beginner, I just need to get something successful done relatively quickly. What I want is to open up an capable editor, run
lein whatever and be working. I want inline evaluation or sending expressions to the REPL. That sounds like how an experienced Clojure dev thinks and talks about it, but there are so many more steps. When I switch files, why doesn’t my REPL switch for me to that namespace? Why doesn’t my REPL stay in sync with my code (or tell me when it’s out of sync)? If you look at Cursive’s REPL setup - as a beginner I have no idea what that stuff means. I don’t know what the
n in nREPL means or why I would pick that. Or if I need a local or remote REPL. I just want my code evaluated as I need it. Part of me feels too entitled to be asking for others to smooth all of this over for me, but I’ve been in the Clojure community long enough to know that in general, people want more people to adopt the language. In companies with other Clojure devs, there are mentors who can pass on all of that nuanced knowledge. But there are many times more people out there that are interested, like me, who don’t have mentors but really want to build software with it. They are relying on this course or online tutorials as the mentor.
Maybe one part of the problem is that bringing it all together isn’t anyone’s domain. There’s the core language, there’s figwheel and lein, there’s the editor. On a technical level, those are nice and decoupled. But from a user perspective, it’s a mess.
I know folks like Zach Oakes is working on this problem. Those editors are cool, but very limited. Nightlight I couldn’t even figure out how to make a new directory. And deep keybinding support is really important to feel productive.
I think the community is great and cares about this a lot. Unfortunately though after 3 years and my 3rd try of really trying to get Clojure projects built, I’m running into the same problems. I’m not giving up this time, I just wish it was a smoother onboarding.