Clojure Concurrency - Rich Hickey

ClojureTV · 72K views · 2012 · 2:32:39

Open on YouTube

Functional programmingSoftware architecture & designtalk

Why Hacker News recommends it

Seen as the definitive explanation of why traditional concurrency is hard and how Clojure's model addresses it, with some commenters crediting it with changing their careers.

What it is

Rich Hickey's long presentation on Clojure and concurrency covers locking and immutability, then goes in depth on refs, transactions and agents. It ends with a multithreaded ant colony simulation demo.

Recommended by 5 HN commenters across 5 different months, 2013 to 2023.

What Hacker News said

Strong rec dominotw · 2020-05 · on “Optimising for Concurrency: Comparing the BEAM and JVM virtual machines”

I started to write a response but remembered rich hickey talk I went to where he lays out problems with java style concurrency Clojure Concurrency - Rich Hickey [this video] Even though the talk is called clojure concurrency, first half of the talk is about the problems clojure solving in traditional concurrency. one my favorite talks I ever went to.

Strong rec cmiles74 · 2023-08 · on “(Next Rich)”

Rich presented Clojure to our local software development group in 2008, I've been working with Clojure (both as a hobbyist and eventually professionally) ever since. [this video] At that time I had been working with Java for years, both the conciseness of the code and the interactivity were flat-out amazing to me. It's saved me time and made me 100 times more productive. Congratulations to Rich, I am also extremely grateful for his work!

Recommends bachback · 2013-07 · on “Why bother learning Clojure?”

I like Rich talks and his main point for his invention seems to be: to get concurrency right. Clojure Concurrency [this video]

Recommends jwr · 2013-12 · on “Why Johnny Can’t Write Multithreaded Programs”

> No, no, no. If you are writing multithreaded programs, you _will_ have locks, period. The question is whether you explicitly use them or if they are hidden somewhere in your libraries, frameworks, etc. Actually, the latter are much more difficult to debug. You say that and then proceed to call the article ridiculous. Well, I write and maintain large applications in Clojure. The code uses a multitude of threads for various purposes, with different lifetimes. And I've yet to see a single explicit lock. What's more important, though, is that I've yet to see a race condition, a deadlock, or data corruption, which I find pretty impressive. I do agree that you need to understand what is happenin

Recommends cellularmitosis · 2023-04 · on “REBL”

> I have yet to encounter a single problem that is solved more elegantly in Clojure than the equivalent Pythonic solution. A good place to start would be implementing Rich Hickey’s ant colony demo in both Python and Clojure. [this video]

Cites fiatmoney · 2014-01 · on “A Worst Case for Functional Programming?”

I also find it to be the exact other way around. A lot of mathematical transformations, on the inside, break down neatly into sequential mutations, and you really do need to express them imperatively for maximum performance. Fortunately, you can look at the math and verify they compose appropriately, and use testing to verify you've implemented each step correctly. But if I'm doing anything involving state, particularly interdependent state like a simulation, functional algorithms make a lot of sense as a way to ensure that I always have a valid object handle (because I'm always returning a new, valid object as a result of a computation) and give you a somewhat easier route to refactor while

Cites iofj · 2016-07 · on “Immutable-cpp: persistent immutable data structures for C++”

Well, when you pass a variable around, it doesn't and cannot change. This means that different threads can't get in eachothers' way anymore, for instance, but also that you can't make a big chunk of mistakes at all. They also have serious disadvantages : they can't be memory managed in the traditional way (since they tend to reuse other instances' memory in complex ways), and thus require a GC (refcounting can work, but ...). They are VERY allocation intensive, and they are worse than most non-persistent data structures. Assuming an O(1) allocator they can match non-persistent data structures in O-ness (ie. when making an invalid assumption that is quite popular in academia. In practice memo

Cites nmg · 2017-11 · on “A Library of Parallel Algorithms”

In the talk "Clojure Concurrency" [1], Rich Hickey demands that everyone in the room read "Java Concurrency in Practice" [2]. "It will scare the crap out of you." [1] [this video] [2] [LINK]