📜 ⬆️ ⬇️

Overview of Mathematica 11 and Wolfram Language Features


Translation of the post by Stephen Wolfram (Stephen Wolfram) " Today We Launch Version 11! ".
I express my deep gratitude to Polina Sologub for assistance in translating and preparing the publication.



Content


- The first thing you mark ...
- 3D printing
- Machine learning and neural networks
- Audio
- Embedded data about anything: from skeletal structure and food to information about our Universe
- Calculations with real objects
- Advanced geographic computing and visualization capabilities
- Do not forget about the complex problems of mathematical analysis and theoretical physics ...
- Education
- The combination of all functions into one
- Visualization
- From lines to text
- Modern approach to programming systems
- Work on the Internet
- Cloud data
- Connect to any external services: Facebook, Twitter, Instagram, ArXiv, Reddit and many others ...
- WolframScript
- New in the core language of the Wolfram Language
- And many more new ...



I am pleased to announce the release of the new version of the Mathematica system and the 11th version of the Wolfram Language , available for both desktop computers and in cloud form. Over the past two years, hundreds of people have worked hard to create it, and several thousand hours and I personally. I am so excited; This is an important step forward, important for many major technology areas.


')
It has been more than 28 years since the 1st version came out - and almost 30 years since I started developing it. And all this time I continued to embody the audacious dream of building an ever larger and larger stack of technologies . Most of the software after several years and several versions, with the exception of minor modifications, remains virtually unchanged. With the system Mathematica and Wolfram Language, a completely different story has developed: for three decades, with each new version, we moved forward, gradually conquering a huge number of new areas .

This is an amazing intellectual journey for me and for all of us. From the very beginning, we had a serious set of fundamental principles and a strong basic structure , so for three decades we could just continue to build on this foundation more and more, creating everything that has now become a huge system that preserves its unity, elegance, and frankly, modernity. In the early years, we focused on abstract areas like mathematics . But over time, we covered more and more types of calculations and knowledge .

Each new version is a lot of new ideas and many thousands of hours of hard work. Moreover, it is an ever-growing system of leverage created with the help of our technology. This is because one of our key principles is automation, and in each new version we use all the previous achievements from this area - so, in essence, we have more and more building blocks, thanks to which we can faster move on. For many years, enormous efforts have been put into creating and maintaining a single structure for the entire system, and as a result all these building blocks from different areas are ideally suited to each other.

Using traditional approaches to software development, it would take us many years to create what we added to the 11th version. And the fact that we can now present a new version is a direct reflection of the effectiveness of our technology, our principles and our methodology. I am very pleased to see that we have come so far, not only in terms of the content of the system, but also in how effectively we can develop it. Not to mention the fact that all these areas, which we have been engaged for many years in the framework of the logical development of our system, have now turned out to be exactly what is needed for many of the most actively developing technological areas.

For many years we called our main system Mathematica. However, after we added new directions, and also went far beyond the boundaries of things connected in some way with “mathematics,” we decided to introduce the concept of the Wolfram Language in order to convey the essence of all that we are doing. And now the Wolfram Language defines the work of not only the Mathematica system, but also the Wolfram Development Platform and the Wolfram Programming Lab , as well as other products and platforms. And thanks to the unity of our software development, we can today release the 11th version of all our systems based on the Wolfram Language.



OK, so what is so grand and new in the 11th version? Well, we have prepared not even one big innovation, but a lot. So that you can appreciate the scale: we added 555 completely new functions , representing a huge amount of new functionality (compared to the first version, which had 551 functions in total ). In fact, this number of functions does not even include in-depth versions of many existing functions.

We manage the development of the company in such a way that we always have a portfolio of current projects - from small enough to those that may require five or more years to implement. The 11th version includes the results of several five-year projects. We are interested in communicating the results of our research to users as quickly as possible, so that since the release of the 10th version we have had several intermediate releases; as a result, the 11th version is actually a combination of many completely new developments, which we have already announced in versions 10.1 , 10.2 , 10.3 and 10.4 (many functions that were labeled “experimental” in the 10.x releases are now fully available in 11.0).

The first thing you mark ...


When you first launch the 11th version on your desktop, the first thing you will notice is a new look for documents with clearer fonts and a strict design. When you enter a code, many new autocomplete options appear (it becomes harder to type something wrong), and also a new spell checker works in real time as you enter the text, which we will constantly update to ensure that the last words are included in it .

