This is really a great way of teaching design ideas. The presenter firstly mentions a design principle and then gives examples and reasons that supports the design principle.
James you are a wonderful teacher! I still love coding in Clojure after you taught me half a decade ago. Your incredible teaching style with explaining the background and mechanics of the language rather than just how to work with it plus your gentle English charm (e.g. When you got a water refill) and how knowledgable you are makes you the perfect teacher for people who have a similar learning style as me. A big whoop whoop and thank you for your presentation!
Thank you so much for your kind words! I have so many fond memories of our Clojure sessions, and to this day I’ve never seen someone pickup the concepts as quickly as you did. I’m so pleased to hear that you still use it!
I tried learning clojure over a year ago and had a very hard time. It was my first attempt at a functional language. I gave up after a couple of weeks. Recently, I've been learning some Erlang and getting a better feel for functional thinking. I wish I had found a teacher who taught clojure this way back when I was trying to learn it. It would have made things so much easier for me. Great job!
This has to be one of the best "sales pitches" for clojure. How can you watch this and go back to JS/Java/Scala/python etc? Amazing presentation skills as well
@@RogueTravel I tried go, it's easy, but probably the most boring language ever. Elixir is interesting, but I have no idea about the BEAM VM and OTP. Also writing end everywhere seems annoying 😂 which one is your favourite elixir or go?
@@RogueTravel JVM is a world class VM but if you don't want it you can run V8 via ClojureScript or .NET via ClojureCLR or substrateVM via babashka or normal Clojure via graalvm (supports polyglot programming) There's also lots of unofficial variants for Erlang and others all variants would work the same for the examples in this video
@@sfyire since this comment, I decided on Golang for my back end. The performance is great, pace of development is great. Language is a bit boring but I don't care, it has proven to be a good fit for what I need
Best introduction to Clojure I have seen. Would be great if @Misophistful could create an online course on the Clojure programming language. Brilliant presentation 👍
I know I already commented seven months ago, but I'm watching this again and have to say it's easily the best introduction to clojure I've seen on TH-cam.
3:12 That is *Programming Language * design, and I totally agree. For a statically typed language true to this principle I’ve started learning OCaml and I’m loving it.
What an amazing intro to Clojure! You explained it so well that I was able to pause the video and implement the last thread-last macro example without any help. Really felt like I was playing with legos! Loved that you went from the language design principles and showed how it looks like in practice. It was also great seeing the REPL in action and I can definitely see how it could be great for experimenting due to the fast feedback loop. Thank you for the presentation James!
Great tutorial. The only problem with Clojure is with people having experience with other programming language. There is a bit of unlearning that has to happen to get acquainted with the syntax of Clojure
Brilliant how after you declare how much you love quotes you tell one yourself on collections being immutable "That gives us a stable base to build upon not a shifting sand of immutability underneath everything we are building"
4:26 he quotes: “when you combined two pieces of data you get data, when you combine two machines you get trouble“, well I’m slightly puzzled. What are the machines? Pure functions? Stateful functions? Objects? Pure modules? Do their interface agree? Static typing or dynamic typing? Regarding data: you may get data, consistent or inconsistent data. Maybe a compilation error if the data types don’t match up, maybe a runtime error downstream in case of semi-structured data … Definitely a stimulating observation, as it touches the essence of software engineering: designing data and functions and building systems by combining them. But you don’t always get trouble if you combine two machines, and merely combining data may just result in nonsense.
The Clojure syntax seems to be very interesting, I have not come across anything like that. The equivalent of the code shown at 15:42 in F# will be either [0..4] |> List.map (fun x -> x + 1) |> List.filter (fun x -> x % 2 0) or [0..4] |> List.map ((+) 1) |> List.filter (() 0 >> (%) 2) - both variants look "boringly conventional"😀.
Coming from Typescript and Go I’m like “where are the type declarations?”. Its kinda cool what you can do without them though. Definitely going to give Clojure a try.
After seeing a very large java production codebase whose stack traces looked worse than verdun after the first world war i can 100% feel what rich hickey wanted to avoid. Holy shit does OO under deliver. What a mess. PS: after having seen the video now: clojure seems like a thing of beauty. Cant wait to get hands on with it
Looks like it was atom with the theme that's linked in his TH-cam channel but I couldn't find how he did the ghost themed parenthesis matching anywhere
Hi Roman, you're welcome! I used Atom: atom.io with Proto REPL: atom.io/packages/proto-repl . Though I believe Chlorine: atom.io/packages/chlorine has become more popular with Atom-loving Clojure devs recently, as it's more actively maintained than Proto REPL.
Really excellent presentation, any anxiety around live coding was well and truely unfounded. I am new to functional programming and find it hard to see the difference around data as a first class citizen compared to object oriented programming. The data appears to be loaded into memory and worked upon in much the same way as one would do with objects in OOP. Can’t see an obvious distinction.
Hi Ivan, with "first class citizen" I primarily mean that data structures have literal representation in Clojure's syntax. In Clojure, you can construct and populate a vector with the code "[1 2 3]", rather than having to construct and then populate an object with something like "ArrayList values = new ArrayList(); values.add(1); values.add(2); values.add(3);" This syntax-level representation brings data structures directly into the language, and changes how you think and communicate about data.
This was great. The live coding examples were accessible and practical. They certainly illustrate how to get useful things done quickly (and very cleanly). Was that VSCode (with Calva)? If so, I wish I could get mine setup that well.
Thanks for the talk! I haven’t used Clojure myself but it looks logical and readable. What would you say are reasons not to choose Clojure? How would you rate its performance, dependency management story, large codebase refactoring (I see no types) and the deployment of Clojure apps? Thanks!
Clojure is a hosted language, the answers below are for Clojure on JVM: - you get a very powerful VM for free. Persistent collections come at a performance cost, but (only if needed) there are many paths to improve the situation in hot loops, - you get all Java libs for free. Java interop has no performance penalty and is plain clear. You can also reuse pure Clojure libs which can be fetched as code (eg from github) or as a compiled jar from Maven/clojars. For dependency management there's a built-in tool where you define lib versions in an edn (think of json) file - to deploy you compile your project and assets in a uberjar, copy it to a production server and restart JVM - there's a limited support for refactoring in tools like cider, perhaps in some IDEs too (I use vim). Despite having no types, Clojure is a compiled language, so any typos/missing declarations are caught immediately, and for me this would be the main source of bugs. When not to choose Clojure: - when JVM is not acceptable (memory wise or GC wise) - when your domain does not have enough libs in Javaland Otherwise this is the best language for JVM, period. It is a perfect choice for web development.
@Misophistful uses Atom: atom.io with Proto REPL: atom.io/packages/proto-repl . Though I believe Chlorine: atom.io/packages/chlorine has become more popular with Atom-loving Clojure devs recently, as it's more actively maintained than Proto REPL.
@Misophistful used Atom: atom.io with Proto REPL: atom.io/packages/proto-repl . Though @Misophistful belives Chlorine: atom.io/packages/chlorine has become more popular with Atom-loving Clojure devs recently, as it's more actively maintained than Proto REPL.
One key difference may be SQL is usually composable using a join statement instead of a function while clojure is composable with function of functions.
looks cool. there are different options for setti ng up working clojure emvironments. i dont know which of the options to choose, and is not that simple to set up..for say Vim editor.
@Misophistful, James, used Atom: atom.io with Proto REPL: atom.io/packages/proto-repl . Though I believe Chlorine: atom.io/packages/chlorine has become more popular with Atom-loving Clojure devs recently, as it's more actively maintained than Proto REPL.
James used Atom: atom.io with Proto REPL: atom.io/packages/proto-repl . Though James believe Chlorine: atom.io/packages/chlorine has become more popular with Atom-loving Clojure devs recently, as it's more actively maintained than Proto REPL.
I suspected it's Moby Dick from the load time alone before you revealed the word count. Now you're impressed? (Ok, the truth is, that it's a very common example...)
“Systems are dynamic and data driven. It might be a nice idea to use a language that is also dynamic and data driven.” A brilliant summary of how you can pass utter rubbish for useful advice by making it vague enough and small enough. “Our world is filled with objects. It might be a nice idea to have a language that is also filled with objects.” Understand why it's wrong now?
You might be being a little uncharitable to Rich Hickey's quote here. His quote uses the form "X has properties Y and Z, therefore if we want to build X we should probably use tools that help us with Y and Z." You could potentially refute this claim by arguing that X doesn't actually have the properties Y or Z, or that the suggested tool doesn't help you to achieve Y or Z. However, I don't think creating a new quote with the form of "Our world is filled with X, therefore our tool should be filled with X.", demonstrates anything about the accuracy of Rich's claim. Especially when this new form is so easily dismissed with a counter example: "Our world is filled with socks. It might be a nice idea to have a language that is also filled with socks."
@@Misophistful I am making the point that the quote is completely meaningless and similar ones have been used in the past to sell things people don't like. He could be entirely correct but nothing in this quote or that video proved it. My refutation is that half the words in the sentence are meaningless and they come together in a blatant appeal to naturalism. "Systems" are just as related to programming as the world is. The biggest thing this ignores is abstraction. The whole point of programming is to remove most of the properties of the actual system because they are detrimental to understanding it. This is a failure for both the OO quote and the Rich one. You have to skirt around this by replacing "tools that are X" with the more reasonable "tools that help with X". Tools with the same properties as problems are really just problems themselves.
The ->> operator is something I have never seen before nice way to remove nesting. Lisp is theoretically nice, until you try do anything useful; stupid overabundance of parentheses... I suppose the alternative for a language like this is Haskell where the syntax and order of operations is like dark magic... but why can't we invent a nice ballance? I want to put my + sign between the numbers at least. QWERTY keyboards are to blame i think.
First of all, Clojure has a good balance of parens, curlies and brackets (compared to other lisps). As for editing, have a look at parinfer -- it infers syntax from indentation, after that coding in Clojure becomes a breeze.
Too many brackets. If they use syntactic sugar already they could have dropped outer brackets and more. Constantly having to count brackets is annoying and unnecessary.
This is really a great way of teaching design ideas. The presenter firstly mentions a design principle and then gives examples and reasons that supports the design principle.
This was awesome. The thread operator really makes looking at FP code way more palatable for me.
James you are a wonderful teacher! I still love coding in Clojure after you taught me half a decade ago. Your incredible teaching style with explaining the background and mechanics of the language rather than just how to work with it plus your gentle English charm (e.g. When you got a water refill) and how knowledgable you are makes you the perfect teacher for people who have a similar learning style as me.
A big whoop whoop and thank you for your presentation!
Thank you so much for your kind words! I have so many fond memories of our Clojure sessions, and to this day I’ve never seen someone pickup the concepts as quickly as you did. I’m so pleased to hear that you still use it!
I tried learning clojure over a year ago and had a very hard time. It was my first attempt at a functional language. I gave up after a couple of weeks. Recently, I've been learning some Erlang and getting a better feel for functional thinking. I wish I had found a teacher who taught clojure this way back when I was trying to learn it. It would have made things so much easier for me. Great job!
This has to be one of the best "sales pitches" for clojure. How can you watch this and go back to JS/Java/Scala/python etc? Amazing presentation skills as well
I thought about that, then I realized that I don't need/want the jvm. Learning elixir and golang instead
@@RogueTravel I tried go, it's easy, but probably the most boring language ever. Elixir is interesting, but I have no idea about the BEAM VM and OTP. Also writing end everywhere seems annoying 😂 which one is your favourite elixir or go?
@@RogueTravel JVM is a world class VM but if you don't want it you can run V8 via ClojureScript or .NET via ClojureCLR or substrateVM via babashka or normal Clojure via graalvm (supports polyglot programming)
There's also lots of unofficial variants for Erlang and others all variants would work the same for the examples in this video
@@sfyire since this comment, I decided on Golang for my back end. The performance is great, pace of development is great. Language is a bit boring but I don't care, it has proven to be a good fit for what I need
@@gagansrai8137 I like elixir better than go, but go fits my needs more
Best introduction to Clojure I have seen. Would be great if @Misophistful could create an online course on the Clojure programming language. Brilliant presentation 👍
This is an incredible introduction to the design of Clojure and a brilliant tutorial for someone learning Clojure
I know I already commented seven months ago, but I'm watching this again and have to say it's easily the best introduction to clojure I've seen on TH-cam.
Great presentation, thanks
And, fantastic presentational skills! Clear and simple slides, very well articulated.
3:12 That is *Programming Language * design, and I totally agree. For a statically typed language true to this principle I’ve started learning OCaml and I’m loving it.
An absolutely amazing presentation. Congrats James, this has to be the clearest and most concise demonstration of any new language I have seen.
Is really brilliant how this guy explains the concepts in his own words. Thanks!
Loving the ->> piping. That plus the list-like basic structure of Lisp makes for a very familiar language to a person like me who loves R.
What an amazing intro to Clojure! You explained it so well that I was able to pause the video and implement the last thread-last macro example without any help. Really felt like I was playing with legos!
Loved that you went from the language design principles and showed how it looks like in practice. It was also great seeing the REPL in action and I can definitely see how it could be great for experimenting due to the fast feedback loop.
Thank you for the presentation James!
Hi Mo, thank you for your kind words, and congratulations on taking your first steps towards Clojure mastery!
Great tutorial. The only problem with Clojure is with people having experience with other programming language. There is a bit of unlearning that has to happen to get acquainted with the syntax of Clojure
unlearning clojure also has to happen when you go back to non-clojure world like missing , (commas)
@@cswaroop2 yeah you start to really get bothered by semicolons and commas and other silly things lol.
@@cswaroop2 tell me about it. I am doing some golang now and I hate every second of it
It's even worse going the other way. Knowing Clojure will make you absolutely hate some common languages.
@@zed9zed can confirm. I absolutely hate Go. I curse at it daily. It's torture.
I never coded in clojure, nor ever tried it. But I was able to catch up the syntaxes immediately. Such a nice presentations.
This is so freaking cool. I've never been "impressed" by a programming language before. It looks fun.
Very precise and deep introduction to Clojure. Thanks you.
Thank you for this awesome presentation. Truly a hidden gem for the ones like me learning clojure from scratch.
Search on here for 'Misophistful' for more of his [kinda] hidden gems. Helped me a lot. Particularly the destructuring tutorial.
great presentation . functional thinking with Clojure is a powerful drug !
Nice - I have recently last 2 years been learning Python. I see similarities. And lots of new ideas.
Thanks for sharing
Brilliant course. Thank you.
Brilliant how after you declare how much you love quotes you tell one yourself on collections being immutable "That gives us a stable base to build upon not a shifting sand of immutability underneath everything we are building"
4:26 he quotes: “when you combined two pieces of data you get data, when you combine two machines you get trouble“, well
I’m slightly puzzled. What are the machines? Pure functions? Stateful functions? Objects? Pure modules? Do their interface agree? Static typing or dynamic typing?
Regarding data: you may get data, consistent or inconsistent data. Maybe a compilation error if the data types don’t match up, maybe a runtime error downstream in case of semi-structured data …
Definitely a stimulating observation, as it touches the essence of software engineering: designing data and functions and building systems by combining them.
But you don’t always get trouble if you combine two machines, and merely combining data may just result in nonsense.
The Clojure syntax seems to be very interesting, I have not come across anything like that. The equivalent of the code shown at 15:42 in F# will be either [0..4] |> List.map (fun x -> x + 1) |> List.filter (fun x -> x % 2 0) or [0..4] |> List.map ((+) 1) |> List.filter (() 0 >> (%) 2) - both variants look "boringly conventional"😀.
Brilliant presentation. Thank you.
Coming from Typescript and Go I’m like “where are the type declarations?”. Its kinda cool what you can do without them though. Definitely going to give Clojure a try.
thank you very much James Trunk!
Great presentation! Very useful info.
After seeing a very large java production codebase whose stack traces looked worse than verdun after the first world war i can 100% feel what rich hickey wanted to avoid. Holy shit does OO under deliver. What a mess.
PS: after having seen the video now: clojure seems like a thing of beauty. Cant wait to get hands on with it
Brilliant format :)
I would love to see his emacs config file. Loved his theme and they parenthesis module he was using.
Yes!
Please let us know if you figure it out. I especially liked the parenthesis plugin
Looks like it was atom with the theme that's linked in his TH-cam channel but I couldn't find how he did the ghost themed parenthesis matching anywhere
@@ShahJrI believe it was the parinfer-rust plugin.
Awesome presentation. Well done!! Thanks a lot!!
Excellent, thanks.
Thank you for an excellent presentation! May I ask what IDE the presenter was using?
Hi Roman, you're welcome! I used Atom: atom.io with Proto REPL: atom.io/packages/proto-repl . Though I believe Chlorine: atom.io/packages/chlorine has become more popular with Atom-loving Clojure devs recently, as it's more actively maintained than Proto REPL.
@@Misophistful Hi James! I’m using VSCode + Calva plug-in right now. Will definitely try your setup. Thank you!
@Scott Hi Scott, I'm using the theme I designed, called Borealis: github.com/Misophistful/borealis-syntax
Does anyone know the color theme he's using ?
Could you tell me what the IDE was? The answer seems to be deleted unfortunately
Beautifully explained.
Great talk
Fantastic presentation!
Excellent live coding demo at the end. Makes me want to try Clojure sometime.
Great Talk!
what a sympathetic presenter. good talk :)
Amazing video. Thank you guys!
Really excellent presentation, any anxiety around live coding was well and truely unfounded. I am new to functional programming and find it hard to see the difference around data as a first class citizen compared to object oriented programming. The data appears to be loaded into memory and worked upon in much the same way as one would do with objects in OOP. Can’t see an obvious distinction.
Hi Ivan, with "first class citizen" I primarily mean that data structures have literal representation in Clojure's syntax. In Clojure, you can construct and populate a vector with the code "[1 2 3]", rather than having to construct and then populate an object with something like "ArrayList values = new ArrayList(); values.add(1); values.add(2); values.add(3);"
This syntax-level representation brings data structures directly into the language, and changes how you think and communicate about data.
What a nice IDE James uses. What's the name of this IDE? Sorry for nooby question.
Great speaker!
Excellent video!
Very well done!
really solid talk about clojure
wow, this was a great talk
what IDE or environment is he using for the live coding?
Thank you for the studio-quality audio and video.
All over the web, there're too many bad sounded videos since 2020...
That was superb!
This was great. The live coding examples were accessible and practical. They certainly illustrate how to get useful things done quickly (and very cleanly). Was that VSCode (with Calva)? If so, I wish I could get mine setup that well.
Was wondering that myself. Actually came to the comments to see if anyone mentioned it.
Can someone tell me which theme he is using? I want that 😁
Thanks for the talk! I haven’t used Clojure myself but it looks logical and readable.
What would you say are reasons not to choose Clojure?
How would you rate its performance, dependency management story, large codebase refactoring (I see no types) and the deployment of Clojure apps?
Thanks!
Clojure is a hosted language, the answers below are for Clojure on JVM:
- you get a very powerful VM for free. Persistent collections come at a performance cost, but (only if needed) there are many paths to improve the situation in hot loops,
- you get all Java libs for free. Java interop has no performance penalty and is plain clear. You can also reuse pure Clojure libs which can be fetched as code (eg from github) or as a compiled jar from Maven/clojars. For dependency management there's a built-in tool where you define lib versions in an edn (think of json) file
- to deploy you compile your project and assets in a uberjar, copy it to a production server and restart JVM
- there's a limited support for refactoring in tools like cider, perhaps in some IDEs too (I use vim). Despite having no types, Clojure is a compiled language, so any typos/missing declarations are caught immediately, and for me this would be the main source of bugs.
When not to choose Clojure:
- when JVM is not acceptable (memory wise or GC wise)
- when your domain does not have enough libs in Javaland
Otherwise this is the best language for JVM, period.
It is a perfect choice for web development.
Very good!
This insanely insightful, thank you!
It took 10 years for Java books to burn Object Encapsulation into my brain. 5 minutes to wash them all away :D
This is dope!
Does anyone know what IDE or programing program he is using? thanks! Amazing presentation too
atom + proto-repl + parinfer
What are the tools and IDEs used in this video?
@Misophistful uses Atom: atom.io with Proto REPL: atom.io/packages/proto-repl . Though I believe Chlorine: atom.io/packages/chlorine has become more popular with Atom-loving Clojure devs recently, as it's more actively maintained than Proto REPL.
@Misophistful, can you describe your VS Code setup? I'd love to replicate it!
What editor are you using ?
@Misophistful used Atom: atom.io with Proto REPL: atom.io/packages/proto-repl . Though @Misophistful belives Chlorine: atom.io/packages/chlorine has become more popular with Atom-loving Clojure devs recently, as it's more actively maintained than Proto REPL.
I just realized from the examples above
Functional programming in clojure done right looks a lot like SQL
One key difference may be SQL is usually composable using a join statement instead of a function
while clojure is composable with function of functions.
looks cool. there are different options for setti ng up working clojure emvironments. i dont know which of the options to choose, and is not that simple to set up..for say Vim editor.
which IDE does he use?
@Misophistful, James, used Atom: atom.io with Proto REPL: atom.io/packages/proto-repl . Though I believe Chlorine: atom.io/packages/chlorine has become more popular with Atom-loving Clojure devs recently, as it's more actively maintained than Proto REPL.
@@FuncProgSweden Han borde använda Calva, tycker jag. 😀 (Haha, j/k, I think it's super nice that people use what they are comfortable with using.)
nice. what's that editor?
Is this Calva?
What IDE are this guy using?
James used Atom: atom.io with Proto REPL: atom.io/packages/proto-repl . Though James believe Chlorine: atom.io/packages/chlorine has become more popular with Atom-loving Clojure devs recently, as it's more actively maintained than Proto REPL.
Liked for Mandolorian references
"Code as Data" Shouldn't that credit go to John McCarthy?
30:17 nearly took me out
I suspected it's Moby Dick from the load time alone before you revealed the word count. Now you're impressed? (Ok, the truth is, that it's a very common example...)
“Systems are dynamic and data driven. It might be a nice idea to use a language that is also dynamic and data driven.”
A brilliant summary of how you can pass utter rubbish for useful advice by making it vague enough and small enough.
“Our world is filled with objects. It might be a nice idea to have a language that is also filled with objects.”
Understand why it's wrong now?
You might be being a little uncharitable to Rich Hickey's quote here.
His quote uses the form "X has properties Y and Z, therefore if we want to build X we should probably use tools that help us with Y and Z." You could potentially refute this claim by arguing that X doesn't actually have the properties Y or Z, or that the suggested tool doesn't help you to achieve Y or Z.
However, I don't think creating a new quote with the form of "Our world is filled with X, therefore our tool should be filled with X.", demonstrates anything about the accuracy of Rich's claim. Especially when this new form is so easily dismissed with a counter example: "Our world is filled with socks. It might be a nice idea to have a language that is also filled with socks."
@@Misophistful I am making the point that the quote is completely meaningless and similar ones have been used in the past to sell things people don't like. He could be entirely correct but nothing in this quote or that video proved it.
My refutation is that half the words in the sentence are meaningless and they come together in a blatant appeal to naturalism. "Systems" are just as related to programming as the world is.
The biggest thing this ignores is abstraction. The whole point of programming is to remove most of the properties of the actual system because they are detrimental to understanding it. This is a failure for both the OO quote and the Rich one.
You have to skirt around this by replacing "tools that are X" with the more reasonable "tools that help with X". Tools with the same properties as problems are really just problems themselves.
I'm starting a new job and I'm forced to learn Java. You've ruined it for me. :)
The ->> operator is something I have never seen before nice way to remove nesting. Lisp is theoretically nice, until you try do anything useful; stupid overabundance of parentheses... I suppose the alternative for a language like this is Haskell where the syntax and order of operations is like dark magic... but why can't we invent a nice ballance? I want to put my + sign between the numbers at least. QWERTY keyboards are to blame i think.
First of all, Clojure has a good balance of parens, curlies and brackets (compared to other lisps). As for editing, have a look at parinfer -- it infers syntax from indentation, after that coding in Clojure becomes a breeze.
00
Too many brackets. If they use syntactic sugar already they could have dropped outer brackets and more. Constantly having to count brackets is annoying and unnecessary.
Do you know that IDE is a thing , right?
impressive