News for hackers. Stuff that matters.
Re:A History of Clojure [pdf] by LandR on Thursday June 04, 2020 @01:45PM (#23419537)
I love clojure the language but hate the tooling.

Also a lack of documentation was always a problem, especially around clojure script.

I also don't like smug community. When you say about the lack of documentation and get told that's a good thing, clojure is meant to be hard to learn, it's not for everyone and maybe you just aren't smart enough...

Hmmm. That attitude might put people off.

Re:A History of Clojure [pdf] by manishsharan on Thursday June 04, 2020 @02:14PM (#23419889)
I kind of know where you are coming from. 'Back in the day', early Clojure adopters would ask one to read SICP before asking questions. SICP is indeed the best CS book I have read but that attitude was uncalled for.

But things have changed. Clojure and Clojurescript community is among the most helpful and Stackoverflow questions are promptly answered. If you take the time , like I did, you will find that Clojurescript has awesome tooling. Go though the tutorial on Figwheel.main (https://figwheel.org/docs/ ) and then check out re-frame TodoMVC here https://github.com/day8/re-frame/tree/master/examples/todomv... or this simpler reframe tutorial from here https://opengisgal.wordpress.com/2018/05/19/re-frame-clojure... . And this here is the Reagent cookbook https://github.com/reagent-project/reagent-cookbook . Good Luck!

Re:A History of Clojure [pdf] by fogus on Thursday June 04, 2020 @03:22PM (#23420685)
"'Back in the day', early Clojure adopters would ask one to read SICP before asking questions."

I was in the Clojure usenet from very early on and do not recall this happening. That's not to say that it never happened but it was certainly not a common response to questions. Instead, I remember early adopters like Chris Houser, Chas Emerick, Phil Hagelberg, and many others taking a lot of time to help people who had questions with the language.

Re:A History of Clojure [pdf] by onetom on Friday June 05, 2020 @11:00AM (#23429317)
I've also received countless hours of help from @alandipert, @micha and @jumblerg on the Clojurians slack about boot, Hoplon and Hoplon UI. Without them I couldn't have successfully built a 6 ppl Clojure team, who was consistently delivering working software!
Re:A History of Clojure [pdf] by puredanger on Thursday June 04, 2020 @02:40PM (#23420189)
> When you say about the lack of documentation and get told that's a good thing, clojure is meant to be hard to learn, it's not for everyone and maybe you just aren't smart enough...

Clojure is not meant to be hard to learn and you are definitely smart enough. There are many, many learning resources for Clojure in every form and it has one of the most helpful communities I'm aware of on Clojurians slack, etc.

Re:A History of Clojure [pdf] by lvh on Thursday June 04, 2020 @03:19PM (#23420643)
> I also don't like smug community. When you say about the lack of documentation and get told that's a good thing, clojure is meant to be hard to learn, it's not for everyone and maybe you just aren't smart enough...

Where did you experience this? That is unacceptable in most of the Clojure communities I know, and the only big one I don't know personally is the subreddit.

(I am not suggesting the subreddit is toxic.)

Re:A History of Clojure [pdf] by puredanger on Thursday June 04, 2020 @04:18PM (#23421248)
Compared to many other subreddits, the Clojure one is frolicking unicorns and rainbows.
Re:A History of Clojure [pdf] by macmac on Friday June 05, 2020 @08:19AM (#23427628)
The best thing is that keeping it that way takes a minimum of moderation.
Re:A History of Clojure [pdf] by james-mcelwain on Thursday June 04, 2020 @01:47PM (#23419561)
What tooling has given you problems? I think that some tooling assumes familiarity with the Java ecosystem (which is a problem for many things in Clojure land), but otherwise it seems pretty solid to me.
Re:A History of Clojure [pdf] by Royalaid on Thursday June 04, 2020 @02:00PM (#23419722)
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.

Re:A History of Clojure [pdf] by dragandj on Thursday June 04, 2020 @02:08PM (#23419815)
That 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.

Re:A History of Clojure [pdf] by jlarocco on Thursday June 04, 2020 @06:08PM (#23422559)
I've never understood why so many people are reluctant to learn Emacs (or Vim), but then don't see any problem with learning a new language specific IDE every few years.
Re:A History of Clojure [pdf] by dTal on Thursday June 04, 2020 @07:04PM (#23423022)
Probably because those language-specific IDEs all follow standard user interface conventions.
Re:A History of Clojure [pdf] by Royalaid on Thursday June 04, 2020 @03:15PM (#23420605)
While 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.

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.

Re:A History of Clojure [pdf] by dragandj on Thursday June 04, 2020 @03:52PM (#23420980)
In 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.

Re:A History of Clojure [pdf] by Royalaid on Thursday June 04, 2020 @05:29PM (#23422059)
Part of the problem could have been that I was using Spacemacs and package support and that may have broken it but circling back around this connects with meeting people halfway, I don't want to learn Emacs style control, I know Vim, Vim works elsewhere, and I just want to write Clojure. I can do that now with Cursive so the trade off isn't worth it. A lot of people learning feel and think this way in my experience, especially if I selling Clojure to someone who is reluctant, anecdotally at least 4 people I know have followed this path, I am sure it extends beyond them.

Per the big files, its not so much Clojure but output at the REPL. Especially as a noob accidentally grabbing way to much data for a buffer is really easy, Emacs hangs, REPL and process dies and has to be rebooted and you have to bring up everything again. This is non-trivial friction when learning and should really be handled gracefully by the editor.

As for everything else regarding Emacs and learning all these points stand and are valid but still don't address the problem of someone wanting to learn Clojure and instead having to learn Emacs + Clojure + Cider. For someone just starting on the path most won't have more than 3 files of CLJ and may not even interact with Lein or Deps. Refactoring IS important but not to them. I just don't think the trade off is worth it for someone just toying around with CLJ in their free time. It may not be the best metric but "time to hello world" and "time to blog" matter to people coming in because it shows that the promise that they are sold is something that they can reach and achieve.

Re:A History of Clojure [pdf] by lvh on Friday June 05, 2020 @08:31AM (#23427731)
Hm, I use Spacemacs particularly because of the easy config.

That said, you're right: you should just be able to use vim, and historically CIDER has been the dominant (most polished) environment. At Clojurists Together Foundation, we're trying to fix that though: a lot of our funding has gone towards IDE development including for vim. Some of it towards CIDER also benefits vim because they share internals.

[0]: https://clojuriststogheter.org

Re:A History of Clojure [pdf] by dragandj on Friday June 05, 2020 @08:49AM (#23427871)
It's worth mentioning that BBatsov, the creator of CIDER, maintains a practically zero-config Emacs distribution, Prelude. A novice interested in Clojure could install Prelude, and start coding Clojure and other popular languages using pre-configured packages in, let's say, 15-30 minutes. The difference from Spacemacs is that Prelude is much simpler, does not mess with Emacs defaults, is close to vanilla Emacs, and has been super stable for years.

http://batsov.com/prelude/

Re:A History of Clojure [pdf] by onetom on Friday June 05, 2020 @11:04AM (#23429374)
aaand I guess that's what ppl mean by "ergonomics issues". Emacs is very stable, quite logical in some sense, but also hasn't kept up with the times and doesn't default to those typical keyboard shortcuts, which most newer editors almost all share... but this has been discussed countless times before on twitter, clojureverse.org etc...
Re:A History of Clojure [pdf] by onetom on Friday June 05, 2020 @11:07AM (#23429402)
My bet would be that you are working with the Linux version of Emacs. That's indeed a lot less problematic and more performant too. Under macOS and Windows, the situation is not that rosy and since ppl want familiarity, they typically mix in something like Spacemacs, Doom Emacs, etc into the mixture. For a long time they would probably won't even hear about Prelude or if they do, they would not even assume that's a preset system for Emacs. I've seen this happening to a couple of ppl already just in the past 2-3 years.
Re:A History of Clojure [pdf] by james-mcelwain on Thursday June 04, 2020 @02:07PM (#23419797)
I'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.

Re:A History of Clojure [pdf] by Royalaid on Thursday June 04, 2020 @03:22PM (#23420679)
Mostly 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.

Re:A History of Clojure [pdf] by Oreb on Friday June 05, 2020 @07:57AM (#23427469)
I 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.
Re:A History of Clojure [pdf] by lvh on Thursday June 04, 2020 @03:39PM (#23420846)
npx create-cljs-app will get you a ClojureScript React app pretty similar in tooling.
Re:A History of Clojure [pdf] by cutler on Thursday June 04, 2020 @06:42PM (#23422850)
Just 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.
Re:A History of Clojure [pdf] by lvh on Friday June 05, 2020 @08:33AM (#23427749)
Is 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 :-)
Re:A History of Clojure [pdf] by Royalaid on Thursday June 04, 2020 @05:38PM (#23422185)
That 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.
Re:A History of Clojure [pdf] by lvh on Friday June 05, 2020 @08:38AM (#23427776)
Can 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.
Re:A History of Clojure [pdf] by amw-zero on Friday June 05, 2020 @11:06PM (#23436461)
How is create-react-app more ergonomic than "lein new"?
Re:A History of Clojure [pdf] by sansnomme on Thursday June 04, 2020 @01:57PM (#23419675)
There isn't enough officially supported first class tooling. Most things that are a given for Rust/JavaScript/Go are community maintained with only one maintainer in Clojure, development is slow and features take a long time to roll out. (Let's not delude ourselves that Webpack level of donations is even possible here) This is a problem with every language that is small but it is particularly problematic with Clojure as it has a commercial company behind it but you get the feeling that they are disinterested in promoting the language and ecosystem beyond selling their database software. Go also espouses "frameworks bad, libraries good" but the biggest difference is that they actually have a strong robust ecosystem of solid libraries while pretty much every Lisp claims to have production-ready libraries but expect you to cobble together the entire kitchen sink from scratch.
Re:A History of Clojure [pdf] by puredanger on Thursday June 04, 2020 @02:35PM (#23420125)
> development is slow and features take a long time to roll out

As Rich has said, Clojure is small and intends to remain so. Clojure has everything you need right now. It doesn't need gobs of new features to be sufficient. Most Clojurists are hard pressed to come up with things they really need in the language itself, so the rate of change in the core language has slowed. (And the rate of change in the tooling and libraries around Clojure gets more attention now.)

> they are disinterested in promoting the language and ecosystem beyond selling their database software

... is incorrect. We have every desire to promote Clojure as a language (regardless of Datomic). Could more be done, sure that's always the case. Please help promote Clojure by doing great stuff and telling people about it!

Re:A History of Clojure [pdf] by divs1210 on Friday June 05, 2020 @04:16AM (#23426198)
I love Clojure.

I also believe that tools.deps is a step in the wrong direction, fragmenting an already small community and forcing all tools to support yet another dependency/build system.

Leiningen is super powerful, and it was never made clear what kind of conflicting requirements / philosophy led to the birth of tools.deps etc. In absence of an official answer, the presumed answer is Not Invented Here Syndrome.

Re:A History of Clojure [pdf] by onetom on Friday June 05, 2020 @11:15AM (#23429483)
> In absence of an official answer, ...

Wouldn't you consider this and official answer?: https://github.com/clojure/tools.deps.alpha#rationale

Re:A History of Clojure [pdf] by divs1210 on Friday June 05, 2020 @02:39PM (#23432181)
That documentation does not explain what prompted the creation of another tool when leiningen was already (and still is to a large extent) the de-facto deps/build tool.
Re:A History of Clojure [pdf] by james-mcelwain on Thursday June 04, 2020 @02:13PM (#23419876)
> Go also espouses "frameworks bad, libraries good" but the biggest difference is that they actually have a strong robust ecosystem of solid libraries while pretty much every Lisp claims to have production-ready libraries but expect you to cobble together the entire kitchen sink from scratch.

I mean, Java is pretty much the biggest ecosystem there is and it's trivial to use Java libs from Clojure, so I'm not sure this is a fair comparison.

The Go ecosystem seems pretty weak outside of the standard library. I'm not an expert, but I was trying to fix something the other week and was shocked by how few packages there were to solve my problem. The main one (which is a dep of things like k8s) is currently unmaintained.

Re:A History of Clojure [pdf] by chrisulloa on Friday June 05, 2020 @02:57AM (#23425801)
Clojurians slack is honestly one of the most welcoming and understanding programming communities I've had the pleasure of joining. I frequently ask stupid questions and will occasionally have library maintainers take their time to fill my gaps in understanding. The tooling complaint is valid, but it has been getting better every year. There are plenty of good books for Clojure too, like Brave & True that help you understand the documentation.