Hacker News new | ask | show | jobs
by rrosen326 2483 days ago
Clojure Help:

This is super apropos since I am JUST learning Clojure via the Clojure Koans.

Any tips from clojurists on getting the repl (and readline) working fluently? I'm using Leiningen but it's not responding as I'd expect. I would think this would all set up more effortlessly.

Tips on getting a new Clojure setup working would be appreciated.

9 comments

Join the beginners channel in Clojurians slack, there are many patient people there volunteering to help with things like this.

Try out Calva for VS code, read the official REPL guide here https://clojure.org/guides/repl/introduction

> Any tips from clojurists on getting the repl (and readline) working fluently? I'm using Leiningen but it's not responding as I'd expect. I would think this would all set up more effortlessly.

For me, Boot[1] has completely replaced Leiningen, and I wish it was used by all new Clojure projects, when deps.edn[2] is not enough.

[1] https://boot-clj.com/

[2] https://clojure.org/guides/deps_and_cli

Thanks for all the tips. I started the book Brave, installed Cava and got it working, and am considering finally biting the bullet on emacs. Two birds with one stone!

Thanks for the tips!

If you're willing to pay a monthly fee, you might like this REPL driven development course:

https://purelyfunctional.tv/courses/repl-driven-development-...

EDIT: and you might also want to check out https://clojureverse.org/

You can ask questions at: ask.clojure.org

And like others said, people on slack are super helpful, don't be shy, the community is great.

That said, Clojure does not invest a lot into beginners. Not a lot of tutorials, guides and tooling are similarly unfriendly and assuming you know a lot. Not trying to scare you off, just setting the right expectations.

I recommend emacs, try braveclojure.com - it's a pain to set up properly but well worth it.
As an avid Emacsen, I would usually recommend Clojure-mode and CIDER only if you are already familiar with Emacs. Learning both - Clojure and Emacs can be really frustrating and may potentially become a "deal-breaking" impediment. Almost every [popular] editor/IDE today supports Clojure (not many mainstream langs can proudly say so)
I use Leiningen as well and I have no issues with it. REPL startup is a bit slow, as is expected from most JVM programs but a bit more so for Leiningen.
You can start the JVM in well under a second, the problem is most JVM programs don't care about startup time thus startup becomes slow. Most JVM apps are designed to be long lived.
Chapter 2 of Clojure for the Brave and True will get you an Emacs environment set up with minimal effort!
I just went through this chapter. Some of the packages are out of date and the environment does not work correctly. I'm still trying to figure out how to get emacs to connect to the repl.
Indeed not so minimal effort, I had to skip that chapter. Hopefully it will be updated in the future.

I've been using Atom so far, and I will try Cursive later

Hmmm, interesting. Set mine up no problem on a Mac about 9 months ago, but I suppose I might have gotten lucky.
try to get integration with repl working with your IDE.

Not sure what you are using but i use CIDR on emacs.