some how functional programming makes me understand OOP better
@RudyRdx8 күн бұрын
oh so this is called monad
@DiamondSaberYT8 күн бұрын
That’s basically Optional in Java. Love it! :D Nice explanation
@grzegorzmolin12 күн бұрын
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!
@pm68213 күн бұрын
lol maybe go notch slower, great video though, had to pause it so many times because the animations are also very fast
@meifray14 күн бұрын
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
@davidmurphy56317 күн бұрын
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.
@Samreyna118 күн бұрын
You talk inside your mouth, please speak with your chest. Thanks for the video.
@mjcal9628 күн бұрын
Hey these videos are great. What software do you use to create them??
@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Ай бұрын
So, it still performs a linear search?
@tanay7391Ай бұрын
i miss u
@qoombertАй бұрын
this is hilarious too
@qoombertАй бұрын
The javascript type system is actually insane...
@bayazid838Ай бұрын
its so quick
@joseph_pokemonАй бұрын
exactly what I needed, just a short into to know what my co-worker is talking about, thx a lot!
@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Ай бұрын
Clone of fireship. I liked it
@insanecbrothaАй бұрын
Let's write the logic in pseudo code -> Writes Python.
@Rockyzach882 ай бұрын
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.
@julian10002 ай бұрын
This goes far too fast, you need to give me time to digest before moving on to the next thing
@BleachWizz2 ай бұрын
ive finally managed to understand that, watched 4 times in 2 years... i guess i took a while but ok
@karim95782 ай бұрын
why are you talking like this? hhhhhhhhhhhhhhh
@kantamana12 ай бұрын
I think you are mixing up totality with closure at 2:00
@mreiche2 ай бұрын
The robot voice used for talk in this video is so annoying monotone. Please use a human being that speaks like a human being 😊
@RoufiaBenzai2 ай бұрын
PERFECT EXPLAINATION! THANK YOU!!!
@KateaMartin-p4u2 ай бұрын
O'Keefe Prairie
@danser_theplayer012 ай бұрын
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?
@RandomTechbro2 ай бұрын
Perfect job ❤
@Gaxi22 ай бұрын
/shadowunban
@c-syrup3 ай бұрын
i need this compiler, then my code will be shipped like assembly black magic
@com0oan3 ай бұрын
Probably the best functional progm. video i've ever seen!
@Fluff-93 ай бұрын
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!
@Zsamoff3 ай бұрын
Feeding the algorithm Really nice explanation
@AByteofCode2 ай бұрын
Thank you!
@joonapasanen5693 ай бұрын
Good video for a node dev whose trying to make a project with a python backend. No extra fluff!
@ai_serf3 ай бұрын
we should also be able to apply a type/procedure that references itself for it's definition. in haskell: loop = loop main = loop
@lazyh0rse3 ай бұрын
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-nt5oo3 ай бұрын
You somehow made the situation worse with this video
@Miranda-yc7ll3 ай бұрын
this explanation is amazingly smoothly done
@synster6933 ай бұрын
talk like a man
@InfiniteWithout4 ай бұрын
Congrats on making an xml ast writer for js
@lpbigfish37304 ай бұрын
So this whole time... I was just writing functional-style Rust 😢😢
@Rhys_10004 ай бұрын
how to add memory in lambda calculus
@poorgrammar31364 ай бұрын
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
@asitisj4 ай бұрын
what does he mean by floating lambda here ?
@janisir45294 ай бұрын
So like where would you actually use this pattern IRL? Talking C++
@AByteofCode4 ай бұрын
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!
@janisir45294 ай бұрын
@@AByteofCode That's actually literally the thing in the video. In C# they just made the ?. operator.
@AByteofCode4 ай бұрын
@@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
@janisir45294 ай бұрын
@@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.
@theworstredstoner09504 ай бұрын
Lambda calculus
@dadlord6894 ай бұрын
Sinse when builder becomes monada? Well, whatever)
@dovahsenbrom8365 ай бұрын
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
@DerMathematicker5 ай бұрын
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.