Mojo: Python(ish)... but faster than C???

One of the guys behind the language is the creator of LLVM, the compiler-creating monster that powers a bunch of programming languages.

1 Like

Sounds promising. I wonder what the tradeoffs are.

It will be interesting to see it unfold… Python is a PITA compared to compiled languages when it comes to distribution. There are a bunch of different things out there that set up environments so that all the libs can be packaged that apps need. I hope they get rid of that.

It definitely looks interesting, for someone who has the time. Ha ha. And when it gets open sourced. It seems like I have barely been able to finish wiping my ass over the last year.

1 Like

I remember the days well, I hope you’re holding up alright!


This does look very promising, having compiler gods working on it gives me confidence. It’s not unreasonable to expect compilers to have another jump in flexibility and I think this might be it.

It sounds really good. Compiled or running interpreted, same language; Python syntax; C power. But I do wonder about the performance on desktop hardware, given that it is designed for programming AI on massively parallel hardware.

And just an fyi. The woman was saying that I wasn’t spending time with her when I started back on C++. So I had to pick. She needs a time-consuming hobby.

Yeah, C++ does that. You could always clone yourself with AI tools and engage in lots of deep and meaningfuls over the phone that ChadGPT then emails you summaries of. You could squeeze quite a lot of programming in there. :smiley:

Deployment question answered:

Deployment

I’ve left one of the bits I’m most excited about to last: deployment. Currently, if you want to give your cool Python program to a friend, then you’re going to have to tell them to first install Python! Or, you could give them an enormous file that includes the entirety of Python and the libraries you use all packaged up together, which will be extracted and loaded when they run your program.

Because Python is an interpreted language, how your program will behave will depend on the exact version of python that’s installed, what versions of what libraries are present, and how it’s all been configured. In order to avoid this maintenance nightmare, instead the Python community has settled on a couple of options for installing Python applications: environments, which have a separate Python installation for each program; or containers, which have much of an entire operating system set up for each application. Both approaches lead to a lot of confusion and overhead in developing and deploying Python applications.

Compare this to deploying a statically compiled C application: you can literally just make the compiled program available for direct download. It can be just 100k or so in size, and will launch and run quickly.

There is also the approach taken by Go, which isn’t able to generate small applications like C, but instead incorporates a “runtime” into each packaged application. This approach is a compromise between Python and C, still requiring tens of megabytes for a binary, but providing for easier deployment than Python.

As a compiled language, Mojo’s deployment story is basically the same as C. For instance, a program that includes a version of matmul written from scratch is around 100k.

This means that Mojo is far more than a language for AI/ML applications. It’s actually a version of Python that allows us to write fast, small, easily-deployed applications that take advantage of all available cores and accelerators!

Python programs can definitely be a pain in the ass. I quit installing much Python stuff because of that. Do an os upgrade and a library update breaks a Python program.

Yeah it takes system dependency to a whole new level with all the weird packaging/environment solutions having their own incompatibilities. I did enjoy it when I used it quite a bit a few years ago, pretty clean apart from the tabs vs spaces invisible bugs that stung me.


Thanks, I’ll watch all of that.

Very cool. Just got access to the mojo playground. Will report back if I do anything

Mojo sure made Python interesting again for me

I’ve been playing with it lately
VS Code running Jupyter notebooks has been the most fun Ive had in coding
Being able to run the whole script or just sections individually (cells) is uber useful
The keyboard shortcut control is Reaper level

Plus the markdown cells are a cut above comments for documenting

The Neural Amp Modeler uses notebooks for finer control so I thought I’d better brush up on it
Turns out it’s quite a good experience

Never thought I’d be giving Microsoft kudos back in the day…

That’s it released for running locally now:

That (optional) emoji file extension is funny, roll on main.🔥!

1 Like