If you have one of a dozen languages ​​other than English installed on your computer, you will see that each function is automatically marked with a “ signature ” in the language of your choice:



When you run the code, you will notice that the messages also look different - and, very conveniently, they allow you to immediately see which functions were called during the creation of the message.

3D printing


In the 11th version many new areas appeared. Let's move on to one of them: 3D printing . I first printed in 3D back in 2002. For many years we have exported to STL . For the 11th version, we have created a complete cycle , which begins with the creation of 3D geometry and ends at the moment when the finished product lies on your 3D printer.



I used to want to take a drawing in 3D and just print it out - also in 3D. And sometimes I was lucky and it was easy to implement. But in most cases it is inconvenient and difficult, since the graphics that are displayed on the screen do not necessarily correspond to the geometry that can be printed on a 3D printer. So it is convenient to set up or fix the geometry so that it really works on a 3D printer, it turns out to be a difficult task (and yes - if you do it wrong, plastic may splash out of the printer).

In the 11th version it became possible to take any 3D-graph and just print it in 3D . Or you can get the structure of the molecule or the height difference around the mountain , and also just print them in 3D. Over the years I have been printing a lot in 3D, and each time it was a kind of little adventure. But now, thanks to the 11th version, it is easy to print almost anything in 3D. And now, when I think about it, I think I need a 3D printout of how the Wolfram Language was growing in different areas ...

Machine learning and neural networks


In a sense, Mathematica and Wolfram Language have always been engaged in artificial intelligence (AI). For many years, we have been pioneers in solving a series of problems related to AI: from a mathematical solution to aesthetics automation to understanding natural language. But back in the 10th version we have made a big step forward with respect to machine learning - this is about developing the most automated main functions ( Classify and Predict ).

I must say that I did not understand whether these functions will work well in practice. It was great to see how well they are working - and it’s great to see that many of our users can implement machine learning into their work solely with the help of automation developed by us and without consulting specialists in machine learning.

In the 11th version, we have pretty much advanced in the field of machine learning . Now we have new ways to carry out not only the classification and prediction, but also the operation of feature extraction , size reduction , clustering, and so on. And we also “teach” our system a lot in order to provide users with ready-made machine learning functions . Machine learning is an interesting new development. In essence, this is a curation process. It’s as if instead of, say, collecting data on various videos , you collect as many images of various types of animals as possible.

The 11th version includes functions such as ImageIdentify , which identifies more than 10,000 different kinds of objects . Due to the general structure, it is quite simple to take already selected characteristics and use them to train new image classifiers more efficiently than before.



We have done a lot to automate the most common of today's machine learning tasks. But only in recent years it has become clear that with the help of modern methods of machine learning (and, in particular, using neural networks), many problems can be solved. This is truly an amazing episode from the history of science : that area of ​​neural networks, which I have been studying for almost 40 years, has become one of the hottest areas, which seems almost hopeless, in which new discoveries are made almost every week.

Well, well - let's say you also want to do this. Yes, you can build something using a variety of low-level libraries. But when creating the 11th version, we set a goal to create an optimized symbolic way of setting up and training neural networks, in which as much of what they can do in principle should be automated. In the 11th version there are now features like NetGraph and NetChain along with all sorts of “ special neural network functions ” such as DotPlusLayer or ConvolutionLayer . And using these functions, you can take the newest networks and quickly set them up in the Wolfram Language (recurrent networks in the 11th version are not completely completed yet, but they will appear soon).



Of course, all this works well thanks to integration with Wolfram Language. The neural network is just a Graph object, like any other. And such input data as images or texts can be immediately and automatically processed using standard Wolfram Language features in forms suitable for neural network computing.

From their name (“neural networks”), it seems that they are connected with the brain. However, in fact, these are completely general computing structures: they correspond to complex combinations of simple functions. They are not related to the simplest programs that I have studied for so long , although they have special characteristics that are configured to be easy to learn by example.

We always had statistical data fitting and interpolation functions. However, neural networks have a much richer space of possible computational structures for data fitting or training. It is remarkable that only in the last couple of years so many different areas have undergone revolutionary changes - and soon there will be even more.

