Wolfram Language: Difference between revisions

Source: Wikipedia, the free encyclopedia.
Content deleted Content added
Extended confirmed users, IP block exemptions
33,174 edits
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
Added speaker's cut transcript of Wolfram's talk at SXSW in 2014 where he introduced Wolfram Language
Line 168: Line 168:
*[https://wolframlanguage.org/ WolframLanguage.org]: a guide to community resources about Wolfram Language
*[https://wolframlanguage.org/ WolframLanguage.org]: a guide to community resources about Wolfram Language
*[https://blog.stephenwolfram.com/2013/11/something-very-big-is-coming-our-most-important-technology-project-yet/ Something Very Big Is Coming: Our Most Important Technology Project Yet]: first announcement of the Wolfram Language in Stephen Wolfram's blog
*[https://blog.stephenwolfram.com/2013/11/something-very-big-is-coming-our-most-important-technology-project-yet/ Something Very Big Is Coming: Our Most Important Technology Project Yet]: first announcement of the Wolfram Language in Stephen Wolfram's blog
*[https://writings.stephenwolfram.com/2014/03/injecting-computation-everywhere-a-sxsw-update/ Speaker's cut transcript from Stephen Wolfram's introduction to Wolfram Language at SXSW]


{{Wolfram Research}}
{{Wolfram Research}}

Revision as of 17:44, 15 February 2021

Wolfram Language
Developer
Wolfram Research
First appeared1988
Stable release
12.2[1]
/ December 16, 2020; 3 years ago (2020-12-16)
Proprietary (available at no-cost for some platforms)[2]
Filename extensions.nb, .m, .wl
Websitewww.wolfram.com/language/
Major implementations
Mathematica, Wolfram|One, Mathics, Expreduce, MockMMA,WolframAlpha
Influenced by
Influenced

The Wolfram Language is a general

Mathematica.[9]

History

The Wolfram Language was a part of the initial version of Mathematica in 1988.

Turing complete language, with support for meta-algorithms and superfunctions
.

Symbolic aspects of the engine make it a computer algebra system. The language can perform integration, differentiation, matrix manipulations, and solve differential equations using a set of rules. Also there in 1988 was the notebook model and the ability to embed sound and images, according to Theodore Gray's patent.[12]

An online frontend for the language, WolframAlpha, was released in 2009. Wolfram implemented this website by translating natural language statements into Wolfram-language queries that link to its database. This frontend greatly enlarged the audience of the language, and the work leading to Wolfram Alpha also means that Wolfram's implementation of the language now has built-in access to a knowledge-base as well as natural language processing functions. Wolfram also added features for more complex tasks, such as 3D modeling.[13]

A name was finally adopted for the language in 2013, as Wolfram Research decided to make a version of the language engine free for

CES 2014.[16] In 2019, a link was added to make Wolfram libraries compatible with the Unity game engine, giving game developers access to the language's high level functions.[17][18]

Syntax

The Wolfram Language syntax is overall similar to the

infix operators
and "function-notation" function calls.

Basics

The Wolfram language writes basic arithmetic expressions using

infix operators
.

(* This is a comment. *)

4 + 3
(* = 7 *)

1 + 2 * (3 + 4)
(* = 15 *)
(* Note that Multiplication can be omitted: 1 + 2 (3 + 4) *)

(* Divisions return rational numbers: *)
3 / 2
(* = 3/2 *)

Function calls are denoted with square brackets:

Sin[Pi]
(* = 0 *)

(* This is the function to convert rationals to floating points: *)
N[3 / 2]
(* = 1.5 *)

Lists are enclosed in curly brackets:

Oddlist={1,3,5}
(* = {1,3,5} *)

Syntax sugar

The language may deviate from the M-expression paradigm when an alternative, more human-friendly way of showing an expression is available:

  • A number of formatting rules are used in this language, including TeXForm for typeset expressions and InputForm for language input.
  • Functions can also be applied using the prefix expression @ and the postfix expression //.
  • Derivatives can be denoted with an apostrophe '.
  • The infix operators themselves are considered "sugar" for the
    function notation
    system.

A FullForm formatter desugars the input:[19]

FullForm[1+2]
(* = Plus[1, 2] *)

Functional programming

Currying is supported.

Pattern matching

Functions in the Wolfram Language are basically a case of simple patterns for replacement:

F[x_] := x ^ 0

The := is a "SetDelayed operator", so that the x is not immediately looked for. x_ is syntax sugar for Pattern[x, Blank[]], i.e. a "blank" for any value to replace x in the rest of the evaluation.

An iteration of bubble sort is expressed as:

sortRule := {x___,y_,z_,k___} /; y>z -> {x,z,y,k}
(* Rule[Condition[List[PatternSequence[x, BlankNullSequence[]], Pattern[y, Blank[]], Pattern[z, Blank[]], PatternSequence[k, BlankNullSequence[]]], Greater[y, z]], List[x, z, y, k]] *)

The /; operator is "condition", so that the rule only applies when y>z. The three underscores are a syntax for a BlankNullSequence[], for a sequence that can be null.

A ReplaceRepeated //. operator can be used to apply this rule repeatedly, until no more change happens:

{ 9, 5, 3, 1, 2, 4 } //. sortRule
(* = ReplaceRepeated[{ 9, 5, 3, 1, 2, 4 }, sortRule] *)
(* = {1, 2, 3, 4, 5, 9} *)

The pattern matching system also easily gives rise to rule-based integration and derivation. The following are excerpts from the Rubi package of rules:[20]

(* Reciprocal rule *)
Int[1/x_,x_Symbol] :=
  Log[x];
(* Power rule *)
Int[x_^m_.,x_Symbol] :=
  x^(m+1)/(m+1) /;
FreeQ[m,x] && NeQ[m,-1]

Implementations

The official, and reference, implementation of the Wolfram Language lies in Mathematica and associated online services. These are closed source.[21] Wolfram Research has, however, released a C++ parser of the language under the open source MIT License.[22] A number of libraries and functions written in this language are open source, and the reference book itself is open access.[23]

In the three-decade-long existence of the Wolfram language, a number of

Mathics.[24] These implementations focus on the core language and the computer algebra system
that it implies, not on the online "knowledgebase" features of Wolfram.

In 2019,[25] Wolfram Research released a freeware Wolfram Engine, to be used as a programming library in non-commercial software.[26]

Naming

The language was officially named in June 2013 although, as the backend of the computing system

Mathematica, it has been in use in various forms for over 30 years since Mathematica's initial release.[9][27] Before 2013, it was internally referred to by several names, such as "M" and "Wolfram Language." Other possible names Wolfram Research considered include "Lingua" and "Express."[8]

See also

References

  1. ^ "Summary of New Features in 12.2".
  2. ^ Stephen Wolfram Aims to Democratize His Software by Steve Lohr, The New York Times, December 14, 2015
  3. .
  4. ^ "Wolfram Language Q&A". Wolfram Research. Retrieved 2016-12-05.
  5. ^ Bezanson, Jeff; Karpinski, Stefan; Shah, Viral; Edelman, Alan (2012-02-14). "Why We Created Julia". Julia Language. Retrieved 2016-12-01.
  6. ^ Hickey, Rich. "Clojure Bookshelf". Amazon.com. Archived from the original on 2017-10-03. Retrieved 2020-05-06.
  7. ^ "Notes for Programming Language Experts about Wolfram Language". Wolfram.com. Retrieved 2015-11-05.
  8. ^ a b c "What Should We Call the Language of Mathematica?—Stephen Wolfram Blog". Blog.stephenwolfram.com. 2013-02-12. Retrieved 2015-11-05.
  9. ^ a b "Celebrating Mathematica's First Quarter Century—Wolfram Blog". Blog.wolfram.com. Retrieved 2015-11-05.
  10. ^ Wolfram (1988). Mathematica, a System for Doing Mathematics By Computer.
  11. ^ "dubrousky/mockmma: mma.lisp (built-in symbols)". GitHub.
  12. ^ Hayes, Brian (1990-01-01). "Thoughts on Mathematica" (PDF). Pixel.
  13. ^ "Wolfram Language & System Documentation Center". Reference.wolfram.com. Retrieved 2015-11-05.
  14. ^ "Putting the Wolfram Language (and Mathematica) on Every Raspberry Pi—Wolfram Blog". Blog.wolfram.com. Retrieved 2015-11-05.
  15. ^ Sherr, Ian (2013-11-22). "Premium Mathematica software free on budget Raspberry Pi - CNET". News.cnet.com. Retrieved 2015-11-05.
  16. ^ Daniel AJ Sokolov (2014-11-22). "Intels Edison: Pentium-System im Format einer SD-Karte | heise online". Heise.de. Retrieved 2015-11-05.
  17. ^ "The Wolfram Language will soon be integrated into Unity". Gamasutra. 2014-03-10. Retrieved 2015-11-05.
  18. ^ "Is there a way to use Wolfram Language in Unity3D?". Wolfram. 2017. Retrieved 2017-04-11.
  19. ^ "FullForm". Wolfram Language Documentation.
  20. ^ "Welcome to Rubi, the Rule-based Integrator". Rule-based Integration.
  21. ^ McLoone, J. "Why Wolfram Tech Isn't Open Source—A Dozen Reasons—Wolfram Blog".
  22. ^ "codeparser: Parse Wolfram Language source code as abstract syntax trees (ASTs) or concrete syntax trees (CSTs)". GitHub. Wolfram Research, Inc. 13 April 2020.
  23. ^ "Open Materials from Wolfram: Open Code, Open Source, Open Data, Open Resources". www.wolfram.com.
  24. ^ Simon. "Is there an open source implementation of Mathematica-the-language?". Mathematica Stack Exchange.
  25. ^ Wolfram, Steven. "Launching Today: Free Wolfram Engine for Developers—Stephen Wolfram Writings".
  26. ^ "Free Wolfram Engine for Developers". www.wolfram.com. Retrieved 19 January 2021.
  27. ^ "Stephen Wolfram Says He Has An Algorithm For Everything — Literally". Readwrite.com. Retrieved 2015-11-05.

External links