Best Programming Language | John Carmack and Lex Fridman

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let me ask you uh uh sort of a big question about preference what would you say is the best programming language your favorite but also the best you've seen throughout your career you're considered by many to be the greatest programmer ever i mean it's so difficult to place that label on anyone if but if you put it on you and it's you so let me ask you these kind of ridiculous questions of what's the best band of all time but in your case what's the best programming language everything has all the caveats about it but so what i use so nowadays i i do program a reasonable amount of python for aiml sorts of work uh that's i'm not a native python programmer it's something i came to very late in my career i understand what it's good for you don't dream in python i do not and it has some of those things where there's some amazing stats when you say if you just start if you make a loop you know a triply nested loop and start doing operations in python you can be thousands to potentially a million times slower than a proper gpu tensor operation and these are staggering numbers you know you can be as much slower as we've almost gotten faster in our uh you know our pace of progress and all this other miraculous stuff so your intuition's about inefficiencies within the python sort of it keeps hitting me upside the face where it just it's gotten to the point now i understand it's like okay you just can't do a loop if you care about performance in python you have to figure out how you can reformat this into some big vector operation or something that's going to be done completely within a c plus plus library but the other hand is it's it's amazingly convenient and you just see stuff that people are able to cobble together by you just import a few different things and you can do stuff that nobody on earth could do 10 years ago and you can do it in a little cookbook thing that you copy pasted out of a website so that is really great when i'm sitting down to do what i consider kind of serious programming it's still in c plus plus and it's really kind of a c flavored c plus at that where i'm not big into the modern uh template meta programming sorts of things i see a lot of train wrecks coming from some of that over abstraction i spent a few years really going kind of deep into the kind of historical lisp work um and the haskell and some of the functional programming sides of things and there's there is a lot of value there in the way you think about things and i changed a lot of the way i write my c and c plus plus code based on what i learned about uh the value that comes out of not having this random mutable state that you kind of lose track of because something that many people don't really appreciate until they've been at it for a long time is that it's not the writing of the program initially it's the whole lifespan of the program and that's when it's not necessarily just how fast you wrote it or how fast it operates but it's how can it bend and adapt as situations change and then the thing that i've really been learning in my time at meta with the oculus and vr work is it's also how well it hands off between a continuous kind of revolving door of programmers taking over maintenance and different things and how you get people up to speed in different areas and there's all these other different aspects of it so c plus plus a good language for handover between engineers probably not the best i and there's some really interesting aspects to this where in some cases languages that are not um that are not generally thought well of for many reasons like c is derided pretty broadly that yes obviously all of these security flaws that happen with the memory and unsafeness and buffer overruns and the things that you've got there but there is this underappreciated aspect to the language is so simple anyone can go and you know if you know c you can generally jump in someplace and not have to learn what paradigms they're using because there just aren't that many available i think there's you know and there's some really really well-written c code like it's i find it great that if i'm messing around with something in open bsd say i mean i can be walking around in the kernel and i'm like i understand everything that's going on here uh it's not hard for me to figure out what's i you know what i need to do to you know make whatever change that i need to while you can have you know more significant languages like it's a downside of lisp where i don't regret the time that i spent with lisp i i think that it i it did help you know help my thinking about programming in some ways but the people that are the biggest defenders of lisp are saying how malleable of a language it is that if you write a huge list program you've basically invented your own kind of language and structure because it's not the primitives of the language you're using very much it's all of the things you've built on top of that and then a language like racket kind of one of the more modern lisp versions it's essentially touted as a language for building other languages and i understand the value of that for a tiny little project but the idea of that for one of these long term supported by lots of people kind of horrifies me where all of those abstractions that you're like okay you can't touch this code till you educate yourself on all of these things that we've built on top of that and it was interesting to see how uh when google made go a lot of the criticisms of that are it's like wow this is not a state-of-the-art language this language is just so simple and almost crude and you could see the programming language people just looking down at it but it does seem to be quite popular as basically saying this is the good things about c everybody can just jump right in and use it you don't need to restructure your brain to write good code in it so i i wish that i had more opportunity for doing some work in go uh rust is the other modern language that everybody talks about that i'm not fit past judgement on i've done you know a little bit beyond hello world i wrote some like video decompression work in rust just as an exercise but that was a few years ago and i haven't really used it since you know the best programming language is the one that works generally that you're currently using because that's another trap is in almost every case i've seen when people mixed languages on a project that's a mistake i would rather stay just in one language so that everybody can work across the entire thing and we have i get meta we have a lot of projects that use kind of react frameworks so you've got javascript here and then you have c plus plus for real work and then you may have java interfacing with some other part of the android system and those are all kind of horrible things and that was you know one thing that i i remember talking with uh with baz at facebook about it where like man i wish we could have just said we're only hiring c plus plus programmers i am and he just thought from the from the facebook meta perspective well we just wouldn't be able to find enough i you know with the thousands of programmers they've got there it is not necessarily a dying breed but you can sure find a lot more java javascript programmers and i i kind of mentioned that to elon one time and he was kind of flabbergasted about that it's like well you just you go out and you find those programmers and you don't hire the other programmers that don't do the languages that you want to use but right now i guess yeah they're using javascript on a bunch of the spacex work for the ui side of things when you go find ui programmers their javascript programmers i wonder if that's because there's a lot of javascript programmers because i do think that great programmers are rare that it's not you know if you just look at statistics of how many people are using different programming languages that doesn't tell you the story of what the great programmers are using and so you have to really look at what you were speaking to which is the fundamentals of a language what does it encourage how does it encourage you to think what kind of systems does it encourage you to build there is something about c plus plus that has elements of creativity but forces you to be an adult about your programming which it expects you to be an expectantly and so forced adult it's so it brings out people that are willing to be creative in terms of building large systems and coming up with interesting solutions but at the same time have the sort of the good software engineering practices that amend themselves to real world systems you
Info
Channel: Lex Clips
Views: 608,603
Rating: undefined out of 5
Keywords: ai, ai clips, ai podcast, ai podcast clips, artificial intelligence, artificial intelligence podcast, computer science, consciousness, deep learning, einstein, elon musk, engineering, friedman, joe rogan, john carmack, lex ai, lex clips, lex fridman, lex fridman podcast, lex friedman, lex mit, lex podcast, machine learning, math, math podcast, mathematics, mit ai, philosophy, physics, physics podcast, science, tech, tech podcast, technology, turing
Id: RfWGJS7rckk
Channel Id: undefined
Length: 8min 52sec (532 seconds)
Published: Fri Aug 05 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.