I hope that we can speed up this process using the 11th version. We managed to make “neural network programming” just another programming paradigm, along with the rest integrated into Wolfram Language. It is very effective and allows you to interact with huge learning sequences. But in the end, I think the strongest thing is that it immediately fits into everything that the Wolfram Language does. Even in the 11th version, we already used it when working with our internal algorithms in such areas as image , signal and text processing . The history of “neural network programming” is still very young, and I am glad that the Wolfram Language will play a central role in it.

Audio


Well, let's turn to another new area of ​​the 11th version: audio . Our goal is to be able to process any data directly in Wolfram Language. We already have such objects as graphic primitives (from which you can build arbitrarily complex vector 2D and 3D graphics) , raster images (also 2D and 3D) , geometric calculated objects , graphs and networks , formulas and many other functions that are sequentially presented in language in the form of symbolic structures. And, starting with the 11th version, one more data type has now become available - audio .



Audio is hard to work with because of its size. However, in the 11th version you can easily process, say, an hour of audio directly in the Wolfram Language. Of course, behind this technology caching, streaming data, and so on. But this is all automated - and in the language it is just an object defined by the Audio function. This Audio object can be immediately subjected to extremely complex processing and analysis, which are only available in the Wolfram Language.

Embedded data about anything: from skeletal structure and food to information about our Universe


Wolfram Language is a knowledge based language. This means that a lot of knowledge is built into it - both about calculations and about everything in the world. To date, the Wolfram Language covers thousands of areas of real-world knowledge, ranging from countries and movies to companies and planets. All new data comes to the Wolfram main cloud knowledge base , and we carefully supervise data on what is new in the world (who knew, for example, that new administrative divisions appeared in Austria recently?). Many of these data are available in Wolfram | Alpha . But only in Wolfram Language data comes to life for full-fledged computation - and then all the efforts that we put into ensuring the consistency and consistency of the entire system become apparent.

We are constantly working to expand the scope of knowledge covered by the Wolfram Language. Those few areas that we have worked on over the years, in the 11th version, are finally ready to work. It was especially difficult with data on anatomy . However, in the 11th version you will see detailed 3D models of all significant structures of the human body. You can see how the complex bones of the legs fit together. And you can do the calculations. Or print them in 3D. You can explore the network of arteries around the heart. I must say that when I researched this, I was more than ever amazed at the level of morphological complexity inherent in the human body. However, now we can easily do calculations in this area. New, and perhaps unexpected, functions have appeared for their maintenance, such as AnatomyPlot3D . Of course, they will still have to work with them: for example, our anatomical data is only the data of an “ average adult man ”, and the joints cannot move, etc.



A completely different area of ​​data is also being developed now in the Wolfram Language - this is food. There are many difficulties in this area. First, ontological problems. What is an apple? There is a general concept - “apple”, and there are also many specific types of apples. It also raises the question of determining the "amount of food." A cup of strawberries . Three apples . Quarter pound . It took us many years of work to get a reliable, symbolic way to display products, with which we can immediately calculate the nutritional properties and much more.



Another long-awaited novelty - historical data by country . We had data about countries in recent times (usually since the 1960s or 1970s). What about the earlier period? What about Prussia ? What can be said about the Roman Empire ? In general, in the 11th version, we finally received at least approximate information about the borders of all serious countries throughout history. Thus, by means of the Wolfram Language, it is possible to make calculations regarding the rise and fall of empires.



Speaking of history, I would like to note a small but very useful addition to the 11th version: historical data on the frequency of the use of words. Just get with the WordFrequencyData feature a time series of word use frequencies, and you will find out how many people spoke about the word “war” (or “turnip”) at different times. Almost every graphic is a history lesson.



Another handy feature from the 11th version is WikipediaData , which, upon request, provides any Wikipedia article (or various types of data that it contains). There is also a WolframLanguageData function that allows you to get calculated data about the Wolfram language itself: examples given in the documentation, links between functions, and so on.

In many areas, we mainly deal with static data (" What is the density of gold? "; " What was the population of London in 1959? "). But there are other areas in which interest in static data is small. In the 11th version there are several new examples. For example, data on human mortality (“ What is the probability of dying between age X and age Y? ”), Standard data on oceans (“ What is pressure at depth X? ”), Data on the braking energy of radioactive particles in a substance (radioactive stopping power ) and data on human growth - as well as information about the entire Universe according to the standard cosmological model.

In addition, in the 11th version, functions such as WeatherForecastData (weather prediction anywhere in the world) and MathematicalFunctionData (a database of mathematical formulas containing hundreds of thousands of mathematical formulas, representations of functions, etc.) appear. Oh, and more data about Pokemon and many other useful things.



