HNHacker News
TopNewBestAskShowJobs

MohamedMabrouk

44 karma · joined February 12, 2024

submissionscomments
MohamedMabrouk··on The Mojo language (by Modular, now Qualcomm) is now open-source
the main value proposition of mojo is being a (modern language for heterogenous compute). when writing code for the CPU, it is a nice language. it looks a bit like python, have arguably one of the best SIMD abstraction, a bit easier than Rust .. etc. but in my opinion, that does not justify deep investment in learning the language vs rust or zig. what sets Mojo apart is that it was designed from the grounds up to natively supprt other types of hardware (starting with GPUs). I have been in the mojo community from the beginning and almost every other project presentation starts with (I wanted to do XYZ in my domain and I could match or get close to Rust, C++ perf but then I wanted to see if I can make work on the GPU and it was much easier than expected and now I can solve my problem 10x faster). this is massive advantage that is underutilized outside of the AI/LLM and few other niches. running natively and being portable to NVIDIA/AMD/Apple GPUs means that you can transform any arbitrary workload you have in mind to the GPU and you won't need to worry about the separate CUDA/ROCm/Metal stacks, slightly different programming models, building headaches. you will be using the same language and the same compiler for CPUs and GPUs (all of them). or you won't need to coerce your problem in the shape of Triton to make it portable. If you have a problem in mind and don't like what you see? write your own GPU abstractions, containers, data moving and pipelining logic, work partitioning .. etc. this is extremely powerful and it sets Mojo apart from any other mainstream systems language that I have seen. that's why bigger mojo projects (even pre 1.0) like NuMojo and Marrow are all dabbling with GPU support even before the first stable release.

and now with support for TPUs and Trainium chips it is becoming even better. some problems will work better on some architectures and you will be able to split your problem to the best hardware doing some work on the CPU and some work on the accelerator(s) of choice, all with a modern language and one compiler with good tooling. that seems to be a good enough value proposition for me.

MohamedMabrouk··on Mojo is now open source
you can but through a python interpreter in the mojo process so you get the same numpy speed with mojo<->ptyhon interop overhead. NuMojo is native and also is now starting to support features that numpy can't really do like native GPU execution.
MohamedMabrouk··on Mojo is now open source
NuMojo is the closest thing in the ecosystem to numpy and the final aim is offer numpy-like experience. https://github.com/Mojo-Numerics-and-Algorithms-group/NuMojo
MohamedMabrouk··on Mojo 1.0
I think they had a good dive here https://www.youtube.com/watch?v=SEwTjZvy8vw The gist is that MLIR (unlike LLVM) was designed to be multithreaded so the whole stack above LLVM IR is parallel, and then LLVM is used as a per-function codegen tool in parallel, so although LLVM itself is single threaded there are multiple seperate contexts of it. also I think they wrote their own linker.
MohamedMabrouk··on Immich 3.0
Immich is an amazing software. I use it regularly as an alternative along side Google photos. I keep in it large videos that I wouldn't upload normally to Google photos + the snappy experience at home vs Cloud-Bades solution.
MohamedMabrouk··on Mojo 1.0 Beta
I don't think mojo depends on OpenBLAS or other BLAS implementation. I remember that they took a lot of pride in the early days how linalg primitives like matmul which was completely written in mojo was faster than MLK, openBLAS and other implementations.
MohamedMabrouk··on Mojo 1.0 Beta
Mojo aims to be this (other language) arguably with easier programming model that rust, familiar syntax to python devs, and a modern design in general. Its stated goal now, is the easiest way to extend python. it provides the same interface for zero-hassle import of .mojo files
MohamedMabrouk··on Mojo 1.0 Beta
how is it in investors self interest to keep a programming language (some thing which no one makes money on today) closed? It also means that library authors can't reason about their code well enough because they don't know the language internals, this also hurts ecosystem growth. Their is no money to be made with a closed language that no body uses. probably modular investors know this.
MohamedMabrouk··on Mojo 1.0 Beta
is that so? People are still reading their code to understand it and ask (or make modifications). even in the (LLM age) language design, readability is still as relevant as before.

