Switching from Python to Mojo programming language | Chris Lattner and Lex Fridman

Поділитися
Вставка
  • Опубліковано 2 чер 2023
  • Lex Fridman Podcast full episode: • Chris Lattner: Future ...
    Please support this podcast by checking out our sponsors:
    - iHerb: lexfridman.com/iherb and use code LEX to get 22% off your order
    - Numerai: numer.ai/lex
    - InsideTracker: insidetracker.com/lex to get 20% off
    Thanks to Tinker Assist for thumbnail image: www.tinkerassist.com/blog/moj...
    GUEST BIO:
    Chris Lattner is a legendary software and hardware engineer, leading projects at Apple, Tesla, Google, SiFive, and Modular AI, including the development of Swift, LLVM, Clang, MLIR, CIRCT, TPUs, and Mojo.
    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
  • Наука та технологія

КОМЕНТАРІ • 128

  • @LexClips
    @LexClips  11 місяців тому +4

    Full podcast episode: ua-cam.com/video/pdJQ8iVTwj8/v-deo.html
    Lex Fridman podcast channel: ua-cam.com/users/lexfridman
    Guest bio: Chris Lattner is a legendary software and hardware engineer, leading projects at Apple, Tesla, Google, SiFive, and Modular AI, including the development of Swift, LLVM, Clang, MLIR, CIRCT, TPUs, and Mojo.

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

      "Oh that's the origin story..." Masterful hosting! Way to get him back to discussing something new regarding which Python package might be rewritten first. Of course, he didn't actually answer that either. ;)

  • @user-wg2eh3iy5r
    @user-wg2eh3iy5r 8 місяців тому +9

    My usual use case for python has been to prototype a concept quickly and then replace parts of the code or do a full rewrite for the sake of performance. If Mojo allows me to not have to chop shop or rewrite I am 100% using it.

    • @dwight4k
      @dwight4k 25 днів тому

      Which language do you use for performance?

  • @_modiX
    @_modiX 9 місяців тому +8

    I'd have picked up Python long a go for serious stuff if it was more performant, Mojo can change the industry a lot.

  • @ertwro
    @ertwro 11 місяців тому +24

    This has really high potential. If you can use the same libraries and the same code but Refactor a little to use things like struck SIMD. You can get on board a lot of people to do great things that already use python. I’m already trying the alpha notebooks.

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

      if you have access to the notebooks, can you test actual performance differences and publish them somewhere? because their hype comparisons to python for loops were just crazy, what has to be done is comparing to SIMD-utilizing functions in eg. numpy at the very least, and since they're running it distributed on a cluster, it would only be fair to use sth like pyspark. So if you can, run a performance test using sth like pyspark and numpy on the same cluster in pure Python, and then compare it to their built-in functions, only then will you know whether their performance claims hold up at all or simply use tools like pyspark or numpy underneath the hood (which we can't know since it's proprietary)

  • @paultoronto42
    @paultoronto42 11 місяців тому +25

    So Python is not going to be replace by Julia? Why Mojo over Julia?

    • @withincode6848
      @withincode6848 11 місяців тому +8

      From my understanding is that Julia is for science, mojo is for AI, everything else will just use python

    • @lukekurlandski7653
      @lukekurlandski7653 11 місяців тому +9

      mojo integrates (nearly) seamlessly into existing Python code. You can write Python code and run it using mojo. Then you can alter it using mojo constructs to improve its safety and performance. mojo has slightly stronger language features than Julia (mojo borrows ideas from Rust) but the main benefit is the interoperability with Python.

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

      What about codon? Isn’t this just the same thing just behind a closed closed beta?

    • @DMSBrian24
      @DMSBrian24 11 місяців тому +1

      @@thomaskragerud8039 The idea behind codon is awesome, much better than what mojo offers, the only issue with codon is that it's proprietary (BSL license), aka the source code is available but it's only free for personal use. By 2026 it's expected to change to Apache 2 license and if the project matures by that time, it might be something amazing, but before that it's not really worth looking into. But it's still more interesting than Mojo which is nothing more than vaporware for now.

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

      Julia will die.

  • @woolfel
    @woolfel 11 місяців тому +27

    the sad reality is the python library community has made it impossible for other python runtimes to reach 100% comparability. Lots of other implementations claimed significant speed improvement, but none of them are able to replace cpython. I've tried other python implementations and every time I ran into issues.
    If only guido had taken time to formalize the language with a full detailed spec and stuck to it. Sadly that didn't happen and today no one has reached 100% compatibility.

  • @donquixoteupinhere
    @donquixoteupinhere 11 місяців тому +5

    Nice I have been wondering about this quite a bit lately and have high hopes for Mojo.

  • @laslism
    @laslism 11 місяців тому +21

    Mr. Lex Fridman, you are a wonderful person. You made me desire science and knowledge more than I used to be, and made me love life more after I was pessimistic and sad. You are a friend and a teacher at the same time. I am one of your viewers from the country that invented writing. 🧡

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

      So, are you in Iraq?

    • @laslism
      @laslism 11 місяців тому +2

      @@alonzoperez2470 Yes 😊

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

    Hey guys, I´m not pretty technical on the mojo use yet. If someone could kindly answer my question, let me set I know yet into AI, but I have a kind of warehouse app, and I would benefit in the speed If I re-write the app on mojo?? or this speed more for AI proposed at the moment?

  • @Gruby7C1h
    @Gruby7C1h 11 місяців тому +3

    Lattner is an international treasure.

  • @christianm4906
    @christianm4906 3 місяці тому +1

    This Mojo is way a much more attractive language than Rust. I'm looking forward to trying Mojo.

  • @KiaAzad
    @KiaAzad 11 місяців тому +3

    My use of pythong is in an engine that uses pygame that uses python, for somebody like me, two levels of frameworks have to switch before I can.
    I assume that would be the case for most others, the frameworks have to switch before they do, or better frameworks have to pop up on mojo.

  • @klaymoon1
    @klaymoon1 6 місяців тому +1

    Amazing video. Does anyone know if Mojo can even run Numpy or Panda faster? And, does this mean we can train AI models faster too?

  • @isuzu343
    @isuzu343 11 місяців тому +5

    What exactly is the business case for Mojo? Can Chris commit to making it open source? Julia is academia-driven. Python has huge open-source backers. Neither of them is a product of a startup like Mojo is for Modular.
    If Mojo is made free and publicly available, who's paying the bills for Modular? Will it have a licensing tier structure for academia/research/commercial use like other software vendors (Mathematica/Matlab) do?
    The entire "closed beta with a wait list" approach that Modular is taking with Mojo has made me skeptical about it's open source viability. Any clarifications would be welcome!

  • @MagnumCarta
    @MagnumCarta 11 місяців тому +42

    I'm sorry but I'm not going to *WatchMojo*.

    • @JerryThings
      @JerryThings 11 місяців тому +2

      I hope that the popularity of the Mojo language will eventually hide most of that time wasting content

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

      @@JerryThings 🤣🤣 haha, just checked it out to see what you were talking about. I was curious at first...

    • @surajjain7119
      @surajjain7119 11 місяців тому +1

      This had me rolling 😂😂

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

      @@surajjain7119 it was cringe

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

      @@AmpersAndAI for you..

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

    The real question is. Can I use it with py_script. Or Mojo_Script.

  • @carina_akaia
    @carina_akaia 11 місяців тому +2

    Though there's no way to install mojo at the moment 👀

  • @sinistan1002
    @sinistan1002 11 місяців тому +6

    we already had cython if you really needed super tightened code granted at more complexity but it will be interesting to see how this stands up against rust which had already started to gain traction finally even at the os level

    • @powerHungryMOSFET
      @powerHungryMOSFET 11 місяців тому +3

      this looks more for AI , rust not necessarily for AI

    • @sinistan1002
      @sinistan1002 11 місяців тому +1

      @@powerHungryMOSFET python is great for ml that is not exaxctly the same as the umbrella term ai which will be supplanted by agi this could work but most of those ml libraries even python uses are actually written in straight c which rust may be viewed or favored as a replacement for

    • @lmnts556
      @lmnts556 11 місяців тому +2

      But then rust came with a bunch of wack policies which seem to have turned a lot of people away from rust again lol

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

      ​@@lmnts556what are the policies ?

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

      ​@@lmnts556also curious to know

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

    Will it run PyScript?

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

    It's totally 2 separate systems that have something to do a bit but can be without it. Like financial system, healthcare system, and eSports and gambling system and gaming. So one is to reduce Inequality at ground level and another for creativity and arts development. And mojo maybe also is another more customer centric one that may not apply to some. So it's so complicated that even wall street gets disconnected. Haha the commentators seem surprised that they are hyping on nothing. But generally it's 3 separate issues that can be separated like currency exchanges. Swift is the banking One? Or the keyboard?

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

    does it run pytorch?

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

    I see Chris is hinting at something which would replace Mojo.

  • @red_ford23
    @red_ford23 11 місяців тому +2

    MISTER MOJO RISIN

  • @CarlosSouza-me
    @CarlosSouza-me 11 місяців тому +1

    i want to use rhe fire emoji now! and leave a legacy ...

    • @CarlosSouza-me
      @CarlosSouza-me 11 місяців тому +2

      jokes aside, this optimisation could be a game changer. I'm comforted by Chris's intellect., He kinda reminds me of Feynman in the way he illustrates his concepts

  • @alonzoperez2470
    @alonzoperez2470 11 місяців тому +6

    Python has got a simplier syntax than Mojo tho lol

    • @lmnts556
      @lmnts556 11 місяців тому +4

      But less speed. Speed is always king if the other aspects are equal.

    • @pranavmarla
      @pranavmarla 11 місяців тому +8

      @@lmnts556 Not for adaptability. Pythons whole selling point is how much more convenient it is compared to other languages.

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

      ​@@pranavmarla It is also unfathomably slow without using Python as only glue and then using code written in other languages... then as glue it hinders or prevents parallelism...
      Python is great as a syntax and language for accessibility but runs into actual real world demands that force rewrites and moves away to other languages.

    • @lmnts556
      @lmnts556 11 місяців тому +3

      @@pranavmarla Does not matter really. Speed is the most important part if everything in python has to be re-written in other languages due to it being too slow. Then it's useless. Hoping Mojo will fix that.

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

      @@lmnts556 Ah, I get your point. But my point is that I don't see it being as popular as python if it's less convenient.

  • @bvds2007
    @bvds2007 11 місяців тому +1

    I was good at Python 2.7, thanks.

  • @nathanruben3372
    @nathanruben3372 11 місяців тому +1

    Another julia wanne be. Julia has come a long way and very nice syntax.

  • @m3hdim3hdi
    @m3hdim3hdi 11 місяців тому +1

    is this mojo language just for AI?

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

    👍

  • @chicolofi
    @chicolofi 11 місяців тому +1

    Miojo? Gosto muito, com exceção do tempero no pacotinho - que é prejudicial à saúde.

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

    MOJO sound scary as fuck

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

    python had 2 problems when i saw it.... 1 was the python 3 was altering how to write the code.... and the other that could have been promising is c to python conversion, like when you want to switch from c fast language to python you could transfer natively...

  • @antonmaier2263
    @antonmaier2263 10 місяців тому

    Everyone is using numpy anyway. How does mojo compare to numpy

  • @valorien1
    @valorien1 11 місяців тому +14

    The "fire emoji" file extension is one of the dumbest things ever.

    • @thavrisco1632
      @thavrisco1632 10 місяців тому

      Let's not be anti-cool here. We're entering Mojo territory now

    • @amj.composer
      @amj.composer 8 місяців тому

      It's just whatever but it really isn't dumb

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

      Cope harder

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

    Actually yo tech is starting to scare me yo is someone gonna break into my house with teleportation code

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

    Fortran in 2023?

  • @DMSBrian24
    @DMSBrian24 11 місяців тому +9

    - proprietary software
    - no source code available
    - *no binary available*
    - unverifiable crazy performance claims
    - comparing to worst case scenario
    yep, it's vaporware hype time, no one will remember this project a year from now when it becomes clear that it's no different than using equivalent python modules

    • @driedurchin
      @driedurchin 11 місяців тому +3

      Yeah because the guy who made LLVM has no credibility when it comes to performance.

    • @kevinmcfarlane2752
      @kevinmcfarlane2752 11 місяців тому +2

      They've said it will be open sourced. Most of this sort of tech starts off closed while the initial architecture and design are fleshed out. Then they are opened. On the Modular site there's a video where they take a Python matrix multiplication sample and progressively Mojo-ise it up to 400x or something. I can't remember the factor now. I take the claimed 35Kx maximum speedup with a pinch of salt but I've no doubt the final product will be at least equivalent to C. But let's see what happens at 1.0.

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

      @@kevinmcfarlane2752 What type of python matrix multiplication, some list of lists nonsense or did they utilize SIMD by using sth like numpy? Also this would still imply that python was running on a single thread while mojo was running on a cluster, if they wanted to make it fair, they'd use python in conjunction with sth like pyspark. If mojo is significantly faster than that, i'll be impressed, but even then it'd still be vaporware until it's actually released and open sourced, because if they end up using some crappy license like BSL and charge for commercial use, none of this will matter anyway and the project will die. Also, "at least equivalent to C"? C is the fastest high level language out there so this is definitely not happening, not even Rust is as fast as C though it comes close. Unless of course you want to compare SIMD operations with multiple executors on a cluster to a single threaded for loop.

  • @Lora_Lynn
    @Lora_Lynn 11 місяців тому +1

    The easier language becomes, perhaps even AGI has created or assisted. Would not that become concerning? Unchecked?
    I am reminded of the movie Close Encounters. It's possible that music is the universal language. However if you remember, the controls was turned over to (although they didn't say) AGI. What if there's a problem with the message, communication that might be detrimental to humans?

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

      Layoff the weed bro

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

      ​@@BlackDub21 actually he's got a point.

  • @zxc232
    @zxc232 11 місяців тому +3

    Mojo really wants to promote their product through UA-camrs, but this strategy might not be sustainable in the long run. Once Python transitions to Python 4, Mojo will struggle to keep up with the changes and advancements.

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

      there will not be python 4

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

    Wao^^

  • @Rundik
    @Rundik 11 місяців тому +1

    Isn't mojo a proprietary closed source thing?

    • @DMSBrian24
      @DMSBrian24 11 місяців тому +3

      it is, and not even released yet, simply overhyped vaporware

    • @volbla
      @volbla 11 місяців тому +1

      It is planned to become open source. It's just not finished yet.

    • @zombizombi
      @zombizombi 11 місяців тому +1

      @@volbla sure...

    • @volbla
      @volbla 11 місяців тому +4

      @@zombizombi Why not? Dude is co-creator of LLVM and Clang. They're both open source.

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

      @@volbla Why not open source from start? As far as I can tell this is all just hype until it happens.

  • @meowbih
    @meowbih 11 місяців тому +1

    meow

  • @playboipablo
    @playboipablo 11 місяців тому +3

    Why is there so much talk about a programming language that doesn't exist yet? Plus why is their marketing scheme so strong and going through youtube? Publish it and let your work speak
    too much talk, red flags start popping up

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

      There's a website, so go have a look. The other languages were also talked about before they existed.

  • @whywhatwherein
    @whywhatwherein 11 місяців тому +8

    this programming language doesn't exist yet. what is going on here??

    • @DMSBrian24
      @DMSBrian24 11 місяців тому +7

      exactly this, fabricated hype around some vaporware that everyone will forget about a year from now because once it releases it'll be clear that it's no different than simply using appropriate python modules to achieve the same performance xD

    • @veebeeTV
      @veebeeTV 11 місяців тому +1

      I have access to the beta... you can sign up for the waitlist and try it out

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

      @@veebeeTV nah. first open source, then I'll think about trying it

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

      ​@@DMSBrian24 What if there is no library? Then you need to use compiled language. This is the point of mojo that you wont need to do this.

    • @DMSBrian24
      @DMSBrian24 11 місяців тому +1

      @@nemanjatrivic9505 what do you mean no library? every feature i've seen Mojo advertise can be done with a combination of pyspark and numpy, former being written in Scala, latter in C, they're both fast af and are basically a standard and I wouldn't be surprised if Mojo just used them under the hood as it is. Mojo is also narrowing down its focus to essentially just AI which is really stupid for a language to do and also indicates that they're just trying to ride the recent AI hype wave. But regardless of all of this, they keep the project closed source and don't even distribute a binary, this language basically doesn't exist, i'd get buying into the hype once it's released and open sourced, as it is it's vaporware

  • @BR-hi6yt
    @BR-hi6yt 11 місяців тому +1

    So fed-up with Python - so many add-ons that I hate the whole thing now.

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

    Its not even out yet.

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

      And?

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

      @@kevinmcfarlane2752 I got excited to try it but found out it’s in early development and waitlist only. Looks promising according to their website though.

  • @techtodas1169
    @techtodas1169 11 місяців тому +1

    First

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

    Last thing we need is new programming language
    Let python alone 2:11

    • @Art-is-craft
      @Art-is-craft 6 місяців тому

      You are thinking about it in the wrong way. If mojo lives up to its promise it will mean that existing Python users will be able to expand their capabilities with their existing Python skills. New users who may never have considered Python because it is not suitable can be introduced.

  • @chancellorpalpatine3352
    @chancellorpalpatine3352 11 місяців тому +2

    Laughing in R

  • @Selenium117
    @Selenium117 11 місяців тому +1

    What a ridiculous name lol

  • @AjaySharma-me1sy
    @AjaySharma-me1sy 11 місяців тому +1

    I am not a python lover but an emoji as the file extension and thinking that people would want to learn new programming languages when AI is here to do it all - is stupid.

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

    I thought python script-kiddies were ridiculous. Now we're supposed to use a language called "Mojo"?! what a joke...

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

    Anchor is so dead, boring 😂

  • @arthurrimbaud-ix5tr
    @arthurrimbaud-ix5tr 11 місяців тому +2

    Nothing better than c... Except rust

    • @zombizombi
      @zombizombi 11 місяців тому +1

      So a more accurate statement would be "Some things are better than Rust"

    • @kevinmcfarlane2752
      @kevinmcfarlane2752 11 місяців тому +2

      Stupid comment. Languages are tools for addressing certain classes of problem. "Better" or "worse" is meaningless without specifying a context. E.g., C is better than JavaScript for embedded software development but not for website development.

    • @arthurrimbaud-ix5tr
      @arthurrimbaud-ix5tr 11 місяців тому

      @@kevinmcfarlane2752 "Don't take everything seriously what you read on the Internet." - Sir Winston Churchill