7 ms·
Another attempt at the Rails for Clojure. Great. The web stacks (yes stacks, there are many at this point) are very mature. I'm getting tired of seeing people r
by janetacarr 4y ago
Another attempt at the Rails for Clojure. Great. The web stacks (yes stacks, there are many at this point) are very mature. I'm getting tired of seeing people re-inventing the wheel over and over again.
I love Clojure, but this language is going to die off if people don't start putting more effort into building mundane, everyday libraries. (I know I am). Clojure has high velocity, but it's always offset by having to create new libraries or update rotting ones.
I've noticed a ton of software rot in what were once major Clojure libraries, like Onyx and Cortex, now fading into obsolescence.
I'm sorry, but I will keep bitching about this on HN until people help me.
- hewrin10 4y agoWhat kind of mundane libraries don't exist? And do you mind sharing what you are working on?
- Barrin92 4y agonot the OP but this struck home for me because I just recently worked with Clojure and I was surprised that there was no standard library to deal with filepath operations. Having to use Java's nio, immediately exposed some weirdnesses, like having to pass an empty array to Paths.get() because just calling it with a string with one parameter made it chose the wrong overloaded function.
- jhhh 4y agoVararg support in interop and type creation (deftype/defprotocol) seems like a reasonable ask.
- lenkite 4y agohttps://babashka.org/fs/codox/babashka.fs.html#var-path https://babashka.org/fs/codox/babashka.fs.html#var-path
- didibus 4y agoYou can type hint to pick the one of the type you're looking for. It's not any weirder than in Java, no need to pass an empty array.
- janetacarr 4y agoYeah. I've just started on a couple things, and it's slow going because I have contract work and burgeoning Clojure blog. However, I'm working on a stripe API library that is up to date, and a syslog server library. It's these API-wrapping and protocol-handling type libraries that either are way out of date, or just don't exist.
- heretoo 4y agoI feel your frustration. Clojure, in my opinion, has always been niche, but is still effective and may actually be immortal? New things are always being tried by small groups of people leaving corpses strewn about. I don't think it is the building, so much as the burying that needs more work, so that we know what libraries do or don't need tombstones. To the best of my knowledge, Onyx and Cortex were both backed by companies which either needed to move onto more successful products, or in the case of Cortex, they closed up shop. It might be better to look at libraries that have stronger community support. Onyx is an amazing library but it competes with other libraries like KafkaStreams which has community buy in, and commercial support if needed. Cortex might be replaced with mxnet which got clojure bindings sometime in the last couple of years (see gigasquid). (Although libpython might make this redundant -- assuming language purity isn't a blocker to being pragmatic). Others will have better examples, but here are some simple ones that are well maintained, but lets not forget that the java ecosystem is also available: clojure clojurescript core.async mxnet integrant Its good to remember that what might be considered "rot" in some ecosystems, is just a sign of maturity and of a library being finished. Many older libraries with no commits in years function as is, as documented.
- dimovich 4y agoYes, and if I may add a few more libraries that are actively maintained, with wonderful documentation and great functionalitY -- next.jdbc for SQL, Timbre for logging, Sente for websockets, Reitit for routing, Carmene for Redis, re-frame for frontend state management, Datascript for frontend DB, and many more.
- rufius 4y ago> Its good to remember that what might be considered "rot" in some ecosystems, is just a sign of maturity and of a library being finished. Many older libraries with no commits in years function as is, as documented. I’ve noticed that pattern in the lisps and Erlang. Things are dead, they just don’t really need any changes.
- didibus 4y agoI think Onyx and Cortex always were redundant. You have Kafka and Spark/SparkML and Storm, you can use them from Clojure without problems. If Onyx had been the first, it could have become what Spark is, possibly. My point being, I don't really think every language needs a distributed compute, just need one and have bindings from your language to use it. Clojure being Java has access to many bindings for many of those popular libraries.
- yayitswei 4y agoFor better or for worse, this is the lisp curse at work.
- dimitar 4y agoClojure libraries are good but you have Java and JS interop for mundane, everyday libraries. Is there anything wrong with interop? I think most Clojure libraries rightfully focus on things that either only possible or needed in Clojure. Things like core async, typed clojure are not even possible to implement in other languages as libraries. When thinking of examples: the cognitect/aws-api is amazing in it's ease and fun, yet AWS Java SDK is also easy to use from clojure. I prefer the former, but there isn't anything wrong with the latter.
- john2x 4y agoIf you're using interop for mundane, everyday things, why use Clojure then? I imagine you would end up writing non-idiomatic Clojure code to do the interop (e.g. working with mutable objects and not immutable datastructures).
- didibus 4y agoThe recommended design for Clojure programs is imperative shell, functional core. You use Clojure as your functional core, and it interops with mundane libraries for the imperative shell, such as database clients, http clients, logging, http server, graphics, sound, etc. It works beautifully, and the REPL helps with all of it.
- regularfry 4y agoA problem I have run into (admittedly, having not written as much clojure code as I'd like) is that some java libraries in particular can make interop distinctly unpleasant. Anything around the Spring framework, for instance, made me tear my hair out. Yes it's possible, but by the time you've compensated for the impedance mismatch you might as well have done a rewrite.
- didibus 4y agoHum, I've used Spring with Clojure a lot, never had issues. Things that are difficult to interop are java annotations based stuff, having to implement interfaces or subclass classes, and functional interfaces. But you can use Spring without annotations, which is my preferred way anyways, because I favor explicit over implicit.
- Diris 4y agoThat sounds like a blog post you could submit to get more visibility :)
- janetacarr 4y agoI write a lot about Clojure, but I haven't written about this specifically. I'll start today.
- janetacarr 4y agoIf you're still interested, I wrote the post and submitted it here https://news.ycombinator.com/item?id=32288291 https://news.ycombinator.com/item?id=32288291
- tmountain 4y agoI was doing a lot of data science with Clojure a few years back (gorilla repl). I looked up incanter, and the last commit was in 2020. I was surprised, as this space is so well suited for Clojure’s strengths. How does a robust library essentially end up abandoned?
- mtnygard 4y agoIt happens the way anything else gets abandoned… not enough contributors. Many of the libraries mentioned in the comments here were created by one person. When that person loses interest (or gets a new job!) the library goes stagnant. It’s kind of a tragic irony. Clojure gives a solo dev enough leverage to create such a library. But because it only needs one dev to create it, the bus number stays at 1.
- tmountain 4y agoThis would make sense, but the project has 98 lifetime contributors and 298 forks.
- jayceedenton 4y agoI've been in the Clojure world for over 10 years but I don't really recognise the problem you're calling out here. There will always be libraries in an ecosystem that lack maintainers, particularly if they did not see the hoped adoption or an alternative de facto solution has emerged. Many Clojure libraries are conceptually simple and solve one problem well, so it's common for them to reach 'feature completeness' and not see much activity after that. clj-commons has also ensures the active future of many libraries. A friend and I adopted a library we felt was stagnating and still had lots of useful features to add. I don't see this more in Clojure than anywhere else though. Any more examples that need engineers? Onyx always seemed to be entering a crowded space.
- didibus 4y agoWhat mondane library are you missing? Everything I need is there, so I'm curious what people are waiting for?