by flaie · 6y ago · 0 comments
You just need Java installed on your system, then you install clojure (via brew, or sh install) and that's it, you're good to go.
I've written a guide to starting with Clojure covering installation to REPL & IDE configuration: https://grison.me/2020/04/04/starting-with-clojure/
In an extreme case, someone who doesn't know Java ecosystem might want to stop to research: what is JVM, why is it necessary, which version would be the best, what's the difference between Oracle's Java and OpenJDK, etc...
Out of the top of my head:
- There is the Python 2.7/3.X situation still going on, then there are the several distributions of python.
- GNU's R has a similar problem
- Installing gcc on windows was (perhaps still is) a confusing mess for a newcomer.
IMO I did not find installing clojure any harder than installing Scala for instance, and yet I have never heard (anecdotal, I know) complaining about Scala.
You might not share that users preference of caring about the installation experience of a PL, but arguing that this user's preference is somehow unfair because many other languages also have bad installation experiences makes absolutely no sense.
The vast majority of PCs are Windows, not Mac or Linux. Though WSL2 (available with Windows Insiders) makes working with Linux software a breeze, it's not the standard flow. Java isn't installed by default, either.
Your guide suggests using WSL and IntelliJ. Does IntilliJ actually work with Closure running in WSL? For that matter, does the VS Code plugin?
These are all headaches a new programmer won't have when getting setup with PHP, Python, JavaScript or most popular languages.
I think this is especially disappointing because there are mature, cross platform solutions available but whoever manages the Clojure project seems hell bent on pushing their "clj" tool which is, clearly, treating cross-platform concerns as an after thought. The Clojure organization conducts a survey every year and this is hurting their adoption with developers on Windows.
"One new question we asked this year was about the primary developer operating system to give us better guidance about tool-related work. As expected, MacOS was the leader (55%), followed by Linux (35%) and Windows (9%)"
Getting started with Leiningen, in my opinion, is much easier although, as has been pointed out, installing a JDK is an extra step that other languages don't have.
[0]: https://clojure.org/guides/getting_started
[1]: https://clojure.org/news/2020/02/20/state-of-clojure-2020
I'm doing a lot of Clojure since years both on my MBP and on Windows and there's no problem at all doing that way. Besides VSCode even has a plugin for WSL which will let you directly hook into it.
So yeah there are some questions like which Java to install, which IDE, .. but these questions are the same for other programming languages.
If you have any hint regarding how to improve my guide don't hesitate to tell me if something is not clear in it :)
Probably the biggest thing would be to assume the person reading the guide has a brand new computer and hasn't installed anything yet (including Java and Homebrew).
It's really hard to assume much about the background of someone just trying a new programming language. Maybe they've worked with other languages and you're familiar with, maybe not.
A Lisper sees a REPL, and thinks they have "gotten started." When I think most language learners don't think they have "gotten started" until they, on the low end, have printed something at a familiar terminal, or, on the high end, pointed a web browser to localhost:8080 and seen some text there.
I don't see who the "clj" shell script is somehow "part of Clojure" any more than Leiningen or Boot. IMHO it's just a shell script and it works similarly to the other tools, except not in any way cross platform.
"Then run:
Invoke-Expression (New-Object System.Net.WebClient) .DownloadString('https://download.clojure.org/install/win-install-1.10.1.536....
There's also no clj installer for Windows although there is a Scoop package.
https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Wind...
And how to work with vscode as it all fails, at least windows.
But love clojure syntax. In particular I found it hard to see all () and the simple added some syntax sugars help the eye a lot.
Hence jump to janet. In fact the community is very helpful.
Not sure but the size is small enough to see whether one can do embedded as I try picolisp but it is bounded to a low end Env.
Very promising.
Btw the whole point I later schedule more time to try clojurescript to ... May be that can wait a bit.
2 - Dowload clojure.jar
3 - Start command.com or PowerShell
4 - cd into clojure installation directory
5 - java -jar clojure.jar
What there should be is an exe or MSI installer like every other Windows program.
Not directly the link you provided.
Yes, they require Java knowledge I guess, but then again using guest languages without caring for the host platform is a fallacy.
Now I do agree that an installer would be the right experience to provide.
...
2 - Download clojure-1.10.1.jar, spec.alpha-0.2.176.jar, core.specs.alpha-0.2.44.jar from mvnrepository.com
...
5 - java -cp clojure-1.10.1.jar;spec.alpha-0.2.176.jar;core.specs.alpha-0.2.44.jar clojure.main
command.com? Is it 1995?