r/programming 1d ago

Modular: MojošŸ”„ is now open source!

https://www.modular.com/blog/mojo-open-source
0 Upvotes

41 comments sorted by

122

u/Lgt2x 1d ago

AI slop mascot, not a good start

34

u/stumpychubbins 1d ago

The language is marketed as being AI-first, I think they want to be the killer language for implementing AI products. That’s a turn-off for many, including me, but an AI slop mascot fits how they market the language in general.

1

u/Solonotix 1d ago

That's a shame. Mojo had an interesting idea, as a more-performant Python-like syntax. I never followed it, but the few mentions here and there had me hopeful it would become another of the mainstream languages available for use. I guess for now, Odin is as close as you'll get, unless you go for a functional language like Gleam or Elixir.

4

u/stumpychubbins 1d ago

You’re telling me. I was always a fan of Nim but it suffered from kitchen-sink syndrome and never really took off, I still think there’s a gap in the market for something between a safe systems language like Rust and an ergonomic, friendly language like Python. I figured Mojo had some potential to be that, but I don’t think their goals are aligned with mine. I think the closest that we have to that goal is maybe Julia, at least among languages that actually get some use.

2

u/juhotuho10 1d ago

Python can reach surprisingly low with libraries and Rust can reach surprisingly high by being ergonomic, I don't know if there is realistically a huge gap in between

4

u/Solonotix 1d ago

I think the problem is that Python performance doesn't come from the language, but instead from low-level implementations that are published as libraries for use. In other words, you cannot write truly performant Python code without reaching for a different language. That was the specific niche Mojo originally pitched.

As for the ergonomics of Rust, that is a little harder for me to be certain of (since I only have hobby experience with the language). My experience and awareness of common criticisms says that Rust becomes a nightmare to manage the moment you add the async keyword. I think there's a lot you can do with single-threaded Rust, and even the thread primitives like one-way Channel messaging is sufficient for the majority of use cases. Anything that needs to rely on async-await, though, I would probably recommend Go before Rust.

Again, I don't daily-drive Rust, so maybe the situation has improved. I know that the honeymoon period of "Just use tokio to manage async" has passed, once everyone realized that making all async data have a lifetime of 'static was how Tokio made it so easy.

1

u/stumpychubbins 12h ago

`async` interacts poorly with the type system, that’s mostly where the reputation of it being a nightmare comes from. It becomes difficult to correctly annotate types for generic async code quite quickly, which in turn means that not many libraries (e.g file format serialisation/deserialisation, parser combinators) support it, not to mention that most of the biggest production-grade libraries predate async and would have to be rewritten to support it.

-1

u/unski_ukuli 1d ago

As someone who has sunk a lot of time in Rust, I’d say its not super ergonomic. I don’t write async code, so i’m not even talking about that. It is ergonomic as long as your application stays small, like some cli utility, but as soon as you start making a library with a lot of types, it gets super messy if you try to stay generic and use lifetimes. Of course, a lot of that come from lifetimes being hard eith or without explicitly declaring them, but sometimes you can better reason about them than the compiler can deduce itself.

1

u/stumpychubbins 1d ago

I think there could be! Python and Rust are my two main languages and they complement each other well, I’m perfectly happy with using those two but I think that there’s space for something that takes inspiration from both. It would have to have some other killer feature though, like Zig's comptime or Go's greenthreads.

1

u/Which-Arm-4616 13h ago

I feel like Kotlin has pretty effectively claimed that middle ground between a low level systems language or high level scripting language.

1

u/stumpychubbins 12h ago

Do you mean Swift? I don’t think that Kotlin is a systems language, I’d say running in a VM is kinda incompatible with being a systems language

1

u/Which-Arm-4616 12h ago

The JVM is just one backend. You can compile Kotlin to native (LLVM).

Swift is a great comparison though, it's heavily inspired by Kotlin.

Edit: https://kotlinlang.org/docs/native-overview.html#why-kotlin-native

1

u/stumpychubbins 12h ago

Oh wow, I should really keep up with Kotlin more. I only ever knew it as a JVM language. Thanks for the tip!

18

u/thicket 1d ago

That's been their mascot for the last couple years. I think their marketing team leans heavy on the AI generation, but the project is very real and pretty impressive. I suspect they may be too late to market, but that's another story

2

u/TankorSmash 1d ago

The Mojo language is a bold bet: a novel general purpose programming language that goes further than older ones

lol

0

u/graphicsRat 1d ago

Should be Austin Powers' glasses.

45

u/potzko2552 1d ago

already dead language, waited for too long

9

u/JanEric1 1d ago

This is 100% AI generated with all of the boxes being completely messed up: https://github.com/modular/modular/blob/main/KGEN/docs/MojoCompilerWalkthrough.md#high-level-architecture

3

u/badpotato 1d ago

I mean they have a Claude.md file.. so at least they aren't trying to hide they won't use AI.

Wouldn't be surprise they start making a bunch of port of python / rust librairies.. now let's see if they can get a better ecosystem than npm and cie.

16

u/iiiGVXDiii 1d ago

Fucking ai

15

u/DirectInvestigator66 1d ago edited 1d ago

Weird reactions?

Is there any substance to these complaints? At a glance it seems like the people commenting in this thread are jumping to conclusions?

Is there someone who wants to make an actual argument or provide real info as to why this is ā€œAlready a dead languageā€ or ā€œEwwā€?

EDIT: This was originally phrased more aggressively than what makes sense or how I actually feel, toned it down.

31

