9 ms·
Productivity brought by Clojure [slides]
- cleansy 7y agoAmazing how they just write a flat: "at least 30%" increase in productivity. Based on what exactly? How did they even measure that? I don't want to talk these slides down, especially since I think that a lot of use cases might benefit from something like clojure but sources would be nice to read up.
- chungus 7y agoIf you are referring to the "30% increase in productivity from REPL driven development", it could be he means not having to recompile after each change, so not having your workflow interrupted.
- EForEndeavour 7y agoThat sounds like support for REPL-driven development, not specifically clojure use.
- 6thaccount2 7y agoAgreed to a degree. I find Python in the REPL to be great, but I think Common Lisp with Slime and maybe Clojure with Cider take it to a new level. You can write your code and when it errors out it drops you into the REPL where you can update the code incrementally while it is running. If Python gets me X% increase, Lisp and Smalltalk (and maybe Forth) get you some X% + Y%. The parent comment is right that 30% is probably a back-of-the-envelope calculation and not a rigorous one. I'm only a novice/superficial language geek, so I can't tell you why Lisp and Smalltalk can do that though. Extreme late binding? Hopefully someone more educated can reply.
- stcredzero 7y agoExtreme late binding? That's part of it. That resulted in any given code change in a method usually requiring the recompilation of just one method. Much of the Smalltalk class library was fairly stateless-ish, so you could unwind the top one or two stack frames and restart about 90% of the time.
- marble-drink 7y agoPython in a REPL isn't really possible because you can't reload modules. It's OK if you're working on just one module but as soon as that's not true it's just not possible. And if you use relative imports you can't even do that. I'd love to know if anyone has a way to get it to work because I really miss REPL based development from my common lisp and Clojure days.
- ilikehurdles 7y agoOther lisps with a repl might fall into the same ballpark, but offerings like the ruby and node.js repls are pretty inadequate by comparison. I haven’t used the python repl in a long time so I can’t comment there. In general I’d say that one of clojure’s strengths is the REPL+Editor integration that’s pretty common among all major editors supporting the language.
- EForEndeavour 7y agoREPL + Editor integration is hardly language-specific, right? Most of the devs and analysts I can think of have some kind of REPL feature enabled in their editors and languages of choice, whatever they might be.
- lastofus 7y agoPyCharm offers similar functionality of sending code from the editor to the REPL. The biggest difference between Python and Clojure is that everything is an expression in Clojure, meaning you can send much smaller chunks (assuming vars are defined) to the REPL. With Python, you tend to have to send much larger chunks, which diminishes the utility for me to the point where I just don't bother.
- FridgeSeal 7y agoPython’s REPL is pretty close to terrible in my experience. Using PyCharm’s is pretty much required.
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]
- dimitar 7y agoReally nice to see stories about Clojure on HN. Initially, it wasn't clear for me what editor is used but it appears to be Vim/Neovim with Fireplace: https://github.com/tpope/vim-fireplace https://github.com/tpope/vim-fireplace Actually looks pretty simple and straightforward. There is a healthy choice of different editors and IDEs for Clojure right now, thanks to building on common foundations of https://github.com/clojure/tools.nrepl https://github.com/clojure/tools.nrepl
- erokar 7y agoThe fact that Clojure runs on JVM turns me off. I find that Elixir is very similar to Coljure, with a runtime that better supports immutability and concurrency.
- cabernal 7y agoThere is a version of Clojure that runs on BEAM: https://github.com/clojerl/clojerl https://github.com/clojerl/clojerl
- arunix 7y agoRecently discussed here: https://news.ycombinator.com/item?id=20219563 https://news.ycombinator.com/item?id=20219563
- jwr 7y agoWhy does it matter to you? I mean, I know why I find it to be a positive: implementing a runtime is a vast and complex task, and doing it well is way too expensive for most projects (see for example the problems Python has had over the years with the global interpreter lock). If you can use a runtime with gazillions of man-hours invested into making it better, and get easy access to bazillions of native libraries, why not?
- tdbgamer 7y agoWhile I agree with you that the JVM is great, I think most people that don't like it really just hate Oracle. It's not really a technical argument as much as it is philosophical. I don't really care either way, but I can see why people would mistrust Oracle knowing their history.
- pjmlp 7y agoYeah, because Sun never did wrong stuff and everyone was queuing up to buy it.
- ilikehurdles 7y ago
- ecmascript 7y agoI have never really understood what people get from these slides, but my while my experience with clojure is extremely limited I can say that I found it to be rather interesting but hard. I could not grasp several error messages, took me a long time to write something to a database and it didn't really feel at all natural to me. But I guess you'll have to get used to the functional nature, but I don't believe all the hype about functional programming in general. If it was so effective as people seem to claim, I am sure everybody would use clojure. My experience is rather the reverse, it is harder and takes a long time to develop in. Maybe it's more predictable and is better software with less bugs in the long run, but I wouldn't really know since I lack the experience. A lot of programming languages today, like javascript, already has functional stuff within it. I get the appeal for it, but I'm not sure it's the best tool for every job or even most stuff. If anyone is willing to post a youtube-talk or something that can convince me of otherwise, please feel free.
- deleted 7y ago[deleted]
- keymone 7y agohere's a youtube link you were looking for: https://www.youtube.com/watch?v=2V1FtfBDsLU https://www.youtube.com/watch?v=2V1FtfBDsLU
- ecmascript 7y agoThat was disappointing, sorry. But that didn't really say anything about why functional programming would be better in the general sense.
- balfirevic 7y ago> If it was so effective as people seem to claim, I am sure everybody would use clojure. Whatever you might think about the qualities of Clojure, the above is almost certainly false.
- LandR 7y ago> If it was so effective as people seem to claim, I am sure everybody would use clojure. I don't think this is even remotely true. As much as everyone in this industry wants to believe it's fast paced and fast moving / evolving, it's hellishly slow in picking up on good ideas and will waste an exorbitant amount of time on bad ideas... Cool / Hip seems to be valued more than quality when it comes to languages / frameworks while the actually useful slowly, painfully slowly, trickles down.
- keymone 7y agoClojure's immutable data structures (lists, vectors, maps and sets) are actually not copy on write, they're based on red-black trees such that when you "mutate" the value, a new one is created that shares everything but the mutated part with the original. Clojure is amazing and i can't recommend it enough. I wish more people looked past the unfamiliar syntax and understood why it exists and how it makes you achieve more with simpler code.
- vnorilo 7y agoTo nitpick a little, Clojure maps are hash array mapped tries and vectors are trees with a highish radix and some push/shift optimization. As you said, they are collections with value semantics which is pretty great.
- lukifer 7y agoI'm pretty sold on Clojure's value, I've read up on its structure/syntax, but generally struggle with learning the standard lib and trying to read/write actual code. Any resources you can recommend for gradually ramping up, and/or "lightbulb moments" for a dev steeped in C-like languages?
- vnorilo 7y agoHaving written C++ for 25 years, I found it very enjoyable to write small toy client-side web apps with clojurescript, figwheel and reagent. Reagent's Hiccup-like syntax for html is lightweight and gets you interactive stuff on screen quickly with hot reloading. Iterating quickly helps me learn, and getting dynamic graphics on screen provides that dopamine drip feed I need to stay motivated.
- ex3xu 7y agoOutside of standard recommended resources like the ones offered here [0], I found that doing the problems on 4clojure.com and then comparing with the answers of top users was helpful for experiencing some of those kind of lightbulb moments in Clojure. [0]: https://github.com/razum2um/awesome-clojure#guides https://github.com/razum2um/awesome-clojure#guides
- whalesalad 7y agoToo many people conflate clojure with high paying salaries. It's not clojure that is earning the salary... it's the kind of engineer who might practice something like clojure that is desirable.
- iLemming 7y agoI think the reason why Clojure (alongside with F#) is the most paid language (according to StackOverflow and State of JS surveys) because more and more FinTech companies are discovering that the language is exceptionally well suited for manipulating financial data (and not just that). Another reason is: like the one you've mentioned: Clojure mainly attracts more experienced, "grumpy" developers, those who have seen things and tried different ways and become almost apathetic and burned out from (over and over again) building and maintaining projects that despite all the efforts almost always spiral into big, unmaintainable clusterfucks.