Calculations with real objects


One of the most powerful features of Wolfram Language is its ability to perform direct calculations with real objects. The United States, or Russia, or even the lizard, for the Wolfram Language, is simply objects that can be manipulated as character constructs using the common symbolic paradigm of the language. The objects themselves do not matter; they are just symbols. But their properties can have values, for example, the calculation of the “Population” property of entity [[USA]] will give 322 million.

However, let's assume that we want to not just take some object (for example, the USA) and find the value of its properties. Let's say, instead, we want to find objects with certain properties and values. Let's say we want to find the 5 largest countries in the world in terms of population. In the 11th version we can do it in a new way. Instead of specifying a specific explicit object, we specify a calculation that implicitly defines a class of objects. So, for example, we can get a list of the 5 largest countries in terms of population like this:



TakeLargest [5] is an operator form of a new function that works with the largest elements in the list. Implicit objects in the end often use operator forms - as in Dataset queries. And in a sense, they use the character character of the Wolfram Language, because they work with functions that define them as data.

The mechanism of objects and properties and implicit objects works for all the different types of objects that exist in the Wolfram language. However, starting from version 11, it is not limited to built-in object types. The new design, called EntityStore , allows you to define your own object types, specify their properties and values, and so on, and then use them in any calculations.

Just as Dataset is a powerful hierarchical generalization of typical database concepts, EntityStore is a kind of symbolic generalization of a typical relational database. And if you have created a complex EntityStore object, you can simply use the CloudDeploy feature to deploy it in the cloud and use it whenever you want.

Advanced geographic computing and visualization capabilities


Geography is one of the aspects of "knowledge about the real world." But the Wolfram Language does not just have access to detailed geographic data (for Earth, Moon , Mars, and even Pluto ); he can also perform calculations with this data. In his arsenal - a huge collection of instantly computable geo projections and all the settings to support detailed geodesy . Remember spherical trigonometry ? Wolfram Language not only knows that the Earth is a sphere, but also, using the actual shape of the Earth, correctly calculates distances, builds areas, and so on on a map with arbitrary projections.



If we talk about creating maps , then Wolfram Language now has access not only to the street map of the whole world, but also to such things as the historical boundaries of countries , as well as to satellite images - with low resolution (at least). Taking into account street maps, a new important class of possible calculations appears: tourist destinations (and travel time ) from anywhere and anywhere.



Do not forget about the complex problems of mathematical analysis and theoretical physics ...


In the 11th version, many new features appeared in all areas of Wolfram Language . However, they are now available in areas that are traditional to Mathematica, for example, mathematical analysis .

For example, there are functions (like DEigenvalues ) for working with eigenvalues ​​and functions of differential operators for ordinary differential equations and partial differential equations . To make this possible, a huge stack of algorithmic technologies is needed, and we have been moving in this direction for more than 25 years. It is important that this is not the case when it is necessary to set a particular task with the help of detailed knowledge of numerical analysis. Here you define only the equations and their boundary conditions - and the system automatically finds out how to solve them.



Back in 1976, I wrote a program on Fortran , designed to find the eigenfunctions of the Schrödinger equation for elementary particle physics , which I studied. In 1981, I wrote programs in C to do the same for some equations of relativistic quantum mechanics . I patiently waited for the day when I could just drive in these tasks and immediately get answers. And now it has become possible.

Of course, in the 11th version all this is much more general. I dealt with simple boundary conditions; but in the 11th version, in order to adjust the boundary conditions, you can use the entire geometric sublanguage of the Wolfram Language — and all the data that is available to us. So, finding your own “drum” surfaces of any shape — for example, in the form of the USA — is not difficult.



In this case, we have no choice but to do all the calculations numerically. However, in the 11th version it will soon be possible to search analytically for the eigenvalues ​​and functions of differential operators . The 11th version also adds some new features for solving in a general form (analytically) partial differential equations . In particular, we had a large R & D project, which has now led us to the point where we can find a symbolic solution for almost any partial differential equation that can appear in any scientific work or textbook (if it has an analytical solution ).

1979 , Mathematica (. " Mathematica "), , , , . — . — , 37 , , , , , 11- - .

- — , . , , ( , ) ( , 1977 ).

, " " — , . , , .

