Mojo Lang… a fast futuristic Python alternative

Поделиться
HTML-код
  • Опубликовано: 3 май 2023
  • Mojo is a new LLVM programming language designed as a superset of Python with the low-level performance of C. It is optimized to run on GPUs with CUDA and other exotic hardware for deep learning and Artificial Intelligence.
    #programming #tech #thecodereport
    💬 Chat with Me on Discord
    / discord
    🔗 Resources
    - Mojo Language www.modular.com/mojo
    - ‪@howardjeremyp‬ Mojo Video • Jeremy Howard demo for...
    - LLVM in 100 Seconds • LLVM in 100 Seconds
    - Python in 100 Seconds • Python in 100 Seconds
    - Linear Algebra for Programmers • 10 Math Concepts for P...
    🔥 Get More Content - Upgrade to PRO
    Upgrade at fireship.io/pro
    Use code YT25 for 25% off PRO access
    🎨 My Editor Settings
    - Atom One Dark
    - vscode-icons
    - Fira Code Font
    🔖 Topics Covered
    - What is Mojo Language?
    - Best Python alternative
    - Is python slow?
    - Futuristic AI programming languages
    - Is mojo a python killer?
    - Mojo vs Python
    - Mojo vs Rust
    - Mojo vs C++
  • НаукаНаука

