Lambda Calculus - Fundamentals of Lambda Calculus & Functional Programming in JavaScript

  Переглядів 194,472

Fullstack Academy

Fullstack Academy

День тому

Fullstack Academy was recently ranked the #1 coding bootcamp in the U.S. Learn more at www.fullstackacademy.com
The Lambda Calculus is a symbol manipulation system which suffices to calculate anything calculable. This branch of pure mathematics forms the backbone of functional programming languages, and here it is presented through the concrete and familiar lens of JavaScript.
In this Lambda Calculus video you will learn:
- Lambda Calculus Syntax
- History of the foundations of mathematical logic
- The essence of functional programming
🔗 Part II: • A Flock of Functions: ... 🔗 Slides: bit.ly/2xpcPKn 🔗 Repo: github.com/glebec/lambda-talk

КОМЕНТАРІ: 363
@tashburn
@tashburn 6 років тому
This was the clearest, most understandable introduction to lambda calculus I'm come across. Nicely done. Thanks for making it.
@chumeh9886
@chumeh9886 3 роки тому
Very True. it has been so troublesome to me, but now its so clear. thank
@john7556
@john7556 3 роки тому
Agreed: I'm only 2m21s into the video, and he has clarified so much of the syntax that I'm very impressed (and regretful at all the time I lost to other "explanations"!)
@otischance9144
@otischance9144 2 роки тому
Sorry to be so offtopic but does someone know of a trick to log back into an Instagram account?? I somehow lost my account password. I appreciate any tips you can offer me
@fabianjax4659
@fabianjax4659 2 роки тому
@Otis Chance instablaster ;)
@otischance9144
@otischance9144 2 роки тому
@Fabian Jax thanks for your reply. I found the site on google and Im waiting for the hacking stuff now. I see it takes a while so I will reply here later when my account password hopefully is recovered.
@alinisar87
@alinisar87 5 років тому
This is hands down the best intro to functional programming/lambda calculus out there. The fact that it only has 38k views at the time of writing is a crime of untold magnitude.
@gustavorino
@gustavorino Рік тому
Top quality is not for everyone, unfortunately
@joriskbos1115
@joriskbos1115 4 роки тому
Watching this video felt like unravelling the world's deepest conspiracy
@Yetipfote
@Yetipfote 3 роки тому
This comment is almost on par with the video!
@itskshitij
@itskshitij 6 років тому
Just want to say, those were some of the best slides I've ever seen.
@ninichanglife
@ninichanglife 5 років тому
the best lambda calculus explanation ever
@SeverityOne
@SeverityOne 4 роки тому
Less than seven minutes in and I can already see that this is great: clearly explained, well articulated, the works. But now I have to rush off to work, writing lambda expressions in Java.
@yannick6927
@yannick6927 4 роки тому
Welll, good luck!
@seyikareem8052
@seyikareem8052 4 роки тому
This should be a TED Talk, the preparation must have been intense. You Sir are a genius
@glebec
@glebec 4 роки тому
Not a genius, just had a lot of fun reading up on what other people figured out before me! What you DON'T see here is all the time and effort it took to untangle those ideas, practice them, and examine them from different angles before it made sense to ME. Once I did that, I really wanted to make the subject easier to understand for people like me… by coming up with explanations which I think might have helped. Thanks for the kind words regardless! :-)
@hi-zg8zc
@hi-zg8zc 3 роки тому
Gabriel Lebec please make videos like this! I guarantee you’ll get a lot of exposure
@charliegarrett5993
@charliegarrett5993 3 роки тому
This lecture is just unbelievably good. This guy is a very talented teacher/lecturer
@ziggy6698
@ziggy6698 5 місяців тому
I used to teach at a fullstack bootcamp and I'm completely blown away by the quality of this lecture. Feel like an absolute jabroni. Amazing my dude.
@mfrdbigolin
@mfrdbigolin 3 роки тому
Literally the best talk about lambda calculus on UKposts, after watching this video (and the second one), I am enthusiastic to read To Mock a Mockingbird.
@olivierbegassat851
@olivierbegassat851 6 років тому
This was remarkably clear, a lot of thought must have gone into preparing this talk ! Thank you so much for this excellent talk : )
@codegeek98
@codegeek98 2 роки тому
[0:00:00] Intro [0:00:48] I = a => a [0:01:48] Notation [0:06:39] Functions [0:09:15] Beta-reduction [0:11:49] M = f => f(f) [0:15:04] "n-ary" shorthand [0:17:00] K = a => b => a [0:18:44] KI = a => b => b [0:20:49] History [0:29:30] Combinators? [0:31:00] C = f => a => b => f(b)(a) [0:33:46] T = K; F = KI [0:39:53] not = p => p(F)(T) [0:42:21] not == C && not !== C [0:45:30] and = p => q => p(q)(p) [0:48:39] or = p => q => p(p)(q) [0:49:29] or == M [0:51:41] beq = p => q => p(q)(not(q)) [0:54:19] ¬(P ∧ Q) === (¬P) ∨ (¬Q) [0:55:01] Closing [0:56:48] Basis [0:58:15] WHY? [1:00:37] Y- and Z-Combinators [1:01:58] Outro
@glebec
@glebec 2 роки тому
Thanks for the timestamps!
@florianvanbondoc3539
@florianvanbondoc3539 Рік тому
Thanks for you work!
@ivandrofly
@ivandrofly 7 місяців тому
Good one thanks
@SatyajitGhana7
@SatyajitGhana7 5 років тому
53:02 *that's XNOR !*
@theogiani8562
@theogiani8562 4 роки тому
Yes ;-)
@omrishavit8843
@omrishavit8843 3 роки тому
I thought the same! And then when he said "boolean equivalence" I felt both stupid/wrong and smart/correct
@gumfun2
@gumfun2 3 роки тому
Right. I thought of it as 'if and only if'
@patrikhagne9204
@patrikhagne9204 3 роки тому
Beautiful talk! I love the way you tie it into javascript, the one functional language that everyone understands!
@pjnoonan1423
@pjnoonan1423 3 роки тому
This just opened a whole new world to my mind. I can't thank you enough for making and posting this. You can't possibly know how deep my thanks are to the presenter, the staff, and all other associated people. Keep doing what your doing, and you'll find someone will change the world because of your work. Thank you, and bless you all.
@rboes208
@rboes208 3 роки тому
This is exactly how I feel as well!
@theblackunderflow1842
@theblackunderflow1842 3 роки тому
FullStack is amazing man!
@aMulliganStew
@aMulliganStew 5 років тому
Mr. Lebec’s talk was excellent. If I had the desire to return to professional programming, I would be knocking at your door.
@tauruscolvin
@tauruscolvin 4 роки тому
I’m a long time software engineer. Have been focusing on functional javascript the last couple years. Have been trying to put my finger on why functional feels so much better than other methods. This video and others like it get at it. Functional programming connects to underlying fundamentals such as the lambda calculus and category theory. Fundamentals which transcend a particular language. Functional programming feels like performed art. It’s satisfying again. Symmetrical, elegant, mathematical. I can tell the presenter *feels* the beauty of the lambda calculus too. Thanks for sharing!
@usamakhawaja8571
@usamakhawaja8571 4 роки тому
38 minutes into the talk and can't resist to appreciate. Very well explained
@Rachel-zw8sy
@Rachel-zw8sy 6 років тому
Such a great explanation of lambda calculus that I was so confused about -- thank you!
@sab611
@sab611 6 років тому
Very helpful on my path to understanding functional programming. If you make any more related vid's I'd like to know.
@AK-vx4dy
@AK-vx4dy Рік тому
Clearly clearest explanation on YT
@MCLooyverse
@MCLooyverse Рік тому
On the bit about XOR or equality (@52:35): On booleans, *not*-equal is the same as XOR. We have && and || operators for AND and OR, but nothing for XOR... except you can use != for that. I also thought it was XOR at first, because I noticed the functions behavior was to return either q or !q, depending on p, it's just that XOR returns !q when p is true, and q when p is false, while equality does the opposite.
@mortenkristiansen2905
@mortenkristiansen2905 Рік тому
This is correct and can be verified quickly by a truth table.
@JulianTontiFilippini
@JulianTontiFilippini 4 роки тому
Brilliant presentation. I can see why Gabriel said he spent a long time making it.
@yingkui
@yingkui 5 років тому
Great Work. Both the thoughts and the slide deck. Amazing!
@ilkero1067
@ilkero1067 5 років тому
Excellet introduction! I knew nothing, (despite watching another video by which I was more confused than enlightened) now things are much clearer, bravo!
@waltermelo1033
@waltermelo1033 4 роки тому
first time in life that i can understand why lambda calculus are so amazing :D congratulations
@profdre
@profdre 6 років тому
Great video. Easy to understand, the idea to translate lambda into fat arrow functions works perfectly for me... I'm going to spend the rest of the evening playing around with the nodejs prompt. Great video!
@simongarcia5648
@simongarcia5648 6 років тому
Thank you for this talk, insanely good and fun!
@Kunleskeleton3332
@Kunleskeleton3332 5 років тому
thanks so much. for a newbie to understand this, is remarkable on your part.
@LyubomyrSemkiv
@LyubomyrSemkiv 4 роки тому
I liked how nicely this video was placed in the left bottom corner so I can't see was the lecturer is typing. Good job!
@glebec
@glebec 4 роки тому
Sorry about that! I didn't realize the bottom-left corner was going to be such prime real estate. Slides are linked in the description - I know it's not as good as seeing them live in the video, but I hope they help fill in any gaps regardless! :-)
@LyubomyrSemkiv
@LyubomyrSemkiv 4 роки тому
@@glebec I managed to guess covered parts :-) Thanks for the video!
@trblyoo823
@trblyoo823 5 років тому
Hands down one of the most clear and concise videos I've seen introducing basic concepts of Lambda Calculus. Gabrial's excitement pretty much forced me to crack open a REPL and follow along. I'll now be locked away composing combinators for a very long time. It's also so painfully obvious how this subject can help to write more clean, readable, and declarative code. Great Job on this one. Part two blew my mind! The more I try to "play" with these combinators, the more I see the need for FP data structures. If anyone has any recommendations for similar talks, specifically on Lambda Calc within Javascript, I'd really like to see more on the subject! :D
@yathi
@yathi 3 роки тому
This is the most amazing explanation of Lambda Calculus I have come across! Thank You !
@thomasononano9208
@thomasononano9208 5 років тому
I'm half way through this, just wanted to praise the speaker and the talk, real quality, perfect for my entry-level FP disposition.
@psychedel0c
@psychedel0c Рік тому
This probably just saved my midterm grade, 10000x more clear than anything my professor has ever said. Also, this dude looks like the Jeff Winger of logical mathematics
@glebec
@glebec Рік тому
Hahah, you are the third person to tell me I look like Joel McHale. I don't really see it but I'll take it. 😂
@pawandesh
@pawandesh 4 роки тому
Best video on Lambda Calculus ever. Got to know about the combinatorial logic for the first time so clearly. Thank you. 🙏👍🏽
@MinhLe-xk5rm
@MinhLe-xk5rm 5 років тому
Great tutorials on functional programming. Thank you!
@odiseezall
@odiseezall 2 роки тому
I finally get how much you need to know and understand to start contemplating creating a start-up company.
@Silkerdax
@Silkerdax 6 років тому
Very helpful! Thanks for the talk.
@monkeytrollhunter
@monkeytrollhunter 4 роки тому
Thank you so much, I had no luck understanding beta reduction but you made it so clear with such complex example.
@korvstenius
@korvstenius 4 роки тому
This presentation blew my mind. Awesome stuff!
@cashmoneyhustler
@cashmoneyhustler Рік тому
Thank you so much. This is the best UKposts video on the topic. I was lost in the sauce until I watched this
@yuanyeo6926
@yuanyeo6926 Рік тому
Remarkable, this is the video recommended by my professor
@wasifzaman1399
@wasifzaman1399 6 років тому
This is so engaging! Thank you!
@estebanmarin002
@estebanmarin002 5 років тому
Amazing! It seems so simple.
@myhandlehasbeenmishandled
@myhandlehasbeenmishandled 4 роки тому
Thank you for placing the video of the speaker over what he types. It really helps. /s
@callumvanheerden1530
@callumvanheerden1530 3 роки тому
You can see his passion. Great work.
@VladTrishch
@VladTrishch 6 років тому
I am impressed. Math is so beatiful! Thanks for an awesome talk.
@alexlindgren1
@alexlindgren1 3 роки тому
This was a really good presentation, informative, easy to listen to and with some humor. You did a really good job at helping me understand this stuff, thanks for that.
@lc11s
@lc11s 3 роки тому
Well done - fantastic lecture - best explanation of lambda calculus I came across so far!
@krish2nasa
@krish2nasa 6 років тому
Excellent presentation, Thank you very much
@ivandrofly
@ivandrofly 8 місяців тому
Best explanation on the internet
@florianwicher
@florianwicher 3 роки тому
This guy does everything right. Also love his use of PowerPoint
@samueleagostinelli5346
@samueleagostinelli5346 5 років тому
This is absolutely fascinating. Thanks!
@wingsonthebus
@wingsonthebus 2 роки тому
The prettiest slides I have ever seen. edit: also some of the most engaging math/programming teaching I have ever been privy to!
@glebec
@glebec 2 роки тому
Thanks!
@rboes208
@rboes208 3 роки тому
That was an amazing talk, thank you!
@ioannpilipchuk8476
@ioannpilipchuk8476 4 роки тому
This video is very helpful and understandable!!!Thanks!
@Joemakatozi1776
@Joemakatozi1776 3 роки тому
Such a clear talk. Thank you.
@piq-dg3vz
@piq-dg3vz 6 років тому
This is amazing! Thanks!
@myhumblebeginnings
@myhumblebeginnings Рік тому
Mr. Lebec, thank you very much for this material of yours. I will do my best to digest this to the best of my intellectual ability.
@maNIKLAS2012
@maNIKLAS2012 Рік тому
Thanks for the great presentation!
@azurewang
@azurewang Рік тому
so clear explained and slide are just artwork
@amir650
@amir650 Місяць тому
What an amazing speaker and so much content to revisit. I love this video.
@DamjanPavlica
@DamjanPavlica 5 років тому
It is strange how simple concept is it, but yet I could not easily adjust my brain to that level of abstraction.
@glebec
@glebec 4 роки тому
It honestly took me a lot of reading, thinking, and practicing, and I have a degree in math. But like everything in math, with enough time it becomes much easier. I tried to make it easier than when I learned it! :-)
@pgovindraj
@pgovindraj 6 років тому
Great explanation!
@kevinwang6188
@kevinwang6188 5 років тому
This is just beautiful and amazing!
@MorisonMs
@MorisonMs 6 років тому
phenomenal lecturer
@jags4all
@jags4all 5 років тому
What a beautiful talk....
@oneofvalts
@oneofvalts 6 років тому
Neat, thank you for your effort.
@vld-blv
@vld-blv 4 роки тому
Thank you for this video!
@rob6129
@rob6129 3 роки тому
I was very skeptical at first but it turned out to be well worth the watch
@bestieboots
@bestieboots 2 роки тому
This is amazingly good. I'm just blown away.
@1K1NDR3D
@1K1NDR3D 6 років тому
Great talk, thanks!
@paxdriver
@paxdriver 5 років тому
It is so hard to teach this subject, excellent job
@Temporelucis
@Temporelucis 6 років тому
Super cool, thanks a lot!
@scifregizmoguy
@scifregizmoguy 4 роки тому
Amazing talk. Thank you.
@alexanderhorstkotter2910
@alexanderhorstkotter2910 3 роки тому
Great and fun explanation, thank you very much
@florianwicher
@florianwicher 6 років тому
Loved the presentation. This guy really knows how! :D
@lennyvsguitar
@lennyvsguitar 6 років тому
Florian Wicher I absolutely agree.
@AndersJackson
@AndersJackson 6 років тому
Beta-normal form are shown not to be calculated in general form already in the 30:th by Entscheidungsproblem presented as one of many problems by D. Hilbert in 1928. In 1936 A. Church and A Turing showed independently with Lambda Calculus and Turing Machine that it was not possible to make a program that could decide if a program was decidable. It is called Church-Turing thesis. This is fun reading: en.wikipedia.org/wiki/Entscheidungsproblem
@kenho811
@kenho811 4 місяці тому
This is an excellent talk. Thank you so much 😊😊
@amanutkarsh724
@amanutkarsh724 2 роки тому
Thankyou so much for the lecture.
@levanroinishvili1
@levanroinishvili1 6 років тому
Wonderful talk!!! Many thanks!
@glebec
@glebec 6 років тому
Thank you for the kind feedback. Glad you enjoyed it.
@StasBar
@StasBar 3 роки тому
Amazing, you are a great lecturer.
@theogiani8562
@theogiani8562 4 роки тому
Excellent indeed, Thank you !
@gumfun2
@gumfun2 3 роки тому
Great video, preparation, delivery, ...
@vineboomsoundeffect5395
@vineboomsoundeffect5395 7 місяців тому
The best video on λcalc‼️‼️
@JosephCaburnay
@JosephCaburnay 6 років тому
Awesome, man! Just awesome!
@nnhm
@nnhm 4 роки тому
The first talk after which I started to understand lambda-calculus
@adumont
@adumont 2 роки тому
An excelent talk!
@purrkachuu
@purrkachuu 2 роки тому
1000x better than university professor's explanation
@nihilist809
@nihilist809 5 років тому
The enthusiasm is intoxicating.
@aiohto7884
@aiohto7884 Рік тому
Best explanation yet from a high school student perspective thank you :)
@fringefringe7282
@fringefringe7282 2 роки тому
This is fantastic!
@NathanCho
@NathanCho 3 роки тому
Absolutely beautiful 10/10 Would watch it again
@user-ze1es8gr4p
@user-ze1es8gr4p 3 роки тому
omg~ to understand this lecture, I study hard english! worth it! Thank you.
@SaisBlade
@SaisBlade 5 років тому
Thanks for the great talk! I've been fascinated by this subject for a long time and this really helped cement the concepts better in my mind. One thing I'd like to understand better though, about the M* function (50:52): You say "The Mockingbird once removed is extensionally equal to the Mockingbird". If I understand correctly, these are the definitions we're working with: (0) M := λx. x x (0*) M* := λxy. x x y Applied to another function a: (1) M a = a a (1*) M* a = λy. a a y Applied a 2nd time (2) M a b = a a b (2*) M* a b = a a b It's clear to see that (2/2*) are intentionally (and extensionally) equivalent. (1/1*) appear to extensionally equivalent, since their applications yield intentionally equivalent functions But of (1/1*) - one of them (M*) is a lambda statement, while the other is an expression (no bound variable) Couple questions about this: A. does lambda calculus draw a line between these two concepts? or are they irrelevant distinctions? B. Since (0/0*) yield extensionally equivalent functions (1/1*), and thus any sequential applications of them will yield the same (extensional) results - is it fair to say that extensional equivalence is "backwards propagatable" in general? P.P.S.- To any non-JS programmers- I have no background in Javascript and had no issue following, the code use here is minimal and basic :)
@glebec
@glebec 5 років тому
Thanks for this excellent question! Looking back on this talk, I feel I probably spoke too cavalierly about the M* function, especially as I think I may have subsequently seen definitions for "once removed" functions which differ from my example. Jargon aside, however, we can still talk about the logic. You asked: A) does LC draw a line between lambda statements vs expressions? B) Since (0/0*) yield extensionally equivalent functions (1/1*), and thus any sequential applications of them will yield the same (extensional) results - is it fair to say that extensional equivalence is "backwards propagatable" in general? Hm, interesting question. Certainly LC distinguishes between these at the level of the *grammar* (formal definition of the symbols in the language and how they may be arranged). In the LC grammar, an Expression is either a Value, Application, or Lambda abstraction. Clearly, (1) is an application whereas (1*) is an abstraction. And yet, as we can demonstrate via 2/2*, they are extensionally equal from the perspective of _application behavior_. I think what this comes down to is the notion of "equality" is contextual; we can define extensional equality in terms of application results (which 1/1* uphold), or we can talk about equality in terms of sentences in the grammar (which 1/1* obviously fail to pass). More practically, this sort of thing DOES have profound implications from the perspective of e.g. laziness or evaluation strategies. "Wrapping" some expression E in a "useless" abstraction like `λx.E x` is called "eta expansion". In an eager language like JavaScript, if E is itself an application like `a(a)`, then what you've done is prevented the evaluation of that expression by putting it inside a function body. The evaluation will therefore never be attempted if the function isn't invoked. This technique (eta expansion) is key to representing the Y combinator in JS; the Y combinator unfortunately cannot be used directly in JS because it would trigger infinite recursion. However, the Z combinator uses eta expansion to make part of the evaluation "thunked" or delayed. From LC we know that eta-expanding an expression is extensionally equal to the original expression, so we haven't changed the meaning of the combinator, but we HAVE changed its use case in the context of an engine which evaluates functions "eagerly". (BTW, eager evaluation means arguments to functions are evaluated before being substituted into the function body.) I didn't go much into this in the presentation, but it's a fact that "normal order" evaluation (leftmost outermost) will always find an answer if the expression doesn't diverge; JS doesn't use "normal order" however. Eta expansion can be carried out ad infinitum: `E` becomes `λa.E a` becomes `λb. (λa.E a) b` which becomes `λc. (λb. (λa.E a) b) c` and so on. All are extensionally equal as we have determined, but different evaluation strategies could result in different intensional representations, and some evaluation strategies could in theory fail to terminate. I suppose this implies that our definition of extensional equality only *really* holds for normal order evaluation! I have to think on this more. Thanks again for the stimulating thoughts, -G.
@joseville
@joseville 2 роки тому
@@glebec What is normal order evaluation? (leftmost outermost)?
@glebec
@glebec 2 роки тому
@@joseville Normal order evaluation is as follows: when multiple parts of an expression could be beta-reduced (i.e. simplified), choose to beta-reduce the leftmost, outermost expression first. For example, in `foo (bar 8) (qux 9)`, the definition for `foo _ _` will be substituted in before `bar 8` is computed and before `qux 9` is computed.
@philipvankampen3394
@philipvankampen3394 4 роки тому
very clear ad thanks for the heads up on 'to mock a mockingbird.' It's on my x-mas list.
@RohitWason
@RohitWason 5 років тому
This is simply beautiful. As beautiful as the concept of Lambda Calculus is, you have done an equally elegant job at explaining it, along with a hint of some JS genius. Thank you!
@stephenjames2951
@stephenjames2951 2 роки тому
A great talk fun and truly informative.
@gooomaaal
@gooomaaal 6 років тому
extraordinary
Functional Programming in 40 Minutes • Russ Olsen • GOTO 2018
41:35
GOTO Conferences
Переглядів 800 тис.
Lambda Calculus vs. Turing Machines (Theory of Computation)
1:08:24
Advait Shinde
Переглядів 13 тис.
Мама и дневник Зомби (часть 1)🧟 #shorts
00:47
Помилка,  яку зробило військове керівництво 🙄
01:00
Радіо Байрактар
Переглядів 263 тис.
What is a Monad? - Computerphile
21:50
Computerphile
Переглядів 587 тис.
What is Lambda Calculus? (ft. Church Encodings)
15:11
Alex Lugo
Переглядів 50 тис.
Lambda Calculus - Computerphile
12:40
Computerphile
Переглядів 995 тис.
How principled coders outperform the competition
11:11
Coderized
Переглядів 1,5 млн
Big Tech AI Is A Lie
16:56
Tina Huang
Переглядів 36 тис.
Something Strange Happens When You Follow Einstein's Math
37:03
Veritasium
Переглядів 4,5 млн
David Beazley - Lambda Calculus from the Ground Up - PyCon 2019
3:26:34
We should use this amazing mechanism that's inside a grasshopper leg
19:19
Introduction to Combinatory Logic - #SoME2
29:48
Malta Mathematical Society
Переглядів 17 тис.