Mojo (programming language)

This is an old revision of this page, as edited by Ddmmyyy8 (talk | contribs) at 07:48, 5 May 2023 (Similarity with Python). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Mojo is a specialized Artificial intelligence (AI) programming language developed by Modular Inc.. First released in May 2023, is is designed to become a superset of Python, with the performance of C, unlocking unparalleled programmability of AI hardware and extensibility of AI models.

Mojo
Designed byChris Lattner
DeveloperModular Inc.
First appeared2023; 2 years ago (2023)
OSCross-platform
Filename extensions.mojo, .🔥 (the Fire Emoji / the U+1F525 Unicode Character)
Websitehttps://www.modular.com/mojo
Influenced by
Python

Origin Design and development

Mojo programming language is first released internally by Modular Inc., an AI infrastructure company in California, United States [1], in September, 2022[2], with advanced compilation features powered by the MLIR, the Multi-Level Intermediate Representation compiler framework. [3][4][5].

The companion, Modular Inference Engine[6], 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!')

References

  1. ^ "Modular, Inc".
  2. ^ "Mojo🔥 changelog".
  3. ^ "Mojo language marries Python and MLIR for AI development".
  4. ^ 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)
  5. ^ 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].
  6. ^ "Modular Inference Engine".

See also