It's a nice tutorial but I think the performance comparison is highly irrelevant for practice. It is a comparison against a manual matmul in Python - and nobody does this. Ever. I benchmarked myself and get the same order of magnitude and (in most cases) still more performance with 0 optimization and simply using PyTorch on GPU, like any AI dev would. No researcher will ever invest time to optimize on that level, if running PyTorch (and the like) on GPU gives similar or more speedup. Don't get me wrong, Mojo looks like a really interesting approach but the huge win of Python - including in AI - comes from enabling the dev to do complex stuff without optimization in just a few lines of code and outsourcing the "heavy lifting" automatically to CUDA and the like. Thus (1) Mojo will never win a huge user base over if the implementation takes much more time and, what is far more important, (2) Mojo needs to compare against PyTorch and the like and *perform better* there, not against vanilla Python.
So i did a little research with the exotic behaviour of Int datatype: Int8 stores 127 positive number, null and 128 negative numbers. So when you type 127 in Int8 you'll get 127, but when you type 128 you'll receive -128 and further initial increment just reduces the negative num by +1 (Int8 129 = -127 and so on). Also when binary grid overflow occurs the bit pointer just continues to move from left to right overlapping past bit. As shown in the video 6000 became 112. The representation of 6000 in binary is 1011101110000 and for 112 is 01110000, as you can see these are the last 8 bits of 6000 in binary.
not exotic behaviour. when a number doesn't fit the datatype (like 6000 into a en.wikipedia.org/wiki/Two%27s_complement signed 8-bit integer) the extra digits get truncated and the implementation may rise some "overflow" flag.
The functionality of Python and the speed of C make Mojo a promising language 🔥 it's far from replacing Python at the moment but we will be waiting for it to evolve. Thank you for the tutorial
@@scarysticks66 They just announced that they are open-sourcing it. Should be out by Q1 2024! And I agree that this is definitely what they needed to do to ensure widespread adoption. Now this can truly be game-changing!
58:02 I think it would be better example for "rhs" if you overload operator in that struct. Such as fn __add__(self, rhs: Banana) -> Float32: return self.Length + rhs.Length. Since you only return self.Rype or Length or Color, include "rhs" argument wasn't necessary.
The 'let' keyword is no longer supported in Mojo as of the 24.2 release. Instead, Mojo now only supports 'var' variables and undeclared variables (similar to Python) inside 'def' functions or in top-level code in the REPL. Therefore, you should use 'var' instead of 'let' for variable declarations.
Thanks for the video. Honestly I’m not sure it really makes sense from a beginner perspective because a beginner would just be confused by Mojo, as they don’t understand the underlying Python. IMO it would have made more sense to write a tutorial for people who already know Python and how they could use this to speed up their programs.
Thanks for the intro! Mojo looks very promising,, but anything that needs a huge speedup would be called from a Python library containing compiled functions. If there's no existing library, it takes extra time and effort to create a custom one in C or some other language compatible with the Python ABI. Yes, great advantage that Mojo compiles directly, but it is definitely possible to get good performance with Python.
Thank youuuuuuuuuuuuuu, finally some mojo content!!!!!!!!!!!!!!!!!!! All do, I have a problem, remember the time you opened Jupyter Notebook? a made the same thing, write "Jupiter notebook" in the terminal, and other enter that link, but it does not open in my browser.
nice, with the speed test with cuda/torch sometimes it delays the initialization of a lot of the cuda packages untill you start using torch. so can mean moving a few 100mb over once at the start of the program. Just didnt want anyone to make the mistake - gpu is going to be much faster at doing most things esp parallellizable stuff. Amazing tutorial thanks!
Correct me if I am wrong but almost all if not all major AI frameworks such as Tensorflow or PyTorch are not "written" in Python. To the best of my knowledge (and I could be wrong here) they act more like wrappers with low level mathematical operations (and thus AI training) taking place in compiled languages, I suspect it's C++. So where is this improvement in AI model training (as mentioned in the video 5:25) comes from? True if you are doing anything outside of those frameworks you are indeed stuck with Python speeds. But I don't believe the training speeds themselves are affected in any way.
When you build a Time Distributed model such as CNN + LSTM for action recognition or video classification, you have extract feature embedding from N frames and then feed them one by one to LSTM (you have to use for loop in this case). And that part is a bottleneck since you use python for loop. Those bottleneck occur in many parts of the code where you don't perform tensor operation. You can look for PaDiM (an unsupervised method for anomaly detection), you can see that there are many parts that have that kind of bottleneck. Hopefully, Mojo can speed up those parts.
Thanks a lot! Free education is amazing. I have a question - does Mojo require powerful hardware to run? It can do a lot and im afraid I may not have what it takes hardware-wise for it to be used optimally... Or could it just be run with the same specs like Python? I know it really depends on what you're doing with it but im speaking in general terms as well as in more broad ones
1:39:50 "We're going to take the first four numbers of whatever you put in here, and everything else we're just going to splice it off. That's a cool little feature. I don't know if that's a feature or a bug --" 😁
you guys always putting out stuff like you reading our minds lol! ... request could you please do a tutorial on MQL5 as in metatrader's language for building trading bots
maybe its the cpp in me talking but wouldnt the expression let x = "hello world" print(x) mean that print takes in a reference to a string rather than a string literal? which is the type that the lsp sates that the print fn takes in?
At 1h01m I don't see the point of the rhs variable, you can just use fn rype(self) -> Bool or am I missing something (It works just fine in my code) Thanks for the tutorial!
Wonderful tutorial, a question from a noob. With the "owned" arg, does the function change a parameter declared as "let"? Or does the function create it's own copy that is disconnected from the "let" parameter, and therefore mutable now?
Your notebook looks slightly different. Is there some theme or other setting that I would need to change or is it just because it's a newer version? I have to first create a new notebook and then it opens another tab where I can select python or mojo.
I recommend Java, python is very high level and hiding the machine and mojo is not ready yet. There are important concepts which are still missing in mojo. My university starts with java. It is not that hard and you can learn everything important, although it is a bit slower.
@@Summersault666 I mean, sure, why not? That's like asking a C++ programmer if there is a C++ framework. Almost all C code works in C++, so any C framework is also a C++ framework. You know what I mean?
if they have built in support to their own Data science libraries maybe they can replace python but most people wont be inclined to switch with similar features and little added on their part.
I wasnt able to find out in the docs. Does Mojo have a support for infinite integers like Python does? I want to test out Mojo's speed by performing a Mersenne Prime search but I would need int's that can carry 10's of thousands of digits.
i am getting this error on my wsl ubantu terminal :tack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
ok so if i am watching this vid today, is there a new version of this video, should i watch this or something else anyone can recommend that will be better since this is old.
The last example I saw on the Modular blog a few weeks ago showed a 68K speedup on the Mandelbrot benchmark. This was also the figure advertised on the home page. But, also, the 68K was on 88 cores, so you won’t get that on your PC! But you could get thousands.
Technically Python is a compiled language and it even has a PVM like JVM. However, the slowness comes from 10 different things in python. BTW, thank you for this course. Fun fact, Mojo can load Python libraries as well.
No it is not a compiled language just because it has a bytecode. There’s a big difference in architecture between a compiler and an interpreter and CPython is definitely the latter.
@@LakaiSkateForLife it depends what Implementation of python you are taking into consideration. CPython kind of takes care of the pyc generation(compiler) and execution through VM(interpreter).
"warning: 'my_banana' was declared as a 'var' but never mutated, consider switching to a 'let'" 😂 All mass produced bananas have been in fact mutated! lol
what a silly name (or worst) for a potential nice language and syntax...why not something like: PyCon, PyonC , ConPy, PythoC, PyWarp, and so on. Thumbs up for the lecture!
Let's gooo!
Thank you for the tutorial 🙏 will be waiting for more🔥
outdated yet?
Thank you so much
It's a nice tutorial but I think the performance comparison is highly irrelevant for practice. It is a comparison against a manual matmul in Python - and nobody does this. Ever. I benchmarked myself and get the same order of magnitude and (in most cases) still more performance with 0 optimization and simply using PyTorch on GPU, like any AI dev would. No researcher will ever invest time to optimize on that level, if running PyTorch (and the like) on GPU gives similar or more speedup. Don't get me wrong, Mojo looks like a really interesting approach but the huge win of Python - including in AI - comes from enabling the dev to do complex stuff without optimization in just a few lines of code and outsourcing the "heavy lifting" automatically to CUDA and the like. Thus (1) Mojo will never win a huge user base over if the implementation takes much more time and, what is far more important, (2) Mojo needs to compare against PyTorch and the like and *perform better* there, not against vanilla Python.
As a Python enthusiast i believe this will soon become my favorite language and thanks to you guys for providing amazing free content, once again!
As someone who has stayed away from being a Python enthusiast due to its speed... likewise. I have yet to watch the tutorial. Is Mojo interpreted?
okay, i lied, i'm pretty enthusiastic about the language. lolol
@@EmberHolly Compiled ;)
Cant believe darth vader is teaching me mojo.such a deep voice 🎉🎉
😂😂😂 stop 🛑 playing and pay attention 😅😅😅. No cap 🧢, that was funny 😁
Lukeeee😂
@@yeyintaung9837 I am ur tutooor!
Is he doing ASMR? On his both voice and keyboard
@@fintech1378
This annoying voice is ASMR to you ?
So i did a little research with the exotic behaviour of Int datatype:
Int8 stores 127 positive number, null and 128 negative numbers. So when you type 127 in Int8 you'll get 127, but when you type 128 you'll receive -128 and further initial increment just reduces the negative num by +1 (Int8 129 = -127 and so on).
Also when binary grid overflow occurs the bit pointer just continues to move from left to right overlapping past bit.
As shown in the video 6000 became 112. The representation of 6000 in binary is 1011101110000 and for 112 is 01110000, as you can see these are the last 8 bits of 6000 in binary.
not exotic behaviour. when a number doesn't fit the datatype (like 6000 into a en.wikipedia.org/wiki/Two%27s_complement signed 8-bit integer) the extra digits get truncated and the implementation may rise some "overflow" flag.
@@alelondon23 yep, that's what i meant
The reason is the 0
The functionality of Python and the speed of C make Mojo a promising language 🔥 it's far from replacing Python at the moment but we will be waiting for it to evolve. Thank you for the tutorial
Mojo has a lot of potential to take over the world. Hopefully it gets a lot of support.
it's not opensource, so its useless
@scarysticks66 not now, but the creators have said they are planning for open source in the future so it's getting there.
Nim has its potential.
@@scarysticks66 They just announced that they are open-sourcing it. Should be out by Q1 2024! And I agree that this is definitely what they needed to do to ensure widespread adoption. Now this can truly be game-changing!
@@scarysticks66 They have now open sourced the Mojo standard library. So we're moving in the right direction.
I’m so glad you guys made this video, but I’d appreciate better audio quality.
yea the guys mic is... interesting lol
58:02 I think it would be better example for "rhs" if you overload operator in that struct. Such as fn __add__(self, rhs: Banana) -> Float32: return self.Length + rhs.Length. Since you only return self.Rype or Length or Color, include "rhs" argument wasn't necessary.
I was waiting for this since I heard about Mojo about six months ago!
24 hours without this channel feels like a day
😂exactly..
I dont get it? 24 hours is a day?
@@marcusdelictusBro if you will get addicted to this channel, there will be no day for you. This channel is addictive though
@@marcusdelictus Every 60 minutes in Africa, an hour pases.
@@Groguemanwhen people die, they become dead
Hello, Mojo😊
Thank you so very much
The 'let' keyword is no longer supported in Mojo as of the 24.2 release. Instead, Mojo now only supports 'var' variables and undeclared variables (similar to Python) inside 'def' functions or in top-level code in the REPL. Therefore, you should use 'var' instead of 'let' for variable declarations.
thanks
I’m sure we’re a few years away from this but, imagine a game engine built in Mojo using Mojo as the scripting language. ❤
Thanks for the video. Honestly I’m not sure it really makes sense from a beginner perspective because a beginner would just be confused by Mojo, as they don’t understand the underlying Python. IMO it would have made more sense to write a tutorial for people who already know Python and how they could use this to speed up their programs.
Python based AI is usually implemented using the PyTorch library, which uses Lua (C based code) for optimizations.
My face during the introduction: 🤨🤨🤨
Imagine DSA with MOJO 😮
Would be a fantastic course
that will give us huge benefit during placements🔥🔥
Data Structures & Algorithms?
@@edism data structures and algorithms
@@vishalboudhh Ah, are you referring to the book or subjects in general?
Wow this is fast! Mojo would be potential, it really nice to adapt from Rust.
It's not an adaptation of Rust though.
Wonderful tutorials 🎉🎉😊😊
Thanks for the intro! Mojo looks very promising,, but anything that needs a huge speedup would be called from a Python library containing compiled functions. If there's no existing library, it takes extra time and effort to create a custom one in C or some other language compatible with the Python ABI. Yes, great advantage that Mojo compiles directly, but it is definitely possible to get good performance with Python.
waited a long. thank you so much
This language is pretty cool 🤩. The syntax is just like that od Python and Kotlin.
Thank youuuuuuuuuuuuuu, finally some mojo content!!!!!!!!!!!!!!!!!!!
All do, I have a problem, remember the time you opened Jupyter Notebook? a made the same thing, write "Jupiter notebook" in the terminal, and other enter that link, but it does not open in my browser.
nice, with the speed test with cuda/torch sometimes it delays the initialization of a lot of the cuda packages untill you start using torch. so can mean moving a few 100mb over once at the start of the program.
Just didnt want anyone to make the mistake - gpu is going to be much faster at doing most things esp parallellizable stuff.
Amazing tutorial thanks!
Thanks for the intro. Does windows version of Mojo mean we use the windows GUI programming?
Thanks. Can you give an example of using Mojo function (such as exp, mod, mul)?
It seems very clean! and I am liking it
Keep it up! Especially when it is for beginners! 👍
I’ve been waiting for this video for a LONG time
Correct me if I am wrong but almost all if not all major AI frameworks such as Tensorflow or PyTorch are not "written" in Python.
To the best of my knowledge (and I could be wrong here) they act more like wrappers with low level mathematical operations (and thus AI training) taking place in compiled languages, I suspect it's C++.
So where is this improvement in AI model training (as mentioned in the video 5:25) comes from?
True if you are doing anything outside of those frameworks you are indeed stuck with Python speeds.
But I don't believe the training speeds themselves are affected in any way.
When you build a Time Distributed model such as CNN + LSTM for action recognition or video classification, you have extract feature embedding from N frames and then feed them one by one to LSTM (you have to use for loop in this case). And that part is a bottleneck since you use python for loop. Those bottleneck occur in many parts of the code where you don't perform tensor operation. You can look for PaDiM (an unsupervised method for anomaly detection), you can see that there are many parts that have that kind of bottleneck. Hopefully, Mojo can speed up those parts.
Great course! Does Mojo even runs Numpy or Pandas faster? Also, would AI training be done faster if re-written in Mojo?
The major drawback of Mojo is that it is not available for Windows
WSL
Thanks a lot! Free education is amazing. I have a question - does Mojo require powerful hardware to run? It can do a lot and im afraid I may not have what it takes hardware-wise for it to be used optimally... Or could it just be run with the same specs like Python? I know it really depends on what you're doing with it but im speaking in general terms as well as in more broad ones
Here we go again
Great intro into the future of IaaS
இந்த மனசு தான் சார் கடவுள் 🙏✨✨
Hey,Tamil Happy to see in the global community
Aaama thala
adai ingayumaa :)
@@sathishyadav6517 😂
Finally someone who knows how good MS Edge is. He is valid boys 😅
1:39:50 "We're going to take the first four numbers of whatever you put in here, and everything else we're just going to splice it off. That's a cool little feature. I don't know if that's a feature or a bug --" 😁
Plz Make Kafka Tutorial as well
Thanks alot.. Amazing people ever&ever
Damn you ARE quick!!!!!!!!!!!!!!!!!!!!!!
you guys always putting out stuff like you reading our minds lol! ... request could you please do a tutorial on MQL5 as in metatrader's language for building trading bots
maybe its the cpp in me talking but wouldnt the expression let x = "hello world" print(x) mean that print takes in a reference to a string rather than a string literal? which is the type that the lsp sates that the print fn takes in?
Both are amazing. His voice and the whole course as well. ❤
What's mojo used for
It’s too young to be used for something but it supposed to be used in AI development.
cool video)
This is what I wanted .....thank you
is it out of date?
I am facing a crashpad failed to initialize error😢 someone plzz help
What about regular expressions or parsers (native without Python Libs)?
Hope we will get just huge speed up for existing Python code with Mojo...
At 1h01m I don't see the point of the rhs variable, you can just use fn rype(self) -> Bool or am I missing something (It works just fine in my code) Thanks for the tutorial!
'Libary' makes me laugh every time 😂
small comment.
You only get the mojo file icon in VSCode if you set the file icon theme to SETI. For me, this was not preset under WSL2 Ubuntu VSCode.
Wonderful tutorial, a question from a noob. With the "owned" arg, does the function change a parameter declared as "let"? Or does the function create it's own copy that is disconnected from the "let" parameter, and therefore mutable now?
Your notebook looks slightly different.
Is there some theme or other setting that I would need to change or is it just because it's a newer version?
I have to first create a new notebook and then it opens another tab where I can select python or mojo.
Exactly, I got this as well. I am also having problems to get the mojo kernel running.
There are a couple things that are not 100% correct throughout the video, so take care.
Fully agree. Like training models will not become faster, since the DL libraries are written in C++ currently and just provide python bindings 🤦🏼♂
I like your own voice like the angel😂
Before I start learning mojo, should I still learn python for the near future, if I want to work witj AI?
If i am starting from 0 can i start with mojo or i still need python?
I recommend Java, python is very high level and hiding the machine and mojo is not ready yet. There are important concepts which are still missing in mojo. My university starts with java. It is not that hard and you can learn everything important, although it is a bit slower.
Is there any rest api framework for mojo ? Or can I still use fastapi ?
All python packages should work with mojo, assumedly
The question should be, is there a framework written in mojo?
@@Summersault666 It can be written in python. I don't mind as long as it is working :)
@@Summersault666 I mean, sure, why not? That's like asking a C++ programmer if there is a C++ framework. Almost all C code works in C++, so any C framework is also a C++ framework. You know what I mean?
@@nubufiSo what’s the benefit then? 😂 Any Python framework will be a bottle neck.
Mojo is what we call our typical sauce in the Canary Islands
Wow nice content
Freecodecamp reading my mind once again ❤😅
@@CoolestPossibleName ohh 😅
i am intreasted in learning mojo programing language
if they have built in support to their own Data science libraries maybe they can replace python but most people wont be inclined to switch with similar features and little added on their part.
free coding camp is my religion.🙇
2:20 I realized I'm actually more advanced than I thought, and I really don't need this... I need to just go to the docs.
Thanks❤
thankh you
Basically typescript but with python syntax
Isn't it just dropped? Is it ok to learn now?
configparser.NoSectionError: No section: 'mojo'
modular: error: failed to run script
I wasnt able to find out in the docs. Does Mojo have a support for infinite integers like Python does? I want to test out Mojo's speed by performing a Mersenne Prime search but I would need int's that can carry 10's of thousands of digits.
Make an Ocaml programming course please 🥺 🙏🥺🙏
In the meantime you could try the underrated F#. Plenty of tutorials on that.
@@kevinmcfarlane2752 Sure, I will try it. Thanks for the suggestion
@@debajyatidey9468 It also has good support for data science and AI. Search "F# data science."
EPIC
i am getting this error on my wsl ubantu terminal :tack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
ok so if i am watching this vid today, is there a new version of this video, should i watch this or something else anyone can recommend that will be better since this is old.
In the immortal words of Austin Powers "I got my mmmmojo back. Yeah baby!!"
Is the author confident in the accuracy of the speed calculations at the beginning of the video?
The last example I saw on the Modular blog a few weeks ago showed a 68K speedup on the Mandelbrot benchmark. This was also the figure advertised on the home page. But, also, the 68K was on 88 cores, so you won’t get that on your PC! But you could get thousands.
interesting language ngl
Technically Python is a compiled language and it even has a PVM like JVM. However, the slowness comes from 10 different things in python.
BTW, thank you for this course.
Fun fact, Mojo can load Python libraries as well.
No it is not a compiled language just because it has a bytecode. There’s a big difference in architecture between a compiler and an interpreter and CPython is definitely the latter.
@@LakaiSkateForLife it depends what Implementation of python you are taking into consideration. CPython kind of takes care of the pyc generation(compiler) and execution through VM(interpreter).
yesssssss
Woooow i was waiting it
Inout is basically by reference
Mojo will be a game changer it will wipeout some languages forever, could this surpass the king: C++?
Since this language is similat to python . Does it work with django?
That would be cool. Django with the speed of Mojo.
@@vectoralphaSec exactly
This guy is so cool ...
19:59
installation of ubuntu, modular and mojo is hell, button run mojo file doesn't work either 🤯 command jupytor notebook doesn't exist
mojo dojo casa house when?
Finally
Could I use it with MacOs Visual Studio ?
"warning: 'my_banana' was declared as a 'var' but never mutated, consider switching to a 'let'" 😂 All mass produced bananas have been in fact mutated! lol
what a silly name (or worst) for a potential nice language and syntax...why not something like: PyCon, PyonC , ConPy, PythoC, PyWarp, and so on. Thumbs up for the lecture!
How can we host endpoint using mojo
Great tutorial! hm I think your read_only banana methods could use (self: Self) instead of (self, rhs: Banana)
THX
dude.. … you have not understood what a struct is in mojo (59:00)…. 🤦♂️🤦♂️🤦♂️🤦♂️