From Twitter: Maybe we have to face it: Clojure has nothing to offer web programming that is better enough to make people switch to Clojure

Coast is really new, I just open sourced it I think a week ago maybe? It’s really early days. There’s definitely a lot of work to do to show how coast is as good or better than mainstream web dev frameworks. A few things I’m working on to make it more appealing to clojure-curious devs:

  • Screencast on homepage showing how easy it is to get started with cursive and start evaluating things in the REPL.
  • Better design
  • More docs, so much documentation that it overwhelms people, but still has a quickstart
  • If anyone, anywhere has any questions, go out of my way to answer them
6 Likes

I am a green developer. I have played around in many programming languages over the years, accomplished whatever I needed accomplished – But Clojure is the first language that hooked me and kept me coming back…

I suspect that folks like me are a pretty good target audience for growth – Developers with lots of experience are often set in their ways, and will nearly always default to the tools that are accessible to them. But those of us who are green are going to learn to love whatever we first learn to be productive in, Clojure is definitely a productive language… So a good beginner experience is very important.

ClojureScript isn’t easy to learn. The Clojure is the easy part… It’s the javascript interop that makes me feel like I need to learn two languages to be productive in one. The diversity of tooling also makes it difficult to grasp exactly how everything works and needs to be set up… Lots of choices too - Lein or boot, figwheel, devcards, Reagent, om, reframe, compojure, bidi. It seems like most of the material out there attempts to explain things, but they assume too much and it’s easy for a beginner to get lost.

Getting some cohesive resources regarding what choices need to be made and how they fit into the context of the entirety of the programming experience would help a ton. Writing Specs may allow for some much improved error messages.

I do think that Clojure instills a lot better discipline in the way thing are done - out of that more reliable and maintainable software will emerge. It’s worth it.

5 Likes

I find that Clojure appeals to both junior and senior developers. Once you’ve worked enough with imperative/OO languages you start seeing the problems, and you recognize the benefits that Clojure brings to the table.

I agree with the problem of having too many choices, and that’s been primary motivation behind Luminus. The goal of the project is to combine a project template that provides some sane defaults combined with consistent documentation. For example, if you wanted to make a project with re-frame and sqlite, you can just run:

lein new luminus myapp +re-frame +sqlite

This will setup everything for you, and you can start working on the app immediately.

9 Likes

I agree with this point. When I was learning Clojure with no Java background, I always think Clojure docs fails to make it a independent language for learners. I had to get familiar with some pieces from Java ecosystem before running Clojure. However some of the pieces are not even documented in Clojure docs. So I just want it to be simpler, i.e. with less invisible dependencies.

1 Like

Just listened last night to the defn podcast with Zach Oakes.
LightMod seems nothing short of amazing for when you’re starting out (repl, full-stack, single install, parinfer).

https://sekao.net/lightmod/

2 Likes

When I was starting functional programming with Scala, it was hard because of the paradigm but also all the syntax and different rules.

There are few things that helped me noticing, starting and persisting :

  • PlayFramework which is the Rails for scala. It was by far the most popular web scala framework. You would start with a sbt new something and you were up and running. For free I had auto reload, error overlay a la react and figwheel (which is very nice for beginners) and some nice templates with DB access examples etc … The nice thing is that I didn’t feel lost about what frameworks to choose. It was just way better and popular than others.

  • Big companies were using Scala and talking about it - Twitter, LinkedIN etc … while developing open source tools using it.

  • Scala Frameworks had a lot of tractions outside of the Scala community: Play, Akka, Spark. The 2 first being now part of TypeSafe/Lightbend “official” stack

I think that those 3 points are necessary.
Hello worlds in repl are not sufficient but Hello world web stack with client side repl to quickly show you can interact with your live code is interesting.

Regarding point #3 I’m not sure what is currently popular outside of clojure community. Popular enough that other language would want to add wrapper around it.

When you have #1 and #3, something like https://developer.lightbend.com/start/ should be interesting.

4 Likes

I came from a full-time Laravel/PHP job to Clojure. That experience showed me what I was doing in PHP in the first place! I remember learning about Ring a short while after getting basic syntax down, and couldn’t believe what I’ve (and the PHP world) have been doing with all those SymfonyHTTPRequest classes (I think nowadays it’s even worse with PSR-7 Request/Response classes), which Laravel wraps again.

I found myself constantly struggling to compose functionality around those, stuff that struck me as very trivial with a plain request map from Ring. From that point on, I discovered that there wasn’t actually much to learn to get from Clojure beginner to intermediate – there were years and years to unlearn. After getting basically all of the PHP world stuff “out of my system” I could start to learn new/higher concepts that weren’t even on my radar before (SCIP etc.).

I for one am super grateful to be able to learn Clojure, learn about LISPs and realising that there are functional concepts and constructs for things which the JavaScript community is just now catching up to (e.g. anything in the React world, or something like Michel Weststrate’s immer library).

2 Likes

Hi all,

