r/Clojure • u/alexdmiller • Apr 06 '21
State of Clojure 2021 Results
https://clojure.org/news/2021/04/06/state-of-clojure-20215
u/bachmeier Apr 06 '21
Interesting that there's no mention of Rich Hickey. I haven't followed Clojure closely in recent years. Is he still involved meaningfully? (Not that it's good or bad, just thought that was interesting).
7
35
u/halgari Apr 06 '21
TBH, I think features like the one for 1.11 : https://clojure.org/news/2021/03/18/apis-serving-people-and-programs are great, but that feature was originally suggested by Rich about 4 years ago. Still not sure what took it so long to be implemented.
Took a break from Clojure for a bit, and while I still love a lot about the language the apathy of the development efforts really saddens me. You can see this exemplified by the lack of features/bugfixes (10 bugs fixed a year, maybe one new small feature). And all the "cool" development being done by teams not constrained by the core language management (e.g. babashka)
I feel that a lot of aspects of Clojure, like repl driven development, need more attention and recognition as "a tool" and not "the tool". RDD is held up as a winner over TDD, but yet every major Clojure project has almost as many tests as code (at least the ones I've worked on) because REPL state goes away, and large enterprise apps are stateful. So it would be nice to have a TDD library and system of coding that combines the best of TDD and RDD without devolving into a "if you're not using a REPL you're doing it wrong".
The lack of movement on spec/spec2 doesn't just hurt the adoption of the tech, it hurts the adoption of the language. Since spec is part of clojure, now the language itself is half-baked, because it leans on a library that's still half-baked. Since we've been waiting 3 years for spec2 no one wants to go and convert code to spec, no one wants to write tutorials about spec. And no one wants to test spec because they know any suggestions they make will be thrown into the pile of "suggestions by clueless users who will be wowed once spec2 comes out"
I guess that's what I'd like to see out of Clojure, more consideration of developer comfort. I've used Clojure for almost 10 years now and the error messages are still a pain to navigate. Due to the lack of leadership and forward movement the community is fractured on areas like logging, component systems, data validation, pattern matching, async programming. Everything is half-baked so everyone uses what's right in their own eyes. In other languages (looking at you C#) you may not have a perfect API, but at least many of these things are standardized so that you have consistency.
And once you solve those issues, I think you'll see more unity in the community which will boost growth. It would be awesome to be able to say "hey, you need logging? Here's how we do that in Clojure, and look it works with the component system, and our test harness uses the same logging". Or perhaps "you provided the wrong config to that component, and look the error for that component uses the same library as the rest of Clojure for data validation, so you now have consistent error messages". Or even just "here's how you stub out a component in tests".
TL;DR - The Clojure community is small, and fragmentation doesn't help unify the community. But without clear leadership on day-to-day programming problems (data validation, components, async, testing, etc.) fragmentation is inevitable.
53
u/alexdmiller Apr 06 '21
As you might imagine, I have a different opinion. Clojure is, by and large, not in need of features. As Rich has said, "Clojure is a small language, and intends to remain so". We have been regularly doing smaller releases, fixing matters of high importance to the community (Java interop for new Java versions, Graal support, etc) based on priorities reflected in ask.clojure. There are several more of those in active work for 1.11. Much of the work happening is outside of core, in places like the Clojure CLI and other things yet to be released. We have lots of ideas (way too many ideas!) and it can take a long time before something gets worked on - the new feature in 1.11 did not take 4 years of course, but it did take about 4-6 weeks of work (a lot more than you might expect) and spawned some other things still in consideration as well. We have increased the team and will probably do so again, and this is going to have an effect on the rate of output over time.
Very small or controlled language communities can have one good answer for every problem. Very large language communities typically have many answers to every problem (or a range of answers with a variety of tradeoffs). Clojure is in the uncanny valley between the two a bit. I (talking for myself here) do not fundamentally believe that the Clojure core team or Cognitect/Nubank can/should provide an answer to every problem you might have when using Clojure or tell people the best way to do every single thing. If you want something better, make it. Write a book. Assemble a set of libraries or a framework. Write a better language and build a community. If that feels overwhelming to you, well yeah.
You pop up every couple years, say everything sucks, and that we don't care, and I find it infuriating tbh. We all get up every single day (8 years for me, many more for others), and keep trying to push things forward. I do not think the word "apathy" means what you think it means.
19
u/daver Apr 06 '21
Alex, I appreciate all the work you do every day, but I do think there are some valid comments in this (as well as some invalid ones). In particular, default choices for broadly cross-cutting concerns (e.g., logging) would help. Clojure.test did this for testing, core.async did this for async work, etc. The act of "blessing" something helps steer people to a common choice unless they have strong motivations for doing it differently. Spec has done the same thing, but I do think it's a fair comment to say that it has stalled (completely stalled out? probably not, but it sure feels like it's on life support). Logging is noticeably absent. The original contrib status met some of this need. I agree that Clojure core should not grow large, but it would be nice if most libraries made the same basic choices for some of these things.
If you remember Scheme in the 1990s, it was really a pain to do anything of real substance. The core language was super small. Too small. Almost everything interesting happened in SRFIs which were supported on a fragmented basis by various implementations or in ad-hoc libraries catering to specific implementations. One reason for Racket's success is that it developed a batteries-included mindset. The core language is still Scheme, but Racket has developed standard ways of doing things within the larger ecosystem.
Surely, Clojure is not Scheme and has already solved many of these issues:
There is basically one version of Clojure for each environment (Java, Javascript, CLR). While there is some interoperability work that is required to write a library that works in both Clojure and ClojureScript, it's bounded and manageable.
The language core is tightly controlled and backward compatibility is valued.
This is a huge leg up. But it still feels like some areas need to be blessed. Logging, for whatever reason, sticks in my craw, as it's always been annoying to mix various libraries and have a spiderweb of adapters and differing formats mixed. In certain other cases, some solutions have won out just by virtue of being first and being well written (e.g., Ring; Compojure, though Reitit feels like it will eventually replace it; Hiccup, yea pretty much anything James Reeves writes :-) ).
Anyway:
I appreciate you and the work you do.
Submitted for your thoughtful consideration.
18
u/alexdmiller Apr 06 '21
Yeah, I think these are good points. I do not think they are necessarily all things that can/should be on the core team's plate. On the flip side, the most common criticism when we do something in any area is that we are blessing something and putting too much weight into something (spec, Clojure CLI, etc). I'm not asking for sympathy, that's just the nature of the tight rope (I went through the identical thing on the community side in the early days of Java). Being embedded in Nubank is actually helpful in some ways of seeing these kinds of problems in the large (Cognitect's consulting work was useful in similar ways more in breadth).
I don't honestly have a good handle on problems around logging (I mean, beyond the problems that have existed in Java logging since forever). This is not an area that I think would be helped by adding something to core (that exact move is partly why Java logging is such a hot mess to begin with). If tools.logging has problems to solve, would be happy to see focused effort there.
spec work is still ongoing and I'm hopeful that it will become a focus again soon. The part that requires decisions is all around spec'ing functions and integration into core defn syntax. This has big ramifications, there are a lot of things to consider, and we're interested in being able to say novel things there too. So, it's hard. There are plenty of options here - Schema, spec, Malli, so evaluate the tradeoffs and pick the tool that's best for the problem you have. This is not going to be a closed space and it's not going to "stop", even when we get to spec 2.
2
u/daver Apr 06 '21
Yes, I can appreciate that it's a balancing act, not wanting to bless anything lest others get angry with your choices.
Maybe the right thing to do it to focus on things like abstract interfaces. IMO, one of Clojure's great strengths is its definition rooted in abstract concepts which can be extended to other implementations.
I sort of think of this as being like roads in the real world. Governments don't pick a specific car and bless that. Rather, they have standardized on the width of lanes and the colors of traffic lights. Car manufacturers have standardized on steering wheels and which pedal goes on the left and the right. That allows manufacturers to build products that fit on roads and for consumers to hop into just about any vehicle and make it go forward.
Anyway, gotta think that through more.
1
u/TheLastSock Apr 07 '21
Your metaphor is exploring that components need to be composable, and standards bodies can enforce that through legislation. Clojure solved (improved) that problem the language which is why we don't have lengthy books about workaround. We can still write code that isnt' composable, but we obviously can't imagine a system where any organization monitors and polices that with penalties.
The penalties is your system becomes hard to manage.
4
u/daver Apr 07 '21 edited Apr 07 '21
Who said anything about penalties? Are you imagining that the Clojure Police are going to send Rich Hickey to your home to break down your door while you sleep? Most standards don't have an enforcement mechanism other than the market. If there is a valid reason to do something non-standard, it's almost always an option to do so. Even with vehicles on roads, everybody has encountered a huge truck with a "WIDE LOAD" sign hanging on the back from time to time. But that exception doesn't negate the fact that most of the time having vehicles adhere to a standard lane width is valuable.
While Clojure has done wonders to foster composability at the language level, there are multiple levels at play here. There are higher level abstractions that need to play nicely together. Going back to the analogy, Clojure's language features are like saying that all nuts and bolts will be metric. That's huge at the level of constructing a vehicle, but it doesn't say anything about whether the vehicle will fit between the lane lines.
Anyway, if you disagree, that's fine. That's the curse of Lisp playing out, I'm afraid.
3
u/TheLastSock Apr 07 '21
I brought up penalties because many standards are upheld by them, and barring that, it's unclear what your suggesting should happen as we have a free market now and I thought you were suggesting something else.
Integrating Clojure libraries tend to be far easier than doing so in other languages because the language has a strong core language and makes the most useful data structures easy to reach for rather than relying on the developer to have to pull them in.
I think I would need to see a specific example rather than an analogy to understand your meaning. I'm not suggesting your not on to something, simply that don't understand what it is.
Re, "the curse of lisp", I have worked in none Clojure shops that end up rolling their own version of preexisting software solutions. Repetition isn't related to Lisp, the reason it's discussed in niche communities is that they feel the need to explain their lack of popularity as if that were the goal, which it isn't.
But from my perspective, interopt is one of the core teams mains concerns, possibly their most important? And I haven't struggled to take advantage of either host ecosystem, which between java and javascript gives me more reach than any other language out there.
1
u/daver Apr 07 '21
Well, most standards are not upheld by penalties. Very few standards are actually mandated by law relative to the number of standards in existence. Many standards are just ignored altogether. So, no, nobody was suggesting penalties. 🙄
1
12
u/seancorfield Apr 06 '21
Isn't some of the issue with logging that Java itself has such a giant mess of logging libraries?
At work, we've tried several approaches over the years (a decade of production Clojure) and we've ended up going back to
clojure.tools.loggingand settled on log4j2 as the implementation. So we use log4j2's "standard bundle" of bridge libraries and a JVM option to tell c.t.l to select that implementation at startup. Done. Problem solved.6
u/daver Apr 06 '21
Yes, some of it is an inherited problem from Java, because it also didn't effectively solve the issue. Then it feels like Clojure created even more layers of indirection. Whenever I approach logging across multiple libraries, it always feels like layers and layers of adapters talking to adapters talking to adapters... Surely, you can get it to work, but it feels more complex than it needs to be. Maybe that's the best I can hope for.
9
u/seancorfield Apr 06 '21
That hasn't been my experience with
clojure.tools.loggingbut it did feel a bit like that with Timbre (which we used for several years and then went back to c.t.l).4
u/zilti Apr 07 '21
For Timbre, all I had to do was to add four thin shim dependencies for the different common JVM logging framework and it automagically worked with everything.
3
u/daver Apr 07 '21
add four thin shim dependencies for the different common JVM logging framework
I think you're making my point. Again, I'm not claiming that it can't be made to work. It can. And does. But why should you need to do this at all? It's pure accidental complexity at the system level. There is no systemic benefit to this. It's all tax and no gain.
2
u/didibus Apr 08 '21
Actually the different logging libs have real differences, mostly in performance, scale, memory use and thread safety. That's why the Java landscape evolved how it did in the first place.
But I can't say I share your beef with logging, there's already a pretty much core offering, clojure.tools.logging, it's pretty standard, just use that, what's the problem? It supports all the main Java logging backends, which if you wanted to pick one, you should use logback or log4j2 due to the considerations I mentioned prior.
1
u/zilti Apr 08 '21
It's all tax and no gain.
I don't see the "tax" really. That is all that's needed to have Timbre manage pretty much everything apart from System.out.println() (which isn't logging), these four deps:
com.fzakaria/slf4j-timbre {:mvn/version "0.3.20"} org.slf4j/log4j-over-slf4j {:mvn/version "1.7.30"} org.slf4j/jul-to-slf4j {:mvn/version "1.7.30"} org.slf4j/jcl-over-slf4j {:mvn/version "1.7.30"}No code, no configuration, just this, and all is handled.
1
u/daver Apr 08 '21
This conversation is turning into the Spam skit from Monty Python.
Me: Have you got anything without spam?
You: Well, there's spam egg sausage and spam, that's not got much spam in it.
2
u/daver Apr 06 '21
I didn't mean to get into a deep discussion of logging, but here we are. ;-) Yea, maybe it's Timbre that's the source of some of my angst.
13
u/adamtait Apr 06 '21
For me, the fact that defacto standards for everything I could hope to do with a programming language do not exist reflects a healthy open source ecosystem.
Take logging. There are real tradeoffs to be considered when choosing mulog over timbre over log4j/logback/sfl4j or console.log. Would you propose building a single library with infinite support for all the tradeoffs that you need to make when deciding how to log. Every significant project I've worked on with Clojure has had different choices around logging.
I love that the Clojure community is broad enough that there are possible alternatives for the real tradeoffs that I need to make in my real project. I don't need a single defacto choice for logging, I need a logging toolchain that fits the system & environment that I want to build (and I need to be able to adapt it). I recognize that this opinion (as well as each system I build) may be a unique one.
As you mentioned, I don't think we should compare Clojure to other languages and their communities because Clojure and it's community are unique. What worked for someone else is not guaranteed to work for Clojure. Instead, (I think) those involved in Clojure should chart their own course.
The Clojure community is a mixed group of veterans and newcomers (according to the survey). The needs and desires of a newcomer may be wildly different to different parts of the community. For someone new to the language, a defacto logging library is likely a huge benefit ("I'm just trying to get my test app to log errors") but to a veteran a community that focuses all their attention on a single logging library is going to be a waste ("I can't use the defacto logging library because it doesn't support Splunk which my company requires. This is a major barrier to adoption of the Clojure language.").
I don't think it's discussed enough but the responsibility for the language, ecosystem and community cannot rest entirely upon the Clojure core team. Clojure has been out in the wild for a long time and the responsibility is now shared. The core team (& Rich, in particular) have a special place in the community but we all need to think of them more as stewards of Clojure (I think they've used this phrase somewhere) rather than the sole voice and final word.
When you look at Rich & the core team as stewards, you see that they help to coach the community in a direction quite effectively and they take on projects that fit with their philosophy of small re-usable things that can't be done without compiler changes.
3
u/TheLastSock Apr 07 '21
To lighten the mode, I'm curious how a library gets blessed. Is it a badge or does a priest need to perform a ritual?
Speaking personally, we establish our problem, search for solutions and implement the one that seems reasonable. A standard is only as useful as it fits your problem, if your bending your problem to fit it, then your trading one set of complexity for another and likely modifying a library into another that the next programmer won't understand anyway.
2
u/daver Apr 07 '21
Yes, but that doesn’t argue against standards, just against useless, constraining standards. Many standards are quite beneficial. Who hasn’t been annoyed at carrying a bunch of international power adapters when traveling. At least there is standardization at the country level. Thank God there was ASCII and later Unicode and UTF-8. Sure, you could interface a library written in EBCIDIC to ASCII, but why?
As for the blessing ritual, I’ll let the core team decide. Maybe we sacrifice a few COBOL programmers.
2
u/TheLastSock Apr 07 '21
thanks for the reply,
I suppose I don't understand what standard is missing. The strength of lisp is that it's composable, the language's responsibility has to stop there, if it goes further what you get are constraints, not standards.
Your examples highlight the critical difference, I have an issue with caring around physical adaptors not software ones. If someone said i could only use certain libraries, it would be an unhelpful constraint with no benefit.
3
u/daver Apr 07 '21
I think I replied on another branch and answered this. The short version is that there are multiple levels of composability in any non-trivial system. The language level is the lowest and Clojure and Lisp generally greatly help with that. But all modern systems are composed of multiple libraries from multiple developers. For common, cross-cutting concerns, it would be helpful if there were "standards" (that sounds too authoritarian and draconian; maybe "common idiomatic solutions" is better) that would help steer library developers into common patterns. For instance, Ring has been great for the web development domain for Clojure. Can you imagine using a router or server that didn't speak Ring? Sure, you could, but why, unless you had a really, really good reason.
1
u/didibus Apr 08 '21
I think it's up to the community to do that, since we're really just talking best practice, framework choice, library choice, etc. The issue is the community is full of people like me who want to do their own thing and are happier that way. People who know what they want and go with that or create their own if it doesn't exist.
This has been an issue with the community for a while, no easy clear choice for newcomers to pick up, new programmers or devs to lean on, etc.
With other languages, the language causes friction if you want to pick what you prefer or make your own if it doesn't exist, but not so in Clojure, every framework and library still works, making your own is generally low effort and can be done pretty fast. So in other languages, people like me have to throw in the towel, and join force with others just to get one framework or one library that even works and does what we need, let alone doing it in my prefered way. That's the issue I think, probably is a part of the Lisp Curse.
In Clojure, it is too easy to have your own opinion and roll with it.
33
u/halgari Apr 06 '21
>> We have lots of ideas (way too many ideas!) and it can take a long time before something gets worked on - the new feature in 1.11 did not take 4 years of course, but it did take about 4-6 weeks of work
It was suggested by Rich in a chat room 4+ years ago (as part of the Cognitect AWS library work) we had this sort of API in spades in that library and were debating if we should add a 2nd arity to every function in the API. The feature suggestion was given a thumbs-up by all involved at the time. But I had never heard of it again until the 1.11 announcement so I had assumed it was decided against for some reason. It's a feature I've wanted for quite some time, so it's awesome that we have it.
>> If you want something better, make it. Write a book. Assemble a set of libraries or a framework. Write a better language and build a community. If that feels overwhelming to you, well yeah.
That's exactly what I did, spent the past 1.5 years renovating the Skyrim modding community writing an OSS app that has been used by 100k people, and a online community of about 50k. That's what's frustrating for me, that energy I spent on that project, I wanted to spend on Clojure. But I got tired of fighting with Rich, got tired of Stu's "hot takes" on twitter, and got tired of filing Jira tickets. I got tired of being asked "why is core.async this way" when I had no power to improve it. I got tired of digging into Spec only to be cut by the sharp edges. I got tired of voicing my concerns, hearing Rich say the exact same things in "Maybe Not" and now in 2021 being left with the same problem: how do I direct my team to validate our data? Spec lacks tooling and Schema is a dead-end.
Not general apathy, no. But apathy for the things that on-the-ground programmers experience outside of Cognitect/Datomic development. Error messages don't matter, because we have the REPL I'm told. Stu has done entire talks about how debuggers and errors don't really matter when you have a REPL and printlns/def. So in essence the entire Clojure style of teaching is "I know best, learn the way of truth, if your experiences differ, you're doing it wrong".
When I bring up this gaslighting, I'm handed emotional retorts in the vein of "why don't you appreciate the work of the core team", or "can't you see how much this frustrates me?". That's just a form of emotional manipulation: my views don't matter because it made someone sad, therefore I should be silent.
9
u/alexdmiller Apr 06 '21
I did not say you should be silent, I did not say anything about "appreciating the core team", and I did not say your views don't matter, so don't put words in my mouth. Saying I don't care about something I spent every day caring about makes me angry, yeah. Hearing that from a former colleague, doubly so.
39
u/halgari Apr 06 '21
When I say "apathy", I do mean that word: "lack of interest, enthusiasm, or concern". Lack of any communication on a subject insinuates a lack of concern about that subject: if it mattered to someone they'd be talking about it. Unfortunately that always seems to devolve into someone accusing me of saying the Clojure team doesn't care at all about Clojure, which is clearly false. And that's where the emotional manipulation comes into play, articles like "OSS isn't about you" are a great example of this. I criticized a workflow designed to optimize Rich's time, wait no I didn't! I explained a workflow and how it worked. And in response, got a verbal lecture on why I shouldn't be so entitled.
So let me cut through all the BS and post something actionable: The community would be greatly served by someone with the power to make decisions on prioritization describing their high-level priorities for Clojure each month. It takes 1-2 hours to write a blog post, but that time would be huge for humanizing the Clojure leadership. 99% of the time I don't care that something is delayed as long as I know why. 5+ years is an insane amount of time for a library to be in development, but we'd all gripe less if we know the complexities of the problem. And I imagine there's a certain amount of rubber ducking that would help as well. Blog posts have a 3-fold benefit: 1) they keep people in-the-know, 2) they provide documentation of the decisions (ADR of sorts) 3) they require a person to be able to express a issue which can help with problem solving.
And before someone goes off saying "how dare you demand that someone spend their time the way you want", I'm just offering this as a suggestion. It would be huge if Alex, Stu, Rich and Fogus all took just 2 hours a month and wrote something about their thoughts about Clojure and what's going on. Offset the articles, and suddenly you have a weekly brain-dump by someone in-the-know. There'd be less confusion on what the direction of Clojure, we'd get to know Fogus more, and I imagine there would be less clamoring for Rich to give a huge talk at the next conference (there was a lot of that in the survey). We all have off-weeks, so when something blows up in Datomic and Clojure wasn't worked on at all, take that time to reflect on something else, prefaced with "got pulled into other things this week, still thinking about X".
No, no-one owes this sort of action to the community...but it would be nice and would help build the community up.
28
u/alexdmiller Apr 06 '21
I did for a while write regularly on insideclojure.org as a weekly-ish journal and it was hard for all the reasons producing anything regularly is hard. It is particularly hard when working on things that are speculative and not public and messy as we thrash through design and decisions (I have at least one thing I've been working on for over a year now like this). With spec 2, we decided to do that work largely in public which has the tradeoff of spending a lot more time explaining things and answering questions about why it's not done yet. There are pros and cons to both.
Fogus and I have been kicking around some ideas though in this vein though.
25
u/daver Apr 06 '21 edited Apr 06 '21
I have to say that your blog was really valuable. Even when it was the "I spent time working on X this week" type. For all the reasons that u/halgari says. I'm an introvert, so I appreciate hammock time and thinking things through, but after some point, it's reasonable for others to ask, "What decision did you finally come to, or were you just asleep?" If the silence goes on too long, people, being people, will start to mutter that you must have been asleep, even if you weren't. On one hand, human nature sucks, but on the other hand, it's the least changeable thing on the planet, as far as I can tell.
12
u/dustingetz Apr 07 '21
idea- record a zoom call on last friday of each month at 4pm and the four of you kick it about clojure for 30 mins, post on youtube send tweet done. it will be scrappy for a bit until you get good at it and then it will be great! complete with zoom screen share and paintbrush
6
3
u/childofsol Apr 07 '21
I love this idea! Matrix.org does something along these lines, albeit much more frequently and also talking to community members about projects. slightly different aims but I think in general it shows how useful a recorded zoom call can be for keeping the community informed about what the core team is working on
https://www.youtube.com/playlist?list=PLl5dnxRMP1hULbP8MYk2noPKFCFyg-SHK
3
10
u/zilti Apr 07 '21
how do I direct my team to validate our data? Spec lacks tooling and Schema is a dead-end.
Malli
2
u/zilti Apr 07 '21
Java interop for new Java versions
Is there? Is that an upcoming thing? I am looking forward to being able to use Clojure functions as Java lambdas.
6
u/alexdmiller Apr 07 '21
We have made a number of updates in other areas and functional interop is one thing on the table for 1.11.
1
u/SimonGray Apr 07 '21
Does it include interop with varargs functions too?
2
u/alexdmiller Apr 07 '21
Yes, also in consideration.
1
u/SimonGray Apr 07 '21
Awesome! That's gotta be one of the most awkward interop situations currently.
2
u/seancorfield Apr 07 '21
I suspect Alex means stuff like this:
https://github.com/clojure/clojure/blob/master/changes.md#21-interop--jvm
12
u/pihkal Apr 06 '21
I second the confusion on why spec is taking so long.
And as long as we're griping... :)
I personally wish longstanding bugs would get a little love. I maintain a personal fork of Clojure solely for an old bug that has been triaged and fixed for years, but the patch has never been applied nor replaced with something better.
7
u/alexdmiller Apr 06 '21
What's the jira/ask.clojure link? I consider maintaining a fork to be a pretty strong form of vote.
3
u/pihkal Apr 06 '21
Thanks, it's CLJ-2065.
I mean, maybe nobody else has really run into it, but I can say it bothers me.
4
u/alexdmiller Apr 06 '21
Thanks, I'll take a look at it. btw, the ask.clojure version is https://ask.clojure.org/index.php/3319/reduce-kv-fails-on-subvec if you haven't yet voted there.
1
10
u/alexdmiller Apr 06 '21
It's taking so long because a) the problem is hard, b) the potential impact on core syntax (defn) is large, and c) Rich is a finite, vastly over-scheduled resource.
12
u/p1ng313 Apr 06 '21
I don't know Rich, but is he the only one who can figure it out? It's an honest question; I'm sure he probably is the most qualified.
And to be honest, part of the issues with clojure are more of social nature; what I think most people who work with clojure for a couple of years dislike, is the apparent lack of sync between what the community wants and what the core team does. Of course, you guys don't owe the community anything, but you are implicitly running a community whether you want it or not.
5
Apr 07 '21
Yeah, I feel some of that too.
I think the forum ettiquite effectively discourages speculation and exploration.
It's for people who make things. Implied in that is that the person who has the idea should act or say silent.
I guess the challenge for "users" is how to contribute and feel confidence in the direction without weighing down our reclusive maker overlords.
PS. I'm nervous that these conversations are sensitive topics close to the hearts of people whose ongoing efforts I greatly appreciate. I hope this comment won't offend due to a flippant turn of phrase - please assume ignorance over malice.
5
u/alexdmiller Apr 07 '21
It's also for people who use things. A perfectly good topic is "I want to do X and I don't know how / I don't think it exists". We very much want to hear those things. It's only by collecting symptoms and needs that we get to problems and ultimately solutions. I do not think that the etiquette implies that people with ideas should be silent, but I'm sure it could be improved.
https://ask.clojure.org is a great place to describe a need or a problem, and ideas for solutions. Voting lets others indicate they also have the problem. Many times people have a problem X, think of a solution Y, and then say "just add Y" (I think this is what is meant by telling people what ought to be made). The best kinds of things to put on Ask Clojure are the original problem X. It's ok to also describe an idea Y, but without knowing the problem X, it's difficult to generate other potential solutions and evaluate their suitability.
2
u/alexdmiller Apr 07 '21
We now have a system for users to voice opinions (https://ask.clojure.org) and vote on things, and have been working on addressing some of the highest voted items in each release). The intent of this is exactly to respond to what the community wants and needs. We are of course not *only* following the votes, but we are paying a lot of attention to it and 1.11 will see several highly voted things addressed.
7
u/dragandj Apr 07 '21
Byt let's not forget that Clojure (and Lisp in general) allows any user to build their own solution for almost anything without being constrained by the (small-ish) language. Except for a tiny subset of things that have to be in the core language, me, you, or anyone else can implement a library that scratches their itch. You don't need any permission or support from Cognitect or Rich to do that. That's why I don't understand much of this fuss whenever someone says "oh, Rich didn't agree with me". So what, why anyone has to agree with me? I can implement whatever I wish, and anyone else can do their own thing. If their thing is better, I'll gladly learn from them. If my thing is better, I can happily continue with it.
10
u/SimonGray Apr 07 '21 edited Apr 07 '21
I think people just find it odd that popular Cognitect libraries end up languishing like this. When they're popular you would think more resources would be spent developing or maintaining them than is the case.
In the case of Clojure Spec, it successfully "killed" Schema at the time as the main solution for data validation, probably since it's a core library. Since it was heavily promoted by Cognitect, it was also adopted very fast, despite quickly being recast as an "alpha" project. Then it has just seemingly languished for many years while Rich Hickey and others involved are doing their hammock time and it has still not been taken out of alpha.
And it really has been taking a very long time, hasn't it? It's not that odd that people are noticing that fact. Rich Hickey and Cognitect put themselves in a position where they value API stability to such a degree that they have to mark many things as alpha or merely some step on the way towards a greater goal -- and I do find that commendable. Meanwhile, Metosin is pushing out new Malli releases like it's nothing, taking PRs through Github, expanding the feature set, and fixing things that people dislike about Spec.
My guess is that Malli over time will become the de facto standard for most of the things that people used Spec for, since Spec is treated more like a research project by Cognitect than a library to be used by the Clojure community. Similarly, I use Pedestal (and I enjoy it) but development of that library is also languishing. Meanwhile Metosin is making a collection of libraries (sieppari, reitit) that are - the way I see things - basically aimed at replacing Pedestal.
So Metosin (and contributors) are able to do this, but Cognitect is not despite its headstart? Why is that the case? It's a bit strange.
7
u/halgari Apr 07 '21
The best is the enemy of the good. In a lot of software development you'll find a 80/20 rule. A small amount of work can solve 80% of the problem space, the additional 20% may take 10-100x as long to develop. Unfortunately, IMO, spec falls prey to ignoring this, and tries to do : data validation, data generation, automatic test generation, documentation, macro error explanation all as one library. When the full problem set wasn't solved by spec, spec2 was designed, so that's taking 100x as long to develop.
Spec started as just a way to get better error messages from macros, now it's kindof in feature-creep. Which I think is unfortunate, because Clojure itself follows the 80/20 rule. We get most of the lisp we want from Clojure, but give up TCO, native compilation, etc. because those would have taken 100x the time to develop.
So other libs step up and do the 80% or 50% (just data validation) and get a lot done in less time.
8
u/alexdmiller Apr 07 '21
spec 2 is not taking 100x longer. So far, I think we've spent less actual work time on spec 2 than we spent on spec 1. But work time != calendar time because we are also working on 20 other things.
spec 1 is a fully available thing, as are Schema, Malli, etc. I don't understand why anyone feels a need to wait for spec 2. As with all dev, pick the best option, add whatever you need where it's not exactly sufficient, and move on. At some point, there are new options and you can make new decisions.
1
u/slifin Apr 09 '21
I know I used to conflate types with spec a lot, then watching the speculation talk didn't help matters because I think it unintentionally ties the two by talking down types and talking up spec 2
6
u/dragandj Apr 07 '21
So Metosin (and contributors) are able to do this, but Cognitect is not despite its headstart? Why is that the case? It's a bit strange.
But why would that be a problem for you, me, or anyone outside Cognitect? What's important is that anyone (Metosin in this case) can come up with a good solution and we can happily use it to solve our problems without having to care whether Cognitect is going to to something or not.
10
u/SimonGray Apr 07 '21
It's a problem because many people enthusiastically embraced Clojure Spec when it first came out, since it was promoted as an official Rich Hickey-designed Clojure Core library and was blessed with several RH talks and talks by other prominent Cognitecters over the years. Then people slowly realised that it was destined to be in some kind of eternal alpha state. If Cognitect were more upfront about the fact that it would be treated as a longterm research project from the beginning, I'm not sure the uptake would have been as strong as it was.
I'm a huge proponent of Clojure, but come on, it's not that hard to see why people are bit miffed about the way things have turned out. It's great that we have an alternative now in Malli, but that's not what this is about.
4
u/alexdmiller Apr 07 '21
Why do you think we knew how things would go when we released spec 1?
4
u/SimonGray Apr 07 '21
I don't think anyone can predict the future, but your comments here about Spec and some other more recent discussions definitely have a very different tone than the older Spec talks I've seen by you, Rich Hickey, David Nolen, and others which were a lot more promotional in tone. There is a very noticeable contrast between how Spec was talked about in the beginning and how its development seems to have been put on the back burner in recent years. You get the sense that Spec has become a Gordian Knot.
→ More replies (0)3
u/didibus Apr 08 '21
I heavily use Spec in production on all my projects. It's been great! I haven't checked Malli yet, but it doesn't seem to improve on anything I care about. Honestly it seems to have a different use case, which is more similar to the use case Schema had, and one I don't use Specs for (or Malli or Schema), which is external API definition, validation and coercion.
I think most people don't understand Spec that much, I don't see a specification the same as a schema. The cool things of Spec seem to have flown over people's head: field level specification, function specification, instrumentation and generative testing, multi-specs, open specifications, data conformance, property assertions (fn spec), compile time macro call spec validation, and predicate based (not types).
Everything cool about Malli was pretty much inspired from Spec. Malli is just a fresh coat of paint (though with allowing for better composition and code gen because it went with data over macros). I don't think you'd have Malli without Spec.
Anyways, in any case, you could argue Spec's mistake was to exist as a core library in the first place. But it had a good reason to do so, automatic spec validation of macros, this is probably what drove it on core. Maybe it led to confusion, and should have been released more as a contrib type of thing such as core.async. I'm still pretty stoked about it, and it's ideas have pushed the Clojure community further beyond. I personally use it for a lot of things and it's been indispensable, not sure what issues most others have with it.
3
u/Crazy_Comprehensive Apr 08 '21
I dread if Clojure's fate lies with the creator only. If creator not around (touch wood), wonder if clojure go with him ? Frankly I like what scala creator Martin Odersky help to make scala popular by constantly engaging and leading community with discussion and on the language's future openly, and this enlighten me that Martin does not have answer to all Scala's question but admittedly bring up the issue to leverage on community for solution and suggestion. Because it is not just the language release that community enjoy, but also the process and learning that goes with development of the language and ecosystem as well. It is not that current clojure community is not up to mark , it is just that Scala is excellent in this regard and a lot can be learnt from it.
4
u/didibus Apr 08 '21
Honestly, I'm not sure what "the community" wants is a real thing. Ton of people using Clojure heavily in large production systems don't really want much, which is pretty obvious by having error messages be the number one thing to improve, cause everyone past being a beginner doesn't have much they really need, Clojure already delivers a lot.
So I really don't know if anyone can speak for "the community". You get vocal people and they probably give a false impression.
7
u/seancorfield Apr 06 '21
Because Spec is a hard problem to solve "properly". Spec is also one of the few situations where the core team has released something (albeit still marked alpha) and then learned from experience that it doesn't solve the problems they were aiming for in the way they were hoping. Spec2 has some big improvements, conceptually, over Spec but there's still one big area that Rich is still working through "in the hammock" (and that's the whole interaction of
defnand Spec together).We've been heavy users of Spec since it was first released and we're happy enough with it -- but we are also looking forward to Spec2, when Rich feels the design is locked down enough to complete the work on it.
3
u/dustingetz Apr 06 '21
The idea of spec being a hard problem actually explains a lot, Clojure's users are here for the complete solution to enterprise information systems development, and we want it now!
No competing ecosystem is really even half as close as Clojure in the search of such a solution should one exist, Clojure is the best there is! (especially when factoring in real world externalities)
8
u/dustingetz Apr 06 '21 edited Apr 06 '21
I think this is a funding issue, to solve it you need a high growth business model, looks like banking is it so hopefully we start to see the impact of the acquisition ... i know since December Cognitect/Datomic has been posting job posts on twitter ... seams reasonable that with now 700 clojure devs Nubank can afford to put 20 people on infrastructure ... for comparison, at Microsoft just the VSCode team has 20 engineers [*can't find citation for this]
8
u/danielglauser Apr 06 '21
Hey there u/halgari! Regarding data validation the team I've been working with has recently adopted https://github.com/metosin/malli. Folks love it. It works really well for our data validation (YMMV) and has saved us a ton of time handling errors with our API calls. I'm not sure if you've had the chance but I suggest checking it out.
14
Apr 06 '21 edited Apr 06 '21
Why don't the survey results discuss the challenges Clojure is facing?
"Not everything is awesome" - Rich Hickey
5
Apr 07 '21
Tbh I do feel somewhat sad that the number of respondents is pretty much flat since 2018. I hope that Clojure being now backed by a big company and open source developers being funded too will help adoption, specially by new companies.
1
u/SimonGray Apr 07 '21
You can't really tell much from the number of respondents. You need about as many as Alex is managing to get right now to make it statistically significant.
The big StackOverflow survey has been getting fewer responses since 2018. Doesn't really mean anything at all. It's getting enough to get a picture of what developers are spending time on.
4
u/didibus Apr 08 '21
I think serverless should be retracted from the post, unless I misread the data, only 1% are using Clojure for serverless use, and I think I know why, Clojure slow start times are a major hurdle for serverless, Google Cloud Functions, AWS Lambdas and Azure Functions all require fast startup to be used effectively. In fact, it's an aspect I'm curious about, what can Clojure do to be more competitive on that front? I know you could use ClojureScript instead, though even that doesn't have that fast startup, the best I've seen is GraalVM native image compilation, but that seems to have some ways to go and it's all dependent on Oracle to make progress and not charge for the good parts of it.
1
u/coltnz Apr 08 '21
I think some of the community angst, as exhibited in this thread, would be assuaged by a Clojure equivalent of the PEP process from Python. Would be great to know if that's still on the cards. It's been hinted at a few times.
The reality is, the bulk of the community has little to offer Core development, but that's not case for the Christophe Grandes and Michał Marczyks of this world.
2
u/alexdmiller Apr 09 '21
I don't expect that we will have a PEP style process anytime soon. Ask Clojure is our process to receive input and votes from the community about needs. We talk to the Christophe Grands and Michał Marczyks of the world about things when needed. :)
23
u/mcorbin Apr 06 '21
"Error messages" first again for the "What has been the biggest obstacle to using Clojure?" question (40,26 %). I'm wondering how we could solve this issue.