Tony Zhang
Tony Zhang
  • Видео 51
  • Просмотров 462 607
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
Просмотров: 26 822

Видео

I tried learning a programming language, but it turns out it's just math.
Просмотров 165 тыс.Год назад
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 тыс.Год назад
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
Просмотров 6942 года назад
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)
Просмотров 9462 года назад
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
Просмотров 1,8 тыс.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
Просмотров 4122 года назад
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
Просмотров 3952 года назад
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
Просмотров 4202 года назад
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
Просмотров 2602 года назад
My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
Variables & Pointers | Data & Things
Просмотров 2972 года назад
My website: tonyzhang.net My Github: github.com/Tony1324 Contact me: hello@tonyzhang.net
Part 0: A Quick Intro | Data & Things
Просмотров 2662 года назад
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,4 тыс.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
Просмотров 3972 года назад
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
Просмотров 2732 года назад
Building the website | Tic Tac Toe Part 2
Design & Animations | Making a Tic-Tac-Toe game part 1
Просмотров 1,3 тыс.2 года назад
Design & Animations | Making a Tic-Tac-Toe game part 1
Use other programming languages on the Web? | Web Assembly
Просмотров 5622 года назад
Use other programming languages on the Web? | Web Assembly
Messing around with GitHub Copilot
Просмотров 7432 года назад
Messing around with GitHub Copilot
How 3 Blue 1 Brown makes animations | Manim Tutorial
Просмотров 106 тыс.2 года назад
How 3 Blue 1 Brown makes animations | Manim Tutorial
Show YouTube videos on your own website! | YouTube API Tutorial
Просмотров 48 тыс.2 года назад
Show RUclips videos on your own website! | RUclips API Tutorial
How computers generate RANDOMNESS from math
Просмотров 57 тыс.3 года назад
How computers generate RANDOMNESS from math
Make Neural Networks in Javascript! | Dann.js tutorial
Просмотров 1,7 тыс.3 года назад
Make Neural Networks in Javascript! | Dann.js tutorial
A different perspective on CSS
Просмотров 2543 года назад
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!
Просмотров 1903 года назад
JS Generators & Iterators Explained!
Mastering Getters & Setters in Javascript
Просмотров 3103 года назад
Mastering Getters & Setters in Javascript
Make your website a bit more fun by adding some animations!
Просмотров 2533 года назад
Make your website a bit more fun by adding some animations!
Floating Points and the IEEE 754 standard
Просмотров 1413 года назад
Floating Points and the IEEE 754 standard
5 Sorting algorithms explained and implemented in Javascript
Просмотров 8723 года назад
5 Sorting algorithms explained and implemented in Javascript

Комментарии

  • @classic6288
    @classic6288 13 дней назад

    Is this how sols rng works

  • @Ivan-qi2du
    @Ivan-qi2du 19 дней назад

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

  • @Lea-js9jw
    @Lea-js9jw Месяц назад

    Oogwey was right all along

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

    Good

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

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

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

    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 2 месяца назад

    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 2 месяца назад

    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?

  • @college3-t3k
    @college3-t3k 2 месяца назад

    I will leave some comment to boost the algo.

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

    Great video. I hope you make more!

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

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

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

    λ Beautiful λ

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

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

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

    Thanks! I now understand xor generator :D

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

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

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

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

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

    What kind of terminal do you use?

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

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

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

    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 4 месяца назад

      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 4 месяца назад

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

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

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

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

    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 5 месяцев назад

    Instead of using church encodings a great alternative is PCF xx

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

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

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

    chinz

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

    有沒有中文的

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

    Very good explanation, thanks.

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

    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 6 месяцев назад

    I finally understand the y-combinator now.

  • @user-je7dq7uc9m
    @user-je7dq7uc9m 6 месяцев назад

    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 6 месяцев назад

    Great video! well explained

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

    Very good video!

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

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

  • @user-rm2qj2jh4l
    @user-rm2qj2jh4l 9 месяцев назад

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

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

    This is amazing, thanks dude

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

    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 9 месяцев назад

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

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

      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 4 месяца назад

      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 4 месяца назад

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

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

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

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

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

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

    Returing instead of returning at 5:03 Nice vid btw

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

    Corny

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

    oumaydeactivate your channel now, youreso Corny

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

    Good one thanks

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

    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 10 месяцев назад

      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 10 месяцев назад

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

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

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

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

    It always annoyed me in c hoe relatively hard is is to get a random number

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

    basically basically basically basically basically basically basically basically ...

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

    Bro. Everything is great. But stop doing the thing => "you can actually do this like this" please dont do it, just show the actual. We dont need the other parts.