Skip to content
0:00 / 0:00

#clojure#javascript#functionalcoreimperativeshell

Solving Problems the Clojure Way - Rafal Dittwald

Clojure/north

1.9K subscribers • 15 videos on Hallway

YouTube
  • Recommended by 14 people: 10 on Hacker News, 1 on Lobsters, 1 in engineering communities and 2 curated lists.
  • A classic. People kept recommending it from 2019 to 2025.
  • Presented by Rafal Dittwald

Intermediate. Assumes working knowledge.

86K views7 years ago14 recommendations

Programming languagesSoftware designFunctional programmingLisp and ClojureDesign patterns

Rafal Dittwald demonstrates how to refactor imperative JavaScript code into a functional core and data-driven design using Clojure principles.

After overcoming a fear of brackets, the next challenge for would-be Clojurians is less superficial: to stop writing Java (or Javascript, or Haskell...) with Clojure's syntax, and actually start "thinking" in Clojure. It is said that Clojure is a "functional" programming language; there's also talk of "data-driven" programming. What are these things? Are they any good? Why are they good? In this talk, Rafal attempts to distill the particular blend of functional and data-driven programming that makes up "idiomatic Clojure", clarify what it looks like in practise (with real-world examples), and reflect on how Clojure's conventions came to be and how they continue to evolve.

Why it's here

14 people recommend this

What people say. Highly recommended for its clear, step-by-step demonstration of refactoring imperative code into a functional core.

u/vojimirin r/Clojure • Recommends

Clojure/north: Solving Problems the Clojure Way by Rafal Dittwald

Yogthoson Lobsters • Recommends

Solving Problems the Clojure Way

ngcc_hkon Hacker News • Recommends

On “The Source Code of “Solving Problems the Clojure Way – Rafal Dittwald””

Watch the video via recommendations here, but no longer can find it. Solving Problems the Clojure Way - Rafal Dittwald( link to this video ) It is a great video and is highly recommended. Spent two days to type and tidy up the source code. If you want the source, and if you like me cannot find it, you may try my version. Just hope Mr. Dittwald would not mind.

tw25497050on Hacker News • Recommends

On “I rewrote a Clojure tool in Rust”

…ed by field), then using two hard-coded "operations" (also keyed by field), and yielding a map whose values are sequences by field (I think). Off the top of my head I don't see why this fn needs to work across multiple fields in the first place (i.e., any field-specific "loop" should be in a surrounding context. Ditto for `diff-rules-by-keys`. 3 link to this video…

blunteon Hacker News • Recommends

On “Case against OOP is understated, not overstated (2020)”

-- (Even if you don't read this whole comment, I urge you to watch this fantastic video which illustrates procedural, OOP(lite), and FP approaches to a sample problem: link to this video (Despite the name, it illustrates JavaScript, not Clojure). If you follow this approach, you don't even have to tell people you are doing FP. You'll just end up with better, more understandable, and more easily testable code.) -- The early (early as in C++ days) benefit of OOP was probably that it made programmers stop and plan before coding. Having learned FP 20 years after learning OOP, I feel certain that I can do the same things in less and more understandable (and MUCH more easily testable) code in FP. OOP was awe…

michaelteteron Hacker News • Recommends

On “Functional Core, Imperative Shell (2012)”

…like that demonstrates this functional core/imperative shell approach: Solving Problems the Clojure Way - Rafal Dittwald. It is a Clojure talk, but it gives an imperative to functional refactor demo in JavaScript in the middle of the talk. Even though it is a toy example, it is big enough that the result shows a meaningful difference in approach. link to this video…

programming-talkscurated list on GitHubRecommends

Under “Clojure”

Solving Problems the Clojure Way 01:02:55 by **Rafal Dittwald** (2019)

awesome-talkscurated list on GitHubRecommends

Under “Functional Programming”

Solving Problems The Clojure Way by **Rafal Dittwald** (Clojure/North 2019) 01:02:25

rafdon Hacker News • Recommends

On “Productivity brought by Clojure [slides]”

If you're new to functional programming, I recently gave a talk on applying FP concepts at ClojureNorth: link to this video The main example I work through is in JavaScript so that Clojure's syntax doesn't get in the way (I love s-expressions, but they're not the point of the talk).

lymitshnon Hacker News • Recommends

On “How I became a better programmer (2017)”

Maybe more of the hype comes from the fact that its a Lisp. To get a feeling for the "magic" of lisp, I would suggest either watching SICP video lecs0 or reading the book. I started learning lisp, almost the same time I've started learning programming with Java (college). Honestly I was thinking why they don't just teach us that, instead of Java at that time. Also Clojure is created by a fairly respected dude (afaik) Rich Hickey. His talks and Clojure design decision articles on the site are really insightful. Also this talk1 also pretty good overview of different paradigms and `Clojure way`, imo. 0 link 1 link to this video

slifinon Hacker News • Recommends

On “A History of Clojure [pdf]”

Hi fellow PHP'er and in a long time gone C#er here I would highly recommend learning the spirit of Clojure first: link link to this video There are a few classes of tech that are uniquely Clojure: Data driven DSLs: - link - link - link Hyper normalised relational databases: - link - link - link Advanced SPA tech (hyper normalised data driven): - link - link Once you understand the spirit and rationale for Clojure it becomes apparent why other communities don't have this kind of tech yet Once it gets down to practical things I recommend using clj-Kondo with type hints, Cursive for Intellji, make sure you learn how to hot code inject new code into your running program using your editor…

ngcc_hkon Hacker News • Recommends

On “JavaScript: The First 20 Years”

There are lots of comments and no doubt JavaScript really has its problem. But one year still I watching this and how he used mainly JavaScript to demonstrate how to think in clojure way. It is not that bad, guys link to this video (solving problems the clojure way by Rafal Dittwald).

ngcc_hkon Hacker News • Recommends

On “Admitting That Functional Programming Can Be Awkward (2007)”

In spite of its name this video use JavaScript to implement a game using the three styles of programming. Great video learnt from hacker news: link to this video

justcoderon Hacker News • Recommends

On “Functional programming should be the future of software”

In the second part of the "Solving Problems the Clojure Way"0 talk, the speaker shows step-by-step transformation of the heavy imperative (book-keepish) JavaScript code to a more functional approach. As a result of transformation, ~95% of the code is easily unit-testable and the only impure code is the call to main which basically starts all the domino falling. 0 link to this video

teodorluon Hacker News • Recommends

On “Premature Abstraction”

> I would love a language that has this gradual evolutional abstracting as a core concern. That makes it easy. Where you can start from simplest imperative code and easily abstract it as the need for this arises. This is about how I write Clojure. I start out with some code that does the thing I want. Either effectfull code that "does the thing" or functions from data to data. After a while, I feel like I'm missing a domain operation or two. At that point I've got an idea about what kind of abstraction I'm missing. Rafael Dittwald describes the process of looking for domain operations and domain entities nicely here: link to this video

fredrikholmon Hacker News • Recommends

On “I made a multiplayer shooter game in Lisp, here is my journey”

This is a common idiom, and does not necessarily imply mutation. Even in cases where you often do have mutation, say in databases, the benefits of a functional approach lie having pure functions between mutations rather than one big ball of Xs sometimes mutatingYs via Zs. Here0 is a wonderful talk that demonstrates this in practice. 0. link to this video