Content deleted Content added
Jerryobject (talk | contribs) Template:Infobox programming language, WP:REFerence WP:CITation parameters: update-standardize-conform, reorders. WP:LINKs: needless: underscores > spaces, WP:PIPEs > WP:NOPIPEs, adds. Time MOS:CURRENT > WP:ASOF Template:As of. Small WP:COPYEDITs WP:EoS WP:TERSE. MOS:FIRSTABBReviation clarify, define before WP:ABBR in parentheses. Tag: Disambiguation links added |
Jerryobject (talk | contribs) m WP:LINKs: WP:Disambiguate (omission in my last edit), adds (1st instance). |
||
Line 39:
| influenced =
}}
'''Mojo''' is a [[programming language]] in the [[Python (programming language)|Python]] family that is currently under development.<ref name="MojoProgrammingManual_(2023)">{{cite web |url=https://docs.modular.com/mojo/programming-manual.html |title=Mojo programming manual |date=2023 |website=docs.modular.com |publisher=Modular |access-date=2023-09-26 |quote=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.}}</ref><ref name="Modular-WhyMojo_(2023)">{{cite web |url=https://docs.modular.com/mojo/why-mojo.html |title=Why Mojo - A language for next-generation compiler technology |date=2023 |website=docs.modular.com |publisher=Modular |access-date=2023-09-26 |quote=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.}}</ref><ref name=InfoWorld>{{cite web |last1=Krill |first1=Paul |title=Mojo language marries Python and MLIR for AI development |url=https://www.infoworld.com/article/3695588/mojo-language-marries-python-and-mlir-for-ai-development.html |website=InfoWorld |language=en |date=4 May 2023}}</ref> It is available both in browsers via [[Project Jupyter#Jupyter Notebook|Jupyter notebooks]],<ref name="InfoWorld"/><ref name="IWFirst">{{cite news |last1=Yegulalp |first1=Serdar |title=A first look at the Mojo language |url=https://www.infoworld.com/article/3697739/a-first-look-at-the-mojo-language.html |work=InfoWorld |date=7 June 2023 |language=en}}</ref> and locally on [[Linux]] and [[macOS]].<ref>{{cite news |last1=Deutscher |first1=Maria |title=Modular makes its AI-optimized Mojo programming language generally available |url=https://siliconangle.com/2023/09/07/modular-makes-ai-optimized-mojo-programming-language-generally-available/ |work=Silicon Angle |date=7 September 2023 |access-date=2023-09-11 |language=en}}</ref><ref name="macOS_(2023)">{{cite web |
Mojo builds on the Multi-Level Intermediate Representation ([[MLIR (software)|MLIR]]) compiler [[software framework]] instead of directly on the lower level [[LLVM]] compiler framework, as do many languages such as [[Julia (programming language)|Julia]], [[Swift (programming language)|Swift]], [[Clang]], and Rust.<ref>{{Cite web |last1=Krill |first1=Paul |date=2023-05-04 |title=Mojo language marries Python and MLIR for AI development |url=https://www.infoworld.com/article/3695588/mojo-language-marries-python-and-mlir-for-ai-development.html |access-date=2024-05-28 |website=InfoWorld |language=en}}</ref><ref>{{Cite web |date=2024-02-20 |title=Should Julia use MLIR in the future? |url=https://discourse.julialang.org/t/should-julia-use-mlir-in-the-future/110459 |access-date=2024-05-28 |website=Julia Programming Language |language=en}}</ref> 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 unit]]s (CPUs), including producing code that can run on [[graphics processing unit]]s (GPUs), [[Tensor Processing Unit]]s (TPUs), [[application-specific integrated circuit]]s (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.<ref>{{Cite web |title=Modular Docs: Why Mojo |url=https://docs.modular.com/mojo/why-mojo |access-date=2024-05-28 |website=docs.modular.com |language=en}}</ref><ref>https://llvm.org/devmtg/2023-10/slides/keynote/Mojo.pdf</ref> According to [[Jeremy Howard (entrepreneur)|Jeremy Howard]] of fast.ai, Mojo can be seen as "[[Syntactic sugar|syntax sugar]] for MLIR" and for that reason Mojo is well optimized for applications like [[artificial intelligence]] (AI).<ref>{{Cite web |last1=Howard |first1=Jeremy |author1-link=Jeremy Howard (entrepreneur) |date=2023-05-04 |title=fast.ai - Mojo may be the biggest programming language advance in decades |url=https://www.fast.ai/posts/2023-05-03-mojo-launch.html?ref=blef.fr |access-date=2024-05-28 |website=fast.ai |language=en}}</ref>
== Origin and development history ==
Line 53:
Mojo was created for an easy transition from Python. The language has syntax similar to Python's, with inferred static typing,<ref>{{Cite web |title=Modular Docs - Mojo programming manual |url=https://docs.modular.com/mojo/programming-manual.html#parameterization-compile-time-metaprogramming |access-date=2023-10-19 |website=docs.modular.com |language=en}}</ref> and allows users to import Python [[Modular programming|modules]].<ref name=":0">{{Cite web |title=Modular Docs - Mojo programming manual |url=https://docs.modular.com/mojo/programming-manual.html#python-integration |access-date=2023-10-31 |website=docs.modular.com |language=en}}</ref> It uses [[LLVM]] and [[MLIR (software)|MLIR]] as its compilation backend.<ref name="InfoWorld" /><ref>{{cite tech report |last1=Lattner |first1=Chris |title=MLIR Primer: A Compiler Infrastructure for the End of Moore's Law |date=2019 |url=https://research.google/pubs/pub48035/ |access-date=2022-09-30 |last2=Pienaar |first2=Jacques}}</ref><ref>{{cite arXiv |last1=Lattner |first1=Chris |last2=Amini |first2=Mehdi |last3=Bondhugula |first3=Uday |last4=Cohen |first4=Albert |last5=Davis |first5=Andy |last6=Pienaar |first6=Jacques |last7=Riddle |first7=River |last8=Shpeisman |first8=Tatiana |last9=Vasilache |first9=Nicolas |last10=Zinenko |first10=Oleksandr |date=2020-02-29 |title=MLIR: A Compiler Infrastructure for the End of Moore's Law |class=cs.PL |eprint=2002.11054}}</ref> The language also intends to add a [[foreign function interface]] to call C/C++ and Python code. The language is not [[source-code compatibility|source-compatible]] with Python 3, only providing a [[subset]] of its [[Syntax (programming languages)|syntax]], e.g. missing the {{mono|global}} keyword, list and dictionary comprehensions, and support for classes. Further, Mojo also adds features that enable performant low-level programming: {{mono|fn}} for creating [[Type system|typed]], [[Compiled language|compiled]] [[Function (computer programming)|function]]s and "struct" for [[Memory model (programming)|memory]]-optimized alternatives to [[Class (computer programming)|classes]]. Mojo structs support [[Method (computer programming)|methods]], [[Field (computer science)|fields]], [[operator overloading]], and [[Python syntax and semantics#Decorators|decorators]].<ref name="IWFirst" />
The language also provides a [[borrow checker]], an influence from [[Rust (programming language)|Rust]].<ref>{{Cite web |title=Modular Docs: Ownership and borrowing |url=https://docs.modular.com/mojo/manual/values/ownership.html |access-date=2024-02-29 |publisher=Modular}}</ref> Mojo {{Mono|def}} functions use value semantics by default (functions receive a copy of all arguments and any modifications are not visible outside the function), while [[Python (programming language)
The language is not open source, but it is planned to be made open source in the future.<ref>{{Cite web |title=Welcome to Mojo |date=2023-10-31 |url=https://github.com/modularml/mojo |access-date=2023-10-31 |publisher=Modular |website=[[GitHub]]}}</ref>
|