I am a newbie to Clojure/Clojurescript and the clojurescript quick start at (https://clojurescript.org/guides/quick-start) is awful. It isn’t really a quick start - its more like a gentoo build linux-from-source guide and scares everyone away since it is the most complicated, error-prone and really long way to get anything running. IMHO, the quick start should demonstrate use of lein/figweel immediately and then link to a ‘from fundamentals’ approach later. Please look at the quick start of other languages/frameworks. To get done anything in Clojurescript requires reading a tonne of wiki pages across several projects and google searches. No developer is going to do that today - they will simply give up.

2 Likes

Hi! Interesting… could you please point explicitly to those parts of the quick start which you find confusing? I’m trying to understand where exactly it makes things harder, so probably we can improve it.

You can try lein new reagent foobar && cd foobar && lein figwheel. That’ll give you something super quick. Then open “http://0.0.0.0:3449” in your browser.

Btw, the QuickStart will be overhauled pretty soon since a new CLJS version will make compiling a simple snippet much simpler. Though I think it might also depend on tools.deps.alpha which itself will have to be installed (so another step).

Here’s my observation: the Quick Stack guide tries to make people understand how things work. It’s not wrong. But that’s not how beginners learn things. Beginners want to get things done and make the steps repeatable, in some cases without understanding how it works internally.

So, can these steps listed in the page be finished in 30mins before a beginner get tired? Can those steps be remembered after following those steps for 1 or 2 times, with help of code snippets and project templates?

7 Likes

Tooling is quite complicated for beginners, i am not a full beginner but i find lein confusing , specially after looking at so many ways to configure project.clj , i still ask ok where would this :xyz_option [Some option] go now? Am i doing it right? And there is no good documentation on it either. One can have many level nested options and deps one cancelling other. It is confusing.

So yes i agree things should have simpler repeatable steps.

2 Likes

the marketing is awful

I can’t stress this enough.

4 Likes

Marketing a language like clojure is not easy job. How do you sell a language with carefully designed STM and concurrency facilities to less experienced developers? Most web developers don’t need to solve and thus aren’t familiar with the problems Clojure was invented to solve.

IMO Clojure will not die out due to slow adoption. There will always be a steady stream of senior backend developers who will rediscover Clojure after being burned by super complex stateful behemoths or microservice-madness.

2 Likes

Good point. But I think that’s not conflicted with “making Clojure easier to learn and to use for new developers”. JavaScript and Java are complicated languages, it doesn’t stop people learning them.

I’ll say here what I said much more long-windedly in the other thread of this general topic and shape: Clojure(script) isn’t successfully selling itself (to the JS community especially) as “a better mousetrap”, because it’s not “a better mousetrap” - it is fundamentally a way of living that no longer concerns itself with the capture of rodents. Working in Clojure is, in and of itself, a superior experience to working in the native languages of its host platforms, so much so that the work itself is the comparative advantage.

In the same way that no matter how many of them come out, and no matter how creatively they are named and marketed, a JS frontend framework will never give a developer the same experience of flow that can be achieved at the REPL, I contend that no Clojure framework or marketing website can effectively communicate this sense of flow, of joy even, that the working Clojurist enjoys to an audience looking for a new framework to solve the problems they face living in the tar pit.

7 Likes

So many times this! Aside from Emacs story, from which I could get productive in minutes using Cursive, I couldn’t get happier with the Clojure FullStack experience.

Also, c’mon Rust docs is something to keep an eye into, Clojure could benefit so much from a cleaner awesome one too.

Also I’d like to add here https://clojurecademy.com has the fundamentals to be the Learn RUST.
Add parinfer for begginers and some more Docs/Cheatsheet integration to the delightful beginner welcome.

We have the tools, we have the learning, heck even purelyfunctional.tv could be added.

IMO the fundamental step is, WE NEED A CLOJURE.ORG REDESIGN TO BRING EVERYTHING TOGETHER.
We must link everything Clojurians Slack, Clojureverse board, Reddit board etc etc.
And c’mmon, the site looks from 1997, and nothing is quite pleasent or vibrant.

Tom and Rich Hickey please, let the community overhaul it.

(Clojure Academy REPL working with instructions on the side, quite awesome for new commers)

6 Likes

And c’mmon, the site looks from 1997, and nothing is quite pleasent or vibrant

They improved it a bit, but ya, its not a good showcase of what you can do with Clojure/Script.

1 Like

I personally wouldn’t change the content of that guide – I would just rename it, or qualify the name – maybe its a quick “exploration” of cljs.build.api and cljs.repl. It was more of a quick restart for me, just yesterday, someone who had used CLJS for a lot of learning projects 1.5y ago, and had definitely “leaned” on lein (and then boot, and git clone) too much. I was trying the same old approach the other day, learning how to use cljs-lambda, and just running into hair-pulling build problems, ultimately probably b/c of some ignorance around the fundamentals. The quick-start guide has done a GREAT job of fixing that.