Tony Zhang
Tony Zhang
  • Видео 51
  • Просмотров 483 217
Lambda Calculus: The foundation of functional programming, and the simplest programming language
Lambda "Calculus" is a extremely concise way to represent logic and computing - just like a Turing machine. Instead of a Turing machine's mechanical and step by step way of computing, lambda calculus looks much more similar to regular math and "computes" by substituting and simplifying.
Timestamps:
00:00 intro
00:36 logical explanation
02:20 formal explanation
06:47 currying
08:47 church encoding for numbers
12:02 recursion
--------------
My website: tonyzhang.net
My Github: github.com/Tony1324
Contact me: hello@tonyzhang.net
Просмотров: 31 746

Видео

I tried learning a programming language, but it turns out it's just math.
Просмотров 166 тыс.Год назад
I first heard of a programming language, Haskell, and wanted to try it because people were saying it changes your way of thinking, makes you more productive, etc. But I didn't know how weird this language actually was. I was struggling to write anything that even ran for the first couple of weeks. The language is so weird because it's declarative and function, basically a completely different c...
Ray Tracing from Scratch in 10 Minutes | Javascript
Просмотров 8 тыс.2 года назад
The full code for this video is here: gist.github.com/Tony1324/bbd45f3f87c480b6f205906242000f2a The code in this video is a somewhat simplified version of a ray tracer I built a couple months ago. You can see that at tony1324.github.io/raytracer/ The major differences are that it supports triangles in addition to spheres (all you need is to make a triangle intersection function), some more orga...
Linked Data Structures | Data & Things
Просмотров 7072 года назад
Linked data structures probably make up around most data structures that exist, it also happens to be extremely simple, all you have are a bunch of values, or pieces of data floating around - what we call nodes, and then we have connections between them, which are the links. They have a bunch of fun properties over fixed or static data structures, mainly being how fast they are to modify, with ...
The Modulo % isn't what you expect (For half of the numbers)
Просмотров 9562 года назад
I have been working with Javascript for quite a long time, yet I for some reason I didn't notice this inconsistency. countless documentation have also referred to the operator as the modulo, when in fact it doesn't behave the same as the mathematical modulo. In python, however, it does. 8 mod 5 = 3 -8 mod 5 = ? My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang...
Explanation and Proof of RSA Encryption
Просмотров 2,2 тыс.2 года назад
Timestamps: 00:00 Intro 00:13 Example 00:47 Basic principles behind the algorithm 05:10 key generation example. 05:52 Finding the Modular Multiplicative Inverse My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
Encryption with ridiculously simple examples | Part 1
Просмотров 4602 года назад
Timestamps: 00:00 Introducing our characters 00:18 Basic steps 01:05 Extremely simple example 1 03:44 Public private key encryption & Extremely simple example 2 My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
Hash Functions, Hash Tables, Passwords, and Checksums | Data and Things
Просмотров 4132 года назад
Timestamps: 00:00 Book searching example 03:46 Hash function basic properties 06:11 A better hash function 07:51 Hash tables and JS Objects 09:33 Checksums 11:41 Passwords My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
Just how much can you do with functions? | Haskell, Functional Programming, & Monads
Просмотров 6 тыс.2 года назад
From www.haskell.org: "Every function in Haskell is a function in the mathematical sense (i.e., "pure"). Even side-effecting IO operations are but a description of what to do, produced by pure code. There are no statements or instructions, only expressions which cannot mutate variables (local or global) nor access state like time or random numbers." Functions are something that take a value and...
The surprising complexity behind the Right Click Menu
Просмотров 4222 года назад
So how do they predict what you want to do *before* you move your mouse? My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
Two’s Complement: The simple way to deal with negatives and subtraction | Data & Things
Просмотров 2652 года назад
My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
Variables & Pointers | Data & Things
Просмотров 2982 года назад
My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
Part 0: A Quick Intro | Data & Things
Просмотров 2722 года назад
My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
How web pages can talk to each other | LocalStorage, BroadcastChannels, and PostMessage
Просмотров 3,5 тыс.2 года назад
Turns out it is possible to easily pass data between different web pages, in less than 10 lines of code. Timestamps: 00:00 Intro 00:40 Setup / Making UI 03:47 The LocalStorage Way 07:06 The BroadcastChannel Way 10:12 The PostMessage Way 14:35 Conclusion My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
An undefeatable Tic Tac Toe AI with Minimax! | Tic Tac Toe Part 3
Просмотров 4172 года назад
GitHub repo: github.com/Tony1324/tic-tac-toe Website demo: tony1324.github.io/tic-tac-toe/ Timestamps: 00:00 Intro 00:23 Minimax Explained! 06:18 Some additional supporting website code 09:54 Coding Minimax 20:53 Outro / some other fun stuff My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
Building the website | Tic Tac Toe Part 2
Просмотров 2873 года назад
Building the website | Tic Tac Toe Part 2
Design & Animations | Making a Tic-Tac-Toe game part 1
Просмотров 1,4 тыс.3 года назад
Design & Animations | Making a Tic-Tac-Toe game part 1
Use other programming languages on the Web? | Web Assembly
Просмотров 5763 года назад
Use other programming languages on the Web? | Web Assembly
Messing around with GitHub Copilot
Просмотров 7453 года назад
Messing around with GitHub Copilot
How 3 Blue 1 Brown makes animations | Manim Tutorial
Просмотров 109 тыс.3 года назад
How 3 Blue 1 Brown makes animations | Manim Tutorial
Show YouTube videos on your own website! | YouTube API Tutorial
Просмотров 49 тыс.3 года назад
Show RUclips videos on your own website! | RUclips API Tutorial
How computers generate RANDOMNESS from math
Просмотров 64 тыс.3 года назад
How computers generate RANDOMNESS from math
Make Neural Networks in Javascript! | Dann.js tutorial
Просмотров 1,8 тыс.3 года назад
Make Neural Networks in Javascript! | Dann.js tutorial
A different perspective on CSS
Просмотров 2633 года назад
A different perspective on CSS
Physics engine for the web | Matter.js tutorial
Просмотров 9 тыс.3 года назад
Physics engine for the web | Matter.js tutorial
JS Generators & Iterators Explained!
Просмотров 1943 года назад
JS Generators & Iterators Explained!
Mastering Getters & Setters in Javascript
Просмотров 3413 года назад
Mastering Getters & Setters in Javascript
Make your website a bit more fun by adding some animations!
Просмотров 2543 года назад
Make your website a bit more fun by adding some animations!
Floating Points and the IEEE 754 standard
Просмотров 1483 года назад
Floating Points and the IEEE 754 standard
5 Sorting algorithms explained and implemented in Javascript
Просмотров 9263 года назад
5 Sorting algorithms explained and implemented in Javascript