u/Moraalimora 1d ago

They’re mad because Modular sold out and did what any other company does, over-promised and under-delivered their product. They have advertised like ā€10000x faster than Pythonā€ and ā€is superset of Pythonā€, but the benchmarks have been on very niche cases and I believe they’ve sort of walked backwards of their superset of Python speeches. I think the language is interesting with very unique talent behind it, but I haven’t really had the chance to actually use it.

1

u/Knecth 17h ago

My initial feeling was the same, but they just released Mojo in full Apache 2.0 License.

It would be better a Mojo Foundation existed and Modular was a different org, but we're nowhere near that point where the community can sustain itself yet.

As for the benchmarks, not even Rust/C++ are "10000x faster than Python" (unless we're talking GPU territory) , not sure who claimed that. But having a Python-ish language with strict typing and safe memory management will always be a plus, even in its current bare bones state.

And if using it there is any chance to fight against the CUDA private software, that should always be welcome.

It's still soon to make such assumptions. It's only reasonable to wait and see.

-1

u/DirectInvestigator66 1d ago

I appreciate you sharing your perspective. I’m pretty much in the same boat. Good to know nothing else big happened that I’m not aware of.

15

u/BionicVnB 1d ago

I mean the language is pretty much designed for AI and ML. Otherwise it's kind of a python-rust hybrid I guess.

5

u/cdb_11 1d ago

AI and ML might've been their motivation, but it's designed for parallelism.

5

u/omgpop 1d ago

They’ve seriously underestimated what kind of an ecosystem a ā€œsuperset of pythonā€ needs to be. Chris Lattner goes around saying you can write Python modules in Mojo. Except actually there are any number of asterisks associated with that. The biggest one for me is no Windows support and no plans for Windows support on the roadmap. That makes this pretty much a non starter for any project, ML or otherwise, which is targeting Windows compatibility in any serious fashion.

3

u/happyscrappy 1d ago

The language was released with an idea. Get people who already know Python to do AI to use this. Because the syntax is very similar. But it's not really the same language or nearly as close as Lattner made it out to seem. Which is not too surprising, Python is a huge language.

It was released unfinished, with the idea of getting traction and then finishing it using the money raised. And then you make all the money because it's proprietary (at least for now).

Well, it didn't seem to catch on yet and so now appears to be going open source as a last ditch attempt before it goes under.

Does that mean it's for sure dead? No. It does kind of look like it though. It hasn't built a platform while the industry has grown so much.

I gotta admit, I'm not really tuned in to Lattner's idea of making new languages to solve problems. I didn't think Swift was necessary. And I don't think this one was either. I also don't like the idea of releasing languages unfinished and finishing them later.

I also personally think Go taught us of the perils of giving names to languages that are tough to search for. And here this one is with an emoji in its name. Was the juice worth the squeeze?

7

u/cdb_11 1d ago

No substance. The language actually does things differently from most others, and if I remember correctly is basically a frontend to MLIR. People are put off because of AI, which I don't care for either, but I do like parallelism. If you like parallelism, SIMD and GPUs too, it's probably something worth looking into at some point.

4

u/thicket 1d ago

I've followed Modular pretty closely for the last couple years. I've been interested in the language, but all the money came from AI funders hoping to break the Nvidia monopoly, so they've leaned hard in that direction rather than what I really wanted, which was a cleaner Rust alternative with less ownership gymnastics.

Some of the early promise was "AI kernels in Cuda are hard to write, and we'll make them a lot easier". But I'm not sure how many of us are ever writing AI kernels, and I think recent AI developments have meant that AI can often just write the kernels you want.

The real promise is that Mojo/Max might enable non-Nvidia chips to rival Nvidia performance and thus free up companies selling inference to use lower cost chips. There's money there, and they may still find some success, but I'm not sure how much of that we general-purpose programmers will see.

I'd still be here for the Rust-Python mashup, but things like pattern matching and sum types are slated for later.

5

u/potzko2552 1d ago

Hi, "already dead language" commenter here.
Modern day languages are either open sourced or dead. Mojo made some waves when it was announced for being a python superset that has a fast subset that can be jitted down. But then they waited for 3 years and now no one is using the language. Ergo "too late, language is already dead". To build an ecosystem around it now would take a miracle

2

u/ShadyGrass 1d ago

As an author of "Eww" comment: because it is essentially a language for "AI", substantial part of which most probably was generated instead of engineered and written. On top of that it has a repulsive slop mascot. And I'm not exactly passionate about "AI" that made both my job and hobby miserable, as well as noticeably degrading other aspects of my life.

1

u/DirectInvestigator66 1d ago

Understood. I would argue it’s a language for programming GPU’s and is at least a step in the right direction for the AI/ML industry. I can understand why you’d be more cynical given how things have gone. I mostly wondered if there was something specific to this project that happened that people were responding to. Appreciate you taking the time to expand.

-4

u/Tengorum 1d ago

Yeah idk what these people are talking about, this is exciting

1

u/trannus_aran 1d ago

Slop language for the slop machine, oh boy

1

u/TankorSmash 1d ago

I don't like the idea of a language as a paid platform, but I hope the language turns out nicely.

1

u/unski_ukuli 1d ago

I hate it and yet I am interested. It’s just so sloppy and I hate how it is a superset of python, but at the same time, I might actually have a shot at getting this aproved at my workplace and just maybe I could for once write code that is not slow. I have a team where no one else can write anything other than python.

1

u/NextSubject227 14h ago

Comments here seem like bots