Комментарии • 1,8 тыс.

  • @kullen2042
    @kullen2042 Год назад +8797

    I love how fast the industry jumps on the trains and looks for Mojo devs with 10+ years of experience.... :D

    • @solatenebra8654
      @solatenebra8654 Год назад +426

      Python devs would apply too since Python now becomes subset of Mojo

    • @叵
      @叵 Год назад +264

      inspect element:

    • @abdirahmann
      @abdirahmann Год назад +10

      @@叵 😂😂

    • @KilgoreOnDrugs
      @KilgoreOnDrugs Год назад +52

      @@solatenebra8654 superset not subset... important difference

    • @gfrewqpoiu
      @gfrewqpoiu Год назад +99

      And no other than Cyberdyne Systems. To do Excel spreadsheets, data entry, and building hyper-intelligent armed robots.

  • @Nick.....
    @Nick..... Год назад +2009

    I have 10 years of watching “Watch Mojo” experience, so I think I’ll apply for that job!

    • @roeltz
      @roeltz Год назад +60

      So that's what the recruiter was referring to, huh?

    • @vectoralphaSec
      @vectoralphaSec Год назад +3

      Lol and fail the interview miserably

    • @th.araujo
      @th.araujo Год назад +1

      😂😂😂😂😂

    • @SaeedAbdulRaheem
      @SaeedAbdulRaheem Год назад +17

      @@vectoralphaSecWhat do think the interviewer ask during the interview?

    • @MrAmbrosse
      @MrAmbrosse Год назад +5

      I travelled forwards in time and have ten years of Mojo experience, and then came back to present day to apply for this job. Next question.

  • @olddudeification
    @olddudeification Год назад +537

    After working with Mojo for 10 years I can safely say that this is going to become the new standard for AI/ML development. Very exciting stuff.

    • @infiniteloop5449
      @infiniteloop5449 Год назад +63

      You’re hired

    • @eklavyachandra
      @eklavyachandra Год назад +37

      You're fired

    • @jiheuilee9883
      @jiheuilee9883 Год назад +45

      hired and fired in one week 😮

    • @skkl8045
      @skkl8045 Год назад +20

      You're hired again

    • @infiniteloop5449
      @infiniteloop5449 Год назад +20

      @@skkl8045 It’s going to cost you twice as much now because I now have 20 years of Mojo experience 😎😎😎

  • @ayoub1024
    @ayoub1024 Год назад +63

    The 🔥 emoji as an extension got me 😂😂

  • @MindlessTurtle
    @MindlessTurtle Год назад +2454

    Crazy how much languages change over the years. C# going functional and Python adding types. Good times.

    • @ouo5634
      @ouo5634 Год назад +10

      What's the C# one?

    • @angeldev96
      @angeldev96 Год назад +114

      @@ouo5634 F#

    • @pawekoaczynski4505
      @pawekoaczynski4505 Год назад +127

      @@ouo5634 C# leans more into functional programming. They introduced structs and pattern matching, quite recently

    • @lucastavares3518
      @lucastavares3518 Год назад +44

      Linq baby

    • @user-rz1hv
      @user-rz1hv Год назад +14

      ​@@pawekoaczynski4505 records ftfy

  • @playea123
    @playea123 Год назад +1926

    I know I will give it a shot once it is open source and stable. Getting up to 14x faster code without changing anything isn’t something to easily dismiss. Obviously, not every use case is gonna get 14x but even getting 2-5x performance improvement with little refactoring is crazy good.

    • @Lord_zeel
      @Lord_zeel Год назад +211

      The real question is: Will this be a drop-in replacement for the python interpreter? Can you just mass rename all your files, run a different command, and magically the same code still runs but is (maybe) faster?

    • @playea123
      @playea123 Год назад +95

      @@Lord_zeeldef a big question. I wouldn’t mind having to make a new mojo file and importing py files like libraries or calling the main function. That’s a small enough sacrifice imho

    • @farrael004
      @farrael004 Год назад +184

      @@Lord_zeel In their announcement they stated multiple times it is a drop-in replacement that requires 0 code refactoring. It just changes how things are implemented under the hood and adds new functionality if you want even better performance.

    • @Lord_zeel
      @Lord_zeel Год назад +27

      @@farrael004 Neat

    • @nikonyrh
      @nikonyrh Год назад +5

      @@Lord_zeel At least Numba is quite strict on what kind of Python code you can run, for example you cannot call any object methods and many times it gets confused about variable types.

  • @Mojoojo95
    @Mojoojo95 Год назад +253

    As someone named Mojo, I see this as an absolute win 🔥

    • @scottalmond9206
      @scottalmond9206 Год назад +58

      So what you're saying is, you have 10+ years of experience with Mojo?

    • @joaopedrovoga5497
      @joaopedrovoga5497 10 месяцев назад

      ​@@scottalmond9206Well he has his age worth of experience with himself.

    • @adiletbeyshekeyev
      @adiletbeyshekeyev 9 месяцев назад

      ​@@scottalmond9206His age is his experience with Mojo

    • @ZOXENE
      @ZOXENE 7 месяцев назад

      depends on his age,@@scottalmond9206. he may even have 40+ years of experience

  • @Lolatyou332
    @Lolatyou332 Год назад +81

    As someone with 20 years of Mojo experience and someone who has watched the power puff girls growing up, I am excited for it's public release.

    • @ElsonRBLX
      @ElsonRBLX Год назад +1

      @@knowsomething9384 if you ever wonder why people hate you, this is why.

  • @Uraazi1
    @Uraazi1 Год назад +1175

    "The problem of being faster than light is that you can only live in darkness"

    • @augusto256
      @augusto256 Год назад +39

      🗿

    • @PawitSahare
      @PawitSahare Год назад +12

      Tru af

    • @sherfinshamsudeen6234
      @sherfinshamsudeen6234 Год назад +1

      Awesome 😂

    • @diegovelez187
      @diegovelez187 Год назад +3

      deep

    • @niklasbaack7238
      @niklasbaack7238 Год назад +17

      Actually wrong, if you are faster then light you should be able to see what is behind you.
      Imagine falling faster then the rain, the rain drops would fall into your face from below.

  • @ThePowerRanger
    @ThePowerRanger Год назад +1651

    I love the industry is moving towards more fast and safe languages.

    • @ko-Daegu
      @ko-Daegu Год назад +95

      Didn’t Intel say that 85% of our processing is copying memory
      And some crazy percentage from Microsoft was memory vulnerability
      The answer is a clear Rust but the learning curve was steep for a lot and the eco system is not their this looks hella attractive

    • @coldestbeer
      @coldestbeer Год назад +70

      Nothing fast is safe. And if it is, what color is your Bugatti?

    • @xX_dash_Xx
      @xX_dash_Xx Год назад

      you are very very soy boy

    • @th.araujo
      @th.araujo Год назад +165

      ​@@coldestbeer Airplanes are very fast and incredibly safe

    • @CatMeowMeow
      @CatMeowMeow Год назад +61

      @@coldestbeer Rust is a pretty rare case of pretty fast and pretty safe. It's hard to pick up at first, but it sure is interesting and unique

  • @rcnhsuailsnyfiue2
    @rcnhsuailsnyfiue2 Год назад +108

    Chris Lattner is a legendary programmer, as if Swift and LLVN weren’t impressive enough already. Respect!

    • @hamedhosseini2155
      @hamedhosseini2155 7 месяцев назад +4

      And mojo was so similar to Swift. What Fireship showed was 80 percent understandable for a swift programmer!

    • @aurelia8028
      @aurelia8028 7 месяцев назад +1

      lol never even heard about him

  • @auspiciouscrane
    @auspiciouscrane Год назад +20

    I've always wanted Python with strict Type Checking. I think this is it. Very excited to see wyat it will be like.

  • @g-program-it
    @g-program-it Год назад +1143

    great explanation, 10 years of experience for Mojo. Recruiters are so smart.

    • @dnull
      @dnull Год назад +65

      i thought nobody falls for insert element jokes anymore

    • @traniel123456789
      @traniel123456789 Год назад +12

      Plenty of people already have that, since all python experience is also mojo experience due to it being a superset.

    • @wanderlustislamabad8082
      @wanderlustislamabad8082 Год назад +20

      Soon to be replaced by AI. Those jobposters will deserve every bit of the layoff they get

    • @JoelRehra
      @JoelRehra Год назад +4

      I mean building hyper-intelligent armed robots sounds like it would be worth 137k a year...

    • @jorgeriveramx
      @jorgeriveramx Год назад +6

      @@traniel123456789 it doesn't work that way. You could claim python experience as Mojo experience if it were a subset of python not the other way around. You only have experience with a subset of Mojo by definition.

  • @ItJackL
    @ItJackL Год назад +891

    I have literally been dreaming of a programming language like this as a python developer...

    • @punchcake4832
      @punchcake4832 Год назад +13

      nim

    • @voxelfusion9894
      @voxelfusion9894 Год назад +21

      @@punchcake4832 no interop with python is the problem there

    • @DB-de2ht
      @DB-de2ht Год назад +10

      What are you missing from Cython?

    • @ko-Daegu
      @ko-Daegu Год назад +2

      @Lonnie Johnson is it difficult? I tried go loved it but way more lines of code for a speed I don’t truly feel it gives me that much needed with this learning curve I might just jump to rust
      Does nim have similar experience?

    • @chiboreache
      @chiboreache Год назад +1

      Nim was pretty close, with some great features though

  • @Mnerd7368
    @Mnerd7368 Год назад +145

    So Mojo is like C, C++, and Python 3 have merged each other to get the performance of C/C++ and the elegant simple syntax of Python 3 or Ruby. As a computer science student I cannot wait to get my hands on Mojo who has been learning C++ and Python 3 for years.

    • @RenderingUser
      @RenderingUser Год назад +22

      more like rust and python combined cause for some reason its got a borrow checker of some sort
      its gonna be interesting to try

    • @SaHaRaSquad
      @SaHaRaSquad Год назад +4

      @@RenderingUser Considering it seems to have completely optional typing etc and is trying to do everything at once I doubt it can be comparable to Rust. But in 90% of cases it doesn't need to be. A strong type system at all and the ability to optimise critical code on a low level is already a huge step forward.

    • @LightningSpritesJetsWizard
      @LightningSpritesJetsWizard 6 месяцев назад

      You don't have to wait. Download Julia 1.10 and see the docs or tutorial and you'll appreciate both the speed and elegance vs. Python.

  • @lost-one
    @lost-one Год назад +89

    Massive potential right there. Python really needed something like this, imo.

  • @DarkVortex97
    @DarkVortex97 Год назад +287

    Any Python++ language that was going to be faster was always going to have to do away with many of the things that made it quick and easy to use. Much of the speed of Rust/C++ etc. comes from their syntax, declared variable types, etc. I'm happy to see Rust's ownership system here though, cos that's something I'm trying to wrap my head around at the moment anyway

    • @dnull
      @dnull Год назад +10

      how does "speed" of these languages come from their syntax, exactly?

    • @revimfadli4666
      @revimfadli4666 Год назад +86

      ​@@dnull enforced static typing, thus removing the need for type checks?

    • @TheOnlyGhxst
      @TheOnlyGhxst Год назад +25

      Julia is as fast as Rust and C++ while managing to have a Python-like syntax. So, the syntax is definitely NOT necessary for speed.

    • @jan-lukas
      @jan-lukas Год назад +48

      The syntax by itself doesn't change anything, but the syntax is only a representation of how complex the langue is designed. You can leave out most of not all types in C++ as well nowadays with auto. But this still has an underlying strong type system which makes it inherently faster than python which has a soft (but, in contrast to C, safe) type system

    • @dnull
      @dnull Год назад +13

      @@revimfadli4666 typing is not part of "syntax" in traditional sense

  • @maazshaikh2953
    @maazshaikh2953 Год назад +12

    I don't know if it will really catch on. Because the reason why python is so popular is because of its easy syntax, and since most AI libraries are written with a C backend, python just works as an interface to those functions. If i wanted to use pointers and types in python wouldn't i just use C or rust?

    • @Tom-cq2ui
      @Tom-cq2ui Год назад +8

      Agreed... I don't get the point. Mojo adds complexity to Python which lowers readability and ultimately, it won't beat pure C or Rust in terms of performance. So you just complicate your code and still fall behind in speed. If you go to the lengths of optimizing Mojo code, you could have just used C to begin with 🤷‍♂
      Yea, it's cool to have regular Python code run faster under Mojo, out of the box, and yea, for hobbyists, it may be a simpler solution to gain some perfomance. But Python was never about or for perfomance so...

    • @michal3141
      @michal3141 Год назад +1

      The point I guess is to create a complete language and remove a need for C/C++ bindings for doing something performance critical. I guess 99% of Mojo code will be basically pure Python in most projects but then you need 1% where performance actually matters and you can code it using Mojo specific stuff. I'm already excited. The potential is huge.

  • @madhes23
    @madhes23 Год назад +65

    I would be much more interested in comparing Python code with GPU optimised version (maybe using Pytorch tensors) vs the Mojo code for the same.
    Nobody would use a simple for loops for matrix multiplication, if we want to see how much impact it makes on industry, maybe we need to compare with industry standards.

    • @kuretaxyz
      @kuretaxyz Год назад +14

      yes. at least give us a comparison with numpy, that would be much more realistic.

    • @yobabadakong8137
      @yobabadakong8137 Год назад

      Agreed.

    • @SaHaRaSquad
      @SaHaRaSquad Год назад

      @@kuretaxyz Even in the cases where there's zero performance difference it's still a better choice with the type system. Python can't even detect use of undefined variables beforehand. This turns the language from a prototyping tool into something usable.

  • @YoshiyaMakina
    @YoshiyaMakina Год назад +6

    What a time to be alive - CAD sketcher add-on is about to become a blender feature, Godot 4's new features makes rendering more enhanced than its predecessor, toroidal propellers (despite being an old invention) are now being slowly applied in different kinds of machines, and now we have this one. :)

  • @_dot_
    @_dot_ 10 месяцев назад +8

    i have a hell of a lot of experience diving into the depths of python and i really like it a lot. but because it’s so slow i basically always shy away from starting anything that might in any way require performance in it. if this is even close to as good as it seems i might just come back to it!

  • @Jeal0usJelly
    @Jeal0usJelly Год назад +79

    I already love how with this language you can basically find a sweet spot between performance and increased codebase complexity, definitely gonna try it once it goes opensource 🔥

  • @beepbeepgamer1305
    @beepbeepgamer1305 Год назад +15

    as a python programmer, I gotta move into mojo, it just sounds like a dreamland for python programmers.

    • @GT-tj1qg
      @GT-tj1qg Год назад +4

      Except if you actually want to unlock all the advertised speed benefits, you have to learn low-level concepts from C such as manual memory management and static data types.

  • @idkidk9204
    @idkidk9204 Год назад +6

    Most of the x1000 speedups are parallelism based, SIMD uses AVX/SSE instruction set to use its parallel abilities. Basically it's somewhat like using a build in Cuda cores in cpu that are limited. Basically it's something that's used by many libraries in other languages for example noise generation libraries use such a instructions.

    • @HolyRamanRajya
      @HolyRamanRajya Год назад +2

      Yeah I don't get it how that is Mojo's USP. Every language is already having libraries or bringing it soon. .NET6/7 had similar ridiculous performance gains using SIMD for LinQ operations on Hashsets specially. SIMD is a cheatcode like multicore processors. It has little to do with a language. It is essentially able to pack bits of data and process within a single machine cycle, which is the reason for gain.

    • @bartpelle3460
      @bartpelle3460 Год назад

      @idkidk9204 you have no idea what you're talking about.

  • @dominikgrodl7822
    @dominikgrodl7822 Год назад +10

    It looks awesome. Chris killing it again 🔥

  • @SuhJoy-uc5yq
    @SuhJoy-uc5yq Год назад +17

    I feel like I dont really need to read articles when I have the code report almost daily. Thanks to fireship 🎉

  • @hukushmolambi8355
    @hukushmolambi8355 11 месяцев назад +7

    I have recently started learning Python, and it's definitely worth the time and effort. I'm finding the syntax exceptionally logical, which is great for newcomers. Plus, Python's extensive adaptability across different industries is a significant advantage.

  • @Chessmasteroo
    @Chessmasteroo Год назад

    Can't believe this was only announced yesterday and there's a Fireship video out

  • @petrkek8140
    @petrkek8140 Год назад +30

    Would be interesting to see a performance comparison with the dot product calculation from numpy.

    • @HolyAvgr
      @HolyAvgr Год назад

      Wasn't the 2000x performance gain compared to that?

    • @kevinmcfarlane2752
      @kevinmcfarlane2752 Год назад

      @@HolyAvgr I thought the 2000x performance gain was of the overall program, I.e, after introducing static typing AND parallelisation.
      If you do a like for like I assume you will find that Mojo, C, C++, Rust are all about the same.

    • @RazgrizDuTTA
      @RazgrizDuTTA Год назад +2

      @@HolyAvgr From my understanding of the code shown, it is just pure Python which makes no sense to use as a comparaison. Numpy should have been used. Anyway nothing matters really because Numpy wraps BLAS and LAPACK for linear algebra. Optimized and scalable Fortran and C/C++ libraries have been around for decades and only API to them matters IMO.

  • @Bersling
    @Bersling Год назад +2

    In the jupyter notebook example, you say "where it behaves like an interpreted language". How is it doing that, is it just fast in compiling or it has some time of just-in-time and ahead-of-time compiler or some other tricks?

  • @raziuldev
    @raziuldev Год назад +2

    The most important part is compatibility.
    If existing projects are going to work fine and tweaking a bit can help us to gain more performance then most of us going for it 😜

  • @mukulborole
    @mukulborole Год назад +3

    It seems to be a game changer. One question
    Can django use mojo in their further versions as angular has used typescript in it?
    If they do it, then we may be able to see improvement in performance.

  • @Ortiane
    @Ortiane Год назад +54

    The only good part of this is more tools for experienced developers since converting to mojo from python code seems reasonable but somewhat obscure. The problem with mojo is like with every language: beginner difficulty. On the other hand, the creators made terrible decisions with by the inclusion of arbitrary decorators, symbols, awkward typing, and a slew of design choices catering only to a specific and small niche. Python is so good because it's so easy to try something, extremely simple to handle tasks, and trivially easy to run the program. I think its a step but I'm unsure if its a step in the right direction but I guess the only alternative is waiting for later releases of python to speed up existing code.

    • @ko-Daegu
      @ko-Daegu Год назад +12

      Yeah I highly doubt the bioinformaticians and ML Eng who can barely type code will be welling to manage their memory manually at this point go with Rust

    • @PGVladimirovich
      @PGVladimirovich Год назад +13

      ​​@@ko-Daegu going to argue title semantics a bit but an ML engineer definitely should be able to do that since they are responsible for prod integration. Now Data Scientists, that's a whole different story.

    • @xavierpierre5586
      @xavierpierre5586 Год назад +7

      From what I understand python synthax is 100% compatible. The simply fact that your app can go 14times faster without any changement is huge enough to make python useless. We are talking about 2 language offering litterally the same efficiency to write code since its support the same synthax and this can also import your python librairie so you don't need to wait for better new librairie and learn more to get 14time the perf...
      If in top of that some libs become optimise to leverage the capabilities of mojo then you will got a 100time performance just by upgrading your Flask or Django framework... I'm exagerating but if we add that to the AI help for productivity this will seriously be interesting. I'm not sur if c++ and so on can be thousand time faster than the current python despite being harder to learn and use

    • @aravindpallippara1577
      @aravindpallippara1577 Год назад

      @@xavierpierre5586 C is essentially above assembly in it's complexity most of the time - you aren't writing faster code than C in a higher level language if you know both equivalently well

    • @drastically143
      @drastically143 Год назад +9

      @@xavierpierre5586 the 14x comparison wasn't fair, for linear algebra everyone is using numpy and i doubt there will be improvements if they compared everything fairly.

  • @BenRogersWPG
    @BenRogersWPG Год назад

    Thanks for this video. Sounds amazing!
    I signed up for the wait-list

  • @DustinGhia
    @DustinGhia Год назад +2

    Fireship always brings me the best time when I go home after a hard day at work.

  • @Landon_Hughes
    @Landon_Hughes Год назад +55

    Damn!
    I love Swift and I use Python for work every day.
    It'd be great to see mojo with Django 🔥

    • @HT79
      @HT79 Год назад +6

      Haven't tried it yet but i have a feeling there won't be significant gains for django. This is more useful for compute intense workflows. Things like matrix multiplication.

    • @d0gl0gic80
      @d0gl0gic80 Год назад +7

      Mojango!

    • @TinTechPodcast
      @TinTechPodcast Год назад

      This was my exact reaction

  • @FinnBrownc
    @FinnBrownc Год назад +5

    If they can keep this performance and improve the packaging ecosystem, they will win over so many python devs.

  • @BirgerBurgerBargir
    @BirgerBurgerBargir Год назад

    Okay but is there some way of defining the end of a block (like with a curly bracket), or are we still stuck with tabbing all the lines we want to move between blocks?

  • @Alche_mist
    @Alche_mist Год назад +1

    A lot of this seems like the ideas used with Godot's GdScript, but instead of tightly integrating the language into the game engine, it focuses on computation-intensive tasks.
    I very well can see GdScript, Mojo and Nim influencing each other back-and-forth in the future for the benefits of their users. Which means, I like this.

  • @WolfrostWasTaken
    @WolfrostWasTaken Год назад +11

    Mojo is looking really promising. I hope it gets adopted by scientists everywhere around the world. It would speed up research (especially the part where you crunch data) so much!

  • @SlimeyDev
    @SlimeyDev Год назад +12

    This video was extremely informative and amazingly edited. I myself will be taking a look at mojo as it looks very interesting.

  • @boriscrisp518
    @boriscrisp518 Год назад

    Hugely useful, concise and even a bit of funny in there too. Dude you deserve to get rich off these vids... and you probably are and I'm glad

  • @vectoralphaSec
    @vectoralphaSec Год назад

    Data analysis, Data science, Artificial intelligence, Machine learning, Deep learning, back-end serverside web development in Django, Flask and more will all go lightning superspeed because of Mojo. What a time to be alive!!

  • @charlesmarks1394
    @charlesmarks1394 Год назад +21

    Nice! Sounds exactly like numba, Cython, Taichi, also Julia is already a thing and has even cleaner numerical code than python usually. All it needs is better static compilation.

    • @RazgrizDuTTA
      @RazgrizDuTTA Год назад +5

      This linear algebra example is meaningless IMO. They use a pure Python implementation as a reference. Everyone use wrappers to fast Fortran or C/C++ libraries like in Numpy or in Julia (I love Julia!). Even if you are doing exotic things, I doubt your implementation can't use BLAS and leverage its optimized implementations.

    • @greatreset4118
      @greatreset4118 Год назад

      ​@@RazgrizDuTTA they're comparing it to python not python + some monkeypatch solution

  • @TheColorman
    @TheColorman Год назад +114

    I have been waiting for something like this, really hope it becomes as mainstream as TypeScript did for JavaScript

    • @JakubGaniaSoftware
      @JakubGaniaSoftware Год назад

      I'm also curious if this will develop more when the stable version comes out and there will be no major problems.

    • @gustavo9758
      @gustavo9758 Год назад +12

      @@Cookiekeks if I'm already Python dev why shouldn't I just use Mojo?

    • @Cookiekeks
      @Cookiekeks Год назад +2

      @@gustavo9758 Because Rust gives you high performance and is a well established language. I don't see the point in using some new language just because the syntax is similar to what you're familiar with. If you don't care about performance, just keep using python.

    • @antoruby
      @antoruby Год назад +34

      @@Cookiekeks you're forgetting that switching to another language is also abdicating the whole ecosystem it provides. Python is used a lot in several data science and analytical domains for instance (processing libraries, machine learning, visualization, etc.). Considering you don't want to abandon all the projects and libraries of this ecosystem, a possibility of a drop-in replacement of a faster runtime is very appealing.

    • @Cookiekeks
      @Cookiekeks Год назад +3

      @@antoruby All of them can be reimplemented in other languages too. It's a bad idea to stick with one language just because it has some libraries you need.

  • @_bustion_1928
    @_bustion_1928 Год назад +1

    I wonder what are the speed gains compared to DL libraries such as PyTorch?

  • @WalnutOW
    @WalnutOW Год назад +1

    Python and pointers sounds like a match made in the deepest, darkest most unspeakably evil depths of hell

  • @d0m96
    @d0m96 Год назад +65

    The hype is strong with this one, thanks to both the great marketing of the Modular team and Chris Lattner (author of LLVM) being behind it. But I just hope this will live up to at least 40% of the hype. But I am excited, I think this has a strong chance of replacing Python and I say this as someone that has worked on Nim for more than a decade.

    • @erniea5843
      @erniea5843 Год назад +3

      So many RUclipsrs promoting Mojo over the past 2 days, will be interesting to see if adoption lives up to the hype

    • @kissinger2867
      @kissinger2867 Год назад +8

      The language isn't complete yet and there is no complete working implementation of it so it's just hype at this point. Nim was good. you and Araq did amazing job but in no way was meant as replacement for python, I was wishing Nim become the Typescript of Python, instead it went its unique way.

    • @drygordspellweaver8761
      @drygordspellweaver8761 Год назад +1

      “Var” kills it

    • @julians.2597
      @julians.2597 Год назад +1

      @@drygordspellweaver8761 how, of all things?

    • @encapsulatio
      @encapsulatio Год назад

      The little WOKE former Nim developer has spoken.

  • @ahmedayad2200
    @ahmedayad2200 Год назад +3

    This looks great, but can we get a performance comparison against a vectorized numpy imementation of the function.

  • @efeonobrakpeya9883
    @efeonobrakpeya9883 Год назад

    So emotional, I never thought I'd see python speed up in my life time

  • @mytechnotalent
    @mytechnotalent Год назад +1

    It looks extremely promising. If the community as a whole gives it a change it could be huge.

  • @johanngambolputty5351
    @johanngambolputty5351 Год назад +66

    I have mixed feelings, I started with python, love the syntax, been using it for 10 years or so... But I ended up going down the route of c/c++/rust when I started integrating some OpenCL stuff in my python and was kinda looking forward to moving on. Will definitely be giving it a try though.
    Edit: Just realised the base python example used primitive/native python types... rather than an optimised linear algebra library like numpy which you would usually use in python, which will use some simd at least if not also parallelism... I'm sure its faster, but the comparison feels in bad taste.

    • @the_mastermage
      @the_mastermage Год назад +9

      to be fair that is not a fair comparison because obviously numpy uses c under the hood. Thats like saying i have a fast javascript program but it uses much c code by using ccall. I personally prefer not needing to use alot of dark magic just so my programs become fast. Tho to be fair i come from a Science background where often enough the straightforward implementation would use alot of loops which with class functionality in python is just a pain in the ass considering its speed. And then the fast implementation using numpy is very unstraightforward.

    • @johanngambolputty5351
      @johanngambolputty5351 Год назад +15

      @@the_mastermage Yeah but that's what python is arguably for, you wouldn't expect to implement performant code in bash, but it doesn't mean there isn't value in being able to quickly plumb stuff together...
      Edit: also numpy has the same ergonomics as MATLAB, which is about as straight forward as you can write linear algebra on computers... (which is also an interpreted language that calls c stuff under the hood?)

    • @timp2751
      @timp2751 Год назад +1

      Quite, easy speed gains already exist. np.matmul provides a 300x speed boost on this tablet vs their original code and that's about the least that can be done.

    • @ko-Daegu
      @ko-Daegu Год назад +3

      @@the_mastermage the whole selling point of python is ease of code and small num of code lines
      While also I don’t need to learn more SW concepts (memory management and how to work with pointers and data types) remember majority of of py coders are no software engineers they learned python in like 10-15 days and then started to apply their ML, Bioinformatics, Quantum, Chemi-informatics concepts with code
      They don’t even care about speed, memory, Algo, DS or anything else they want their shit to work
      It’s up to us to improve it
      So if we will introduce complexity to the language they love what will they think ?
      As a software engineer I like it (the borrow checker concept one of great stuff from rust is coming) but in the same time I don’t think they will be happy to see extra weird stuff that doesn’t do things as an output for them

    • @pu239
      @pu239 Год назад +1

      @@the_mastermage why didnt they add parallelism in the py code then? You imported something in Mojo, you can import something in py too.
      that's not a fair comparison either... this is not a benchmark as they are claiming it to be.
      Also, from personal experience, just take some simple function with a loop and try to vectorize that, don't try to vectorize everything all at once. Dont even try to vectorize in multiple dimensions at once, just one at a time, and you will be surprised at how easy it becomes!

  • @Bompi_
    @Bompi_ Год назад +53

    It would be nice to see a performance comparison between the optimized Mojo code and the same task implemented in C++/Rust. I imagine Mojo has some overhead, but that the simplicity of parallelization and vectorization might cover the gap.

    • @virtuosisimo
      @virtuosisimo Год назад +16

      Lots of times those comparison are bullshit, people writing them just try to rewrite the same code and then c++ is 50 times faster than python, but if they had wrote idiomatic c++ it could had been 400 times faster

    • @samuraijosh1595
      @samuraijosh1595 Год назад +2

      @@virtuosisimo haskell might b3 1000x faster

  • @Erik-rj5xz
    @Erik-rj5xz Год назад

    Is there a ts runtime that takes advantage of ts types with increased performance?

  • @ThatTrueCJ201
    @ThatTrueCJ201 Год назад +1

    You had me on naming the file types with emojis

  • @user-dl4rr5qs8y
    @user-dl4rr5qs8y Год назад +365

    The downfall of Silicon Valley Bank has caused significant damage to the worldwide financial markets. As a result, investors are scrambling to revise their projections for interest rate increases and hastily selling off bank stocks across the board. As someone who has invested 200k in stocks, I find myself at a pivotal moment, wondering whether it's wise to cash out my depreciating portfolio. What strategies should I adopt to make the most of this bearish market?

    • @olgageorgsen9654
      @olgageorgsen9654 Год назад

      The recent events with SVB make it unlikely for the market to make significant gains soon, so it's wise to manage expectations and prepare for a potentially long recovery period. It's recommended to avoid making significant investment decisions until the economic environment stabilizes in areas of concern. It's best to exercise caution and avoid engaging with the current turbulence

    • @PrincessGunther
      @PrincessGunther Год назад

      A steadfast commitment to reputable companies requires either holding steady during market downturns or increasing investments during such times. This strategy is based on the fundamental belief that well-managed enterprises will eventually rebound with renewed strength. On the other hand, investors seeking long-term profits through stock appreciation should seek guidance from a FA to identify opportune entry and exit points. My own experience during the pandemic highlights the value of working with an investment advisor, which resulted in a significant gain of $530k in just 8 months.

    • @user-dl4rr5qs8y
      @user-dl4rr5qs8y Год назад

      please can you leave the info of your investment advisor here? I’m in dire need for one.

    • @PrincessGunther
      @PrincessGunther Год назад

      My advisor is YUVAL ERIC BROKMAN., a renowned figure in his line of work. I recommend researching his credentials further. he has many years of experience and is a valuable resource for anyone looking to navigate the financial market..

    • @PrincessGunther
      @PrincessGunther Год назад

      search his full name.

  • @rj7250a
    @rj7250a Год назад +5

    Companies publishing their AI job positions:
    "10+ years of experience with Mojo required, Python does not counts."

  • @melodysleeping3807
    @melodysleeping3807 Год назад

    I would like to use it when training models, it might be a game changer.

  • @DomainObject
    @DomainObject 10 месяцев назад

    Brilliant video. Well done introduction to this new tech. 👏

  • @David-zt5yl
    @David-zt5yl Год назад +3

    4:11 Did you read the end of the Mojo hiring ad? ----> "Will work on ... building hyper-intelligent armed robots" Wait, what ?? 🤨

  • @AWriterWandering
    @AWriterWandering Год назад +6

    It sounds great, but there are already a bunch of solutions for faster python: Cython, Numba, Pypy. What I really want to know is what advantage does Mojo have over those? (particularly Cython, which is also a superset of Python)

    • @vectoralphaSec
      @vectoralphaSec Год назад

      Watch the announcement video

    • @johnsarthole
      @johnsarthole Год назад

      The performance improvements line up with my results when testing numba and cuda so probably nothing if you just look at the numbers. If this is easy to set up and works on non-nvidia GPUs then you have a clear benefit.

  • @christiansimbarashe
    @christiansimbarashe Год назад

    Coming from Swift, you had me at Chris Lattner. Can't wait to try it out

  • @gaius_enceladus
    @gaius_enceladus Год назад

    Looks really good! I'll definitely be trying it out!

  • @RobertAlbrecht-mw7er
    @RobertAlbrecht-mw7er Год назад +4

    There is a risk that Mojo will "ruin" Python, but I think it is more likely that it will be used for Python (and Mojo) library development. Python can do amazing stuff on huge distributed clusters already. Being able to code libraries in a more python-like language will be nice. It looks like a lot of this is to get around the GIL.

  • @Earth-Worm-Tim
    @Earth-Worm-Tim Год назад +9

    Wow, if this is as it’s described then it’s a game changer. This is by far the most interesting new language I’ve heard about since Rust. Although C/C++ is so embedded (pun intended) that even if by some miracle those languages were to be replaced by contemporary solutions, the legacy code will transcend my lifetime lol.

  • @henrykkaufman1488
    @henrykkaufman1488 Год назад

    wow, it has built-in support for simd in function declaration, that is AWESOME

  • @coherentpanda7115
    @coherentpanda7115 Год назад +1

    To have the ability to go more low level could be enough oomph to make Python good enough to have game engines built on top of it that can be competitive with Godot and Unity. Having more options than C# and C++ for game development would be quite nice. It will be interesting to see the true performance gain comparisons once this is in the hands of more people.

  • @NguyenDucPhuc-qw2mt
    @NguyenDucPhuc-qw2mt Год назад +6

    Using SIMD is already a massive performance boost, especially with something like matrix multiplication. I’m curious if there is and if there are how much performance is gained by just having struct and static type in that example.

  • @halisterfernando9160
    @halisterfernando9160 Год назад +3

    Pretty interesting! I'had seen a bit of Python when I was at a bootcamp, I enjoyed its simple sintax compared to JavaScript, it would be nice to work with it someday!

  • @yugio5991
    @yugio5991 Год назад +1

    The job description killed me :)

  • @DaveParr
    @DaveParr Год назад +1

    I love how I was just finishing the rust book so I could get all these benefits, and already someone's about to solve it for me 😅

  • @LilianBoulard
    @LilianBoulard Год назад +14

    Mmm, if you'd like to compare Mojo to:
    - a pure-Python implementation (CPython), you should compare with something like PyPy/MyPy, which are already well established and use the python type hints (no crazy syntax to learn!)
    - a linear algebra implementation, __use numpy__. Never in existence would you do you matmul with for loops 😂
    But of course you wouldn't get the flashy 4000x speedup

    • @IvanYakovkin
      @IvanYakovkin Год назад +2

      numba and numexpr are also much faster than pure python, so yeah, not a fair comparison

    • @daniilvinnik4450
      @daniilvinnik4450 Год назад

      NumPy is not Python, it is C. Same with GPT - it is written in C but accessed from Python. Anyway, I'm not one of those crazy Python haters-Cpp lovers... every language has its purpose. Let's just admit that Python is indeed slow but very simple and comfortable language to write in.

    • @katrinabryce
      @katrinabryce Год назад +1

      @@daniilvinnik4450 Sure, but in my data analysis projects, I use Python to get the data into a Numpy, Pandas, or more recently Polars array, do all the heavy lifting there, then use a bit of Python and Javascript to present the results.

    • @deepfakescoverychannel6710
      @deepfakescoverychannel6710 Год назад

      we don't need mojo. Python is the best.

  • @stijndcl
    @stijndcl Год назад +3

    If you can only get these speedups when adding the proper type annotations, doesn't that rule out practically every library (like Numpy) as of right now? None of those are typed properly (if _at all_), and especially not with Mojo types, so code that uses it won't get much of a performance increase

    • @coherentpanda7115
      @coherentpanda7115 Год назад

      Every library will start updating, or be replaced. Same thing happened when Typescript became popular, every library creator had to go back and update their code to take advantage of the new features.

  • @jess-inspired
    @jess-inspired Год назад

    I'm curious, would you be able to use mojo with python web frameworks like django and flask?

  • @michellegiacalone1079
    @michellegiacalone1079 Год назад +1

    Interesting! Will this be usable for Blender scripting?

  • @toyesobayo924
    @toyesobayo924 Год назад +18

    10 years of Mojo experience lmaooo they want time-travelers.

    • @rj7250a
      @rj7250a Год назад +5

      I would not doubt that will happen in 2 or 3 years. I have seen a job position asking for 5 years of experience with PHP 8.

    • @dimas-
      @dimas- Год назад

      Cyberdyne Systems was developer of Skynet in Terminator 2 movie. So it makes total sense they looking for 10 years of experience

  • @totoshampoin
    @totoshampoin Год назад +6

    This is HUGE!
    I mean, I've never been a fan of Python's scope by indentations, but a faster Python is definitely worth looking into!

    • @lubricustheslippery5028
      @lubricustheslippery5028 Год назад

      With an good editor and C-like syntax. Your indentations is just an shortcut to perfection Like Ctrl+I. With pyton that is not possible and having invisible characters that have meaning in the code can create so much trouble.

    • @totoshampoin
      @totoshampoin Год назад

      @@lubricustheslippery5028 My main troubles come when I try to use multiple lines to fill a function's parameters.
      Like, suppose I have a function that takes in about 8 variables, each of which have a rather long names (looking at you, SDL).
      It's more readable for me to arrange the parameters within multiple lines.
      But in Python, when I do that, the indentation rule applies too, and I have no idea when it actually needs to be, which is likely where I wouldn't want it to be...

  • @blazinghellwheels
    @blazinghellwheels Год назад +1

    That entirely depends on mojos debugging tools and tooling support for the supersets features.

  • @fichtensaft5149
    @fichtensaft5149 Год назад

    Amazing
    Gonna try it when it’s out

  • @gunasheelan4130
    @gunasheelan4130 Год назад +3

    wow.. 4:06 this caught me offGuard 🤣🤣

  • @GoldenAgeMath
    @GoldenAgeMath Год назад +12

    As a (non-professional) python dev, this is amazing! Numpy and pandas might become a permanent part of scientific computing now

    • @georgrommling2125
      @georgrommling2125 Год назад +1

      Do you mean this in more of a _"Python will become a permanent part of scientific computing"_ way, or _"numpy and pandas will become a permanent part of scientific computing with Python"_ ?
      Because I'd argue both are true already, e.g. if you look at the Python implementation of OpenCV, they already work with numpy ndarrays. The Python implementation of MediaPipe Holistic expects an RGB-image in the form a numpy ndarray as input aswell, while PyOpenPose takes a BGR version instead.
      As for pandas, Tensorflow has a dedicated page in it's documentation about working with pandas dataframes as input for ANNs.

    • @GoldenAgeMath
      @GoldenAgeMath Год назад

      @@georgrommling2125 Yes and Yes? I really meant that this development means that Python might end up not being replaced for orders of magnitude more time than before. With human-written code becoming less and less important over the next decade, Python might remain king until humans are done programming manually as a whole!

  • @Pizzasnurr
    @Pizzasnurr Год назад

    You had me at the fire emoji

  • @zubayerrahaman2430
    @zubayerrahaman2430 Год назад

    The last 5 seconds deserved that like :D

  • @alexandredevert4935
    @alexandredevert4935 Год назад +5

    On paper, it's very nice : python, and you get rewarded to make things typed, static and peppered with hints. I'll wait to see in practice how much machinery is required to deploy and run things written in Mojo.

  • @aiexplainai2
    @aiexplainai2 Год назад +6

    this will change the game and potentially lowering the cost of training llm by magnitude and I really hope later some variation of gpt can train on this code and learn how to rewrite code from python to optimized mojo so that really minimize the learning curve become immediately useful

  • @alexandersemionov5790
    @alexandersemionov5790 Год назад

    I learned rust quite a bit, now learning python for tools. Seems like borrow checker changed the world. This is huge. Django with MOJO could be insane stack

  • @anj000
    @anj000 Год назад +1

    Typescript for Python.
    WTF what a time to be alive

  • @JSzitas
    @JSzitas Год назад +11

    We will see. I have strong doubts that this can achieve comparable performance to C++, and if it retains 'Python like simplicity' it will remain horrible for larger projects.
    People tend to ignore the overhead of things like virtual dispatch, which will probably still be a massive problem for this language. It will also have to deal with code reuse (if we are typing statically, how do I reuse my code for 32 and 16 bit dot products?). There is a very good reason why many things are the way they are in C++, and if we want comparable performance across whole programs (as opposed to short code snippets) much of it is unavoidable.
    Much of this already exists in C++, by the way. Loop vectorization is standard in all modern C++ compilers (and is not nearly as easy to automate as we would like). The 'automatic' parallelization exists in the C++ standard algorithms header as execution policy, and going from single threaded to multithreaded is a single template argument.
    Somehow people are more excited about this, but really it is not all that new, and as it becomes larger, it will start converging to C++ in a lot of ways if they want comparable performance.
    Why learn budget C++ if I already have the real thing?

  • @01001000010101000100
    @01001000010101000100 Год назад +27

    I was never into Python, because you know, speed issue ;) But there already is some quite faster than Python and quicker to handle than C++, it's Julia. It's a little (to say at least) older and mature than Mojo, but I'm not sure if it really caught up. It's a nice language targeted at AI and such, but not very popular though. It's weird considering it has other languages interoperability.

    • @katrinabryce
      @katrinabryce Год назад +16

      I use Python a lot, because for me, speed of development is far more important than speed of execution.

    • @Pedro-dn3sg
      @Pedro-dn3sg Год назад +4

      Yes!
      *insert Michael Scott "thank you" meme*
      For the entire video I was thinking "isn't this like Julia?"

    • @coherentpanda7115
      @coherentpanda7115 Год назад +1

      @@katrinabryce It doesn't appear anything will change with that. You can make virtually no changes to your code and still get performance gains with Mojo. Typescript is a great example of how adding a superset doesn't overcomplicate the underlying language, it just makes your life easier.

    • @Pascualex22
      @Pascualex22 Год назад +1

      ​​​​@@katrinabryce can a Python developer create great scripts for ML or other purposes much faster than a Rust developer? For sure.
      Can a Python developer create a complex app for backend or other purposes much faster than a Rust developer? Maybe in a simple demo they stand a chance, but linting and compile-time verifications are massive boosts to development speed in such projects.

    • @PaulSmith-gi5bf
      @PaulSmith-gi5bf Год назад

      @@katrinabryce For small-medium stuff sure, try developing a large scale enterprise application with Python and tell us how much you lasted before switching to another language

  • @ulrich-tonmoy
    @ulrich-tonmoy Год назад +1

    As you said mojo is what TypeScript to JavaScript it will neither kill or Replace but will be used as a complement to the Original Lang

  • @workingguy3166
    @workingguy3166 Год назад

    I'd love to try this out when it's out

  • @genstian
    @genstian Год назад +4

    Now, the real question is how it compares to pypy, which is the fast python.

  • @RawPeds
    @RawPeds Год назад +4

    It's too early to say, but looks promising. Because machine learning devs want performance, and many python devs will be tempted to give it a try.

  • @ant1free2e
    @ant1free2e Год назад

    was it to hard to implement bracket defined blocks?

  • @ibrahimhlc
    @ibrahimhlc Год назад

    is it only just for AI development or also can be used for like backend? Like Django?

  • @FarazMazhar
    @FarazMazhar Год назад +5

    Asking for 10 years of experience isn't absurd. If Mojo is 35,000 times faster than Python then it should only take 2.5 hours earn 10 years of experience.

  • @benjaminshinar9509
    @benjaminshinar9509 Год назад +8

    Is there really such a speed increase over using compiled python?
    And seriously, I love how all of the "next big thing" superset languages end up being decades old basic concepts such as having type safety and immutable data.

  • @yuack2398
    @yuack2398 Год назад +1

    Language naturally supporting parallelism cross cpu cores and SIMD is insane. It took several hours to study intel SIMD and accelerate my program even though I had cpp background. Now python developers with no cpp background can SIMDlize their program without cost

  • @raphaelmendesdasilva3858
    @raphaelmendesdasilva3858 Год назад

    1:50 YEEEES!
    But wait, it continues the “parameters by reference” mechanic, or it backwards to “parameters by copy”?

  • @cw9249
    @cw9249 Год назад +4

    How much speed boost would it have on numpy or torch(GPU) operations? I’m guessing not much