- Видео 51
- Просмотров 483 217
Tony Zhang
США
Добавлен 1 дек 2016
Hi! My name is Tony and this is my channel.
I'll probably mostly do programming, graphics design, and perhaps some reviews of software and tech.
I'll probably mostly do programming, graphics design, and perhaps some reviews of software and tech.
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
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
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
Physics engine for the web | Matter.js tutorial
Просмотров 9 тыс.3 года назад
Physics engine for the web | Matter.js tutorial
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
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
Factor the number of hairs lost into the generator.
@ factoring my nutz
Very nice explanation. Thanks Tony!
Fast, efficient, accurate, great vid, good content, well executed, ty
Is this how sols rng works
Suggestion: speaks more slowly and clearly, this video is difficult to follow.
Oogwey was right all along
Good
I had no idea you could code so well! BTW I am your friend Bart
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.
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.
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?
I will leave some comment to boost the algo.
Great video. I hope you make more!
Watch this video and learn to train a custom checkpoint on anything in JS... Nice.
λ Beautiful λ
The original repo is very easy to use. You only need Python, Scoop, MiKTeX/LaTeX, and Manim
Thanks! I now understand xor generator :D
Random numbers: Gargoogolchime = 10^2,000 Gogolbong = 10^50,000,000 Guppyminutia = 10^-20 Guppyminex = 10^-10^20 Guppychunk = 10^15
somebody is copying my RUclips videos to his Facebook page. How do I prevent that ?
What kind of terminal do you use?
getting error Uncaught (in promise) TypeError: Cannot read properties of null (reading 'innerHTML') how do I fix this?
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?
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.
I haven’t been able to work out a similar set of steps to demonstrate multiplication though. I could use help with that.
using the lamb emoji is genius
This is the best lambda calculus video I've watched of all. Thank you!
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?
Instead of using church encodings a great alternative is PCF xx
I declare and am imperative about the fact that this is a good video.
chinz
有沒有中文的
Very good explanation, thanks.
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?
I finally understand the y-combinator now.
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.
Great video! well explained
Very good video!
I'm new to programming. So when we use the random() method in python how is the seed determined there?
This is such a good, brief yet detailed explanation! Thank you!
This is amazing, thanks dude
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.
3:05 does the function return itself (i.e. return a function), or the value it received?
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".
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.
@@LambdaJack The function at 3:05, f(x)=x
Computing is not math, kid. It's engineering. Please stop talking bullshit. ;-)
Extremely interesting way of computing already curious to learn more about catergory theory!
Returing instead of returning at 5:03 Nice vid btw
Corny
oumaydeactivate your channel now, youreso Corny
Good one thanks
at 10:20, shouldn't it be \mnfx.(mf)(nfx)?
thanks!!!!!
This is really really useful, but if I'm being honest, basically inaudible at times. Could you please talk a bit slower.
"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.
Wow. Award for deepest statement on the internet of the day. Seriously. Love it.
i kinda like haskell tho, im currently learning how to do tail recursion now
You know that recursion is an emergency technique, right? It's not a general problem solving strategy. ;-)
@@lepidoptera9337 yeah yeah, just finished learning functional programming :)