Пікірлер
@arseneandrouse5554
@arseneandrouse5554 7 күн бұрын
some how functional programming makes me understand OOP better
@RudyRdx
@RudyRdx 8 күн бұрын
oh so this is called monad
@DiamondSaberYT
@DiamondSaberYT 8 күн бұрын
That’s basically Optional in Java. Love it! :D Nice explanation
@grzegorzmolin
@grzegorzmolin 12 күн бұрын
Great video! Thanks! Nice background music. As for the production of the video, personally, I would move the mic further away from the person speaking and let her speak louder. In this way the listener won't have a felling that someone is whispering to his ear... But this is a constructive critisism, no juging:) Anyway, thanks a lot!
@pm682
@pm682 13 күн бұрын
lol maybe go notch slower, great video though, had to pause it so many times because the animations are also very fast
@meifray
@meifray 14 күн бұрын
A monad just a warpper function pack a original type to a universial processing type with extra states, so you dont need to manage all type all the time and chain your execution without doing ugly error handling everytime
@davidmurphy563
@davidmurphy563 17 күн бұрын
That Box class you wrote... I never knew python could be transformed into such a monstrosity. Anyway, less here is avoid recursion at all costs.
@Samreyna1
@Samreyna1 18 күн бұрын
You talk inside your mouth, please speak with your chest. Thanks for the video.
@mjcal96
@mjcal96 28 күн бұрын
Hey these videos are great. What software do you use to create them??
@aczajka74
@aczajka74 Ай бұрын
3:19 isn't correct. That's just the category of endofunctors End(X). A monad in X is a monoid internal to End(X), which is, so it comes from picking a specific endofunctor T together with natural transformations T^2 -> T and Id -> T.
@samarthjain5015
@samarthjain5015 Ай бұрын
So, it still performs a linear search?
@tanay7391
@tanay7391 Ай бұрын
i miss u
@qoombert
@qoombert Ай бұрын
this is hilarious too
@qoombert
@qoombert Ай бұрын
The javascript type system is actually insane...
@bayazid838
@bayazid838 Ай бұрын
its so quick
@joseph_pokemon
@joseph_pokemon Ай бұрын
exactly what I needed, just a short into to know what my co-worker is talking about, thx a lot!
@borisdorofeev5602
@borisdorofeev5602 Ай бұрын
This is where the function abstraction comes in. What is an algorithm? Well it's just a function made of functions. Bohm and Jacopini wrote a famous paper in the 70s claiming that all programming can be broken down to functional blocks or statements that are: sequential, selective, or iterative. Your choice to remove a users input and output (as in keyboard and monitor), doesnt change that all the nodes in your abstraction still contain an in and out. Thus, the FUNCTION. Everything is a function. That is the lowest abstraction goes. I personally love how all logic can be recreated using NOR or NAND gates. But, it doesnt stop there. Do gates need to be transisitors, or diodes, or capacitors, vaccume tubes or even resistive elements. So what is a NOR gate? Well its a function, it takes inputs and spits output. What is computation? Well its a (typically procedural) function.
@Haru02w
@Haru02w Ай бұрын
Clone of fireship. I liked it
@insanecbrotha
@insanecbrotha Ай бұрын
Let's write the logic in pseudo code -> Writes Python.
@Rockyzach88
@Rockyzach88 2 ай бұрын
I mean Isn't a turing machine the most basic model of computation and every other model can be expressed as it? So essentially you can encode the nor gate into a turing machine and otherwise just use true and false on the cells I think. This also tickles my very novice category theory sensors. A category of turing machines.
@julian1000
@julian1000 2 ай бұрын
This goes far too fast, you need to give me time to digest before moving on to the next thing
@BleachWizz
@BleachWizz 2 ай бұрын
ive finally managed to understand that, watched 4 times in 2 years... i guess i took a while but ok
@karim9578
@karim9578 2 ай бұрын
why are you talking like this? hhhhhhhhhhhhhhh
@kantamana1
@kantamana1 2 ай бұрын
I think you are mixing up totality with closure at 2:00
@mreiche
@mreiche 2 ай бұрын
The robot voice used for talk in this video is so annoying monotone. Please use a human being that speaks like a human being 😊
@RoufiaBenzai
@RoufiaBenzai 2 ай бұрын
PERFECT EXPLAINATION! THANK YOU!!!
@KateaMartin-p4u
@KateaMartin-p4u 2 ай бұрын
O'Keefe Prairie
@danser_theplayer01
@danser_theplayer01 2 ай бұрын
Yo did he just make a -shittyfied- js-ified version of Ok and Never or whatever rust and go use to pass errors as values?
@RandomTechbro
@RandomTechbro 2 ай бұрын
Perfect job ❤
@Gaxi2
@Gaxi2 2 ай бұрын
/shadowunban
@c-syrup
@c-syrup 3 ай бұрын
i need this compiler, then my code will be shipped like assembly black magic
@com0oan
@com0oan 3 ай бұрын
Probably the best functional progm. video i've ever seen!
@Fluff-9
@Fluff-9 3 ай бұрын
Bro that was amazing! I was looking for a fireship video because I like the format, but you’re just as amazing. Short and simple, giving you a small insight into what it’s like to use a framework without a big tutorial. Keep up the good work!
@Zsamoff
@Zsamoff 3 ай бұрын
Feeding the algorithm Really nice explanation
@AByteofCode
@AByteofCode 2 ай бұрын
Thank you!
@joonapasanen569
@joonapasanen569 3 ай бұрын
Good video for a node dev whose trying to make a project with a python backend. No extra fluff!
@ai_serf
@ai_serf 3 ай бұрын
we should also be able to apply a type/procedure that references itself for it's definition. in haskell: loop = loop main = loop
@lazyh0rse
@lazyh0rse 3 ай бұрын
I liked the video, but upon doing it in practice, there's a lot of complications, for example, you can't do it if the function throws errors?. What about nulls? if the value is null, the monad will still continue to the next function. But it looks pretty.
@UJ-nt5oo
@UJ-nt5oo 3 ай бұрын
You somehow made the situation worse with this video
@Miranda-yc7ll
@Miranda-yc7ll 3 ай бұрын
this explanation is amazingly smoothly done
@synster693
@synster693 3 ай бұрын
talk like a man
@InfiniteWithout
@InfiniteWithout 4 ай бұрын
Congrats on making an xml ast writer for js
@lpbigfish3730
@lpbigfish3730 4 ай бұрын
So this whole time... I was just writing functional-style Rust 😢😢
@Rhys_1000
@Rhys_1000 4 ай бұрын
how to add memory in lambda calculus
@poorgrammar3136
@poorgrammar3136 4 ай бұрын
I think it’s funny how you say ‘A monad of X is a monoid in the category of endofunctors of X’. This makes a lot more sense, but people don’t say it. The difference is exactly like ‘pointfree’ programming vs normal programming, and pointfree programming involves a lot of monads
@asitisj
@asitisj 4 ай бұрын
what does he mean by floating lambda here ?
@janisir4529
@janisir4529 4 ай бұрын
So like where would you actually use this pattern IRL? Talking C++
@AByteofCode
@AByteofCode 4 ай бұрын
From my google search, std::optional is a monad. From the name I imagine its pretty similar to the example in the video. Never done C++ before so I'm not very well versed in the specifics of the language, but I hope this helps!
@janisir4529
@janisir4529 4 ай бұрын
@@AByteofCode That's actually literally the thing in the video. In C# they just made the ?. operator.
@AByteofCode
@AByteofCode 4 ай бұрын
@@janisir4529 It is a nice operator I'll admit that in heavily object oriented languages, monads are far less useful than in functional languages, where state mutation is generally not allowed
@janisir4529
@janisir4529 4 ай бұрын
@@AByteofCode Needing weird workarounds for immutability is not unexpected. I tried to write something functional once, and I ended up basically just numbering my variables. var1 var2... var16 Kind of defeated the point of functional language.
@theworstredstoner0950
@theworstredstoner0950 4 ай бұрын
Lambda calculus
@dadlord689
@dadlord689 4 ай бұрын
Sinse when builder becomes monada? Well, whatever)
@dovahsenbrom836
@dovahsenbrom836 5 ай бұрын
This was absurdly clear and I'm extremely proud of that fact, because when I first heard of the meme last year it totally blew my head Here's the process: - Learn the mathematical basis of category theory. You don't need much for now - Learn relational algebra. It's basically syntactic sugar for category theory. It's also the foundation of SQL - Practice your relational algebra. I liked Alloy for this (+ you learn a model validation tool while at it) - Learn some automata theory - DFA and NFA are good enough to get a gist of it - Learn some functional programming concepts. I say "concepts" because you likely already know some. Learn something more about it. It'll make it all start clicking - Start applying them in your OOP designs. Easiest pattern is the callback. Function tables are also straightforward too - Learn how to use function pointers in C++. Trust me on this one. You'll thank the abstruse syntax once it clicks - Contemplate the pure raw cosmic power of void*(*foo)(void*) - Learn how functional programming is done in C++20. Seriously. - Lambda captures create closures. - A functor is a function that generates functions. - First-order functions means now your functions are also types - Higher-order functions are functions that take functions as parameters - Watch this video again It'll be excruciatingly clear
@DerMathematicker
@DerMathematicker 5 ай бұрын
When starting your code with rewriting Array.prototype.toString with function(){if(this[0]) String.fromCharCode(this[0]);1}, you can limit the number of '!','(' and ')' needed.