Mojo and Python type system explained | Chris Lattner and Lex Fridman

  Рет қаралды 16,540

Lex Clips

Lex Clips

Жыл бұрын

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

Пікірлер: 35
@LexClips
@LexClips Жыл бұрын
Full podcast episode: kzbin.info/www/bejne/ppWtgmufi7mqoJo Lex Fridman podcast channel: kzbin.info 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.
@vicheakeng6894
@vicheakeng6894 Жыл бұрын
(sometimes called "textbook Pascal") are:
@vicheakeng6894
@vicheakeng6894 Жыл бұрын
(DCMA)
@Fuego958
@Fuego958 Жыл бұрын
Super excited to try out Mojo
@kalpakHere
@kalpakHere Жыл бұрын
mojo is basically trying to weave rust, c++, python into a unified platform and have compiler as a service (may be)
@ivan.jeremic
@ivan.jeremic 4 ай бұрын
Man I wish someone like Chris Lattner came to JavaScript to rebrand and fix it.
@scosminv
@scosminv Ай бұрын
This is the misision of TypeScript.
@janklaas6885
@janklaas6885 Жыл бұрын
📍18:30
@rezakghazi
@rezakghazi Жыл бұрын
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.
@davidagnew8465
@davidagnew8465 Жыл бұрын
Mojo targets the AI community. They aren't much into super-long ints. E.g., some AI hardware actually implements 16-bit floats. Those aren't so precise, but some NNs deal with a pantload of them. Python definitely does large integers. E.g., try: >python -c "p=print;n=13**1003;p(f'{n:,}');import math;logn=math.log(n);p(logn);p(len(str(n)));p(logn/math.log(10));p(math.exp(logn))" It prints out the 1003rd power of 13. All 1,118 digits, complete with thousands separator. It also prints the number's base-10 log. But it scores an overflow error trying to convert it to a float.
@rezakghazi
@rezakghazi Жыл бұрын
@@davidagnew8465 Yes, I know the floating point is the central issue in computer architecture, and it doesn't matter which programming language you use. My main concern was "int" data types, and I got my answer. Thanks.
@niks660097
@niks660097 Ай бұрын
@@davidagnew8465 I mean AI community not using super-long ints is not actually true, when you are building/researching new kinds of models or training methods, you need unlimited precision to debug your model or reduce classification errors, then when its correctness is tested, you can build a production model on int 4 or int 8, but high precision is still very important, that's why things like AVX 512 are still used in industry for researching AI.
@larryjeffryes6168
@larryjeffryes6168 5 ай бұрын
I only know AutoLISP. I want a LISP that talks to the net and peripherals easily and can run or at least manipulate standard office software like spreadsheets, CAD, word processors etc. what comes closest to that?
@kaynefry
@kaynefry Жыл бұрын
👌
@xyzzy7145
@xyzzy7145 Жыл бұрын
Strict typing is analogous to seat belts. Trying writing code in Zig - at first it's a pita, and will probably make you grumpy, but once you understand why Zig has strict typing (and thoughtful allocation...) you'll write better code. Lex, consider an interview with Andrew Kelley ...
@user-dy7bw9fm4b
@user-dy7bw9fm4b Жыл бұрын
@ajit_edu
@ajit_edu Жыл бұрын
I too stick to python because of not needing to define type
@bayrock1337
@bayrock1337 Жыл бұрын
As a JS dev I relate, but then eventually you come to understand that (strong) static typing has a purpose and you end up with solutions like TypeScript or Mojo..
@Art-is-craft
@Art-is-craft 8 ай бұрын
@@bayrock1337 Strict type based programs tend to be very much a niche and are better suited to engineers, mathematicians and data engineering.
@RobertLugg
@RobertLugg Жыл бұрын
I can’t see the advantage of this versus cython+the optional type system Python already has. What am I getting wrong?
@TCH534
@TCH534 Жыл бұрын
My guess is the cython is a bit harder to use.
@davidagnew8465
@davidagnew8465 Жыл бұрын
Python's bolted-on type declarations are useful as documentation and enable independent type checking utilities to catch bugs. Mojo, however, actually translates Python into optimized machine code that can take advantage of special hardware available on some platforms. That's how the 35,000-folds speedup can occur. Up until Mojo, if your Python wasn't fast enough, you needed to rewrite the critical parts in C or C++ or Rust or whatever. With Mojo all you need to do is to add whatever additional incantations Mojo needs to your time-critical Python source code. That's a lot less work.
@pandr3s
@pandr3s Жыл бұрын
@@davidagnew8465 Have you tried fully typing an already deployed Python application? You may as well rewrite it.
@Michallote
@Michallote 3 ай бұрын
​@@pandr3syeah the type system isnt as well thought out. If you have linters enabled like mypy almost every library will throw warnings and tell you it does not work unless you type the parts of the library you are using...
@karigucio
@karigucio Жыл бұрын
gradual typing ala mypy/mojo is the worst design point in the space. There's just no advantage compared to type inference on the user side. In every programming language you can program in any style, its just a matter of what is the least-friction default - if types are optional, then there's essentially no type guarantees for anything more complex in a codebase developed with deadlines and time constraints. Also, lack of typing in single place may destroy the whole compiler optimization thing, if unlucky.
@usefulalgorithms659
@usefulalgorithms659 Жыл бұрын
🤦‍♂️
@marcossidoruk8033
@marcossidoruk8033 Жыл бұрын
​@@usefulalgorithms659There is nothing of what this guy said that is even remotely close to being untrue, IDK what the 🤦🏼‍♂️means, probably an expression of your own ignorance?
@usefulalgorithms659
@usefulalgorithms659 Жыл бұрын
@@marcossidoruk8033 In any program you can define a threshold under which everything is compiled and above which types are interpreted. If you cannot, this is because of a bad design idea, and, even in that case, it can be solved creating a correspondence for each not typed datastructure into a typed datastructure. Any machine learning library like tensorflow or pytorch do that to compile the code into a computational graph. And even the cpython interpreter in itself if you read the code do that (in the opposite way, i.e. instructions are firstly compiled in bytecode that interpreted). Optional typing is just a way to speed up the development and optimize-where-you-need, maily designed to stop working 8 hours per day as in 1920 (even with computers and additional support) just because the customer needs a boost in computer execution speed.
@Sitron_
@Sitron_ 2 ай бұрын
Mojo is statically typed, but one of the types is called PythonObject which you only really use when you want to do Python stuff
@DDGenes
@DDGenes Жыл бұрын
this guy's voice and cadence sound like elon musk
@wilfred5656
@wilfred5656 Жыл бұрын
He speaks better than Musk
@RealNewsMMA
@RealNewsMMA Жыл бұрын
Probably communicates with Elon. Would honestly be more shocked if not. Though one explanation may be this guy watches a ton of Elon musk and has taken up some of his speech. I know growing up in Newfoundland people though it was strange I never had a strong accent for living here, but i chalked it up to me spending a lot of time talking to people on Xbox from other places around the country/world.
@ronaldomcdonaldo6289
@ronaldomcdonaldo6289 Жыл бұрын
he has Michael Shannon like features
@raianmr2843
@raianmr2843 Жыл бұрын
they bought the white nerd voice pack
@jorge1869
@jorge1869 Жыл бұрын
A ghost language.
Can Mojo run Python code? | Chris Lattner and Lex Fridman
16:11
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
Самый Молодой Актёр Без Оскара 😂
00:13
Глеб Рандалайнен
Рет қаралды 11 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 106 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 52 МЛН
Future of Python - Guido van Rossum
1:43
The Data Science Channel
Рет қаралды 2,4 М.
Mojo🔥: a deep dive on ownership with Chris Lattner
48:50
[UPDATE] Mojo Is Faster Than Rust - Mojo Explains More
52:09
ThePrimeTime
Рет қаралды 251 М.
How to hire programmers | Chris Lattner and Lex Fridman
9:45
Lex Clips
Рет қаралды 93 М.
Mojo Is FASTER Than Rust
19:22
ThePrimeTime
Рет қаралды 113 М.
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 784 М.
Python vs Swift | Chris Lattner and Lex Fridman
11:16
Lex Clips
Рет қаралды 151 М.
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 61 МЛН
Копия iPhone с WildBerries
1:00
Wylsacom
Рет қаралды 7 МЛН
Самые крутые школьные гаджеты
0:49
iPhone 15 Pro Max vs IPhone Xs Max  troll face speed test
0:33