24 ms·
Why did Clojure gain so much popularity?
- k__ 8y agoHow much did it get?
- lincpa 8y agoClojure is a functional programming language based on relational database theory. The Clojure system can be treated as a RMDB using the Lisp language, RMDB Schema (Clojure Spec) is a static type, and SQL (LISP) is a dynamic type. It is an example of the best combination of dynamic and static types. It's innovation, simple, practical and reliable. https://github.com/linpengcheng/PurefunctionPipelineDataflow/blob/master/doc/Clojure_is_FP_based_on_RMDB.md https://github.com/linpengcheng/PurefunctionPipelineDataflow...
- sandGorgon 8y agocould you elaborate on that ? how is it based on relational DB ?
- lincpa 8y agoClojure -> DBMS, Super Foxpro STM -> Transaction,MVCC Persistent Collections -> db, table, col hash-map -> indexed data Watch -> trigger, log Spec -> constraint Core API -> SQL, Built-in function function -> Stored Procedure Meta Data -> System Table In the latest spec2, spec is more like RMDB. see: https://github.com/clojure/spec-alpha2/wiki/Schema-and-select https://github.com/clojure/spec-alpha2/wiki/Schema-and-selec... The main development goal of clojure is to write the database. The development idea is actually from the database, not the FP. With reference to the database, as long as I use spec to strictly define (standardization) the core data model, I can ensure the correctness of the system. I've turned the traditional work of ensuring code correctness from in-code type system validation to data self-validation. Turn the work into verifying the core data model instead of validating the input and output data types of the function. Similar to industry, verify that all finished products meet the standards before entering the warehouse. Also similar to databases, verify their compliance before data enters the database. That is "Data as a service, Warehouse as the core, operates around it". A system requires only a few core data models, and development is built around the core data model. Persistent data structures ensure that the modification of the immutable big data model are high performance and memory efficient. In addition, using my pure function pipeline data stream (https://github.com/linpengcheng/PurefunctionPipelineDataflow https://github.com/linpengcheng/PurefunctionPipelineDataflow) makes debugging, parallelism and extension very simple. from: https://github.com/linpengcheng/PurefunctionPipelineDataflow/blob/master/doc/Clojure_is_FP_based_on_RMDB.md https://github.com/linpengcheng/PurefunctionPipelineDataflow...
- weavejester 8y agoThe main development goal of clojure is to write the database. The development idea is actually from the database, not the FP. This seems a tenuous theory. Clojure has been described as a language for data processing, but this isn't the same as basing the design on relational databases. Clojure isn't even relational; its data is generally kept in standard collection types, rather than relations. I'd describe Clojure as a dynamically typed, functional Lisp that emphisizes open data models and explicit time.
- lincpa 8y agoI think that mapping the data type of Clojure to the RMDB data model can achieve RMDB theory, simple operation, convenient viewing, high performance, and reliable results. I think the open data model is not an excellent and safe engineering practice. Map to static type RMDB schema, similar to RMDB with schema and data as the core, with sql operation, simple and reliable. Unrestricted open data model + dynamic type is not a good combination for constructing a complex large system.
- collyw 8y agoits data is generally kept in standard collection types, rather than relations. Isn't that the same as relational databases once you dig a layer deeper?
- cgrand-net 8y agoNo, it's hierarchical (because we nest collection types) vs relational.
- lincpa 8y agoIn RMDB(For example postgresql), Database is hierarchical nest collection types. It is also consistent with Clojure. ```clojure {:table01 {:row01 {:col-array [0 1 2] :col-json "{\"a\": \"Hello\"}" :col-text "abc"} :row02 {}} :table02 {:row01 {} :row02 {}}} ``` In addition, postgresql supports inheritance, which is also hierarchical nest collection types.
- throw03172019 8y agoDid it though? Most of the time when I mention Clojure, people think I mean “closures”. Our whole stack is Clojure/Clojurescript. Clojure has helped reduce bugs and improve stability across the board. I enjoy writing it everyday and wish more people would give it a shot.
- Touche 8y agoCompared to lisps before it, yep it did.
- yogthos 8y agoI don't think Clojure needs to boil the ocean to be successful. We already have a community of many thousands of developers with lots of very smart people in it. At this point there's enough mind share to keep it going indefinitely. At the same time Clojure benefits from being a hosted language. We don't have to build everything from scratch, instead we leverage two of the biggest ecosystems and reap all the benefits for free. It's still a very niche language to be sure, but from what I've seen there has been a lot of commercial adoption in the last couple of years. There are new a few consulting companies, such as JUXT and Metosin, that are focusing exclusively on Clojure consulting. A lot of the libraries in the ecosystem are now maintained by these companies as opposed to individuals. There are also efforts like Clojurists Together for funding Clojure projects sustainably. These efforts would not have been possible without growing commercial use with companies willing to donate money. So more companies using Clojure directly leads to a better ecosystem, and that in turn makes the language more attractive. The state of tooling and libraries is dramatically better today than it was even a couple of years go. I'm excited to see how the ecosystem grows this year. One of the projects I'm most excited about is https://cljdoc.org/ https://cljdoc.org/ which aims to provide a one stop shop for polished Clojure library documentation. I just saw a presentation about it at Clojure North, and I was very impressed with where it's at already.
- throw03172019 8y agoThanks for your reply. I am very glad to hear this! Cljdoc looks great as well - much needed :) Btw, thank you for all your open source projects and comments on various GitHub repos.
- furgooswft13 8y ago> But that's not how programming being taught and mentored today - it's more like "steal it from StackOverflow, adjust it to your needs. Do what everyone is doing. It's okay to follow the hype". Oof. So true, I hate this field. But I guess you could say similar of almost anything. Maybe I just hate humanity.
- deleted 8y ago[deleted]
- Jach 8y agoSoft-misanthropy is healthy enough, just as long as you don't go full-misanthrope. I hope. You left out the immediately following bit, "Experienced software developers don't chase the hype". I cringed. But maybe if my interpretation of the overall point is correct, I can agree with a point that Clojure attracts grumpy programmers who have Seen Things and gives little lip service to beginning devs.
- lugg 8y agoWhy cringe? Hype creates burnout. The churn is absolutely untenable in the UI space right now and hasn't shown signs of slowing down anytime soon. Where I work we have 3-4 different ways of accessing our monolithic backend, and on top of that 3-4 different ways of accessing and manipulating application state. It drives me up the fucking wall. I'm not sure I agree with the little lip service statement. I feel like the feelings are most likely mutual. Stable systems that don't need constant heroism and don't diverge much from original choices made at the architecture level don't make for good places for juniors to make mistakes and learn from them.
- Jach 8y agoI cringed because it's not my experience that experienced devs are immune to hype, it's an orthogonal characteristic. I also find it somewhat logically inconsistent for there to exist a push for teaching/mentoring The Way of the Hype if seniors haven't bought into it themselves.
- refset 8y agoFor me it was the draw of Datomic and DataScript. Clojure is a neat language, but I feel like how we store, retrieve and transmit data is vastly more important.
- mschaef 8y ago> ...how we store, retrieve and transmit data is vastly more important. Agreed. Data storage and transmission formats have the potential to dramatically outlast the modules where they originate. This is in large part because these things represent commitments to others, where the internal design (or implementation language) of a specific module really doesn't. So, these days I tend to be much more interested in the design at the interface level than anywhere else. This works both for and against languages like Clojure. It works for it, to the extent that fewer people have to care what you use when you're building the innards of something. Against it to the extent that it can put a potentially relatively low bound on the gain that can be realized through the use of better (?) tooling like Clojure. (There's also something to be said for the fact that languages like Clojure tend to snowball in my experience better than other languages. A single program written in Clojure is nice, but it's in the ecosystem/network effects where it really pays off... and that takes a lot of time to see. More than most people take.)
- ilikehurdles 8y agoTake a peek at Crux from Juxt. Really exciting times happening on the data front.
- iagooar 8y agoTo be perfectly honest, Clojure's biggest mistake, from my point of view, was to be so heavily JVM-dependent. Yes, in certain environments Java is king and a ton of people use it, it's battle-proven, etc. But so are other stacks. Clojure, as a programming language, sparks a lot of joy and is a lot of fun to use and reason about. Yet in reality, when working in a production environment, you're basically fighting the always-memory-hungry JVM. Just give me Clojure running on BEAM and I'll take it over anything in this world.
- f3r3nc 8y agohttps://github.com/clojerl/clojerl https://github.com/clojerl/clojerl
- lincpa 8y agoClojure for the Erlang VM 1. clojerl language: https://github.com/clojerl/clojerl https://github.com/clojerl/clojerl 2. kapok language: https://github.com/kapok-lang/kapok https://github.com/kapok-lang/kapok
- shivekkhurana 8y agoClojureScript can run on Node.js and the Browser.
- Touche 8y ago"can run" is much different from "the default environment". There's a big noticeable difference.
- paultopia 8y agoAbsence of syntax! I really wish every language were a lisp. Like, Rust, the lisp, Swift, the lisp. Who needs rules of precedence and associativity and statements vs expressions and all the other stuff that languages that aren't lisps impose on you? Just stick an expression in some parentheses! And then put that in another expression!
- mschaef 8y agoAbsence? There's absolutely syntax in Clojure. 1) Lexemes have a specific structure. 2) Core data types have a specific syntax (representable with a grammar). 3) The data types used to represent programming constructs also have a specific set of syntactic rules by which they are assembled. It's a different kind of syntax than the usual - more raw/direct, perhaps - but it's a misconception to say there is an absence of syntax. A big part of the reason I mention this is that the nature of Lisp's syntax is one of its biggest strengths.
- paultopia 8y agoFair enough. I was aiming for a non-technical use of the term "syntax" more or less tracking the cognitive burden of remembering and parsing out the relationship between symbols for the programmer. Like, putting s-expressions in the front seat feels like a much lower cognitive load to me than, for example, all the stuff you have to think about writing, or, god help you, reading, pointfree haskell or line noise perl
- deleted 8y ago[deleted]
- LandR 8y agoYes, there is syntax, but there is a lot less noise and syntactic bureaucracy compared to other languges.
- sevensor 8y agoYes please. Like the sibling comment says, it's definitely a syntax, but what a lovely syntax it is! Like a master key unlocking program structure. When I'm studying other functional languages, I find that the best way to make sense of their syntax is to figure out where the parentheses should go.
- krn 8y agoInterestingly, Clojure is associated with the highest salaries worldwide[1], and is used by developers with the most years of professional coding experience[2], according to the StackOverflow Developer Survey 2019. [1] https://insights.stackoverflow.com/survey/2019#technology-_-what-languages-are-associated-with-the-highest-salaries-worldwide https://insights.stackoverflow.com/survey/2019#technology-_-... [2] https://insights.stackoverflow.com/survey/2019#developer-profile-_-years-coding-professionally https://insights.stackoverflow.com/survey/2019#developer-pro...
- sandyarmstrong 8y agoSo what you're saying is, if you look at a language that is only used by people with many years of professional experience, then salaries will be higher compared to a language used by many entry level learners? I think Clojure is awesome and have used it for some projects but I also think that causal relationships in the SO survey are often completely misunderstood.
- krn 8y ago> So what you're saying is, if you look at a language that is only used by people with many years of professional experience, then salaries will be higher compared to a language used by many entry level learners? I think in practice most less experienced developers cannot justify investing their time in such a niche programming language as Clojure. It's not like Clojure developers are paid best because they are the most experienced. It's because they could afford the time to master a programming language with very little demand on the job market.
- dan-robertson 8y agoThese surveys seem (increasingly) biased towards certain types of development. Specifically, web development. I couldn’t find a single language I regularly or irregularly use on this page (the closest thing I could find is Emacs). Also the sample size for Clojure developers is smaller than other languages. It’s not obvious to me why the bar should be raised at a certain point (e.g. letting in slightly niche Clojure programmers but not other more niche things). I don’t want to imply that these surveys are rubbish, just that I do not think they give the whole picture
- room271 8y agoClojure is particularly well suited - at least Rich Hickey would claim - to real world applications with unsafe or unstructured inputs. I.e. complex programs that receive or pull data from external and loosely-typed sources. A lot of web programming falls into this category. Why is it well suited to these? Because it is dynamic, and offers rich runtime solutions to validation (Spec), has immutable data structures, safe and relatively simple concurrency primitives, and has the expressivity of a lisp. It also has access to the vast array of JVM libraries which helped early adoption (but possibly hindered it in the longer term?!).
- cutler 8y agoAlthough I love working with Clojure more than any other language it's relationship with its host is somewhat schizophrenic. Calling Java classes from carefully-crafted functional code is like pouring tomato ketchup over a lemon sorbet. Thankfully there are about 23,000 pure Clojure libraries at clojars.org to help my Clojure code stay functional.
- stingraycharles 8y agoIt depends on what your requirements are. Through the years, I found it easier to write reliable code by just skipping the Clojure wrapper libraries (e.g. using Kafka directly rather than a wrapper): it's easier to "escape" into functionality the wrapper doesn't offer, and it's typically more performant as well.
- shay_ker 8y agoClojure is popular? It's at the bottom: https://insights.stackoverflow.com/survey/2019#technology https://insights.stackoverflow.com/survey/2019#technology As much as I love Clojure, it's still a harrowing language for beginners to learn and use. The learning curve is just too high. If you have to learn category theory in other to handle basic programming flows, then there's just something wrong. Elixir, for instance, has many functional primitives, but isn't dogmatic about it. It can "feel" like traditional OO-style programming without the cruft.
- dragandj 8y agoHow the heck Clojure has any relation to category theory? Clojure explicitly does NOT require nor use any explicit CT. Maybe you confused Clojure with Haskell?
- shay_ker 8y agoPerhaps my understanding is outdated! IIRC you needed CT because you couldn't do some basic conditional flow things, but I could be wrong. It's been a while.
- LandR 8y agoI dont think you need Category Theory to understand / use Clojure at all. I say this as someone who uses CLojure and has at best a very sleight understanding of category theory.
- projectileboy 8y agoWith respect, I think you may be confusing Clojure with a different language.
- jakeinspace 8y agoPlease don't disparage that which you do not know. You must be confusing Clojure with Haskell, it requires no category theory.
- iLemming 8y ago
- armitron 8y agoThe thing that kills Clojure for a lot of teams I worked with is the JVM. It's too limiting and constrains the problems one can solve.
- synthc 8y agoWhat problems did you run into where the JVM was the limiting factor?
- iLemming 8y agoWhenever I ask to explain JVM criticism, people either really have nothing to say, or most of the time it turns out to be hatred of Java. JVM is a very solid piece of tech and it is hated for all the wrong reasons. I'm baffled: give people a powerful tool that can simplify and bring enormous joy to work with two, most popular platforms of all time, even making it possible to share code between completely different worlds - they'd still be complaining about it.
- throwawaywlabs 8y agoI work at Walmart Labs. Clojure is super popular[1] in Walmart Labs. Clojure is fun and importantly it is a very productive language to work with. This gain in productivity comes from less state, thus easy to debug and fix, and functional approach, so the functions do what exactly what they are supposed to and there are no hidden surprises. Less state or immutability means concurrency is easy. Easy concurrency means we can scale[2] applications with ease. I mean ease of development. It takes less work, less mental effort to take something that works for a single thread and make it work in a multithreaded and/or distributed manner over hundreds of thousands of cores. Debugging is easy too. P1 incidents for a microservices written in Clojure takes less time to debug compared to those written in other languages. So no wonder most of our mission critical services are written in Clojure. For a complex environment where thousands of microservices are deployed on hundreds of thousands of computes, Clojure has been super successful.[3] [1]: https://github.com/walmartlabs?language=clojure https://github.com/walmartlabs?language=clojure [2]: http://blog.cognitect.com/blog/2015/6/30/walmart-runs-clojure-at-scale http://blog.cognitect.com/blog/2015/6/30/walmart-runs-clojur... [3]: https://clojure.org/community/success_stories https://clojure.org/community/success_stories
- brlewis 8y agoOne big reason why running on the JVM was a success factor for Clojure was that in Java, concurrency is hard.
- Jach 8y agoConcurrency is hard anyway, but in Java it's considerably easier than it could have been (I'm thinking C++) given you know that java.util.concurrent exists and have a handy reference to the relevant book. Even having 'synchronized' as a primitive keyword has its benefits... But Java wasn't born with java.util.concurrent, Clojure had the benefit of being able to follow (IMO) one of Perl's laudable principles of "easy things should be easy, and hard things should be possible" and build the language with the assumption of being on top of a rather high quality set of existing concurrency primitives.
- 8y ago
- _pmf_ 8y agoFor me, Clojure was full of false promises and dead ends / false starts regarding concurrency[0]. Elixir delivers where Clojure failed. [0] for example, nobody uses the STM implementation
- weavejester 8y agoWhere did Clojure fail? People don't use Clojure's STM because it turned out not to be necessary most of the time, not because of any inherent issue with the implementation.
- iLemming 8y agoCome back when you are ready to use Clojure for real, not for a weekend reading through tutorial blogs. Clojure's concurrency story is extremely well implemented.
- dwhitney 8y agoRich Hickey gives the best talks. It's that simple.
- Scarbutt 8y agoWas that a pun? ;)
- karmakaze 8y agoI attribute it to two things. It's the least lisp-y of the lisps meaning it came with so much that you didn't have/want to make a (different) dsl on every project. The second is the jvm: partly from interoperability but even more so from being just another jvm language with packaging/deployment and some ops already paved.
- billfruit 8y agoI thought that Clojure was losing its buzz in recent times. Perhaps it is that even though the core language is elegant its ecosystem of leiningen, maven for dependencies, etc, and the whole brittle emacs-cider-nrepl chain is detracting from its core strengths. And poor startup times, and unhelpful error messages (though I hear there has been some improvement in recent versions).
- maxgiraldo 8y agoI can't speak about lein or maven, but it is in no way a requirement to use emacs as your editor. In fact, there is really interesting work going on in other editors like Atom with proto-repl[1]. For the web, you can spin up a Gorilla REPL[2] which basically gives you a Jupyter notebook but for Clojure. [1] https://atom.io/packages/proto-repl https://atom.io/packages/proto-repl [2] http://gorilla-repl.org/ http://gorilla-repl.org/
- billfruit 8y agoI thought the emacs tooling depended upon leiningen.
- KingMob 8y agoNo. It depends on a library called nREPL, but you can start that in multiple ways (the other candidates being tools.deps and Boot)
- didibus 8y agoNo it doesn't. It depends on nRepl. Personally, I find maven repos and lein to be one of the better dependency/build ecosystem of any language. So I disagree with your premise. But, if you don't like them, there's a lot of alternatives. For dependency management, there's now an official one, maintained and bundled with Clojure, called `tools.deps`. It supports multiple providers, currently maven repos, git repos and local folders. For build tasks, appart from Lein, you can use Boot or Gradle. But there's a new trend now to rely on individual Clojure programs as the foundation for build tasks, which are then packaged and distributed through `tools.deps`. You can see their full list here: https://github.com/clojure/tools.deps.alpha/wiki/Tools https://github.com/clojure/tools.deps.alpha/wiki/Tools In the ClojureScript world, there are less build options, but `shadow-cljs` has emerged as a replacement for Lein, and gained a lot of popularity, because it integrates transparently with npm.
- maleghast 8y agoAdd onto the very real facility for being a highly reliable and productive tool for doing data acquisition, transformation and distribution it makes programming FUN!
- elamje 8y agoI love clojure. Would it be possible to get it running on a rust runtime? That would be awesome
- yingw787 8y agoI'm doing a series on concurrency models at the moment for personal professional development, and I recently reviewed Clojure and its native ability to separate identity from state. It's a very properties-based and specifications-based language, and the thing about properties and specifications of languages are that they're nigh impossible to retrofit at a later point in time. Other languages need to have external tooling or frameworks on top for things Clojure supports out of the box, and even then those frameworks may not be as reliable as something guaranteed on a language level. It's actually a pretty sizable moat. Python broke encodings between 2 and 3 and split the community for at least a decade. Some companies will likely never be able to migrate from Python 2 to Python 3. Now imagine breaking now `dict` works. https://bytes.yingw787.com/posts/2019/01/26/concurrency_with_python_identity_and_state/ https://bytes.yingw787.com/posts/2019/01/26/concurrency_with...
- amai 8y agoIt didn‘t gain any popularity with me, since I had to debug it once. Most Clojure code is just a collection of overly clever recursive subroutines. In the end I rewrote the code in Java. It was shorter, easier to read and probably more performant than the same code in Clojure. Don‘t believe the hype. Clojure has some nice constructs for concurrent programming, but most of them are available also in Java since version 8, or are available as some external package. In the end programming in Clojure will just make your project more expensive, as good Clojure programmer are a rare species. The small advantages of smart Clojure constructs won‘t outweight the costs of maintaining Clojure code in the long run. The same is actually true for Scala.
- crimsonalucard 8y agoJava didn't gain any popularity with me. I prefer Basic. Basic syntax is significantly less complicated than java and none of that overly clever object orientation making the code more readable and more performant. Don't believe the hype.
- fnordsensei 8y agoI'm not sure you would end up with a good or accurate impression of any language where the extent of your Interaction with it were "I had to debug it once".
- yogthos 8y agoI'm sorry, but as somebody who's been working with Clojure professionally for nearly a decade I have to say that this is just utter nonsense.
- cutler 8y agoClojure suffers from a lack of ambition, at least as far as adoption is concerned, and I think that's why many leave the community. Rich Hickey is more than happy with Clojure's current reach which says everything when you look at Clojure's abysmal level of adoption. It could be argued that Matz and Rich are both similarly idealistic language designers but Matz recognises the danger of Ruby being left behind without improvements to the language and Ruby's community is already much bigger than Clojure's. Although there's Luminus web frameworks are generally frowned upon in Clojure-land which concedes mindshare to other languages which recognise the importance of frameworks and killer apps. With so many languages competing for mindshare it is that much easier today for a language, however original and superior, to be sidelined by paying customers. For developers looking for a language which will also help pay the bills Clojure is unfortunately not an option.
- didibus 8y agoWell, its got a chicken and egg problem here. The chickens, experienced Clojure devs, don't need a framework, and are easily able to do whatever they want and use Clojure to pay their bills. Thus they're not motivated to build frameworks. On the other hand, the eggs, devs unfamiliar to Clojure, find it difficult to get anything done in Clojure, and are looking for frameworks that abstract away some of the expertise needed to manage a full Clojure web app. They're hoping they can start using it to pay their bills before they become an expert in it, through the use of a framework. I'm not sure how the future will unfold here.
- yogthos 8y agoThe way we build web apps is changing away from back-end frameworks in general. Things like micro-services are a good example of that. Traditionally, web was all about serving static documents, and server side rendering model is a perfect fit for that. However, nowadays we also have web apps that are highly interactive. This requires moving away from the thin client model. Server-side rendering approach is inherently at odds with that because HTTP is a stateless protocol. So, the modern way to write web apps is to have a thick client that manages things like views, business logic, and state in one place. With this approach you no longer need a complex framework on the back-end because vast majority of the complexity moves to the client. The server is mostly responsible for things like data governance. The other driver here is horizontal scalability. It's much easier to scale small stateless services than a giant monolith. Clojure started getting a lot of use in the wild right around the time when SPA model started taking off, and I think that the ecosystem reflects that. We tend to have fairly light weight back-end architecture coupled with a thick client on the front-end.
- elamje 8y agoSummary: The JVM made Clojure popular. The JVM made Clojure hated.
- iLemming 8y agoYeah, haters gonna hate - it's human's nature. Give a man a powerful tool that solves lots of problems with two* most popular platforms today: Java and Javascript and they still will be complaining. * actually three - if you include CLR
- acd 8y agoClojure builds on Lisp that its creator wanted a modern functional programming language that runs on the JVM. Clojure also has immutable data structures Link to Githut programming language popularity on Github, compare the number of open issues per repository for different programming languages. Then you will find that Clojure, Lisp and Haskell has relatively fewer issues compared to other more popular languages. https://githut.info/ https://githut.info/ Lisp is used in AI. https://medium.com/ai-society/the-lisp-approach-to-ai-part-1-a48c7385a913 https://medium.com/ai-society/the-lisp-approach-to-ai-part-1... https://ai.stackexchange.com/questions/2236/why-is-lisp-such-a-good-language-for-ai https://ai.stackexchange.com/questions/2236/why-is-lisp-such...