Mojo (programming language)

Mojo
Paradigms
FamilyPython
Designed byChris Lattner[1]
DeveloperModular Inc.
First appeared2023; 1 year ago (2023)
Preview release
24.4[2] / May 24, 2024; 6 months ago (2024-05-24)
Typing discipline
OSCross-platform: Linux, macOS
LicenseProprietary
Filename extensions.🔥 (the fire emoji/U+1F525 Unicode character), alternatively .mojo
Websitewww.modular.com/mojo
Influenced by
Python, Cython,[citation needed] C, C++, Rust, Swift, Zig

Mojo is a programming language in the Python family that is currently under development.[3][4][5] It is available both in browsers via Jupyter notebooks,[5][6] and locally on Linux and macOS.[7][8] Mojo aims to combine the usability of a high-level programming language, specifically Python, with the performance of a system programming language such as C++, Rust, and Zig.[9] As of 2024, the Mojo compiler is proprietary software (closed source) with an open source standard library. Modular, the company behind Mojo, has stated an intent to eventually open source the Mojo language, as it matures.[10]

Mojo builds on the Multi-Level Intermediate Representation (MLIR) compiler software framework instead of directly on the lower level LLVM compiler framework, as do many languages such as Julia, Swift, Clang, and Rust.[11][12] MLIR is a newer compiler framework that allows Mojo to exploit higher level compiler passes unavailable in LLVM alone, and allows Mojo to compile down and target more than only central processing units (CPUs), including producing code that can run on graphics processing units (GPUs), Tensor Processing Units (TPUs), application-specific integrated circuits (ASICs) and other accelerators. It can also often more effectively use certain types of CPU optimizations directly, like single instruction, multiple data (SIMD) with no direct intervention by a developer, as occurs in many other languages.[13][14] According to Jeremy Howard of fast.ai, Mojo can be seen as "syntax sugar for MLIR" and for that reason Mojo is well optimized for applications like artificial intelligence (AI).[15]

  1. ^ "How Modular simplified AI software infrastructure". Fast Company. Retrieved 2024-08-19.
  2. ^ "Mojo Changelog". Modular. Retrieved 2024-04-14.
  3. ^ "Mojo programming manual". docs.modular.com. Modular. 2023. Retrieved 2023-09-26. Mojo is a programming language that is as easy to use as Python but with the performance of C++ and Rust. Furthermore, Mojo provides the ability to leverage the entire Python library ecosystem.
  4. ^ "Why Mojo - A language for next-generation compiler technology". docs.modular.com. Modular. 2023. Retrieved 2023-09-26. While many other projects now use MLIR, Mojo is the first major language designed expressly for MLIR, which makes Mojo uniquely powerful when writing systems-level code for AI workloads.
  5. ^ a b Krill, Paul (4 May 2023). "Mojo language marries Python and MLIR for AI development". InfoWorld.
  6. ^ Yegulalp, Serdar (7 June 2023). "A first look at the Mojo language". InfoWorld.
  7. ^ Deutscher, Maria (7 September 2023). "Modular makes its AI-optimized Mojo programming language generally available". Silicon Angle. Retrieved 2023-09-11.
  8. ^ "Mojo for Mac OS". Modular. Retrieved 2023-10-19.
  9. ^ "Mojo: Programming language for all of AI". Modular.com. Retrieved 2024-02-28.
  10. ^ "The Next Big Step in Mojo Open Source". Modular.com. Retrieved 2024-05-28.
  11. ^ Krill, Paul (2023-05-04). "Mojo language marries Python and MLIR for AI development". InfoWorld. Retrieved 2024-05-28.
  12. ^ "Should Julia use MLIR in the future?". Julia Programming Language. 2024-02-20. Retrieved 2024-05-28.
  13. ^ "Modular Docs: Why Mojo". docs.modular.com. Retrieved 2024-05-28.
  14. ^ https://llvm.org/devmtg/2023-10/slides/keynote/Mojo.pdf
  15. ^ Howard, Jeremy (2023-05-04). "fast.ai - Mojo may be the biggest programming language advance in decades". fast.ai. Retrieved 2024-05-28.