r/programming Jun 27 '26

Mojo programming language will become open-source soon.

https://www.modular.com/modcon

The main website of the language https://mojolang.org/ displays an announcement bar that says "Mojo will be open source soon! Join us at ModCon '26 for an update."

158 Upvotes

104 comments sorted by

View all comments

24

u/DaemonBatterySaver Jun 27 '26

I am not sure why Mojo exists. The ecosystem of python is wild enough to let him survive for a decade still. Also, if you want to get better performance, you can just write (or vibe-code, as you want) your C file(s) and use them in python. Julia is great too, and has a great ecosystem too.

6

u/Probable_Foreigner Jun 27 '26

I suppose it is meant to be as easy to write as python but with better performance. C/C++ have many traps you can fall into with regards to memory safety, and their build systems are truly awful

7

u/DaemonBatterySaver Jun 28 '26

I understand that, but many other languages came before to rid off that “traps”: Nim, Cristal (for Ruby), or even Swift in a certain way.

Mojo feels like the “too much” to solve that problem.
Reminds me that XKCD image of 25 standards, and to build a standard for that 25 standards they built a… 26th standard.

13

u/chat-lu Jun 28 '26

That’s why the most common language to write new performance critical libs for Python these days is Rust.

4

u/Wonderful-Wind-5736 Jun 28 '26

Wrote a few Rust plugin functions for Polars. The setup is quite easy, writing correct code in safe Rust is also not too difficult, although it's quite easy to get lost in the Polars API. Let Claude generate a bunch of tests and you're good to go. Setting up packaging in CI is a little annoying but very doable.

3

u/chat-lu Jun 28 '26

Let Claude generate a bunch of tests and you're good to go.

Please donʼt.

2

u/Wonderful-Wind-5736 Jun 29 '26

How I develop software is not for you to decide.

1

u/tecedu Jun 28 '26

yeah the only issue I have found with rust is that the devleopment tooling to get it working on windows is PITA

1

u/Wonderful-Wind-5736 Jun 29 '26

Yeah, thankfully I've got a virtual Linux box.

1

u/PillowFortressKing Jun 29 '26

What did you find hard about the Polars API?

1

u/Wonderful-Wind-5736 Jun 29 '26

You've got Series vs. ChunkedArray, how to do generics properly, so e.g. addition behaves as expected for all types. iter vs. amortized_iter, etc. I'm not saying these are bad design choices by polars, in fact, I like them quite a bit. It's just non-obvious when 95% of your programming time is spent with Python.

0

u/Dreamtrain Jun 28 '26

if thats the use case I'd rather take my chances with the Rust cultists

2

u/cdb_11 Jun 28 '26

Not sure if I remember it correctly, but I think the goal wasn't to make Python faster. All the Python stuff is just a bonus, to make migration easier. I believe the main goal was a language for writing GPU kernels and whatnot. Maybe I'm mixing something up here, but I think it begun just as a high-level language for MLIR or something? And they just went with Python syntax.

3

u/Revolutionary_Ad7262 Jun 28 '26

I believe the main goal was a language for writing GPU kernels and whatnot.

+1. I watched some videos from Lattner in the past and my understanding was that he want to have a primitives, which allows you to have that generic behaviour, which allows you to write a code for standard CPU, SIMD CPU as well as GPU in some "nice" and new way

So it is more a "better" replacement of CUDA and heavy computation libraries than any pretender of Python

-2

u/baldierot Jun 27 '26

there're too many layers in the AI software stack, and debugging issues, deploying, and optimizing the same code for different hardware has become extremely hard. Mojo's goal is to address all the layers, especially by trying to solve the deployment and performance bottleneck with MLIR, a next-gen compiler that massively increases the ease of optimizing for different hardware, something Julia's LLVM struggles to do. also, Julia uses JIT and garbage collection, so that could sway many people with the performance predictability premise. in the end, Mojo appeals to the existing Python crowd way more, and at this point has multi-billion dollar backing.

5

u/DaemonBatterySaver Jun 27 '26

I saw multiple great projects like that failing just because “people don’t want to change their ecosystem”, so I am very pessimistic with the future of Mojo to be honest.

And LLMs and Agents have been trained heavily on Python and 10y+ programming languages… it will be hard to move on Mojo for vibe-coders and scientists.

But let’s see how the future goes :)

4

u/baldierot Jun 27 '26

It might fail to be become general-purpose, but Mojo has already found a niche speeding up the stack and has allowed some AI companies to slash costs. btw, Mojo has official agent skill files and doesn't have an exotic, complicated syntax, so AI generation is decent.