Hold up... did I miss something, is Mojo open sourced now?
Edit: No it is still not open source. There are still same promises of open sourcing eventually, but there is no source despite the URL and the website claiming it's an open language. What's "open" here is "MAX AI kernels", not Mojo. They refer to this as "750k lines of open source code" https://github.com/modular/modular/tree/main/max/kernels
Python has a performance problem. Most people may not need it, but many people do. Languages like Rust and Go are heavily adopted by Python programmers either trying to understand low-level concepts or looking for something more performant.
And this is before we talk about the real selling point, which is enabling portable heterogenous compute.
py2many can compile static python to mojo, apart from rust and golang.
Is it comprehensive? No. But it's deterministic. In the age of LLMs, with sufficient GPU you can either:
* Get the LLM to enhance the transpiler to cover more of the language/stdlib
* Accept the non-determinism for the hard cases
The way mojo solves it is by stuffing two languages into one. There are two ways to write a function for example.
I don't think the cost imposed by a transpiler is worse. In fact, it gets better over time. As the transpiler improves, you stop thinking about the generated code.
It does matter. It already has a pretty active community and thousands of people who follow the development closely, however, most won't commit until the entire language is fully opened... including me.
I think they should say that on their /opensource/mojo website if that's the plan. Rather, they are trying to gesture at "750k lines of open source code", when that code is only meant to be fed into their closed source MAX engine. That's a sleight of hand, bait and switch misdirection, and that's what feels icky to me.
Spy (https://github.com/spylang/spy) is an early version of this kind of thing. I believe it compiles to C though, kinda like Nim. Actually speaking of Nim, that's probably the most mature language in this space, although it's less pythonic than Spy
F# is very similar to python because it's based on indentation instead of curly braces. And with Fable you can transpile it to Rust (or Python even): https://github.com/fable-compiler/fable
Mojo is a language with Pythonic syntax that compiles to fast machine code built by the creator of Swift: https://www.modular.com/open-source/mojo
Hold up... did I miss something, is Mojo open sourced now?
Edit: No it is still not open source. There are still same promises of open sourcing eventually, but there is no source despite the URL and the website claiming it's an open language. What's "open" here is "MAX AI kernels", not Mojo. They refer to this as "750k lines of open source code" https://github.com/modular/modular/tree/main/max/kernels
This feels icky to me.
The compiler will be open-sourced in a few months.
There is a question of what benefit would it bring even if its open sourced?
Static python can transpile to mojo. I haven't seen an argument on what concepts can only be expressed in mojo and not static python?
Borrow checker? For sure. But I'm not convinced most people need it.
Mojo therefore is a great intermediate programming language to transpile to. Same level of abstraction as golang and rust.
Python has a performance problem. Most people may not need it, but many people do. Languages like Rust and Go are heavily adopted by Python programmers either trying to understand low-level concepts or looking for something more performant.
And this is before we talk about the real selling point, which is enabling portable heterogenous compute.
This is why transpilers exist.
py2many can compile static python to mojo, apart from rust and golang.
Is it comprehensive? No. But it's deterministic. In the age of LLMs, with sufficient GPU you can either:
The way mojo solves it is by stuffing two languages into one. There are two ways to write a function for example.I don't think the cost imposed by a transpiler is worse. In fact, it gets better over time. As the transpiler improves, you stop thinking about the generated code.
At this point, it might be moot. Too many people are assuming it's still a closed-source thing and will dismiss it.
Due to the closed source nature, every mojo announcement I see I think "whatever, next"
If the actual intent is to open-source, just do it, dump out whatever you have into a repo, call it 'beta'
It does matter. It already has a pretty active community and thousands of people who follow the development closely, however, most won't commit until the entire language is fully opened... including me.
Valuable technologies are not so easily dismissed
I think they should say that on their /opensource/mojo website if that's the plan. Rather, they are trying to gesture at "750k lines of open source code", when that code is only meant to be fed into their closed source MAX engine. That's a sleight of hand, bait and switch misdirection, and that's what feels icky to me.
Spy (https://github.com/spylang/spy) is an early version of this kind of thing. I believe it compiles to C though, kinda like Nim. Actually speaking of Nim, that's probably the most mature language in this space, although it's less pythonic than Spy
Nim looks a lot like Python with a first-class type system and compiles to many different targets, including wasm and C.
Static python as described in this skill.
https://github.com/py2many/static-python-skill
Here you are. https://github.com/google/grumpy
Last commit was 9 years ago though, so targets Python 2.7.
Amazing people still keep discovering it. And google search fails to surface working implementations.
"Python to rust transpiler" -> pyrs (py2many is a successor) "Python to go transpiler" -> pytago
Grumpy was written around a time when people thought golang would replace python. Google stopped supporting it a decade ago.
Even the 2022 project by a high school student got more SEO
https://github.com/py2many/py2many/issues/518
F# is very similar to python because it's based on indentation instead of curly braces. And with Fable you can transpile it to Rust (or Python even): https://github.com/fable-compiler/fable
What benefit would it bring? There's already https://cython.org/
Cython uses C-API. This one doesn't.
You want to use the Go runtime for example