You can edit almost every page by Creating an account and confirming your email.

Mojo (programming language)

From EverybodyWiki Bios & Wiki



Mojo
Designed byChris Lattner
DeveloperModular Inc.
First appeared2023; 3 years ago (2023)
OSCross-platform
Filename extensions.mojo, .🔥 (the fire emoji / the U+1F525 Unicode character)
Websitewww.modular.com/mojo
Influenced by
Python, Rust

Search Mojo (programming language) on Amazon.

Mojo is a specialized artificial intelligence (AI) programming language developed by Modular Inc.[1][2][3] 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.

Origin design and development

Mojo was first released internally by Modular Inc. in September, 2022,[4] with advanced compilation features powered by the MLIR, the Multi-Level Intermediate Representation compiler framework.[5][1][6]

Its type system is hybrid (something between static and dynamic), given that the developer can opt-in for high performance static typing by choosing the keyword (between `fn` and `def`) to define her function.

The companion Modular Inference Engine[7] is an AI infrastructure that simplifies the AI development workflow and reduces inference latency in order to scale AI products.

Similarity with Python

Mojo programming language is fully compatible to Project Jupyter ecosystem. It's not yet fully compatible with Python code, i.e. provides a subset of its syntax, e.g. missing (Python) classes, but can call existing Python 3.x code (by reusing the CPython runtime). It also has integration to transparently import Clang C/C++ modules, can transparently generate a foreign function interface between C/C++ and Mojo. 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.

Mojo has a borrow checker, an influence from Rust, and in that way is dissimilar to Python.

Programming examples

Hello world program:

print('Hello, world!')

See also

References

  1. 1.0 1.1 Krill, Paul (4 May 2023). "Mojo language marries Python and MLIR for AI development". InfoWorld.
  2. Claburn, Thomas (5 May 2023). "Modular reveals Mojo, Python superset with C-level speed". The Register.
  3. Pandey, Mohit (3 May 2023). "This New Programming Language is Likely to Replace Python". Analytics India Magazine.
  4. "Mojo🔥 changelog".
  5. Lattner, Chris; Pienaar, Jacques (2019). "MLIR Primer: A Compiler Infrastructure for the End of Moore's Law". Retrieved 2022-09-30.
  6. 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].
  7. "Modular Inference Engine".

External links



This article "Mojo (programming language)" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Mojo (programming language). Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.

Page kept on Wikipedia This page exists already on Wikipedia.