Why Python is popular for machine learning

Поділитися
Вставка
  • Опубліковано 16 чер 2024
  • Lex Fridman Podcast full episode: • Guido van Rossum: Pyth...
    Please support this podcast by checking out our sponsors:
    - GiveDirectly: givedirectly.org/lex to get gift matched up to $1000
    - Eight Sleep: www.eightsleep.com/lex to get special savings
    - Fundrise: fundrise.com/lex
    - InsideTracker: insidetracker.com/lex to get 20% off
    - Athletic Greens: athleticgreens.com/lex to get 1 month of fish oil
    GUEST BIO:
    Guido van Rossum is the creator of Python programming language.
    PODCAST INFO:
    Podcast website: lexfridman.com/podcast
    Apple Podcasts: apple.co/2lwqZIr
    Spotify: spoti.fi/2nEwCF8
    RSS: lexfridman.com/feed/podcast/
    Full episodes playlist: • Lex Fridman Podcast
    Clips playlist: • Lex Fridman Podcast Clips
    SOCIAL:
    - Twitter: / lexfridman
    - LinkedIn: / lexfridman
    - Facebook: / lexfridman
    - Instagram: / lexfridman
    - Medium: / lexfridman
    - Reddit: / lexfridman
    - Support on Patreon: / lexfridman
  • Наука та технологія

