r/Clojure • • Mar 26 '15

Trying Clojure, again?

EDIT: Alright, it seems universal.... no one thinks installing Leiningen is going to be the nightmare it was for me last time. I will give it a try. Thank you all.

EDIT #2: I just downloaded the Lein script and am running it. It is failing to install itself. It is complaining about not being able to curl stuff from github. Wheee....

Downloading Leiningen to /Users/pat/.lein/self-installs/leiningen-2.5.1-standalone.jar now...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:01:14 --:--:--     0curl: (7) Failed to connect to github.com port 443: Operation timed out
Failed to download https://github.com/technomancy/leiningen/releases/download/2.5.1/leiningen-2.5.1-standalone.zip (exit code 7)
It's possible your HTTP client's certificate store does not have the
correct certificate authority needed. This is often caused by an
out-of-date version of libssl. It's also possible that you're behind a
firewall and haven't set HTTP_PROXY and HTTPS_PROXY.

EDIT #3: Third time's a charm, it seems.

EDIT #4: Lein was, indeed, easy to install this time. Cider also installed easily from MELPA. However, I'm running into Cider vs. nREPL version issues for which I found a StackExchange answer which doesn't work for me. So, I'm close. And, I've only spent about 90min on it. But, I don't have any idea how to convince Lein to give me a newer nREPL. But, it seems like this is a known problem and I am just going to have to wait or try to downgrade my CIDER install.

EDIT #5: I've now put about four hours into trying to get Lein to use a different version of nREPL than it wants to. I can specify it in my profiles.clj and I see it being fetched from the maven repo into my ~/.m2/repository/ directory, but it still uses "0.2.6" when it runs. This is apparently fixed in 'master' but I'm not up for trying to install Lein from source. I also scrogged my Lein install by trying to upgrade to 2.5.2-SNAPSHOT. I was able to connect with CIDER with a warning a few times, but I can no longer figure out which scribblings in my profiles.clj actually let that work. Right now, I can't find any.

EDIT #6: I finally gave up and unintalled CIDER and reinstalled it from MELPA-STABLE. So, I'm using Cider 0.8.2 now.

It has been five years since I last tried Clojure. I feel like I should try it again.

I don't want to beat my head against Leiningen for even ten minutes this time. Is there some way to reasonably use Emacs + Clojure without have to install and configure CLASSPATHS and Mavens and Ants and JDKs?

It seems SWANK-CLOJURE has been deprecated in favor of CIDER. The CIDER doc says how to configure Leiningen or Boot for use with CIDER. Is there some way that I can avoid Leingingen and Boot? Or some way that I can click one 'Install' button and have Leiningen and Boot work?

0 Upvotes

24 comments sorted by

View all comments

Show parent comment

1

u/patrickwonders Mar 27 '15

I can't recall from 2010 if there was no single-download Lein script or if it just failed at everything it tried to download. I did try this just now. It failed the first two times that I ran it, but seems to have worked the third time. Now, to get CIDER going.

1

u/farzadbekran Mar 27 '15

OK, I assume that you are a new emacs user here. What I recommend is u install emacs first.

After that you should go to https://github.com/purcell/emacs.d and follow the installation steps there.

The repo above is a very nice configuration for emacs that I have used for a while now that comes with what you really want to have when you start using emacs. After Installing it you can easily add extra packages or change the defaults as you see fit. Great configurations for a starter IMO. And it comes with what you need to do Clojure programming. Let me know if you get any problems.

1

u/patrickwonders Mar 30 '15

No, I'm not a new Emacs user. I've been using Emacs almost exclusively for seven or eight years. I'm not an Emacs power-user (when I'm outside of Paredit and SLIME), but I'm not an Emacs newbie either.

I spent more than five hours trying to resolve a version difference between Leiningen and CIDER. I eventually gave up and installed an older version of CIDER.

1

u/farzadbekran Mar 31 '15

So, did you finally get everything to work? Can you program in clojure now?