I don't see the superficial comparisons between why this new Y when we have X are not really helpful. Languages and system got adopted not for their stated goal only, but for the underlying details capabilities, good design which translates to better user experience and ecosystem growth.

MohamedMabrouk··on Mojo 1.0 Beta
I don't understand this framing, so? Cpp, Julia are more widely adopted, used in HPC. it does not mean that people shouldn't start, learn new languages.
MohamedMabrouk··on Mojo 1.0 Beta
I think that plan is to open source the compiler with 1.0 which is expected to be this summer. so in ~3-4 months time.
MohamedMabrouk··on ML needs a new programming language – Interview with Chris Lattner
* Compiling arbitrary Julia code into a native standalone binary (a la rust/C++) with all its consequcnes.
MohamedMabrouk··on The Decipherment of the Dhofari Script
the available data from some of those lesser used scripts are miniscule. the most common ancient North Arabian script is safitic and only around 50K texts are processed and widely available each with a few words to a few sentences.
MohamedMabrouk··on Python can run Mojo now
Creating DSL/Bindings for Julia or python to underlaying platform like CUDA is not really replacing it, it is yet adding another layer on top of the existing platforms or creating a prototyping envirnoment for research. The question is not can Julia interface with CUDA, it is can Julia replace C++/CUDA/ROCm in an end-to-end scenarios (preferably with portability across GPUs vendors)? if not then there is no comparison between the stated goals of Julia and Mojo. they are different langauges targeting completly different use cases.
MohamedMabrouk··on Python can run Mojo now
I think the modular proposition is to solve the AI infra problem using a modern systems programming language but with a python syntax (to keep the mental overhead low) it is mainly trying to replace C++/CUDA. I am not sure Julia is suitable for such endeavour. Julia is not marketed as a systems programming language and I find it hard to believe that it can be one as dyamically typed langauge with GC and JIT. Could Julia replace python in the high-level dynamic code space used in research and training? maybe. but I find it really hard to believe that it can replace CUDA/ROCm/C++ .. etc.
MohamedMabrouk··on Python can run Mojo now
AFAIK, there is a zero-copy interface for objects like numpy array and torch tensors where you can do in-place manipulation in mojo.
MohamedMabrouk··on Python can run Mojo now
not sure, modular is focusing mainly on enterprise applications. but if you look at the current PRs you can see people hacking support for standalone consumer-grade Nvidia and AMD gpus because it is easy, you just add the missing or different intrinsics for the architecture in the lowest level (in pure mojo code) and wire it up in a few places and voila you already program and run code on this GPU. iGPU/Apple GPUs are still not supported yet but it would interesting to see their integration
MohamedMabrouk··on Python can run Mojo now
Already GPU code, kernels, and complete models can run on datacenter AMD GPUs using the same code, the same programming model, and same language constructs.
MohamedMabrouk··on Llm.mojo: Andrej Karpathy's Llm.c in Mojo
Mojo the language is free to use and probably will be open sourced. The money maker for modular is MAX which is an AI compiler written in mojo where they would charge for its use in model inference in the cloud on AWS .. etc. Modern programming languages are so vast and complex to be developed for profit and in closed source in perpetuity.
MohamedMabrouk··on A look at the Mojo language for bioinformatics
Thanks a lot!
MohamedMabrouk··on A look at the Mojo language for bioinformatics
That's great to see, thanks a ton. care to share your system information? I am trying to understand where the difference is coming from and that would really helpful.
MohamedMabrouk··on A look at the Mojo language for bioinformatics
Hey, the Mojo parser author here. the test folder is just for the unit tests. All the benchmarking code is located in the /benchmark folder. It would be great if you can give it another go on your machine. https://github.com/MoSafi2/MojoFastTrim/tree/restructed/benc...