Комментарии

  • @keki4578
    @keki4578 28 дней назад

    I lost some hairs trying to think a way to program randomness. Turns out, there is no way. underwhelming, sad, distraught, depressed, furious Thanks for the video

    • @error404m
      @error404m 15 дней назад

      Factor the number of hairs lost into the generator.

    • @keki4578
      @keki4578 6 дней назад

      @ factoring my nutz

  • @YoungFellow
    @YoungFellow Месяц назад

    Very nice explanation. Thanks Tony!

  • @RoBoKilZ
    @RoBoKilZ Месяц назад

    Fast, efficient, accurate, great vid, good content, well executed, ty

  • @classic6288
    @classic6288 4 месяца назад

    Is this how sols rng works

  • @Ivan-qi2du
    @Ivan-qi2du 4 месяца назад

    Suggestion: speaks more slowly and clearly, this video is difficult to follow.

  • @Lea-js9jw
    @Lea-js9jw 5 месяцев назад

    Oogwey was right all along

  • @yanfeng1156
    @yanfeng1156 5 месяцев назад

    Good

  • @yanfeng1156
    @yanfeng1156 5 месяцев назад

    I had no idea you could code so well! BTW I am your friend Bart

  • @jonathandyment1444
    @jonathandyment1444 5 месяцев назад

    Yesterday I heard of Lambda Calculus for the first time. It is something that is right up my street and I look forward to understanding it soon. However, for now, I am encountering barrage after barrage of geeky drivel from one geek back to himself and his fellow geeks who are entertaining one another with the notion that they have explained this thing clearly and adequately.

  • @kahnfatman
    @kahnfatman 5 месяцев назад

    I am happy that the Romans did not invent lambda Calculus -- otherwise buildings worldwide must bear the mark of Church Encoding f(f(f(f(f(f(f(f(f(f(fx)))))))))))) <- LISP fans, you are welcome.

  • @plablo_plablo
    @plablo_plablo 6 месяцев назад

    Can you enumerate each of the lambda calculus functions in order of the number of bits of information that it takes to represent their function?

  • @jean-kiara
    @jean-kiara 6 месяцев назад

    I will leave some comment to boost the algo.

  • @amarboldbatzorig7313
    @amarboldbatzorig7313 6 месяцев назад

    Great video. I hope you make more!

  • @DranKof
    @DranKof 6 месяцев назад

    Watch this video and learn to train a custom checkpoint on anything in JS... Nice.

  • @paulomarcos.5585
    @paulomarcos.5585 7 месяцев назад

    λ Beautiful λ

  • @makromath
    @makromath 7 месяцев назад

    The original repo is very easy to use. You only need Python, Scoop, MiKTeX/LaTeX, and Manim

  • @logicmatthewlearning
    @logicmatthewlearning 7 месяцев назад

    Thanks! I now understand xor generator :D

  • @objectivecompleted-9474
    @objectivecompleted-9474 7 месяцев назад

    Random numbers: Gargoogolchime = 10^2,000 Gogolbong = 10^50,000,000 Guppyminutia = 10^-20 Guppyminex = 10^-10^20 Guppychunk = 10^15

  • @jayayadav909
    @jayayadav909 7 месяцев назад

    somebody is copying my RUclips videos to his Facebook page. How do I prevent that ?

  • @geekoutnerd7882
    @geekoutnerd7882 7 месяцев назад

    What kind of terminal do you use?

  • @jessica.roberts
    @jessica.roberts 7 месяцев назад

    getting error Uncaught (in promise) TypeError: Cannot read properties of null (reading 'innerHTML') how do I fix this?

  • @MarkVolkmann
    @MarkVolkmann 8 месяцев назад

    You say that the full definition of the add function is 🐑fxmn. (m f) (n f x). Sorry, I haven’t found a way to input the lambda character on an iPad, so I used the lamb emoji. How can I walk through the steps to apply that function? Is it like this? 🐑fxmn. (m f) (n f x) f x 2 3 (2 f) (3 f x) What do I do from here?

    • @MarkVolkmann
      @MarkVolkmann 8 месяцев назад

      I think I found an answer. (λfxmn. (m f) (n f x)) 2 3 -- Substitute 2 for m and 3 for n. λfx. (2 f) (3 f x) -- Substiture the λ terms for 2 and 3. λfx. (λfx.f (f x) f) (λfx.f (f (f x)) f x) -- Apply the arguments f and x in the last term. λfx. (λfx.f (f x) f) (f (f (f x))) -- Apply the argument f in the last term. λfx. (λx.f (f x)) (f (f (f x))) -- Apply the argument `(f (f (f x)))` to the function on its left. λfx. f (f (f (f (f x)))) -- This is the definition of the number 5.

    • @MarkVolkmann
      @MarkVolkmann 8 месяцев назад

      I haven’t been able to work out a similar set of steps to demonstrate multiplication though. I could use help with that.

    • @Lambda_Ovine
      @Lambda_Ovine 4 дня назад

      using the lamb emoji is genius

  • @RoseS-mf8ye
    @RoseS-mf8ye 8 месяцев назад

    This is the best lambda calculus video I've watched of all. Thank you!

  • @chandmalsuthar3129
    @chandmalsuthar3129 8 месяцев назад

    Hello sir (91 club colour predition) a game janrate 0 to 9 rendom number computer method Is it possible to guess what the next number will be?

  • @joejeffrey1436
    @joejeffrey1436 8 месяцев назад

    Instead of using church encodings a great alternative is PCF xx

  • @neilclay5835
    @neilclay5835 9 месяцев назад

    I declare and am imperative about the fact that this is a good video.

  • @tsunningwah3471
    @tsunningwah3471 9 месяцев назад

    chinz

  • @tsunningwah3471
    @tsunningwah3471 9 месяцев назад

    有沒有中文的

  • @thekarotte1625
    @thekarotte1625 9 месяцев назад

    Very good explanation, thanks.

  • @buyankhuuodgerel3834
    @buyankhuuodgerel3834 9 месяцев назад

    at 1:16 i don't understand how u just turned m^ed mod n=m to just m^ed = m mod n. How did u just switch the place of the modulo?

  • @nilcipher1351
    @nilcipher1351 10 месяцев назад

    I finally understand the y-combinator now.

  • @GlaukNami
    @GlaukNami 10 месяцев назад

    The quality of information Is exelent but the way how It Is explained Is really low level. Really Fast to have time to be understand. Sonetimes It looks that It Is an automatic voice that speak. I really Belive that this video Is superwow for the content but It Is terribly hard to really understand the content.

  • @101nka
    @101nka 10 месяцев назад

    Great video! well explained

  • @monsterhunter8595
    @monsterhunter8595 11 месяцев назад

    Very good video!

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

    I'm new to programming. So when we use the random() method in python how is the seed determined there?

  • @user-rm2qj2jh4l
    @user-rm2qj2jh4l Год назад

    This is such a good, brief yet detailed explanation! Thank you!

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

    This is amazing, thanks dude

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

    Someone might have already mentioned it in the comments, but there was a bit of a problem with your example of declarative vs imperative. Both loop types you showed were declarative. Both are what's knows as a "for each loop" just using different syntax. Examples for imperative loops (sometimes also called "raw loops") are the for(int i = a; i<b; ++i), and while(condition) loops.

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

    3:05 does the function return itself (i.e. return a function), or the value it received?

    • @raphaeld9270
      @raphaeld9270 10 месяцев назад

      It is an error in the video it seems : `f(x) =x ` is the Identity function and just returns the input value as its output. 12:26 is closer to a function that "returns itself".

    • @LambdaJack
      @LambdaJack 8 месяцев назад

      Which function!? A composition specialized to it's recursive specialization is it's recursive specialization. A better name than Y could be "recursive", as in "(recursive compositio)". "id" as composition does not _specify_ at all what should be done, so it could be anything. As a Degenerate Case a Composition can take the Self-Reference and do nothing with it.

    • @beantown_billy2405
      @beantown_billy2405 8 месяцев назад

      @@LambdaJack The function at 3:05, f(x)=x

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

    Computing is not math, kid. It's engineering. Please stop talking bullshit. ;-)

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

    Extremely interesting way of computing already curious to learn more about catergory theory!

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

    Returing instead of returning at 5:03 Nice vid btw

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

    Corny

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

    oumaydeactivate your channel now, youreso Corny

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

    Good one thanks

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

    at 10:20, shouldn't it be \mnfx.(mf)(nfx)?

  • @gabriel-dg2bd
    @gabriel-dg2bd Год назад

    thanks!!!!!

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

    This is really really useful, but if I'm being honest, basically inaudible at times. Could you please talk a bit slower.

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

    "what the equals sign means in math" - oh sweet summer child... the '=' sign in math is probably the most overloaded, pernicious, imprecise concept that rots the whole discipline of math at it's core.

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

      Wow. Award for deepest statement on the internet of the day. Seriously. Love it.

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

    i kinda like haskell tho, im currently learning how to do tail recursion now

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

      You know that recursion is an emergency technique, right? It's not a general problem solving strategy. ;-)

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

      @@lepidoptera9337 yeah yeah, just finished learning functional programming :)