Mojo is a specialized artificial intelligence (AI) programming language developed by Modular Inc. First released in May 2023, it is designed to become a superset of Python, with the performance of C, unparalleled programmability of hardware acceleration and extensibility of deep learning models.
Mojo | |
---|---|
Designed by | Chris Lattner |
Developer | Modular Inc. |
First appeared | 2023 |
OS | Cross-platform |
Filename extensions | .mojo, .🔥 (the Fire Emoji / the U+1F525 Unicode Character) |
Website | www |
Influenced by | |
Python |
Origin design and development
Mojo programming language is first released internally by Modular Inc. in September, 2022,[1] with advanced compilation features powered by the MLIR, the Multi-Level Intermediate Representation compiler framework.[2][3][4]
The companion, Modular Inference Engine,[5] is an AI infrastructure that simplify the AI development workflow and reduce inference latency in order to scale AI products.
Similarity with Python
Mojo programming language is fully compatible to the existing Python 3.x code and Project Jupyter ecosystem. Further, it also adds features that enable performant low-level programming: “fn” for creating typed, compiled functions and “struct” for memory-optimized alternatives to classes. A struct in Mojo is similar to a Python class: they both support methods, fields, operator overloading, decorators for meta programming.
Programming examples
Hello world program:
print('Hello, world!')
See also
References
- ^ "Mojo🔥 changelog".
- ^ "Mojo language marries Python and MLIR for AI development".
- ^ Lattner, Chris; Pienaar, Jacques4 (2019). "MLIR Primer: A Compiler Infrastructure for the End of Moore's Law". Retrieved 2022-09-30.
{{cite journal}}
: Cite journal requires|journal=
(help)CS1 maint: numeric names: authors list (link) - ^ Lattner, Chris; Amini, Mehdi; Bondhugula, Uday; Cohen, Albert; Davis, Andy; Pienaar, Jacques; Riddle, River; Shpeisman, Tatiana; Vasilache, Nicolas; Zinenko, Oleksandr (2020-02-29). "MLIR: A Compiler Infrastructure for the End of Moore's Law". arXiv:2002.11054 [cs.PL].
- ^ "Modular Inference Engine".