КОМЕНТАРІ • 188

  • @LexClips
    @LexClips  Рік тому +9

    Full podcast episode: ua-cam.com/video/-DVyjdw4t9I/v-deo.html
    Lex Fridman podcast channel: ua-cam.com/users/lexfridman
    Guest bio: Guido van Rossum is the creator of Python programming language.

    • @judededude
      @judededude 9 місяців тому

      @LexClips can you do an episode on K8's ?

  • @powmod1
    @powmod1 Рік тому +116

    Python has a ridiculously low barrier to entry for scientists/engineers that need to spend time analysing their data rather than being programmers

  • @johnnyfry2
    @johnnyfry2 Рік тому +170

    All of the community support made it possible with the libraries. Also, Python has an easy learning curve for the math and data analyst expert to take it on when their primary interest is ML. They just want to dig into the data and learning process, not spend 80 hours a week trying to learn to program. Programming is a learned residual necessity of wanting to learn/apply A.I and data science.

    • @marcmason3514
      @marcmason3514 Рік тому +11

      I couldnt agree more.. I am not even at the level of Machine Learning, but as a BI Developer who primarily works with SQL and DAX, learning how to make API calls, convert the returned JSON into a Data frame and import into SQL Server using Python was relatively easy and has left me wanting more.
      Web scraping is next for me I think.

    • @metinersinarcan92
      @metinersinarcan92 Рік тому +4

      @@real_mikkim Matlab has awfull syntax. With Python I can create very nice functions with optional arguments, keyword arguments etc. in seconds. With Matlab, it is an awfull experience.

    • @kejtos5
      @kejtos5 Рік тому +1

      Yea, got to agree. I came to python from R and I have found it being better. Indentation instead of brackets is just pure heaven, though I am not a fan of 0-indexing....

    • @TheNewton
      @TheNewton Рік тому

      The tools make it easy to make more tools. Repeat.

    • @manoelnt0
      @manoelnt0 Рік тому +3

      Matlab is good for simulation and exploring mathematics. For production-level usage both Matlab and R it's a complete hell to make it work and maintain. Going from Prototype and Production with the same language is really a important feature.

  • @Bengt.Lueers
    @Bengt.Lueers Рік тому +80

    For me it was the other way around: I got into machine learning, because it used Python, which was already my programming language of choice.

    • @ghosthunter0950
      @ghosthunter0950 Рік тому +4

      Weird way to go about it but ok...
      Idk just seems like it one should choose a language/tools based on what he wants to do not the other way around.
      Do you mean it was a gateway to get into it?

    • @Bengt.Lueers
      @Bengt.Lueers Рік тому +3

      @@ghosthunter0950 I live in code and so I care about aesthetics and ergonomy. I could have stayed writing web 2.0 stuff in Python, like some collegues have. I wouldn't have come to
      ML if the lingua franca was Matlab.

    • @mikebarnacle1469
      @mikebarnacle1469 Рік тому +2

      @@Bengt.Lueers it's a terrible language though

    • @bigpickles
      @bigpickles Рік тому +7

      @@mikebarnacle1469 it is when you don't know how to use it

    • @johnk6757
      @johnk6757 Рік тому

      It's not though. We look for things to do with our skills and tools just as much as the opposite, imho

  • @johnwick2018
    @johnwick2018 Рік тому +178

    One word answer : NumPy

    • @tommclean9208
      @tommclean9208 Рік тому +8

      all good libraries revolve around the numpy api which means you dont need to learn the api for all the other libraries, you already know how it works and that any library which implements the numpy api, will be compatible with eachother its a great system
      any new modern language should have NDArrays inbuilt

    • @neildutoit5177
      @neildutoit5177 Рік тому +5

      What was the solution people used before NumPy? I thought that Numpy was just a wrapper around fortran code. Is there nothing like that available in other languages?

    • @TanimIslam
      @TanimIslam Рік тому +5

      @@neildutoit5177 numeric. Very very old and obsolete numerical module

    • @hitlerssecondcoming2523
      @hitlerssecondcoming2523 Рік тому +2

      @@tommclean9208
      Fortran has entered the chat

    • @OOpSjm
      @OOpSjm Рік тому +1

      1) Free, and 2) when Dataframes came along.

  • @jorge1869
    @jorge1869 Рік тому +108

    Ridiculously easy to learn + open source = Python success

  • @DiazGee
    @DiazGee Рік тому +14

    "Anything but C++"
    😂

  • @ClaudioBrogliato
    @ClaudioBrogliato Рік тому +2

    Perl saved my life when I had to reconcile two systems exchanging messages that were not idempotent. That stuff was made manually before and took days for just one accident. 3 hours of scripting and then a single accident could be reconciled in minutes. Great stuff.

  • @federicogasparv
    @federicogasparv Рік тому +39

    I think one simple explanation is that many DS and ML en... came from math, physics and other related disciplines without much knowledge of programming and the learning curve of python is quite efficient, you are writting usefull code in a glympse of an eye.

    • @johnsmithers8913
      @johnsmithers8913 Рік тому +4

      Bingo. Having some experience in both python and C++, python is perfectly balanced for scientists and engineers. It's one of the easiest to learn and it's limitations are not pronounced when the program is small and not complex. Most scientists want write a script to calculate one particular problem.
      Having tried to write a large full blown user desktop application in python and C++, python's limitations soon become apparent and C++'s strengths are exposed.

    • @PeterSedesse
      @PeterSedesse Рік тому

      exactly. ML was developed by scientists, not programers

    • @evan9536
      @evan9536 Рік тому

      Can confirm, I came from a Financial Analytics background using predominantly R. Aside from Python being widely accepted, it was quite easy to learn the syntax. The biggest obstacle was learning all of the functions in each package.
      In fact, I only really had formal education in C, so coming to Python felt so wrong because of the lack of curly braces and semicolons 😂

    • @aoeu256
      @aoeu256 Рік тому

      @@johnsmithers8913 What limitations in Python, multithreading or speed? Did you try using JIT?

  • @aldorodriguez7310
    @aldorodriguez7310 Рік тому +3

    I was debating what language to learn first. This video gave me the answer.

  • @neildutoit5177
    @neildutoit5177 Рік тому +14

    I was pretty shocked to see how slow Python regular expressions are. I started using Googles re2 and it sped up some of my stuff about 12X

  • @holthuizenoemoet591
    @holthuizenoemoet591 Рік тому +10

    I love python for its beautifully minimalistic syntax, ease of 3trd party packages, extendibility and much more.
    btw how the adoption of new technologies spreads and propagates, can be studied with graph theory with the focus on cascading effect, power-law, triadic closure, 6 degrees of freedom, and many more cool CS and Economy related topics.

  • @rdevaughn22
    @rdevaughn22 Рік тому +19

    Because it's easy to use for people who are focused on things other than coding.
    It's not "good for machine learning" outside of the fact that many people have used it to create useful libraries, because it's easy to code with, if you're not really that concerned about coding or performance.

  • @auroraRealms
    @auroraRealms Рік тому +26

    Python became popular because, it gets out of your way, it allows you to be as technical as desired, all with minimal syntax. No other language offers all three (not strict, provides traditional object and procedural disciplines, minimum syntax). So when I develop, I can quickly flesh out ideas. Later, I can revise as needed. If it is discovered that Python is a performance bottleneck, the ideas are already solidified enough that they can easily be rewritten into a compiled language.
    I am currently using GD Script which is a Python like derivative for game programming. In this case, a Python-sh language was developed for game programming, because Python does not perform well enough (mostly because garbage collection does not work in game programming). So the Godot Game Engine Developers developed a language that acts like Python (without garbage collection) until compile time. At compile time it runs through an interpreter, to convert it to optimized C++. The C++ is then compiled. This is an amazing way to get C++ performance out of Python like code.

    • @Kaizzer
      @Kaizzer Рік тому +1

      FYI: You can use Cython to write code similar (if not exactly like) Python, but generating C/C++ code, with most of the performance gain if used correctly. BTW, it's a mess to debug.

    • @hansdietrich1496
      @hansdietrich1496 Рік тому +3

      For numerical computing you nowadays just use numba and put "@jit" in front of your performance critical functions, all within plain python code.

    • @nininininininini7511
      @nininininininini7511 Рік тому

      @@hansdietrich1496 There are times when numba is better than cython and vice versa. I also enjoy Cupy when I want to use my GPU.

    • @aoeu256
      @aoeu256 Рік тому

      You can also use LISP s-expression version of Python like Hy or maybe Julia and have macros that allow you to calculate stuff at "compile time“ rather than run time or allow you to have static analysis, its easier to build custom compilers or to convert s-expression based Python into s-expression based C++ into a compiler. Paredit can also be used like "JQUERY" for s-expressino code.

  • @paganizonda1000ps
    @paganizonda1000ps Рік тому +4

    I did once jave and after Python. The difference is huge. Python is so flexibel its crazy.

  • @nininininininini7511
    @nininininininini7511 Рік тому +1

    Its pretty easy to translate matlab code into python code in many instances, so if I find matlab code in the matlab community that would be useful I first check if there is a python implimentation, and if there isnt I write one

  • @johnandrews5414
    @johnandrews5414 Рік тому

    Love this interview series

  • @darrendrapkin4508
    @darrendrapkin4508 Рік тому

    Now that I know that variadic numerical arrays are so important to machine learning and natural language processing I will be picking up a language especially designed for this; APL : and I will do this as soon as possable.

  • @syntropy3020
    @syntropy3020 Рік тому +14

    Will be good to get someone on to talk about R. Maybe someone from RStudio.

    • @DaveParr
      @DaveParr Рік тому

      Except it's not called RStudio any more, but posit, to represent it's 'multilingual' approach.

    • @hamm8934
      @hamm8934 Рік тому +1

      RStudio is absolutely horrible to use. So slow. Though I do prefer R to Python for its rich and customizable statistics library. I just run R in Neovim (as with everything).

  • @mayureshsavargaonkar4694
    @mayureshsavargaonkar4694 Рік тому +5

    Because writing stochastic gradient is much simpler in python due to high-level syntax and dynamic type setting along with automated garbage collection!

  • @greggodonnell6938
    @greggodonnell6938 Рік тому +1

    Easiest answer of my life, the crossover between programming and applied mathematics/engineering is already small enough. It's assumed that programmers are good at math but it's rare to have true polymaths.
    To be able to include people who have more pure math skills with an easier programming language is a big deal. I would not consider myself a good programmer at all but I am actually considering contributing to some open source Electrical Engineering libraries this summer in Python to bolster my resume, just because the language is so inclusive.

  • @thijsyo
    @thijsyo Рік тому +1

    The most important reason is that mathematicians/computer scientists usually are not that good at coding. They will find/modify an algorithm from a research paper (written as pseudocode), and in Python you can almost just copy that pseudocode in and it will just work.

  • @CristianGarcia
    @CristianGarcia Рік тому +6

    Low-key triggered that numpy was not mentioned, IMO we wouldn't be here without numpy.

  • @kemamusa
    @kemamusa Рік тому +3

    It's "readability" in my opinion.
    It's clean and human readable. There are no layers of complexity to peel back to understand what's really going on. Or rather Python hides the complexity so that you can focus on what really matters. Your work, not your code.

  • @carlosandresdelarosa2841
    @carlosandresdelarosa2841 Рік тому +26

    Will be good to see a talk about Julia an MIT language that connects software engineering with scientists, looks like a a good replacement for math lab closing the gap between engineering and science.

    • @SrWho1234
      @SrWho1234 Рік тому

      I second this, Julia is a wonderful and flexible language

    • @EigenCharlie
      @EigenCharlie Рік тому

      Julia is certainly faster than Python for Scientific computation and machine learning, but is far to replace python just because the community and support that python already has will be hard to replace

    • @SrWho1234
      @SrWho1234 Рік тому +5

      @@EigenCharlie yeah but for a lot of people it's not about replacing, is about complementing. Julia can call Python, R, C++ code and more. I use a lot of pure Julia for tasks that are just very slow in Python, and at the same time I use PyTorch in Python.

  • @marktellez3701
    @marktellez3701 Рік тому +2

    I was a rubyist for a long time. Slow as can be, and a community that self-detonated over social justice and intersectionalism. it was wasted time, I should have just followed the smart guys into Python way back in 2008. Thank god for Python and its community who cares about coding and programmers above all the politics.

  • @ugmugm3938
    @ugmugm3938 Рік тому +13

    Matlab in engineering is dying too… legacy systems only. My entire graduate lab group (engineering group) that does computation is forced to learn either python (obvi for the ML students) or C++ for physics modelling

    • @aplus1080
      @aplus1080 Рік тому

      I know a lot of cognitive scientists using it.

    • @stanislasgrare5046
      @stanislasgrare5046 Рік тому

      I hear that more and more are using Julia

    • @isodoubIet
      @isodoubIet Рік тому +2

      Matlab has a crummy licensing model and it's also a horrible language, even worse than python. Some of its functionality is hard to replace, though.

  • @EudesConhecido
    @EudesConhecido Рік тому +2

    I tend to think of Python as the 2000s' Basic.

  • @jorge1869
    @jorge1869 Рік тому +44

    It is true, in the past it was thought that Perl was going to be the de facto language in Bioinformatics, to my surprise Python also conquered that arena without almost anyone noticing. Once it is shown that nothing is written in technology and everything can take an unexpected turn.

    • @ianrust3785
      @ianrust3785 Рік тому +4

      People hated Perl and wanted to see it die. And they loved Python

    • @CARPB147
      @CARPB147 Рік тому +1

      @@ianrust3785 What nonsense coming from people who evidently haven't had much experience in Perl. Python was deemed to be "easier to learn" by novices (very debatable), so a whole generation of new programmers were raised on its training wheels. Perl's freedom of expression, cherished by experienced sysadmins, is still valued. It "wrote the book" on regular expressions and its model was widely copied by other systems (as van Rossum readily admits). I personally disapprove of Python's significant whitespace because of 2 scripts, seemingly the same, one can be correct and the other produce errors, but hey, different strokes for different folks.

    • @ianrust3785
      @ianrust3785 Рік тому +2

      @@CARPB147 In stackoverflow’s annual questionnaire on various languages Perl has been voted the most hated programming language, repeatedly, for about a decade now…. There are about 20 languages included in that poll. This is why it died out. It didn't get that honor due to the ignorance of those voting, it got that because it has the worst syntax of any language… due to its horrible design philosophy, where the designer believed there ~should~ be 4-5 ways to do almost everything. Python and Ruby have completely overtaken Perl in the sysadmin world and everywhere else, Perl 6 didn’t go anywhere… Perls version of OO is so ridiculously bad it makes old javascript look well designed.

      Congrats to Perl for creating regex’s, every language has those now. Why should I bother today in 2022...? And why should an organization use the most hated language? That's just going to cause people to leave the org.

    • @CARPB147
      @CARPB147 Рік тому

      @@ianrust3785 I don’t expect you “to bother.” I expect you to go by annual questionnaires. I’ll go by experience. Perl is actually quite alive and working in systems worldwide. It’s even included by default in UNIX, Linux distributions, and in the latest macOS. No surprise given its affinity with UNIX commands and tools. Your favored questionnaires are “fashion statements” meant to steer students and the inexperienced emotionally into specific segments of the job market. For ML, the existing libraries are compelling arguments for Python. Real programmers are not that fazed by one or another language. Or say this one or that one “is dead” 😆 They know that languages don’t really “die”. Witness the venerable 1950’s FORTRAN. Real programmers are not “one-finger pianists playing on a one key piano”. They even know how to write Perl programs as readable as they can be in virtually any language. 😆

    • @ianrust3785
      @ianrust3785 Рік тому

      ​@@CARPB147 A serious programmer actually does need to differentiate between bad, dying technology and new, promising technology. Otherwise they'll just be pigeonholed into a crap technology, the way that you are. It would be a waste of braincells to learn every other dying technology where there are better modern alternatives that are widely used. I'm sorry that you spent your adult life obsessing over Larry Wall's poorly-conceived rats nest of a language... but your pain doesn't have any meaning, I'm afraid.
      You'd be hard pressed to find a population of more experienced devs than those who frequent stackoverflow. Perl must be really unfashionable if it's been voted most disliked 10 years in a row. How did it get so out of fashion...? Did the world conspire to demonize poor old Perl for some reason? No, it was voted that because people used it and found that it was a piece of crap language where it takes hours of in depth study to even understand how to initialize an array.. it is a bad implementation of a bad set of ideas on language design, it was only ever popular because people needed a good way to manipulate text in CGI during the internet boom... one of the very few things it is good for, but which Python is much better for... And it is indeed dying... we can be thankful for that.
      Carry onward!

  • @konki47
    @konki47 Рік тому +3

    I use python because it lets me skip OOP, using only modules, and I get the same results as OOP. Using modules allows me to organize my code efficiently so I know what I'm doing.

  • @spoddie
    @spoddie Рік тому +5

    I spent many years programming Perl, it was my first love after C. I'm so glad Python is the science language.

  • @esantirulo721
    @esantirulo721 Місяць тому +1

    A somehow marginal reason : for old AI guys, Python was the best replacement for LISP. R is in fact closer to LISP, but it is not as versatile as Python.

  • @TimStark
    @TimStark Рік тому

    Lex please give more content where you explain your thoughts on xyz subject. I love you as an interviewer, but I want to know more from you.(nothing to do with the content above, no disrespect, just been on my mind)

  • @hansdietrich1496
    @hansdietrich1496 Рік тому

    About matlab not being popular due to not being open source: There was also Octave, an open source matlab clone. And it actually had some use on universities. Nevertheless, it never got popular. The matlab syntax is a major pain in the ass. And the library coverage and general usability was limited to mathematical applications. Trying to create any customer software out of it, interfacing with the real worlds, didn't work well.

  • @TheNewton
    @TheNewton Рік тому +1

    Because groups of people did the hard work of creating fundamental abstract tools(libraries) usable by free by other who then made more tools for free usage.

  • @catharsis222
    @catharsis222 Рік тому +2

    Id say the interactive console and iPython/Jupiter has plenty to do with it

  •  Рік тому +5

    They didn't mention R or RStudio in their whole conversation.

  • @PapiJack
    @PapiJack 6 місяців тому

    Put yourself in the shoes of a biologist or a mechanical engineer. If you have to learn a new language or even learn to program, what do you rather learn? Python or C?

  • @sercan272727
    @sercan272727 5 днів тому

    What im wondering is , is there really a technical reason other than someone picking their favorite language and others having no option but to use python? Dont you get a better performance from a compiled language?

  • @Mukna132
    @Mukna132 Рік тому +2

    Two reasons.
    First: Data Scientists are not programmers (at least that's not an implicit skill of data science). Python allows these people that don't program to write stuff in a way that is almost how it would be written on paper.
    Second: Execution speed is usually not important when it comes to data science. Data science doesn't really matter much about optimisation, and in some cases would be a bad idea because you would want to make sure that what is happening while the script is running is accurate to the task, and not necessarily fast.

    • @hansdietrich1496
      @hansdietrich1496 Рік тому

      I'd disagree or rather, put it in other words. Data science cares a lot about speed, as it has to deal with a lot of data. But all those speed critical parts are well handled in python using specialized libraries like numpy, numba and so on. So the program speed is comparable to compiled languages, while the programming time is drastically reduced due to well maintained high level libraries.

    • @Mukna132
      @Mukna132 Рік тому

      @@hansdietrich1496 Yeah I completely agree. I guess I was more meaning in terms of the kinds of people using it. Like you say, the speed critical parts are sorted by people that know both the math and the programming, but aren't necessarily data scientists by trade.
      Data scientists are more worried about the math and the second priority would be the speed.

  • @Basta11
    @Basta11 Рік тому +6

    Python won I think because of readability. Not all programmers are not Software Engineers, there is a large range of skill. With Python, a novice can more easily understand code that an expert coder would write.

    • @chicof5031
      @chicof5031 Рік тому

      yes, for experienced coders its good to look at others codes and understand easily, you dont need too much, same thing can be tiresome for C++ and java for example.

  • @tomski2671
    @tomski2671 Рік тому +3

    It doesn't matter what programming language you like or use. Soon enough all the libraries will be translated to any other language by AI, withing limits of the target language.

    • @aoeu256
      @aoeu256 Рік тому

      I wonder how it will translate Python code into Haskell, it won't be idiomatic it will use the IO monad when the state monad is called for like when using dictionaries(hashes), oop can be simulated with closures or many other ways.

  • @asier6734
    @asier6734 9 місяців тому

    Being perl and javascript the alternatives...looks like they chose python as a prototyping language rather than a fundamental or basic choice

  • @psoto222
    @psoto222 9 місяців тому

    how old is too old to change career to coding I am going to be 38 next month :) should I learn algorithms first what should me my first step into this world? thanks...!!!

    • @Leonhart_93
      @Leonhart_93 2 місяці тому

      Have you started yet? The question of wether to start or not is very simple: start learning and see how far can you go just as a passion. If you can go pretty far, then you are good to go.

  • @soulsbourne
    @soulsbourne Рік тому +1

    One answer... Python is a language... Easy to read , easy to write, easy to speak....

  • @brainforest88
    @brainforest88 6 місяців тому

    Did C and Perl in a project. Perl was not my favorite because every problem had as many solutions as developers. Horrible to read and maintain. Getting the libraries managed was a hell.

  • @woolfel
    @woolfel Рік тому +4

    matlab is quite expensive, and it doesn't fit nicely into open source community. That's what made it dead for open source community. If you can't clone a repo, run a setup script and get running in less than 1 hour, who is going to bother? I've been contributing to open source for 2 decades and cost of sharing is the biggest factor in community growth. Anything that raises the barrier to entry means it has little chance of community adoption.

  • @gregoryarefev9349
    @gregoryarefev9349 Рік тому +1

    Hey, this isn't true that in the late 90s there was no other language with support for multidimensional arrays. Perl had PDL back then, not only powerful Regexes. PDL is very similar to Numpy and existed much earlier. So, apparently, the reason for Perl to lose its prevalence was its ugly syntax and its 1000-ways-to-do-one-thing weird philosophy =)

  • @MrKrtek00
    @MrKrtek00 Рік тому

    Lex, you are very American: "Universities still paid for it..." yeah, if you were an American university. Not every country can afford $2000+/person fees (yes, in Eastern Europe Matlab was about double-triple price compared to US, I do not know now)

  • @GlazersOut
    @GlazersOut Рік тому +1

    Anything is better than C/C++ 😅

  • @minionsystems
    @minionsystems Рік тому +11

    Sounds like Python is still trying to solve problems that have already been solved in Java. As it moves forward, the syntax will start to approach the complexity of Java. Type checking is extremely important in creating trustable libraries and overall reliability. Scripting without type checking will always be less efficient because every variable access has to be tested. I would have thought since, aside from complexity, AI apps are compute intensive they would benefit from the JIT compiling and optimization Java already has. As time goes on, business apps written in Java would likely need to access AI functionality creating a high integration cost. Jython will have a hard time filling that gap because it is not the primary version..

    • @YourNerdyJoe
      @YourNerdyJoe Рік тому +11

      With a lot of computationally intensive things in python, the heavy lifting is done in libraries written in C/C++ (or something similar). So the poor performance of python doesn't matter as much as its ease of use. You can use tensorflow with java (and other languages), but everyone uses python. python is a nice language for just gluing a bunch of libraries together. I say this as a C/C++ try-hard.

    • @woolfel
      @woolfel Рік тому +1

      the other limiting factor against Java for ML is complexity. DL4J is a massive code base and difficult for users to grok. I've contributed documentation in the past to DL4J and the developers are quite responsive, but that doesn't solve the issue of learning curve. A researcher needs to get stuff done quickly and doesn't have the luxury of spending 2 months learning the API. Google's tensorflow Java api kinda sucks and is treated like a second class citizen. As of Oct 2022, the java tensorflow api is deprecated until a new version is released.
      my own bias, I hope tensorflow dies and better frameworks take it's place. TF2 fixed a lot of bloated ugliness of v1, but it's still kinda ugly. Sadly most clouds support TF first and pytorch second. Hopefully that changes.

    • @minionsystems
      @minionsystems Рік тому +1

      @@YourNerdyJoe I agree with what you have said and if your main interest is research and getting more people involved, Python is simpler to get started. If you want heavy duty production applications however, much of the complexity of Java comes in handy eventually. C/C++ is not as portable so writing universal libraries is difficult and does not add much to the performance over Java JIT. I'm retired now but in my work as an IBM Architect and a long time programmer I have found that adding a new language to your organization is very expensive. You have to train or hire trained people in the new language. The first thing they want to do is re-write existing software to fit the new model and spend a lot of time interfacing it to the existing frameworks. I think a newly introduced language needs to be a lot better to justify it unless you are mostly doing one-offs.

    • @IwinMahWay
      @IwinMahWay Рік тому

      Death to java

    • @woolfel
      @woolfel Рік тому

      @@minionsystems I hear you. My primary languages are Java and C#. In the consulting world, my experience matches yours. Getting our customers to add new language is a tough sell. It's always easier if the CTO is the one pushing for it, otherwise it's usually DOA.
      There's lots of things about python I dislike. I'm hoping Rust community can build the frameworks needed to replace python :)

  • @colinmaharaj
    @colinmaharaj Рік тому

    4:12 absolutely false. Because of the idea of immutability of strings and maybe other objects, anytime you need to manipulate a string, a new version has to be created. I have decoders I wrote in C that was 50x faster than the python version. The decode will take a binary file and make a text version of it. It does so by appending 2 to 10 byte small strings to a larger growing string that will then be written to disk when completed. This appending happened a few thousand times, and it slowed down the python process.

    • @Kaizzer
      @Kaizzer Рік тому +2

      You can use *bytearray* to manipulate ASCII/byte strings, as per C++ byte vectors.
      If you need Unicode support, you can use *StringIO*.

    • @aoeu256
      @aoeu256 Рік тому

      You can use bytearrays, another trick is instead of using += with strings is to make a list of strings then use ''.join(string_list).

  • @seankingsland
    @seankingsland 11 місяців тому

    Okay Lex I am following you're advice 10 minutes a day of the Lex Clip to learn something each day with discipline 🤣...For the next 5 years to be proficient 🤣

  • @smrtfasizmu6161
    @smrtfasizmu6161 Рік тому +1

    Who the hell would pay for Mathlab when there are so many free programming languages out there

    • @Final187ers
      @Final187ers Рік тому

      my university..... welcome to germany

  • @Tech_Publica
    @Tech_Publica Рік тому +1

    I dare to disagree with Guido.
    I think that library authors and users chose Python because it is simple yet powerful enough.
    Most researchers working on ML are not programmers, they are not coders, they do not care how powerful a language is, they do not care how well designed and elegant it is, what they want is to use the simplest tool to do their job, and that is Python.
    And yes of course to be elected by the academia and research a language must be open source and not belong to a corporation. Java was so open source friendly and "democratic" that it started as a big favorite in universities, which also used to teach it in their programming classes, until it ended up belonging to Oracle...which is clearly the worst thing that ever happened to Java..

  • @etsequentia6765
    @etsequentia6765 Рік тому

    *MATLAB!* Now that's a name I haven't heard in years. YEARS!

  • @mikewright2858
    @mikewright2858 Рік тому +1

    Python is slow and I personally hate the syntax. Interpreted, loosely-typed languages may be simpler to throw together simple migration scripts or whatnot, but languages like this (IMO) will always be more error-prone for runtime exceptions.

    • @aoeu256
      @aoeu256 Рік тому

      You can implement inner loops in Python by using numpy matrices and other such aggregate functions, there are JITs as well, and a lot of apps are IO bound not CPU bound. I think if you don't test your application it will have a lot of problems.

  • @ShakespeareCafe
    @ShakespeareCafe Рік тому +2

    Perl lost because the meaningless distinction between Perl vs perl...that's driving down the middle of the road

  • @capetownct
    @capetownct Рік тому

    We drive on the left side of the road and we also use Python. Go figure 😄

  • @Fallingmonsters
    @Fallingmonsters 8 місяців тому

    Watch 98x speed

  • @culpritdesign
    @culpritdesign Рік тому +2

    R was popular for a little while but then Python sored passed it.

    • @hamm8934
      @hamm8934 Рік тому +1

      I think R still has far better libraries. R still has a higher market cap in academia.

  • @godblessCL
    @godblessCL Рік тому

    But wecall know python internal and pytorch and others use C or C++. It is just a simple interface to make calculations at no cost and to help warm the planet soiner

  • @MrZerosixZeroone
    @MrZerosixZeroone Рік тому +1

    Its popular because Google pushed it so hard, so they can have easier and bigger pool to pick talents, it kinda got out of hand because too many people jumped on the hype train and slowly started to realise that Python is a absolute dumpser fire.

    • @neildutoit5177
      @neildutoit5177 Рік тому +4

      Not trying to start a flamewar but genuinely curious why you think it's a dumpster fire.

    • @nininininininini7511
      @nininininininini7511 Рік тому

      @@neildutoit5177 I too would like to know, I certainly dont think it is, its been fantastic for me

  • @GGGGGGGGGG96
    @GGGGGGGGGG96 Рік тому +1

    Ok, so why Python is popular for machine learning? 😛

  • @bhaalgorn
    @bhaalgorn Рік тому +6

    Bingus

  • @aplus1080
    @aplus1080 Рік тому +3

    Holy smokes Lex is interested in some eclectic stuff for his talks.

  • @derfla5
    @derfla5 Рік тому

    your Kanye interview got me hesitant to receive ANY information from this channel.

  • @AI_Guy_official
    @AI_Guy_official Рік тому

    Python is just English language 😅

  • @spokesperson_usa
    @spokesperson_usa Рік тому +2

    Now that Python has become as verbose as Rust because of unchecked type hints, there are fewer and fewer good reasons to use Python every day.

    • @benw4401
      @benw4401 Рік тому +3

      Lol

    • @metinersinarcan92
      @metinersinarcan92 Рік тому +2

      Type hints are not necessary to use.

    • @spokesperson_usa
      @spokesperson_usa Рік тому

      @@metinersinarcan92 They are when you work on a team that uses them.

    • @Kaizzer
      @Kaizzer Рік тому +2

      @@spokesperson_usa That's a team problem, not a language problem. I feel fine with type hints, especially after all of their evolutions, they're still getting better. Yet, you don't really need them if you don't want them.

    • @hamm8934
      @hamm8934 Рік тому

      Fewer good reasons?
      Embedded ML systems?
      Cutting down on the absolutely disproportionate cloud computing costs of python ML?
      There are definitely blind spots of python that are not going away. Also with the rise in use of rust, especially in the ML community, I wouldn’t be surprised if rust starts chiseling away at python’s ML market share.
      Rust won’t take over academia or scientists, but it’s definitely gunna be interesting for ML engineers.

  • @biomorphic
    @biomorphic Рік тому +3

    Very efficiently, fast, these are all words you can't use with Python, especially if you are the creator of the language. The reality is that scientists can't write programs, they can barely write scripts, so they find it easy to use Python, even though Python is a shitty language.

    • @isodoubIet
      @isodoubIet Рік тому +1

      Anecdote: the scientists at my organization all pushed for porting most of our python ML crap into C++ (we have a pretty well-designed c++ system and they knew from experience that working with it was much less painful than working with python). I suspect the reason so many scientists remain with python and work around its many problems is they just don't know any better.

    • @metinersinarcan92
      @metinersinarcan92 Рік тому +6

      Why is it a shitty language? It has maybe the most beatiful syntax among other programming languages.

    • @biomorphic
      @biomorphic Рік тому

      @@metinersinarcan92 what? It's horrible. Not sure what you like about the syntax.

    • @aoeu256
      @aoeu256 Рік тому +1

      Python requires much less lines of code to do stuff so the code is more beatiful. Python's REPL based development and REPL based development in general(esp Smalltalk) is more productive and you can see it in studies.

    • @Leonhart_93
      @Leonhart_93 2 місяці тому

      @metinersinarcan92 The syntax is pretty dumb not gonna lie. It sacrifices a lot of concise redability just because it doest't want to add a few extra signs and symbols that are standardised for almost anything else.

  • @richardj9016
    @richardj9016 Рік тому

    I hate the way you pronounce pythON.

    • @steveman1982
      @steveman1982 Рік тому +3

      PythOff would be even worse

    • @Kaizzer
      @Kaizzer Рік тому

      He's its creator, he's the owner of the pronunciation :P
      Just like Linus calls Linux... "Linux" ua-cam.com/video/c39QPDTDdXU/v-deo.html

    • @richardj9016
      @richardj9016 Рік тому +1

      @@Kaizzer It’s a snake. He doesn’t own the pronunciation. I used to use a language called Delphi named after the ancient oracle at Delphi and AyMerEyeCans kept insisting on calling it DelphEYE. Similarly with EYEraq and EYEran. You pronounce water as WahDer. But the worst ones are international becomes inner national which has the exact opposite meaning. You don’t write on a piece of paper, you ride on it. Stop bastardising languages.

    • @Kaizzer
      @Kaizzer Рік тому +1

      ​@@richardj9016 I get what you say, and I agree.
      But, some things are called differently depending on the region of the speaker.
      Guido is Dutch, and pronounces "Python" the way they pronounces it.
      For example, I'm Italian and I call "pizza" as "pit-tsa", not "piza" as English speakers do. I hate that, but that's the way it is...
      (oh, and I prefer the Brit "woh-ta" than Murican "wah-dr" for water 🙂)

    • @richardj9016
      @richardj9016 Рік тому

      @@Kaizzer I will make sure that I never again pronounce pizza wrong. ( It’s actually easy for me because I never did 😉).

  • @moronpaul
    @moronpaul Рік тому

    Just bring back Microsoft 2.0 Basic already.
    I would live the rest of my life a happy boy just doing a bunch of PEEK and POKE commands.
    I can write/use a Basic program in minutes...with Python/etc, I'm still trying to figure out the setup of the IDE!!!!

    • @mattizzle81
      @mattizzle81 6 місяців тому

      😂 I grew up with BASIC and know the feeling. In 2014-2017 I was still all BASIC. Expand your mind, move on, it's dead. Lol. I learned all the more modern popular languages and it is much better. You get comfortable.