9 ms·
My $0.02 on the state of Clojure - For building stateful UI's Clojurescript + Reagent beats anything else out there. For data science and algorithms Clojure b
by AlwaysBCoding 11y ago
My $0.02 on the state of Clojure -
For building stateful UI's Clojurescript + Reagent beats anything else out there.
For data science and algorithms Clojure beats anything else I've used.
For backend web development Rails is still miles ahead of any Clojure workflow.
Datomic is interesting but there's still too much incidental complexity to be super productive with it. It's hard to build a startup on Datomic because of the pricing and productivity hit, but could see it being useful in the enterprise where speed is less important.
I'm very interested in mobile development with Clojurescript on top of React Native, but haven't found a tutorial that wasn't written in hieroglyphics, so assuming that needs some more time to mature.
- devty 11y agoI had not realized that Clojure is well regarded in data science. Could you point to some libraries you find especially strong?
- ohnomrbill 11y agoI personally use this in place of R, where possible: https://github.com/incanter/incanter https://github.com/incanter/incanter
- mej10 11y agoIt has a very small portion of the mindshare. Almost everyone uses R, Python, or one of the proprietary things. I use Clojure for any data science type tasks I have, but that is because I am primarily a Clojure developer. It is very nice for a lot of basic data analytics -- but I doubt many full time data scientists use Clojure as their primary tool. The number of libraries available for R and Python is pretty amazing.
- dkersten 11y agoThe number of libraries available for R and Python is pretty amazing. I wrote some proof-of-concept code for submitting Python Celery tasks from Clojure. I should polish it up, get return values working and publish it... You could then farm out certain tasks to Python when it makes sense (eg because of existing code, libraries or just familiarity of team members). Best of both worlds, kinda ;-)
- thom 11y agoYeah, the fact is, if an algorithm has a page on Wikipedia, it probably has a package in R.
- thom 11y agoI build a lot of stuff with Incanter[1], clj-ml[2] and Quil[3] for building visualisations. None of this is as joined up or as thorough as the equivalent R (or probably Python) bits. Clojure open source libraries are also incredibly prone to being abandoned. Wouldn't trade the language in for anything though, and I've never seen any R code that I would want to maintain myself. [1]: http://incanter.org/ http://incanter.org/ [2]: https://github.com/joshuaeckroth/clj-ml https://github.com/joshuaeckroth/clj-ml [3]: http://quil.info/ http://quil.info/
- bad_user 11y ago> For backend web development Rails is still miles ahead of any Clojure workflow. If by web development you mean building frontends to a relational database. If on the other hand you mean web services, then I think Rails really sucks.
- AlwaysBCoding 11y agoHm, I guess that's a valid point. I normally think of web apps as a frontend to a database, but could see why that's not the only use case. If you don't have a database associated with the service, can't you just use AWS Lambda or something? Is it necessary to maintain an entire separate project for it?
- zubairq 11y agoI've also built a Rails like system in Clojure which has easy SQL backend support. I actually find Clojure much EASIER than Rails backend, so I definitely disagree: https://github.com/zubairq/AppShare https://github.com/zubairq/AppShare Rails is just such a different thing. Rails IS really is a framework optimised for the days of Page based web applications with small amounts of Ajax requests. Clojure is much more suitable to full web applications (SPAs)
- dkersten 11y agoIf by web development you mean building frontends to a relational database. In my opinion, yada[1] will change this with its concept of resources (eg it already has File and Directory resources for serving static data, but it wouldn't take much to develop a CRUD/DB resource - in fact, I spoke with Malcolm Sparks (the yada dev) about this). I personally find the Clojure(Script) development experience, with figwheel, much better than my experience with both Flask and Django (never used Rails). [1] https://github.com/juxt/yada/ https://github.com/juxt/yada/
- calgaryeng 11y ago> For backend web development Rails is still miles ahead of any Clojure workflow. I feel the same way. And in my opinion, is a symptom of the "library vs framework" culture that is present in the Clojure community. While that is probably a good stance for the first 2 points in your list, in web development there are just so many already-solved-problems that you have to re-work without a framework. Luminus looked good but seems to be shunned by the community.
- AlwaysBCoding 11y agoYeah exactly, for building UI's less is more and the Clojurescript approach works really well. For building web apps, I really don't care how storing sessions, or configuring your web server or parsing HTTP requests is done, I just want it to work out of the box.
- sova 11y agoYeah, it's true. Although I personally learned a lot about HTTP when having to pick and pluck apart at Ring, but an out-of-the-box working stateful server / web backend would be MOST WELCOME in my clojure life.
- gered 11y ago> Luminus looked good but seems to be shunned by the community. Can I ask what left you with that impression? I've no idea if this is true or not as I don't participate much in the Clojure community, I'm just genuinely curious. I guess a bunch of people just use the lighter weight Compojure/Ring templates that really leave you with an extremely barebones web app to start with? I used Luminus myself when starting out, but I feel that as you grow more comfortable with Clojure web dev, you'd _typically_ end up putting together your own Leiningen template more tailored to how you like to set things up (as I ended up doing). But even still, I don't think Luminus is by any means bad?
- nickik 11y agoShunned is a strong word and I don't think it applies. I think Luminis is ok for some things but by and enlarge most people doing webdev in Clojure prefere to go a different way. Saying it is shunned makes it sound like a whitch-hunt but that not the case. I don't even think the community has an opinion on it. Most just dont use it.
- mej10 11y agoI only agree about 20% with this assessment of Datomic. Their "Pro Starter" tier is free. It is plenty to get started with for many use cases. It doesn't take _that_ long to get up to speed with how it works and how to use it, and if it fits your problem naturally then it can save you so much time and headache. That being said, I can understand people hesitating to use it.
- AlwaysBCoding 11y agoI don't think Datomic takes that long to wrap your head around, but it does take a long time to actually use. There's no inherent equivalent of Model.all or Model.where(x = y), so chances are that you'll have to write your own DSL for mapping domain objects to datomic queries which is a time consuming non value-adding activity. You'll also likely want to transact through some DSL so that you can do validations, and post-creation lifecycle hooks, where in Rails or something you'd just get that for free. The Devops is pretty frustrating imo, there's no equivalent of the Heroku Postgres or AWS RDBMS one-click deploy for Datomic, so you'll need to set it up and monitor it yourself, which can get tricky when doing things like REPLing into the db from your local Emacs shell can crash a process downstream somewhere because you went over your remote peer limit without realizing it. And there's no view that shows you the IP address of every connected peer, so it's kind of hard to debug what exactly is going on sometimes. I think the query engine is really cool, I just feel like I waste a lot of time using Datomic that I don't with other databases.
- deleted 11y ago[deleted]
- nextos 11y agoI love everything about Clojure, except that stats libraries are nowhere comparable to Python sadly. It's probably still better for building a big ML solution, but sadly for small prototypes it's too much effort.
- weavejester 11y ago> For backend web development Rails is still miles ahead of any Clojure workflow. In what way?
- akjetma 11y ago'Lack' of frameworks. I always think it's kind of funny when starting a new Clojure web project, I have to explicitly insert a middleware for parsing parameter strings into a Clojure data structure, and then another middleware for transforming the string keys in that structure into keywords. There are just a bunch of things that don't magically work for you. That said, I really enjoy Clojure and appreciate/understand the high configurability.
- AlwaysBCoding 11y agoOh man, and having to manually configure your server logs just so you can see what requests are being made and where errors are popping up vs. just tailing log/development.txt in Rails...
- sveri 11y agoHi, author of closp (https://github.com/sveri/closp https://github.com/sveri/closp). TLDR; Yes, clojure is behind in regards of web development, but it is not as bad as you said. There is active work done in this area. I totally agree with what you said. It is a general understanding in the clojure community that you compose libraries to get things done. However, for web development that still means a lot of repitition, thats why I created the closp template. It is based on luminus (http://www.luminusweb.net/ http://www.luminusweb.net/) which is a lighter "framework" with more options. My idea was to provide one way with sensible defaults to get started in doing web stuff in clojure. I still work regularly on it and would be happy about contributions / feature requests. Whereas regularly means in terms of months as I do this all in my spare time. Also I am quite active in the clojure community and I know that luminus is not shunned, but instead it also receives improvements and releases regularly. Also the author of luminus works professionally with clojure and with luminus. And I have to admit, that luminus has the far superior documentation, he has done a good job on it I think.
- 11y ago
- michel-slm 11y agoThanks for that; been meaning to try CLJS+Reagent for a side project and the external testimony helps.
- ff_ 11y agoTry re-frame, is built on top of Reagent to provide some more magic (and the README is just AWESOME, worth reading it): https://github.com/Day8/re-frame https://github.com/Day8/re-frame
- plinkplonk 11y ago"For data science and algorithms Clojure beats anything else I've used." A very strong claim. Julia, R and Rust might have something to say about that. Fwiw, I think Clojure is awesome. For data science though? (IMO) no(t yet). The Python ML ecosystem is miles ahead of Clojure's.
- AlwaysBCoding 11y agoI mean, I like R, I think R Studio is an incredible IDE, but I would never build anything meaningful in R code. It's messy, slow, and has an antiquated community where people share library documentation in PDF's. Julia seems promising, I haven't used it on a real project yet though, but I really like how easy it is to do data visualizations in the browser with Clojurescript and don't see Julia really having an answer for that.
- sooheon 11y agoWhat do you use for the browser visualizations? Gorilla repl?
- BorisVSchmid 11y agoAs a scientist, I use a mix of Incanter, Quil, and gg4clj bridge to R's ggplot2 for visualization in clojure (none of these outputs to a browser though). R's ggplot2 beats Incanter (or anything other charting library) by a large margin in its excellent mix of conciseness and power, but I find Quil pretty nice for animations (superimposing data on geographical maps, for example). I keep an eye out for new charting libraries coming out for clojure. Last two I spotted were vizard from yieldbot (https://github.com/yieldbot/vizard https://github.com/yieldbot/vizard), and what seems to have only been a small project, xvsy (https://github.com/dvdt/xvsy https://github.com/dvdt/xvsy)
- thom 11y agoHadn't seen those libraries before, thanks for the links. I have to say, Quil is the least Clojurey library I have ever used, and I find it very, very primitive. There's definitely a huge gap for a project built with idiomatic Clojure bindings that can handle both nice graphical stuff but also stodgy charts, with basic stuff like annotation layouts etc. I think something that could work really well if anybody finds the time is a port of G: http://geosoft.no/graphics/ http://geosoft.no/graphics/