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

Ғылым және технология

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

Пікірлер: 36

  • @LexClips
    @LexClips Жыл бұрын

    Full podcast episode: kzread.info/dash/bejne/oph-s5qihrfdmps.html Lex Fridman podcast channel: kzread.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)

  • @larryjeffryes6168
    @larryjeffryes61685 ай бұрын

    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?

  • @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.

  • @ivan.jeremic
    @ivan.jeremic4 ай бұрын

    Man I wish someone like Chris Lattner came to JavaScript to rebrand and fix it.

  • @scosminv

    @scosminv

    Ай бұрын

    This is the misision of TypeScript.

  • @agranero6

    @agranero6

    Күн бұрын

    It is easy to fix JavaScript, just throw it away and begin from scratch. Did you notice how "JavaScript: The Good Parts" is a small book?

  • @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 ...

  • @kaynefry
    @kaynefry Жыл бұрын

    👌

  • @user-dy7bw9fm4b
    @user-dy7bw9fm4b Жыл бұрын

  • @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...

  • @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.

  • @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.

Келесі