David Beazley - Lambda Calculus from the Ground Up - PyCon 2019

Поделиться
HTML-код
  • Опубликовано: 22 окт 2024

Комментарии • 68

  • @TheEntireUniverse
    @TheEntireUniverse 5 лет назад +73

    He should do a tutorial on how to customize his environments to do this stuff.

  • @PGouges35
    @PGouges35 5 лет назад +48

    I live for these tutorials. David Beazley is my personal Jesus

    • @CucuExploziv
      @CucuExploziv 4 года назад +3

      I'd compare him to Moses - spliting the fog of your mind!

  • @jiamingsun1701
    @jiamingsun1701 5 лет назад +27

    The talk continues at 1:43:50

  • @m.h.7121
    @m.h.7121 3 года назад +8

    Yoo, i am not joking at all, David beazley should be nominated as a lord of the python universe. No way the amount of knowledge he has. I am not surprised at all since he started programming at something around 11 years old. What an absolute legend. I always wished i knew programming at an early age of my life. Hopefully, i am still in my 20's. Holy Jesus freak, this guy is the lord of the rings. Anyway, i hope y'all doing great during this shitty pandemic time and shit. Have a good day/night.

  • @malikrumi1206
    @malikrumi1206 5 лет назад +9

    "... have a lot of fun, be completely amazed, and learn some foundational computer science that is a jumping off point for further explorations of functional programming..." IS practical and useful !!!

  • @plectro3332
    @plectro3332 3 года назад +1

    Hands down best Lambda Calculus tutorial out there

  • @freddupont3597
    @freddupont3597 5 лет назад +14

    Have not had so much fun in some time; mind suitably, and delightfully blown! :-) An afternoon well spent, thank you Mr Beazley!

  • @gpk6458
    @gpk6458 5 лет назад +6

    Man, this was so much fun to follow along to. I don't think my brain will be done processing this for a while. That kid with the high-pitched voice is very annoying, though.

  • @x87-64
    @x87-64 2 года назад +1

    This was totally insane. He is a brilliant teacher.

  • @pahvalrehljkov
    @pahvalrehljkov 3 года назад +4

    its official, im gonna search whole web for david beazleys videos...

  • @SKyrim190
    @SKyrim190 5 лет назад +4

    For some reason his intonation cracks me up!

  • @MatthiasBlume
    @MatthiasBlume Год назад

    To me the best way to understand what that R function is goes as follows:
    Suppose you have some slightly crappy version of factorial, call it crappyfact that only works for arguments 0 ... N for some number N, but not for arguments bigger than N. Then R(crappyfact) returns a slightly improved version of factorial - slightly less crappy, because it will work for arguments up to N+1.
    The actual perfect fact is a fixpoint of R because R cannot improve it further. As a matter of fact (no pun intended), this fixpoint is the so-called LEAST fixpoint. It is the "least crappy" version of factorial that cannot be further improved by R.

  • @cheaterman49
    @cheaterman49 4 года назад +4

    Some things are really subtle AF:
    >>> THREE(FOUR)(incr)(0)
    64
    >>> THREE(FOUR(incr))(0)
    12
    I got stuck a while when implementing multiplication. It makes a lot of sense but is very hard to wrap your head around!!!
    EDIT: Explanation (to the best of my understanding...) - in the first case, we're creating a function that will call three times the "call four times" operator so that's 4*4*4 calls applied to the function, while in the second one we're creating a function that will call four times incr and then we call that function three times, so 4+4+4 calls.
    EDIT2: Also, to the best of my understanding, there's no easy/good way to reuse ADD to implement MUL - but I'd love to be corrected with an example. :-)
    EDIT3: Well Tenchi below did it :-) I do stand corrected!

  • @matthewblott
    @matthewblott 5 лет назад +3

    I've watched the first hour and my mind is blown.

  • @thanasiosmetallidis5642
    @thanasiosmetallidis5642 3 года назад +3

    The most interesting video I have ever seen.
    With this we can build a whole UNIVERSE starting to define the NOTHING ( The emptyness ).
    Am I write when I say that the definition of NOTHING is the begin of all there is.
    And that the execution ( instance ) of NOTHING is the creation of ALL

  • @SKyrim190
    @SKyrim190 5 лет назад +2

    That was really insightful, specially the way he described the Y-combinator. It made complete sense. I would suggest anyone who already knows basic lambda calculus to jump to around 2:30:00 though

  • @2xhTenchi
    @2xhTenchi 5 лет назад +9

    When following the course and trying to implement things before David shows how to do them,
    I came up with a multiply that doesn't involve an F and makes more sense to me:
    MUL = lambda x: lambda y: y(ADD(x))(ZERO)
    We repeat y times "ADD(x)" to ZERO

    • @jlhidalgo
      @jlhidalgo 5 лет назад +6

      The "easy" way for me to understand natural numbers in lambda calculus, that makes all this much simpler, is to think that we are defining "once", "twice", "thrice" etc. and using those concepts to represent "one", "two", "three", etc. Then "sum a b" actually means "do a and then do b", as in "do twice and then once more to the result", which equals "do tree times". And "mul" is "do a to b, and then apply it", like in "do twice to twice, and apply that", which equals "do four times". Thus the additional lambda in David's definition of mul is (somehow) obvious.

    • @cheaterman49
      @cheaterman49 4 года назад +1

      Hehehe, I was looking for this, thanks!

    • @x87-64
      @x87-64 2 года назад +1

      I came up with the same. We can do Power in a similar way.
      POW = lambda n: lambda m: m(MUL(n))(ONE)

  • @StefanoBorini
    @StefanoBorini 5 лет назад +7

    This lecture broke my brain

  • @billcolak5253
    @billcolak5253 3 года назад

    david beazley is my spirit animal.

  • @varunpatkar501
    @varunpatkar501 4 года назад +2

    I came here after i failed to solve a codewars question about this topic and now i'm really interested about this

    • @x87-64
      @x87-64 2 года назад +1

      You just started the journey into the deepest rabbit hole

  • @mikelezhnin8601
    @mikelezhnin8601 5 лет назад +4

    The recursion magic broke me.

  • @boomiboom3900
    @boomiboom3900 2 года назад

    Wuuuuuut
    This is like the most amazing math thing ive ever seen.

  • @calebgindelberger3046
    @calebgindelberger3046 5 лет назад +6

    I'm almost glad I wasn't there, guessing my yelling "zero is false!" Wouldn't have gone well

  • @DeanLa
    @DeanLa 4 года назад +2

    How does he do the code with slide next to it?

  • @MatthiasBlume
    @MatthiasBlume Год назад

    Simplification: You don't have to modify ISZERO and you can use the normal TRUE and FALSE. You would still pass thunks as second and third arguments to ISZERO, and then you invoke the thunk at the end after ISZERO returns:
    lambda n : ISZERO(n)(lambda dummy: ONE)(lambda dummy: MUL(n)(FACT(PRED(n))))(TRUE)
    (The last TRUE is the dummy argument and could be anything.)

  • @oxereviscerator
    @oxereviscerator 3 года назад

    Incredible.

  • @_intruder
    @_intruder 2 года назад

    I've never felt so excited to implement a SUCC, let me tell you.

  • @aaronhall8039
    @aaronhall8039 5 лет назад +4

    Very large gap from 1:20:00 to 1:42:00

  • @amelemara4615
    @amelemara4615 5 лет назад

    Damn, that's some really out there python.

  • @michellethalakottur9328
    @michellethalakottur9328 3 года назад

    awesommeee

  • @section9999
    @section9999 4 года назад

    anybody know where that mind blown meme is from in the image @1:09:00? Its so common I kind of want to see the original video. Was it for like a mediation guru thing or something like that?

    • @mehoyminoy9224
      @mehoyminoy9224 4 года назад +1

      Tim and Eric's "The Universe"

    • @section9999
      @section9999 4 года назад +1

      @@mehoyminoy9224 Dude awesome, thank you. 😜

  • @StankyPickle1
    @StankyPickle1 5 лет назад +4

    Is it Christmas already?!

  • @raghavatreya4533
    @raghavatreya4533 5 лет назад

    Presentation material link??

  • @allenstevens4216
    @allenstevens4216 5 лет назад +4

    As soon as you can build a not gate with a function, you can build all circuits, as soon as you can build all circuits you can build a computer, etc etc etc. I don't know how many people minecraft before, but you can build entire computers that run code and software and decision trees inside the game, with nothing more than a not gates, thousands of them. So.... I'm done screaming at the video... But I see where this is going.

    • @calebgindelberger3046
      @calebgindelberger3046 5 лет назад +1

      You get NOR and NAND really early, so full logic is easy and proveable

    • @omega82718
      @omega82718 5 лет назад

      Minecraft is Turing-complete so yeah

    • @clementdato6328
      @clementdato6328 2 года назад +1

      This is not what the video means. When you are talking about binary coding, you talk about an external interpretation of the binary code. In the intrinsic fashion, the ONE defined in there is fundamentally different from the one the you build by stacking up a computer based on the logical gates that he made. The one is the only one, the ONE in that universe.
      That’s also why the iszero does not work. True False cannot be intrinsically determined. Equality and so on relies on an external interpretation.

  • @kurianbenoy9369
    @kurianbenoy9369 5 лет назад +2

    Low audio

  • @freddupont3597
    @freddupont3597 5 лет назад

    ISZERO(CONS(2)(3)) --> ) too.

  • @TacticalReligion
    @TacticalReligion 3 года назад +1

    WHATEVER GENIUS WAS IN CHARGE OF THE DYNAMIC RANGE OF THIS RECORDING... A CURSE ON YOUR FAMILY

  • @rohithill
    @rohithill 5 лет назад

    What setup is he using? What is he writing his code in along with presentation?

  • @poojanpatel2437
    @poojanpatel2437 5 лет назад +12

    that stupid guy at 30:00

    • @gpk6458
      @gpk6458 5 лет назад +11

      He's very annoying all the way through. He's listening to a talk on lambda calculus and how to do logic using nothing but functions and thinks to himself "I wonder if this guy knows about truth tables?" Something you learn in day one of computer science...

    • @cronaut5429
      @cronaut5429 5 лет назад +5

      I don't remember the last time I actually wanted to punch someone in the face, but, somehow, he evoked this feeling in me without me ever seeing that face.

    • @MrHaste12
      @MrHaste12 4 года назад +1

      @@gpk6458 The way he comments on every single thing is like he thinks he's got a private lesson with Beazley

    • @amyfalconer1660
      @amyfalconer1660 4 года назад +2

      @@MrHaste12 That guy is killing me right now. His commentary totally breaks the flow. I'm not trying to be mean, as I'm sure he'd feel awful reading this, but geez louise.

    • @sssveny
      @sssveny 4 года назад

      He’s so rude at 1:51:10 basically saying “i don’t find this interesting, can you move on?”

  • @jeffschlarb4965
    @jeffschlarb4965 4 года назад

    github.com/PyCon/2019-slides
    is 404

  • @jungjunk1662
    @jungjunk1662 3 года назад

    He is confused a bit

  • @CrapE_DM
    @CrapE_DM 5 лет назад

    That's not how an electrical switch works... The middle one supplies the power, and the switch decides which of the two sides receives the power.

    • @crimsun7186
      @crimsun7186 5 лет назад +2

      That's only if the switch is a SPDT switch. What David is probably thinking of a SPST switch, which only has two contacts.