HomeVideos

Mojo: the new programming language for AI

Now Playing

Mojo: the new programming language for AI

Transcript

31 segments

0:00

Mojo is a brand new programming language.  It's a member of the Python family,  

0:04

but it was built because of new hardware. And so,  a thing that is happening all around us that very  

0:10

few people are paying attention to is that we  have new GPUs and AI accelerators and networking  

0:15

chips and all kinds of new computers are being  invented that are purpose-built and specialized.  

0:20

These specialized processors, they don't run C++.  They don't run traditional code. AI in general is  

0:26

taking over the world. You're probably seeing all  the news and headlines and all this kind of stuff,  

0:31

but the thing that is really difficult is how  do we program a GPU? How do we get these AI  

0:36

algorithms to get access to full power hardware?  And so Mojo is really designed to solve that call.  

0:41

Now from that problem, you can say okay, if we're  going to build a new programming language, this  

0:45

is very expensive. It takes years of time to do  what is the best approach? And so what what we're  

0:51

doing is we're bringing best-in-class technology.  So MLIR compilers, not just LLVM. We're bringing  

0:58

well-known syntax: just python, come. Let's not  have to teach people the basics of syntax again  

1:05

let's get it so the AI tools natively know  Mojo already because we're using Python.  

1:10

But then we're bringing entirely new compiler  techniques and so in C++ you like templates and  

1:16

meta programming with templates and things like  this supercharges that and so it takes uh books  

1:21

out of more recent languages just like Zig  for example and brings it into the ecosystem.  

1:26

It makes it so error messages are detected much  earlier, makes it so you can take a piece of code  

1:32

and then split it across multiple devices. That's  a completely new thing that's almost impossible  

1:37

to do in a language like C++. But honestly it  learns a lot from C++ too. And basically the  

1:43

idea and the way I look at it is that C++ is a  great language. Take the good ideas from it and  

1:50

the good ideas from Swift and the good ideas from  Rust and the good ideas from every other language  

1:54

that we've seen before and mix it together  into a new system that is state of the year.  

1:59

And so I think that Mojo will continue to  grow. It's maturing now which is very exciting.  

2:05

It will grow from being a GPU programming thing  which is where it's starting into being a full  

2:09

application level thing where it will compete  with things like C++ and Rust. Then eventually  

2:14

we'll grow into object orientation and things like  this and it will feel like Python 4. At that point  

2:19

I think that you know it would be very exciting  for the world because you'll have something in  

2:23

the Python family that's very scalable all the way  down to really weird and obscure accelerators all  

2:27

the way up to the biggest application use cases.  But unlike Python it's a thousand times faster.  

2:33

Unlike C++ it's way easier to learn and teach.  Like Rust is memory safe and so we'll bring  

2:39

together a lot of uh new technologies into the  system that hopefully can scale for the world.

Interactive Summary

Mojo is a new programming language designed to bridge the gap between easy-to-use syntax and high-performance hardware, specifically targeting modern AI accelerators and GPUs. By combining the familiarity of Python with advanced compiler technologies inspired by C++, Rust, and Swift, Mojo aims to offer a scalable, memory-safe, and significantly faster alternative for both low-level hardware programming and general application development.

Suggested questions

3 ready-made prompts