Top
Best
New

Posted by sbt567 1 day ago

Mojo 1.0 Beta(mojolang.org)
356 points | 222 commentspage 3
0xpgm 1 day ago|
Right now majority of beginners start programming with a high-level language, say Python or JavaScript - then for more advanced system-level tasks pickup C/C++/Rust/Zig etc.

If Mojo succeeds, it could be the one language spanning across those levels, while simplifying heterogeneous hardware programming.

tveita 1 day ago||
Is there any project that showcases Mojo for running neural network models on the GPU - like ideally something like llama.cpp that could run one or more existing models to showcase the readability and performance?
melodyogonna 22 hours ago|
Something like this https://github.com/tairov/llama2.mojo?
sriram_malhar 1 day ago||
Doesn't anyone here have _one_ kind word to say about its features? Every one seems to be starting with "on the other hand".
pjmlp 1 day ago|
Many of us were already around during Swift for Tensorflow.
noduerme 1 day ago||
Am I old or remembering this wrong... didn't Zuck write the first iteration of Facebook in PHP, and then spend millions to hire people to write something that converted the code to C++?
dtj1123 1 day ago|
https://en.wikipedia.org/wiki/Hack_(programming_language)
CodeArtisan 18 hours ago||
Hack came after. Noduerme is referring to https://en.wikipedia.org/wiki/HipHop_for_PHP
brcmthrowaway 11 hours ago|||
Whoever made this probably got a gigantic bonus!
dtj1123 17 hours ago|||
Today I learned
thefounder 1 day ago||
Does it have the indentation thing? That would be a no go for a lot of people
IceDane 1 day ago|
Only incredibly inexperienced people think indentation in python is a problem.
thefounder 13 hours ago|||
I must admit that I’ve tried python in my early days and indentation was the main reason why I just didn’t pursue the language further. It felt just brittle and hard to read. Of course if I had be forced I would have probably managed to master it but I had the freedom to use whatever I wanted as programming language and python was just not an attractive option.(despite being seduced by its “zen” and all that. Felt like form over function design.

The “build”/run/deploy system was the other major issue. All the python versions, virtual env etc seemed like a mess. A compiled language is so much better(I.e Go, Rust etc) IMHO.

vga1 1 day ago||||
I have tons of experience with python, possibly more actual work experience than any other language, and I do think the indentation is a bit of a problem. Obviously not a huge one, but still something I wished they had done differently. Because I like to have a robust format-on-save wired into my editor, and you just cannot quite have that when indentation is meaningful.
tweakimp 1 day ago||
Use black as format on save and you will never have a problem with that. https://github.com/psf/black
vga1 1 day ago|||
Sure, black's pretty good and definitely better than nothing.

Just wanted to provide an easy counterpoint to the logical fallacy by IceDane.

redlewel 16 hours ago||||
Yes, I remember having a problem with python indentation. For some reason tabs and spaces were causing my code to fail to run!! This was when I was first learning programming and didn't know anything. Once I understood the syntax of the language it hasn't been a problem ever since. Its like being upset that your yaml doesn't work because you have mixed spaces and tabs.
tasuki 1 day ago||||
Yes, indeed, indentation is one of the very few things in Python which aren't problematic!
Petersipoi 8 hours ago||||
How the fuck could you possibly even possibly begin to validate such a claim. Lol. Asshole.
nothinkjustai 15 hours ago|||
Seems just as valid as any of the other syntactical nitpicks of other languages, except it touches every line of code you write and it’s unavoidable.
AbuAssar 17 hours ago||
> AI native

What’s that supposed to mean?

jjice 16 hours ago|
My guess is that they expose first party skills and maybe other agent friendly docs? Not positive though.
DeathArrow 22 hours ago||
>As a compiled, statically-typed language, it's also ideal for agentic programming.

Since there is not much Mojo code in the wild so the LLMs were trained on it, I wonder how it will work in practice.

Probably the agents will make lots of mistakes and you will spend 10x the tokens compared to using a language the model are well versed in.

runarberg 1 day ago||
I am actually on a lookout for a low level language which compiles to web assembly to write a (relatively small) supervised learning model which I plan to be good enough for 5 year old phone CPUs. I have a working prototype in Julia and was planning on (eventually) rewrite it in Rust mostly for the web assembly target. I come from a high level language background so the thought of rewriting in rust is a little daunting. So I was excited to learn about Mojo and find out if they had a WebAssembly target in their compiler.

But then I read this:

> AI native

> Mojo is built from the ground up to deliver the best performance on the diverse hardware that powers modern AI systems. As a compiled, statically-typed language, it's also ideal for agentic programming.

Well, no thank you. I know the irony here but I want nothing to do with a language made for robots.

kstrauser 1 day ago||
I’ve written Python for the past 25 years or so. I dig it. But I don’t think I’ve started a new Python project since starting to experiment with Rust. A lot (not all!, but a lot) of Rust patterns look a lot like Python if you squint at it just right. I also think that writing lots of Rust has made me better at writing Python. The things Rust won’t let you get away with are things you shouldn’t be doing almost anywhere else.

Go on, give it a shot. It stops being intimidating soon! And remember that the uv we all love was heavily influenced by Cargo.

pjmlp 1 day ago|||
I can't go get coffee so many times per day, there are better compiled languages to chose from, while offering Python like ergonomics.
kibwen 1 day ago||
I can only go get coffee waiting for my Python test suite to finish so many times per day. I write Rust because the strict type system accelerates the iteration speed for producing correct code more than any other language in its class.
pjmlp 23 hours ago||
Which is why the solution is to pick neither, rather something with Python like productivity and a mix of JIT/AOT tooling.

Some alternatives are as old as 1958.

frizlab 1 day ago||||
If you’re searching for a language that has the same strong memory safety than rust but is a bit easier to write, you should give Swift a go.
kstrauser 23 hours ago||
Good call. It’s not the first language I think of for most things but there’s no great reason why not to. I probably reach for Rust first because I’m more familiar with it and the projects I want to work on were already written in it.
runarberg 1 day ago|||
I actually have written Rust, but it has been a minute. I think my last project (a backend for a massive online multiplayer theremin jam session [site no longer up; but HN discussion still exists: https://news.ycombinator.com/item?id=10875211] 10 years ago).

I remember Rust very fondly in fact. And I had the same experience as you, learning Rust made me a better Javascript programmer. Lets see if a little neural network can be as fun.

Certhas 1 day ago|||
Mojo has been suffering in their communication from targeting VCs rather than users. They never actually had a clear "Mojo extends Python" MVP or even strategy to get to an MVP anytime soon. And the language started developing before AI Agents were a thing and has more to do with building around state of the art LLVM tooling than AI Agents. But I guess "easier lifetime semantics than Rust and native access to MLIR intrinsics" doesn't raise money...
FacelessJim 15 hours ago||
Might want to take a look at WasmTarget.jl it’s rather new and experimental but could be what you’re looking for!
runarberg 13 hours ago||
Too much vibe code for my taste.
DeathArrow 1 day ago||
>No more choosing between productivity and performance - Mojo gives you both.

That's a very big claim.

logicchains 1 day ago|
Very bold of them expecting people to use a language with a closed source compiler in the 2020s.
evertheylen 1 day ago||
If you're looking for a language that aims to solve the "two-language problem" like Mojo, but want something more open, more mature and less influenced by VC funding, check out Julia: https://julialang.org/
runarberg 1 day ago||
I used Julia a lot when I was studying statistics (which I dropped out of) back in 2015, but I recently (like last weekend) came back to it to write a prototype of a supervised learning model, and I have to say, coming back to it was pure joy. And my model prototype was indeed fast enough for me.

Now I will probably rewrite the model in rust if I want to do anything with it (mostly for the web assembly target as I want this thing to run in browsers) but I will for sure be using Julia for further experimentation. Lovely language.

ssivark 16 hours ago||
> mostly for the web assembly target

Funny you should say that... there was recently a very interesting announcement for a Julia-to-WASM compiler and a full-stack signals-based web framework:

https://discourse.julialang.org/t/ann-experimental-wasmtarge...

runarberg 16 hours ago||
I saw that, but then I saw this:

> Both repos were built iteratively with LLM coding agents

I think I would rather just use Rust.

redlewel 16 hours ago|||
WOW. Thanks for the comment I don't need to waste my time. So many choices for programming languages why would I go with something that isn't fully open source?
walterlw 1 day ago|||
from what I understand the goal for now is not to get the people to use it, but for enthusiasts to try it
kstrauser 1 day ago||
What enthusiast worth getting feedback from is going to tinker with a locked up language?
melodyogonna 1 day ago||
You'd be surprised. Anyway, the compiler will be opened with 1.0 release, that's why reaching beta is exciting.
ainch 1 day ago|||
They've said they'll open source the compiler alongside the 1.0 release.
rvz 19 hours ago||
CUDA is closed source (and will never be open sourced) and everyone is fine with it.

Modular is giving you at least a public promise that they will open source Mojo it this year but some how here it is a problem.

Unbelievable.

kstrauser 18 hours ago||
CUDA is not a programming language. It's a package with adapters for lots of languages. IMO, it's not relevant here at all. Sure proprietary packages exist for just about every language, but most modern languages are open source. You can use them, distribute them, patch them, or whatever else.

For instance, you can write Python without using CUDA. CUDA's existence doesn't make Python less useful. But what do you do when you bump into a bug in Mojo? You have no ability to fix it yourself. At best, you can report it to the authors and hope they care enough about it to put in the work and release an update. If you run into a Python problem, you, or someone in your org, or a paid consultant, can fix it even if the Python core team doesn't care about it.

rvz 17 hours ago||
It's not just CUDA and it's runtime. I am talking about its compiler, nvcc and that is closed source. [0]

But somehow it is a problem when Modular gives a single promise to open-source their Mojo compiler?

> For instance, you can write Python without using CUDA. CUDA's existence doesn't make Python less useful. But what do you do when you bump into a bug in Mojo? You have no ability to fix it yourself.

You don't use AI training / inference with bare Python at all.

PyTorch (which almost all AI researchers use) primarily uses CUDA as the default and it is less useful without it (all other backends are slower). If there is a bug in anywhere from PyTorch to the silicon, you need to investigate if it is a PyTorch problem, C++ or Python issue or both, or a CUDA driver issue.

So a bug in one place (Mojo) vs a bug in 4 different places and one of them (CUDA) will never be open source. The latter is worse.

> At best, you can report it to the authors and hope they care enough about it to put in the work and release an update. If you run into a Python problem, you, or someone in your org, or a paid consultant, can fix it even if the Python core team doesn't care about it.

You are assuming Modular will never open source the Mojo compiler, when it is clear that Nvidia has been completely hostile to opening anything related to CUDA and its compiler.

[0] https://en.wikipedia.org/wiki/Nvidia_CUDA_Compiler