Education


— , . , ? — Mathematica . , , .

, . . . , , Tan [] «» , –∞ +∞. Tan[] . , .



, , - — MathematicalFunctionData : — - (. " ") .

Wolfram Language . , , , , c , Wolfram Language. , NumberExpand — , , 123 {100, 20, 3} ; , , RomanNumeral , .

Logo , — AnglePath — “ (turtle graphics) ”, , — , .




Wolfram Language — , . 11- .

, , . , , , , . , , , 11- : Wolfram Language .

. . , 2,5 , 2,5 . , .

. , , . — ImageMesh — : . , , , .

: . RandomInteger RandomReal — . 8- RandomVariate , , . 9- RandomFunction , . 11- RandomPoint , , (-, -, ). RandomEntity , , RandomWord , ; — … , , 11- — , Mathematica Wolfram Language.

Visualization


Mathematica Wolfram . . 11- .

WordCloud , . TimelinePlot . AudioPlot , . Dendrogram , , . GeoHistogram . TextStructure . AnatomyPlot3D , ( , ).



? , ( ) — , , . 11- RulePlot .



3D . , «» 3D. , -, — , .



— . 11- Callout , , ( , ). — , , . , . 11- , .




Mathematica Wolfram Language . 10- Interpreter : . , 11- , .

