5 ms·
I have posted about this before but Clojure does have tooling problems specifically ergonomics. Look at create-react-app. Two commands and a ton of editor inte
by Royalaid 6y ago
I have posted about this before but Clojure does have tooling problems specifically ergonomics.
Look at create-react-app. Two commands and a ton of editor integration across intellij, vscode, vim, etc gives you incredible access to a rich ecosystem and plugs together really nicely with sensible defaults.
Clojure has some answers in this space but everything feels bolted on and not nearly as polished. A big part of the problem is the size of the community, there just isn't enough hands to build out the infrastructure that other langs enjoy.
I still love Clojure and will continue to use it but in order to do so I have to understand that some simpler things will just be more work.
- james-mcelwain 6y agoI'm not super familiar -- what editor integrations does create-react-app provide? It seems like it's just a project template like Luminus for Clojure. Tooling is definitely important, so I don't want to downplay friction here, just curious about what other ecosystems do better.
- Royalaid 6y agoMostly that there is an interplay between the config that gets spit out by CRA and the editors that consume it, I don't need to give intellij the run config for the 400th time, it's just there by default. I click run and it runs. An exercise for you to try that might illustrate it. Setup create-react-app and get hello world up and running. Now do the same with Clojurescript. That should include a way to hot reload and edit because that is often the next steps. Notice the friction that CLJS still has and the aimlessness of starting from a build script as is suggested on the Clojure site vs getting a functional build in two commands. I don't want to come across as ungrateful for the hard work that David and Alex and the whole team put in, they are the only reason have dev tools that feel comfortable to me and I can't thank them enough for that, but I just want to point out that friction and difficulty and to try and get people who do understand to put themselves in the shoes of developers who don't and to acknowledge that we as a community can aspire to more.
- Oreb 6y agoI am not familiar with CRE, so I could be missing something, but based on my understanding of what you write, `lein new re-frame hello-world` should do the trick. Do `lein dev` from the project root directory to get the app running with hot reload.
- dragandj 6y agoThat might be because you've left out CIDER, which is 1) the most popular Clojure programming environment 2) solidly documented 3) built on top of Emacs, which is in itself very well documented (Just the reference manual of the vanilla Emacs is 500 nicely written, if dry, pages) 4) very featureful. I guess the biggest problem is that most people are not familiar with Emacs, and not willing to read any documentation and guides.
- Royalaid 6y agoWhile we can suggest Cider as an option, I have had nontrivial problems with breakage on updating, Emacs falling over with long lines of text, Windows support, etc. I also know that I am not the only one who has had these problems https://twitter.com/ztellman/status/1055152840589496320 https://twitter.com/ztellman/status/1055152840589496320. These kinds of issues a part of the tooling gap and are real reasons people give up on Clojure and I do find the dismissive attitude of most when I have suggested this in the past off putting. Addressing Emacs specifically, while it would be probably worth the investment it is not an answer most people want to hear and when we suggest that Clojure is this great thing it is important to show people on some of their terms because learning a new editor on top of Clojure more then we should be asking IMHO and for all the talk of Clojure being pragmatic this feels directly opposed to that ethos. Let me emphasize, I don't want to say anyone is doing anything wrong or that Emacs isn't the right way forward but it had to be acknowledged that there are real problems that path that need improvement when it comes to onboarding new developers and with daily use.
- dragandj 6y agoIn 6 years that I've been using Cider daily, I don't remember it being broken after update. Ditto for Emacs. A few times Cider had major changes, but even then it was quickly resolved, and was relevant only to people that were using daily snapshots. I guess if someone is a beginner, they'd use a stable version, and these are rather stable. Big files could be problematic in Emacs. OTOH, Clojure files are never big. As for Emacs requiring a bit of learning at first. Well, yes. It has lots of features that beginners have probably never encountered in other tools. These features are awesome. They also help a lot. So, someone expects to unlock a great featureset, but refuses to spend even a few afternoons learning about that featureset. I understand that people would rather get something out of nothing, but it's not Emacs's fault.
- lvh 6y agonpx create-cljs-app will get you a ClojureScript React app pretty similar in tooling.
- Royalaid 6y agoThat is extremely fair but again it doesn't have deep hooks and the convenience that Javascript and CRA have with, for example Intellij. This isn't a problem that is easily solved, Colin is only one person and JetBrains is a huge team, but it is still a gap that Clojure needs to have a story around to attract more developers and to make our lives as devs starting new projects easier.
- lvh 6y agoCan you help me understand the deep hooks that need to happen? My understanding is that it's stuff like, intellij's "run" knows how to call `npm start`. Elsewhere in the thread you highlighted specific requirements like getting hello world running and hot code reloading with your editing, but CCA seems identical to CRA in that regard.
- cutler 6y agoJust tried this and the install size is 796Mb of which 513Mb is node modules. The initialised git repo is a whopping 274Mb - WTF? I re-initialised git, excluding node_modules and it's now 244k. I recommend the author leaves `git init` to the user.
- lvh 6y agoIs your criticism that it downloads to many packages, or just that they're (I agree, incorrectly) being added to the git repo? Because if you want to create your own minimal setup, shadow-cljs' tutorial will help you do that: but OPs criticism was that there's no easy starting point that has all the bells and whistles, so yeah, this has a lot of bells and whistles :-)
- amw-zero 6y agoHow is create-react-app more ergonomic than "lein new"?