Can Mojo run Python code? | Chris Lattner and Lex Fridman
Вставка
- Опубліковано 6 чер 2024
- 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
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 - Наука та технологія
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.
Why not let this guy be the leader for Python 5, and wrap MoJo technology right in there?
We still need that slow shit 4 da Sn@!Lz
because its a superset not an update
@@nugget7236also Mojo is compiled language. Just imagine how fast python if it's was compile language, then it is Mojo
@@nugget7236 Python3 is a backwards incompatible superset of Python2. How would this be different except it is planning on not being backwards incompatible (if possible).
Mojo isn't ready yet but like raw cookie dough is still yummy. Unrelated: Nice miniature guitars, especially the Sunburst Fender Stratocaster.
I really praise the wisdom of Chris. I used assembler, c, c++, c#, swift, JavaScript, golang and many more but never found a more elegant language then Python! It is one of the best decisions ever in the programming language world, to not start a new language but build a superset to combine the most elegant with most performant ❤
They picked Python because of the ecosystem. Chris being experienced in lisps and functional langs I really doubt he would've picked Python had it all boiled down to purely elegance and expressivity.
Mojo is one of the best programming languages to come out in decades IMO!
Does Mojo supports arbitrary integer as Python does (natively, not using an extra library) but with more speed, as Mojo claims? Or it has cons, the same as the statically typed languages which use bit-related ints. Inventing this type of ints was a fantastic gift to numerical analysis, but the only problem is because they rely on vectors on the compiler side, they need to be faster in huge numbers. If Mojo, as they announced (and I never had a chance to work on it), is 35k faster, this ability can help the concepts.
This is a big win for ML and AI considering the fact that every millisecond counts when it comes to running a model. However, I don't see the need for mojo in say something like web development or am I missing something.
Yes you’re missing something. Some of the backend calculations are “hot loops”. If you’re running a massive Python web backend over 1000 servers, switching over to Mojo or Goland would give you massive savings
ML stuff only uses Python as a frontend. None of the backend runs in Python. So the speed improvements here would be nearly insignificant.
@@incremental_failurewell you can write everything in Mojo and thus simplify and speed up development
Excited to see what the mojo team is doing in the ecosystem!
Can Mojo improve the Global Interpreter Lock (GIL).
It alls boils to having a big integer.
Lex Fridman 2023
Mojo will be for python what typescript is to JS
in other words, the best thing that no one uses?
@@KenOtwell Are you really implying that no one uses typescript? Lol
@@looming_ Well, I've used it so I can't say no one. ;) But the majority of people working in legacy systems will stick with JavaScript. What's your experience with TypeScript?
@@KenOtwell I have yet to see a production codbase that DEOSN"T use ts.
@@looming_ Hmm. I'm betting you're a lot younger than I am. ;)
Anyway - I'm glad it caught on. It's just syntactic sugar for JavaScript, but it makes it much easier to work with.
How nice would it be to have a game engine written with Mojo and using it for scripting?!
Hear me out. We got Py_script. Give me mojo_script.
I would loooove to just run python code in the frontend.
They've expressed interest in wasm support but it's not an immediate priority
Well, I didn't expect the guys of watchmojo getting into programming…
That's because they wanted to see my python
They did not make any mention of changing their pronouns
📍13:36
Types should obviously be enforced. Every newbie likes dynamic typing but it only works when working with simple scripts. Complex stuff requires typing to make any sense.
python ++
Untyped, Dynamic and Beautiful code 😢
OOP is so gross, no thanks
FP and OOP aren't mutually exclusive, nor are they language specific. It's a fairly crude take to claim that one model of programming is good and the other is not. As with all complex choices, there are tradeoffs to each.
@@JDalmasca I should have put the /s on that.
What is intolerable... is that Mojo is not even open source. Bleh.
Who actually cares if python is slow. It basically never matters if you’re writing scripts. Genuinely wondering if anyone has had an issue here with python’s speed.
Because Python doesn't have to be just for scripts. You can write full complex applications in Python, using Qt as a frontend and any datascience package as a backend. Not everyone wants to switch to C/C++ for production code.
Sometimes even in the case of scripts. It can get pretty difficult to vectorize some stuff.
Lots of programs have high performance requirements, particularly when you get into more demanding, large-scale mathematics. If you're doing matrix multiplication, fast Fourier transforms, vectorized operations/SIMD, etc. these optimizations in compiled languages matter quite a bit. Even more so if you can optimize the instructions for a specific hardware.
It even has large real-world consequences, like large changes in computer energy consumption, heat generated in data centers, costs to consumers of those programs...
There's a reason C/C++/Rust are used in lots of contexts where this stuff matters. They're better suited to optimizing the task.
Everyone who knows more than 3 langs,
people contributing to python's scientific stack,
companies realizing they need to rewrite services to save money,
Guido van Rossum himself: Yeah, CPython is slow
Some dude in the comment section of every UA-cam video about Python:
Either this guy is trying too hard to sound like Elon Musk or there is a certain way people act to sound super smart and this guy and Elon are both trying to act that way