EEVblog Electronics Community Forum

Products => Computers => Programming => Topic started by: Picuino on May 21, 2023, 11:00:25 am

Title: Mojo programming language
Post by: Picuino on May 21, 2023, 11:00:25 am
Mojo is a language that promises to be compatible with Python, but much faster. It looks very interesting.
What do you know about this language?

https://www.modular.com/mojo (https://www.modular.com/mojo)
"Mojo combines the usability of Python with the performance of C, unlocking unparalleled programmability of AI hardware and extensibility of AI models"

https://www.kdnuggets.com/2023/05/mojo-lang-new-programming-language.html (https://www.kdnuggets.com/2023/05/mojo-lang-new-programming-language.html)
Title: Re: Mojo programming language
Post by: Marco on May 21, 2023, 02:09:24 pm
Seems a byzantine combination of the neural network python-subsets consumed by the major "compilers" (pytorch, keras etc) with C and Rust to make it more efficient to compile to MLIR.

Useful perhaps for those already accustomed to doing numerical code with Python glue, but I don't think it will be general purpose.
Title: Re: Mojo programming language
Post by: SiliconWizard on May 21, 2023, 09:31:14 pm
Nice: https://www.modular.com/about (https://www.modular.com/about)
 :popcorn:
Title: Re: Mojo programming language
Post by: tggzzz on May 22, 2023, 12:38:13 pm
Nice: https://www.modular.com/about (https://www.modular.com/about)
 :popcorn:

Tee hee. "Get the popcorn" indeed :)
Title: Re: Mojo programming language
Post by: Picuino on May 22, 2023, 05:25:30 pm
https://www.youtube.com/watch?v=V4gGJ7XXlC0 (https://www.youtube.com/watch?v=V4gGJ7XXlC0)
Title: Re: Mojo programming language
Post by: Ed.Kloonk on May 22, 2023, 08:49:44 pm
Video said: Port a bit of Python code and now it runs 14 times faster.

This is how chipmakers used to hoodwink buyers. Find the most obscure set of circumstances where your chip does one thing better than the market leader but with 500 other things, it doesn't. LOL

Title: Re: Mojo programming language
Post by: SiliconWizard on May 22, 2023, 08:56:29 pm
Just read the about page really, it's hilarious.
Title: Re: Mojo programming language
Post by: Marco on May 22, 2023, 08:58:09 pm
No one has been using python implementations of matrix multiplication seriously.

Even Numpy is a bit old in the tooth, best to compare to Jax.

PS. they are VC funded, the about page is par for the course. Making a new compiler which can be backward compatible with the mountains of shoestring and bubblegum of ye average AI Python code (especially the higher level stuff like Huggingface) and produce something remotely efficient will take a lot of programmers, gotta woo the VCs and keep them happy.
Title: Re: Mojo programming language
Post by: SiliconWizard on May 24, 2023, 09:16:28 pm
Note that the CEO, Chris Lattner, is the guy behind LLVM and Swift. So definitely not your random Joe.

Still, the web site and their videos, benchmarking stuff that doesn't really make sense, looks odd. The logo with fire. Is this targetting engineers or kids?

Money is one thing, if you have a really serious project led by people with this background, you shouldn't (and shouldn't have to) make it a circus.
Of course, it may all be about making quick cash.

Just my 2 cents. :popcorn:
Title: Re: Mojo programming language
Post by: Rizzo on October 02, 2023, 08:00:35 pm
Mojo is for Python programmers who don't want to learn a new syntax yet have no problems learning static typing and manual memory management?
Title: Re: Mojo programming language
Post by: brucehoult on October 03, 2023, 12:37:18 am
Note that the CEO, Chris Lattner, is the guy behind LLVM and Swift. So definitely not your random Joe.

Lattner did good work at university and I'm sure in most of his almost 12 years at Apple. I'm not at sure about his rapid arc through Tesla (6 months), Google (2 years 6 months), and SiFive (2 years 1 month).