Very interesting. I'm currently trading off whether to use Mojo or C++/pybind to accelerate simulations that combine matrix operations with fine-grained scalar calculations. I only recently learned that pybind + cppimport offers the integrated compile-on-import experience available in Mojo.
Mojo makes SIMD and GPU programming more ergonomic than what you would obtain from C++, I imagine this should factor into your decision process. The language is just less mature overall.
In my niche corner of scientific computing it feels like Cython has largely been replaced by Numba and CFFI, or just Julia. Last I checked it still needed setup.py which is a bit of a deal breaker in 2025.
I haven't kept track of numba in recent years. But there is a clear path to translate more and more scikit-learn to mojo, bypassing the python interpreter entirely. And then things become much more composable in a way that numba can't be.
We are heavily leaning on Julia, and to my mind Mojo is a major threat to the long term development of the Julia community. If people dissatisfied with Python+C(++)-Silos end up writing Mojo instead of Julia it will become even harder to grow the ecosystem and community.
That said, for now Julia has a number of big strengths for scientific work that don't seem to be in the focus of the Mojo devs...
[build-system]
requires = ["setuptools", "cython"]
[tool.setuptools]
ext-modules = [
{name = "example", sources = ["example.pyx"]} # You can also specify all the usual options like language or include_dirs
]
Very interesting. I'm currently trading off whether to use Mojo or C++/pybind to accelerate simulations that combine matrix operations with fine-grained scalar calculations. I only recently learned that pybind + cppimport offers the integrated compile-on-import experience available in Mojo.
I would say it depends on how stable you need the code to be.
If it's something you need to put in production soon, C++/pybind might be the way to go, but if it's just a side-project, Mojo could work.
Mojo makes SIMD and GPU programming more ergonomic than what you would obtain from C++, I imagine this should factor into your decision process. The language is just less mature overall.
In my niche corner of scientific computing it feels like Cython has largely been replaced by Numba and CFFI, or just Julia. Last I checked it still needed setup.py which is a bit of a deal breaker in 2025.
I haven't kept track of numba in recent years. But there is a clear path to translate more and more scikit-learn to mojo, bypassing the python interpreter entirely. And then things become much more composable in a way that numba can't be.
We are heavily leaning on Julia, and to my mind Mojo is a major threat to the long term development of the Julia community. If people dissatisfied with Python+C(++)-Silos end up writing Mojo instead of Julia it will become even harder to grow the ecosystem and community.
That said, for now Julia has a number of big strengths for scientific work that don't seem to be in the focus of the Mojo devs...
Yeah, I went to JuliaCon last year, and it was clear that Julia really seems to have found it's niche in the scientific computing world.
I like the language, but as I do ML, Python is really the only game in town, and Mojo is looking promising.
/? cython pyproject.toml: https://www.google.com/search?q=cython+pyproject.toml
From "Building cython extensions using only pyproject.toml (no setup.py)" https://github.com/pypa/setuptools/discussions/4154#discussi... :
Pybind11 seems more popular in my area now. I still like Cython though in terms of the ease of wrapping anything in a Python-y interface.
> Last I checked it still needed setup.py which is a bit of a deal breaker in 2025.
lolwut
A more interesting path is to keep dbscan_inner in pure python with type annotations and then use
to translate.> I think moving a lot of scikit-learn’s more computationally intensive code to Mojo could be an interesting project.
Only if you want to lose access to Windows users, as it is a low priority for Mojo development.
Fair, but it would also be a multi-year project, and I wouldn't take it seriously until Mojo reaches a 1.0
As per current roadmap that seems something around 2027, assuming everything goes as planned.
Somehow just trying to navigate to this website makes my browser crash.
Firefox on Android with NoScript.
Something with Noscript is causing it. I was able to load it fine, then installed noscript and it suddenly crashed
Mhh, any idea what I could do? It's my website.
I just use Quarto to create a static site, but I am also very clueless about web stuff.