TextWords TextSentences ( «.» ( — “St. John's St.”)). TextCases , , — , , , .

: , WordList , WordDefinition — .

. Alphabet ; Transliterate . , , WordTranslation 200 — .




Wolfram Language is an ultra-high level language. However, in the 11th version, we added a bunch of opportunities to cover low-level computer systems. The first is the ByteArray function, which can store and process raw byte sequences. There are also functions that deal with networks - PingTime and SocketConnect .

Also, a new framework for publication-subscription channels has appeared. You can create a channel, and then the Wolfram Language or the external system will send data to it, and you can create a “receiver” that will perform some actions through the Wolfram Language when the data arrives. Much more can be done with this setting: whether to connect to external services or devices , handle e-mail or third-party authentication, or even create your own chat .

Another new feature is embedded cryptography . This is a purely symbolic framework that allows you to configure almost any protocol using public or private key systems.

But what about interaction with the web? The character of the Wolfram Language is also strongly manifested here. So, for example, it allows you to interact with HTTPRequest and HTTPResponse as with character structures . There is also a URLSubmit function for working with symbolically defined handler functions for feedback from asynchronous URL execution. There was even a function CookieFunction , responsible for the symbolic handling of cookies.

You can engage in programming systems in virtually any language, or even, for example, on the command line. However, I found that doing it in Wolfram Language is much more efficient. Let's say you explore the performance (see the post on Habré " Finding errors in the cloud from a scientific point of view: an unexpected adventure of the CEO ") of a computer system. Everything you do is beautifully stored in a document where you can add comments, etc. And then everything you do can be immediately rendered. Or you can use machine learning, or whatever. Want to test network performance? Use the PingTime function to create a list of data transfer delays; then make a histogram correlating with other data.

The FileSystemMap function, another new feature, is able to process the file system as a set of nested lists (or associations), and then apply some function over it. For example, you can take a whole catalog of images and use FileSystemMap , applying image processing functions for all images at once.

Yes, and one more thing: version 11 also includes (although still labeled as experimental), industrial-level systems for searching text documents, both locally and in the cloud.

Work on the Internet


An incredible feature of the Wolfram language is that it works not only on the desktop, but also in the cloud . And in the 11th version, we added many new cloud-based capabilities for working on the Internet.

Let's start with the simple. The CloudDeploy [ FormFunction [...]] function allows you to immediately create a form- based application directly on the Internet. But now you can make the form even more difficult. Many new “smart fields” appear that automatically use a natural understanding of the language to interpret the entered data. There are also new constructions like RepeatingElement and CompoundElement , which automatically set the fields to get data for lists and associations. And there is a new programmable linguistic interface that allows you to define your own grammar in order to broaden the understanding of the natural language already built into Wolfram Language.

The forms that you symbolically designate in the Wolfram Language can be quite complex — several pages with many interdependencies and formatting. But ultimately they remain the same forms for which you set your input, and then send it. The 11th version introduces a new framework, AskFunction , which allows you to create more complex interactions: for example, dialog boxes in which you “interview” a user to get data. In Wolfram Language, the whole process is determined by the symbolic structure, which then with the help of the function CloudDeploy immediately becomes active on the Internet.

The goal of Wolfram Language is to be able to easily do complex things on the Internet. In the 11th version, we included the FormPage feature (as in wolframalpha.com ), as well as GalleryView , which allows you to create a list of images in the Wolfram Language, and then deploy it on the Internet as a “gallery” (as in demonstrations.wolfram.com ).



If you want to work at a lower level, there are URLDispatcher and GenerateHTTPResponse functions that allow you to accurately determine how web requests will be processed depending on your cloud settings.

In addition, the new version has features such as CloudPublish and CloudShare , which allow you to control access to what you put in the cloud. Another small but important function is SourceLink , which allows you to automatically link, say, a graphic image that you place in the cloud with the document (also in the cloud) in which it was created. I think this is a great tool by which every image that you see in a document contains a link to the one who created it. I insist that within our company automated reports be written to the Wolfram Language, and, of course, would include source links, so that I can always get the source data and analyze them myself.

Cloud data


You could use Wolfram Data Drop already in version 10, but now an advanced version is available that allows you to accumulate data in the Wolfram Cloud . I must say that I underestimated the capabilities of Wolfram Data Drop . I thought (see the post on Habré " Wolfram Data Drop - a new service Wolfram Research ") that it will be used primarily to store data from sensors, etc. . And, indeed, many applications have been thought out in these areas. However, for Data Drop, you can find use exclusively inside Wolfram Language. Let's say you have a web form that works for Wolfram Language. You can process each request and then drop the result in the Databin format in Wolfram Data Drop to analyze everything at once.

Wolfram Data Drop is created primarily for the accumulation of time series data. In the 11th version, another way to store data in the cloud appeared - CloudExpression . You can put any expression on the Wolfram Language into the cloud, and it will be stored there, and each part of it can be extracted or configured using normal functions (for example, Part or AppendTo ). CloudExpression is a great way to store structured data in which parts are constantly changing, but the data itself remains unchanged in the cloud.

What you put in the cloud remains unchanged. The 11th version also introduced the LocalObject function - a local equivalent of the CloudObject function, which provides permanent local storage on your computer, and LocalCache , which is used for caching in the local object storage.

Connect to any external services: Facebook, Twitter, Instagram, ArXiv, Reddit and many others ...


With the help of the Wolfram Language, we supervise a lot of data that we put directly into the Knowledge Base ; we are also looking for ways to get additional data, such as external APIs . In the 11th version, many new links appeared - with Flickr , Reddit , MailChimp , SurveyMonkey , SeatGeek , ArXiv and so on .



Wolfram Language is a powerful tool for deploying your own APIs. And in the new version there are a number of authentication mechanisms that are supported for the API: for example, PermissionsKey for assigning AppID. CloudLoggingData provides the most detailed information about how to access any API or any other cloud object.

The API by which you call various services on the Internet receives data passed to it through a given URL. In the 11th version, a new kind of API is now available, which works through email, rather than via the Internet and URLs. The MailReceiverFunction function is similar to the APIFunction , except that it first determines the email address, and then any mail sent to that address is passed to the function code of the MailReceiverFunction . MailReceiverFunction allows you to separate different parts of mail messages and their headers, and then with the help of Wolfram Language to automate the processing of e-mail almost any level of complexity. And for people like me who receive a huge amount of emails from both people and automated systems, this is quite convenient.

WolframScript


You can access the Wolfram language through a laptop, desktop or cloud. You can access it using deferred tasks in the cloud or through the API or the MailReceiverFunction function. Wolfram Language could always be started from the command line, but in the new version it was possible to do this using WolframScript .

The idea behind WolframScript is to create a very simple but flexible interface to Wolfram Language. WolframScript allows you to run the Wolfram Engine on a computer, which, in turn, allows you to run code from a file or directly from the command line. This allows you to receive feedback in any format - including text, images, sounds, PDF, CDF , etc. If you are dealing with Unix, then you can use #! Wolframscript to create a script that can be called standalone and that will work with WolframScript .

There is one more thing. You can customize how WolframScript works, like FormFunction , to pull out arguments of any type you designate (and interpret when necessary). And you can also use WolframScript to call the API you’ve already created in the cloud.

In our company, we often use Wolfram Language, as part of a large and distributed system. WolframScript provides a direct way to place components in Wolfram Language.



New in the core language of the Wolfram Language


I have already talked about all kinds of innovations that extend and deepen the algorithmic possibilities of Mathematica and Wolfram Language. But what about the core structure of Wolfram Language itself ? Of course, we strive to maintain compatibility (although this is not difficult, given the fact that we are always focused on development). But we also want to gradually strengthen and polish the tongue.

The process of evolution of natural languages ​​implies, among other things, the construction of new words from idioms. In essence, we do the same thing in Wolfram Language. We study which “clusters” of repeated calculations most often appear in the Wolfram Language code. Then we come up with a good name for this particular set of calculations and create a new function.

At the beginning of work on the Mathematica system, I thought it would be cool if there were functions that allow you to do something with idioms. I realized that if an idiom is compressed to one function, from the name of which it is clear what it is for, then we get a code that is easier to read. And the fact that idioms do not have to be reconstructed many times justifies the introduction of a new function.

Over the past few years, our company has been actively developing two areas: Language Development (Incremental Language Development - ILD), and Language Consistency & Completeness (LCC). The main idea of ​​ILD is the introduction of functions equivalent to idioms. The main idea of ​​the LCC is to make sure that both template expressions , units of measurement , and symbolic URLs are supported where it makes sense.

So, for example, the standard ILD add-on in version 11 is the MinMax function, which returns the minimum and maximum values ​​for a given list (surprisingly, how many difficulties she gets when using Map ). The standard addition of LCC is pattern matching support in associations .

In the 11th version there were many additions to the main language . Functions like Cases were distributed and SequenceCases appeared - searching for sequences instead of individual elements in the list. There is also the SequenceFoldList function, which is similar to the FoldList , except that it can return to a sequence of elements of any length. There is also a similar function FoldPairList , which summarizes the FoldList and returns at each step a result that differs from the one achieved earlier. This may seem abstract, but it is a very useful operation if you want to maintain a separate internal state while continuing to receive data.

Another novelty that may seem strange at first glance is the Nothing function. Despite its name, Nothing does something: whenever it appears on the list, it is immediately deleted. This means that if you want to get rid of the list item, you must replace it with Nothing .

Thanks to some innovations, it became more convenient to use the 11th version. For example, for the First function, there is now a second argument that tells what to do if there is no first element, and eliminates the need to include If in this case. The UpTo function is designed to display a certain number of objects - you can set: Take [ list , UpTo [4]] to get up to 4 list items (if there are fewer of them, then as many as there will be). UpTo is supported in many places, and this greatly simplifies the code.

Echo is another handy feature. When you are trying to trace what is happening inside a piece of code, you may need to print some intermediate result. Echo is a function that prints and then returns the typed so that you can use it in your code without changing what this code does.

It's hard to believe that you can add something else to this list, but that’s not all. Subdivide is a function similar to Range , except that it subdivides the range into equal parts. TakeLargest and related functions generalize Max and similar functions to take not only the largest, but n the largest elements of the list.

There is also the Groupings function, the structure of which I have been thinking over for many years: it generates all possible trees generated by binary or other adders (“What numbers can you get by placing Plus addition and Times multiplication in the list of units in all possible ways?”).

The Table function is convenient because you can now set Table [ x , n ] , rather than Table [ x , { n }] . In general, there are many more things that make the core of the 11th version of the Wolfram Language more elegant and convenient to use.

And a lot of new ...


It was a long post. However, I didn’t even describe everything that was new in the 11th version. On the Internet more information. Check out the New page on the Wolfram Language 11 system , or review information for users or a brief description of the new features. See also the list of new features from version 10.4 to 11.0 .

But most importantly - start using the new version! If you want to quickly (and for free ) interact with it, launch it through the Wolfram Open Cloud . Or simply start using Mathematica 11 or the 11th version of any other Wolfram Language based products .

I have been using test versions for some time now, and the 10th version for me looks and feels like very “old-fashioned” - I miss these wonderful new interface functions, new functionality and little amenities. I am very pleased with how the 11th version turned out. This is another big step on our 30-year development path of Mathematica and Wolfram Language. And I am glad that for the first time all sorts of people around the world will be able to do amazing things with Mathematica 11 and other products of the 11th version of the Wolfram Language .

For questions about Wolfram technologies, write to info-russia@wolfram.com

Source: https://habr.com/ru/post/308168/


All Articles