Prime Reacts To Professor Reacting To Prime Reacting To FP | Prime Reacts
ฝัง
- เผยแพร่เมื่อ 20 พ.ย. 2023
- Recorded live on twitch, GET IN
/ theprimeagen
Reviewed video: • Professor reacts to Pr...
By: / @pisterlabs
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Kinesis Advantage 360: bit.ly/Prime-Kinesis
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/deeznuts - วิทยาศาสตร์และเทคโนโลยี
The cycle is complete! Now let's have a different professor reacting to this video and keep this thing going!
frfr lmao
is not AI we need to fear.
is this loop that just started
let's have Dave react to this video instead then the professor reacts to that video and prime reacts to that other video and....
It would be very topical to functional programming to have this kind of recursion
Yes, let's exclude that old guy who thinks he is wise somehow.
"Kind of funny" is professor talk for "I think this guy is hilarious, but I can't say that or my students won't listen to anything he says."
came here to say this, I was the asssistant professor at the university and I was told to explicitly make sure when I am quoting something or referring something, not to state that it is in any way controversial, including being funny!
All it takes is for the professor to react back to this video and we'll all hit the stack overflow before we know it
Not if this gets tail call optimized
Closed, opinion based
Your stack is too small? Expand it in 3 days with our ULTIMATE STACK RESIZING UTILITY!!!
@@Daniel_Zhu_a6f Just download more stack!
@@Rastafa469 this one knows about functional programming
In theory I agree with the idea of "they all end in the same place," but the path you take towards your goal matters. If your perspective and tooling make the project unmaintainable or difficult to debug, that is a meaningful difference. Even through the project could reach feature parity across different paradigms, the longevity could suffer significantly if you are trying to force a perspective that doesn't fit.
Now all that's left is to explain it in reaction video :D
Do you by chance have some examples I could google? Or on your channel? (careful sending links in comments, the algorithm sometimes picks that up as spam)
I'm having a hard time seeing why one perspective will be better or worse than another, even in a specific situation. It feels like that's more of a skill/architectural issue than it is a perspective issue. We each naturally will "feel" like OOP or FP are going to be harder to debug, maintain, or add to later. But is that feeling real (and something we can identify) or is that just us being more comfortable with one perspective over another? Is it that we just often implement the perspective poorly, or that a perspective is 'actually' poor?
I can imagine, as Prime pointed out, someone who doesn't look at things through FP (like him) and doesn't really understand FP (like he said he doesn't) would implement FP very badly, and have a hard time maintaining FP code as they can't see the perspective themselves. Much like I still don't really get OOP.
The only instance I can think of where pure FP is probably bad, is when data is going to get changed many times by being passed between functions. Like in neural networks, where you might pass billions of data points through functionA, then to functionB, back to functionA, millions of times. Copying that data to not mutate the state would be both memory and compute intensive for no real bug/safety benefit.
@@connorskudlarek8598 I agree with that.
@@connorskudlarek8598 One good example where I find leaning more toward OOP is useful is game development, where there can be a lot of complex processes going on at a time, and objects make conceptual sense as references to entities in the game, that can each have their own actions and state.
On the opposite end of the spectrum where I find functional programming a good fit, is data processing pipelines. You receive data is input, you run various computations on it, and you spit out an output. You don't want to spin up various instances of objects, you just want to process data.
Procedural programming I find works well for most things in between, especially when working with typical applications where it's a lot of handling user input and rendering UI to a screen.
You can of course use any of these paradigms for any of these scenarios, but they each have various niceties that make working in these particular scenarios significantly easier, in particular if you omit any sort of bias you may have from prior knowledge and experience. In the end, use what every you are most proficient in that can get the job done, unless you're trying to learn something else.
To me the real issue is abstraction not OOP or FP. What is really fun is that the basic concept of programming is abstraction. Programming languages are an abstraction on assembly which itself is an abstraction on electrical signals.
The issue is having good abstractions, this is interface, or API. Building a good abstraction is incredibly hard, look at any small open source project with multiple developpers and insane amount of feedback arguing about what interfaces should be available.
Whether a good abstraction you are using is OOP or FP doesn't matter at all, it is abstracted. To me, your project's architecture needs to be a really good set of abstractions. It requires time and thought to plan out and the sole purpose of that is to write the least abstractions possible on a daily basis because they are so hard. To take a simple example to me MVC is a model for abstraction that can be OOP or FP. Abstract the architecture and then when writing your models or your views or your controllers just go full procedural, your utils will almost necessarily be FP to be useful, your libraries will be one or the other and it really doesn't matter much as long as they work and have a great interface.
I WAS IN THIS LECTURE, it truly surreal to watch Primeagen react (re-re-react?) to this
imma about to transfer to your school fr fr, this was so funny
Once a legend said: "I totally agree with me"
prime has achieved the peak of commentary
He reacts to professor reacting to him reacting to functional programming
and how to get into functional?with realistic use cases
i used OO only for orms but realised sql.exec() or query() is way easier and saves way less boilerplate....|
i can understand functional but dont usually use higher order functions/lambdas can i have some good way to learn it
OO is generally easier to learn not because of its inherent ease but the resources available to learn it compared to functional,
i like the idea of functional(similar to math) but dont know how to use it.
@@rando521 in my opinion the best way to learn FP is to learn Haskell, since it _forces_ you to use a pure functional style. now, how do you learn haskell? there are plenty of resources available, both free and paid books, youtube video series, video lectures, etc. and of course don't forget to actually try to write code with it.
I have also found it very helpful to read existing code and trying to figure out how it works. in the documentation for any haskell library, there will always be links to the corresponding piece of source code.
@@asdfghyterElm is also an interesting purely functional language
So much React.
React is everywhere.
The loop is closed.
I love that there's some true inception going on here with time compression and everything. They're 3 minutes into the innermost video, 1 minute into innermost prime, Professor at 4, current prime at 8.
Not to mention, Inner prime is watching Continuous Delivery at 1.5x - 2x speed; Inner Prime's video is 57 minutes long; and Outer Prime's video is just shy of 15 minutes
The way two primeagens are alligned is funny
This is the reaction content I crave. 5 reactions stacked on top of each other so I can watch 15 different videos simultaneously, and not learn a goddamn thing because each reaction removed the most useful 15% of the video before it. Which is exactly the same amount that I would've learned if I'd watched the original video, so it all comes out in the wash.
Send help, my brain is actively losing brain cells as we speak. It's because I'm watching mindless garbage like this instead of actually learning.
Why not learn and then watch mindless BS to cool off.
And then I spend my time reading your reaction to a reaction of a reaction to a reaction to the worlds most terrible paradigm.
Painfully relatable
Your brain needs time to cool down in between sprints. Enjoy the madness
obviously those videos are only funny if you already know all the concepts
Asmongold level of content farming. Good job!
The overlap between Asmongold viewers and ThePrimeagen viewers is surprisingly high!
@@NostraDavid2 The overlap between an MMO streamer and a programming streamer is surprising?
Lmao this was my first thought, love a 4D abstraction reaction.
@@NostraDavid2Oh no… Im one of them 😂
“Life is a skill issue.” Words I will never forget
Amen
"do you have a published paper" is the filter for functional programmers
I had a massive grin on my face watching all of this, it's so funny
Need to get the Professor on the channel for a healthy debate on this topic. That would really close the loop and be cool to see industry and academics discussing these topics.
I like how primeagen reacting to professor reacting to otherguy reacting to primeagen just degenerates into primeagen reacting to himself.
flat_map!(Primeagen(Prof(Primagen(FP_Guy))))
the factorial equivalent of a reaction video
Amazing Prime video, amazing Prime takes
real talk - please do more of these Prime stuff
Watching Daniel Ingalls lecture about Smalltalk from 1989 is so inspiring, then watching his 2011 lecture about The Live Web where he shows the same examples in a web based Smalltalk version run slower is so depressing.
The last big abstraction of abstractions we had to refactor was a dynamic table generator, which took a bunch of parameters from a bunch of places and generated table rows and cells in a data model in the backend, which was then used by the frontend to create a table.
In the end we scrapped the old implementation, part of which was not even needed any more, and we wrote separate code for the different cases. Yes, there is some duplication, but I'd rather have that, than unreadable DRY code that it takes days to understand every time you need to change something or, heaven forbid, if you need to find an obscure bug.
Regarding 8:30.
Isn't "the way to look at a problem" a mental tool?
The way I see it: the first tool you use when solving a problem is contextualization, the way you choose to look at the problem. (i.e. which paradigm is best suited to solve said problem)
Never has someone enjoyed the smell of his own farts so much
I was kinda waiting for this video to happen, so thank you Prime!
I watched (listened to) like 40 hours of your content in the past few days and I just hit like and subscribe, just because Professor said so.
Hey, Prime, isn't this reaction circle your ultimate abstraction? :)
Love you videos, keep going!
A paradigm is a tool, though.
It's like a lens that forces you to look from another perspective.
And because you have that other perspective, you may see things you can exploit.
It's a tool of the mind!
Booth are tools to be used in separately or mixed depending on what you are trying to accomplish when efficiency comes to mind. It's that simple.
I wanna say thank you for making this vid! I was hoping when I first watched it there would be a “prime reacts to..”😂🔥
Someone really needed to describe functional programming as the human centipede of procedure calls. This seems like a missed opportunity.
This video has the perfect format for demonstrating why abstraction lasagna will mess with your head.
Oh shoot, Primeagen found the infinite content glitch
I think if I'd had to give a brief description of OO I think i'd would be a paradigm oriented around the communication of objects. Abstraction is everywhere, almost all paradigms can have that classification, you can(and probably should) have OO without inheritance, encapsulation similar to abstraction is very common for different paradigms(closures e.g.) and polymorphism can happen with functions to, and operators in reactive programming I think.
I needed this kinda funny after the kinda news flying lately, thanks Prime
We need the professor reacting to this reaction!
Dave confuses me with that list at the end because I've seen videos where he's talked about messaging being the true core of OOP and I think it was on his channel that he even mentioned the creators of SmallTalk regretted their focus on anything BUT messaging because that was the point. I could be misremembering and I'm not smart enough to be an authority on the topic. But I love this reply and shows why I still love you Prime. Huge ego and still humble AF and able to handle a teardown. Legend.
12:56
Use Common Lisp; you can abstract away inconvenient glue code so you don’t have to change existing abstractions to bring an unexpected use-case down to reasonable effort levels.
And if you *do* need to change things, you can modify whichever aspects of the abstraction stack need to be refactored for your specific use-case, without having to modify the original code files or worry about entity-redefinitions breaking the language environment.
You truly are a geeky blend between Bill Burr and Dr. Disrespect. Love it!
Wtf I literally just left a comment on this vid saying is it just me or does anyone else feel like prime's a big bill burr fan😂scrolled down to see this
Dude, I was waiting for this since I saw the other video 😆
I would say there's a pretty big difference between schools of functional programming and procedural programming. Many functional programming proponents also want to impose a bunch of constraints on state mutability, use of raw pointers, side effects, etc. If you want the constraints, you're in the functional camp. If you say to hell with the constraints, you're a procedural programmer.
Anyone programming in modern times with anything other than assembly subscribes to a ton of constraints. Say, structured programming, ie, not using goto, but function calls instead, is a constraint. You using objects is a constraint. It's a constrained way of structuring data/code. The interesting bit is that it is somewhat opposed to functional school of structuring data/code, but you can do both constraints, tho synergy isn't on your side there.
@@gJonii I meant more specifically the mutability/immutability constraints that tend to go with functional programming, the disavowal of raw pointers, that kind of thing.
I agree that procedural has constraints, just different ones than the kind that functional programmers tend to adopt. And even within procedural schools, people disagree.
Rust people don't do raw pointers. C people don't mind them.
Tbh in order for a language to be truly functional it has to be lazy in its design. When you're sticking to hardcore immutability where in place modifications are a huge taboo, you're naturally forced to use linked lists or other immutable recursive data structures like Trees and processing those immutable recursive structures in a lazy context is much more effecient than strict context.
Recursion in general becomes flexibly natural in a lazy context. But of course that doesn't necessarily mean it's also very efficient to do so. If you had to choose between strict + imutability vs lazy + immutability, lazy + immutability wins but if it was strict + mutability vs lazy + immutability, strict + mutability easily wins over them all (at least in terms of memory efficiency most of the time).
@@tedbendixson I guess that makes my code a combination of the two. Because its entirely possible to mix and match parts of your code with different styles, and sometimes it makes more sense - at least to me. I generally allow myself to figure out the structure of how I want to do something by messing around, then scrap it all and design something good from the start based on what I learned... when you have a second chance you can come up with all sorts of ways to optimize and make your code cleaner, more efficient, & more reusable, things you just wouldn't think of the first time without a better perspective of the problem.
@@samuraijosh1595immutability doesn't require a certain evaluation strategy.
Also, you can use arrays in immutable languages, so long as each element is only assigned a value once.
TheReactagen sounds like a such a cool world-ending chemical compound.
I'll try my best
I like how prime pauses the video to agree with himself near the end
This gotta be the best reaction videos I've watched
Man I was waiting for this xD
Engaging in a discourse on functional programming versus object-oriented programming (OOP) is contingent upon the specific nature of the task at hand. Each paradigm presents unique advantages, making its suitability dependent on the particular requirements and characteristics of the programming endeavor. A thoughtful discussion necessitates an examination of the contextual nuances and objectives associated with the programming task.
This is so good!
Nice video, throwing a like. Now time to watch it.
oh boy Ive been waiting for this since saw it
Why does this question of "Functional vs OO" even exist? These are not opposing principles. They are orthogonal. It's like comparing Yellow vs Aluminium.
Can't Wait till next semester when we get "Prime reacts To Professor Reacting to Prime Reacts To Professor Reacting To Prime Reacting To FP"
At some point they will become confused and react to themselves.
For those who have trouble recollecting stuff while giving interviews - Abstraction, Polymorphism, Inheritance Encapsulation remebered as A-PIE
12:22 that's like the version of "it works on my machine" in alternate universe ;)
I love you man 😂 ❤ you’re the best 😂😂
Have this professor on the stream!!! He's fantastic!
i hope the professor will react to Prime's reaction
@PisterLabs did in comment form
"Ejaculate words out of my mouth"... absolute genius
A good set of abstractions are wide, really specific for each use case with no coupling, when you start adding depth to abstractions you are digging your own grave
I couldnt figure out if you were giving a reaction or it was just live for couple of first minutes
„Life is a skill issue“ - The Philosophgen
We have reached peak reaction encapsulation
Rust - Woke
C - Based
Ligma - ...
what's ligma?
@@_bradleystrider ligma balls
Haskell - Quiet Kid
It's so telling that the professor skipped the part where you talked about oop and inheritance often beeing a unsuitable abstraction causing konplexity.
Academia caused so much harm in practice especially with inheritance.
They should really look more into what our problems in the industry are.
It's not academia that's pushing OOP. True Computer science academia is actually still on the functional bro ride. These universities have rolled out courses where they supposedly teach "industry -useful" languages and design patterns and what's their bright idea of "industry-useful" skills? Yeah it's fucking OOP again. This is a never-ending mindless cycle.
It's so easy to buy in to OOP and inheritance. I wish the industry wasn't so dogmatic about it. And I wish that there were less gatekeepers among those who are proficient in both hardware understanding and procedural code.
This is the realest take I've seen. Of the 4 computer science university courses I've taken, they all circle back to "OOP is the holy grail that will solve all your problems."??? Universities are psyops by the secret society of OOP to convince the population that there are no other paradigms.
Academia is also responsible for selling the idea that functional programming is as easy to learn as its procedural counterpart whilst also maintaining an extremely high bar for entry. Haskell is 33 years old and there's not a single person in that community that's capable of explaining monads in a way that doesn't require you to already know what they are or have knowledge of category theory. The same goes for many of the complex parts of C++, Rust and so on. It's almost like people are in a pissing context to see who can craft the most complex solution just so they can bask about how smart they are.
@@BrunodeSouzaLino you're making a strawman.
9:34 I know it's probably a joke, but just wanted to add this for those who may not know. An example of a successful Haskell project is the Hasura GraphQL engine, the server of which is fully written in Haskell.
CD has to react to this so we get back to main()
The only next logical step is the modern peak of communication: the conversation
this is pure and stateless
have you heard of Qiskit for quantum computing in python? How does the speed of all this futuristic sounding compare to some sexy C algs?
Is this video a loop or a recursion?
whatever it is, it's about to become a mandela
This looks like an interesting class to take next semester
What a great professor, I really like him! Instead of reciting a littany what OOP is for the whole lesson, that would undoubtedly bore the students, he uses freely available material of two notorious people with lots of experience and differing opinions, while filling in the gaps. Making the lesson a lot more than just "trust me bro, I am the professor here, just learn what's in my lesson to pass."
4:13 Kermit enters the stage, lol
I teach software development for games at a university and I have also referenced primeagen videos to my students.
"We got kind of funny", TBH I think you are off the chain and out the gate funny. 🥰
This is blowing my mind!
Before I watch this to the end: my suspicion is that this an introductory lecture laying foundations for the topic of recursion later….
12:44 Me trying out storing settings in a bitmask, maxing it out. Two days later I needed to add two more slots. Yeah.
This video caused a tear in the space- time continuum.
Oooh, a chain reaction, gonna blow up
Awesome he's got a very similar hoodie on both vids
Dave needs to react to this and close the loop
I think I've finally figured out java and spring: they're not used to build software, but hardware. Software, as opposed to hardware, is meant to be able to change, but "adding one" to a springboot is impossible. You might as well make a new board and ship it to customers.
This is peak content
I want the prof to do a react to this vid.
If this keeps going we might end up with a discussion.
This was a real life inception
I could still tell if it's present-day Prime or past Prime from the audio quality, but I kept forgetting who was replying to who in what order
Just spend a day learning the small Haskell-like language that compiles to JS I cannot name here. You'll finally know what this pure FP stuff is generally about
I think we are witnessing a functional recursion here.
all of those except for inheritance (and maybe polymorphism in some cases) are in basically any other paradigm
@ 4' a true inception moment!
Prime watching professor, watching prime, watching Dave talking about Dave! 😵💫
This video is such pauseception. This is what nested loops sound like.
ThePrimeagen with an example in recursion
You didn't actually get dunked on, Prime. You said that language paradigms are not tools. The professor agrees with you.
my reaction to your reaction to his reaction to your reaction to that information:
I'd argue that mental models can definitely be used like tools, if you are able to cycle between some and pick the most appropriate. But this is a semantics thing, because some people will have broader or narrower definitions for "tool" that they want to stick by.
It's not really. At least in Merriam-Webster, the first 5 definitions for "tool" are essentially variants of "an object or method used to solve a problem." And even the perjorative use of the word is also that definition.
@@BrunodeSouzaLinoI'd consider a mental model to be a method for thinking about a problem that can help you solve it, and therefore a tool.
The professor was enjoying the video so much
This is 'all in all' good, but hard to consume, getting inception vibes all over the place!
"hard to consume" 🤢
Does anyone know if the rest of this guy's class lecture is available anywhere?
This is my professor, lectures are walled by the uni and you need an account to access them
@@pokyparachute3262 bummer. well let us know what oop really is when you find out!
UR-Prime: "..is an interesting take to begin with-"
Current-Prime: "I'm trying not to insult hi-"
🐐🐐🐐🐐: "That is a wrong take."
Now we need the professor to react to Prime reacting to the professor reacting to Prime.
You KNOW the professor is here watching
5:03 So going to re-use that 'scrum is like football' tweet 😀