Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"


0 (0 Likes / 0 Dislikes)
Hi, I’m Chip Hurst. Here to show you how to get started with the Wolfram Programming Cloud. The Programming Cloud is an online development environment accessible from your browser where you can write and deploy programs in the Wolfram Language. ’ll show you how to get online, how to use the Programming Cloud interface and how to write and deploy programs in the Cloud. To get started, go to and click “Wolfram Programming Cloud”. You’ll see the sign in screen. If you don’t already have an account, click “Create Account” to get one. Any one can get a free Wolfram Cloud account with the basic level of access to the programming cloud. Sign in to the Cloud with your account name and password you should arrive at the home page of the Wolfram Programming Cloud. The items on the left are resources and shortcuts to help you get to work and the ones on the right are something similar to a file browser here you can manage your cloud objects. To get started writing code, click “Create a New Notebook”; give the notebook a name by clicking here. Notebook documents are where you write code in the Wolfram Programming Cloud. They’re useful for a number of other things as well, like making presentations and testing code, but I’ll focus on programming here. If you’re familiar with desktop Mathematica, you’ll feel completely at home in cloud notebooks. If you aren’t yet familiar with the Wolfram Language, stick around —I’ll show you how it works. You can use the Wolfram Language in the cloud like a calculator. Type in an expression, like “100!”, and evaluating by hitting Shift Enter. You immediately get an answer. The input and output reside in cells, which are indicated by brackets on the right. Hover over a bracket and you’ll see a gear icon that you can click for a menu of operations useful for managing cells. There are lots of kinds of cells, which you can mix freely with inputs and outputs to document your work and give structure to your calculations. Add a text cell to document your work by clicking the input tongue and selecting, Plain Text”. Add title and section cells to structure your notebook. The cloud interface has a lot of helpful features that help you can find your way around the Wolfram Language like this toolbar that appears after you do an evaluation. It’s called the “Suggestions bar” and it contains operations you might want to do next on the output you just got. It helps you get work done quickly and learn the Wolfram Language. If you click, for example, “Prime Factorization”, it will not only give you the prime factors of this huge number but also show you what you could have typed to get the same result in the Wolfram Language. Now you know that “FactorInteger” is the function that gives you the prime factors of a number and that you apply the function using square brackets. So you can type “FactorInteger[100]” and hit Shift Enter to get prime factors of 100 —namely, two 2’s and two 5’s If you don’t want to see the Suggestions Bar, click the “x” at the right to minimize it. You can always get it back again by clicking the arrow. For those of you who are completely new to the Wolfram Language, you don’t have to know the specifics to get something done. You can program using natural language. For example, enter today’s date by typing “control = ” and “today”. When you evaluate that expression, it’ll turn into what you could’ve typed with exact Wolfram syntax to specify today’s date. You can use natural language input right in the middle of calculations, too. Say you want to know the number of days since the beginning of the year —type “control = today”, Enter, “-”, “control = Jan 1”. Hit Shift Enter to emulate and you see the answer You can switch between the natural language expression and the Wolfram Language expression by clicking here. here are several codices features in the cloud interface that help you use Wolfram Language functions. When you start typing a function name, a completion menu pops up with likely names that you tend to type Type “return” to complete a function name with the item selected in the menu or click the name you want. Click the down arrows that pop up next to a function name to select an argument template. Type the arguments using Tab to advance to the next placeholder. You can get complete documentation for a function by hovering over the function name and clicking the “i”. The documentation appears in a pane to the right of the notebook. You can work with the notebook and the documentation panes side by side for quick access to function descriptions. The easiest way to learn the Wolfram Language is the copy and paste examples from the documentation to try things out. You can explore by editing the example inputs as well. A faster way to do the same kind of exploration is to use “Manipulate” to make the example interactive. Wrap the expression in “Manipulate” and replace the value you want to explore, “t” in this case, and specify a range of the variable. Now you have an interactive widget that you can quickly use to explore variations in the example code. You can get a lot of work done just by evaluating these kinds of simple, one-line expressions of built-in functions. But the real power of the Wolfram Language comes into to play when you define your own functions. Here’s how to make a function that returns how many days ago a particular date was. I’ll call the function “days Ago” and give it an argument of “date”. Evaluate that definition with Shift Enter. Now you can use the function by invoking it with a particular date—for example, Jan 1. Now let’s make that function available to the world by deploying it to the Cloud. Type “CloudDeploy[FormFunction]”, specify the argument “date” is a date and make the deployment called “days Ago” the date argument. When you evaluate “CloudDeploy” you get a cloud object. Click the link in the cloud object and you get a form where you can enter the date and get the result. The form contains smart fields. You can enter any common format for a date and it will interpret the results. If you give it nonsense it will let you know. You can make a function that evaluates directly without the intervention of a form by using “APIFunction” instead of “FormFunction”. You call this function by specifying the date as a query string in the URL. You can also call this cloud function programmatically from the Wolfram Language using URL execute. And you can do it anywhere in the Cloud or from the desktop. I’m going to switch to the Wolfram desktop and call this function from there. So you have a function that lives in the Cloud but can be used in the Wolfram Language just like any other function. In fact, you can call this Cloud function from just about any programming environment. To call the function from Python, for example, evaluate with “EmbedCode” using “Python” as the second argument. You’ll get the Python code that you can drop into your project to call the function. You can also put computed content in web pages using “CloudDeploy”. Here’s a web API that gives the current temperature. Click the link and you can see the current temperature. Right now, this is a private API available only to me. But you can make it accessible to the world using public permissions. To embed this on a web page, you apply “EmbedCode” to the cloud object, copy the HTML expression in the output and paste it into the HTML source for your webpage. When you open the web page in a browser, it shows the current temperature in the location of the visitor. The “EmbedCode” gives a default size for the iframe and frame style You can edit that to improve the appearance of the page. So now you know how to get online, write a simple Wolfram Language program, and deploy it in the Cloud. The notebook and cloud objects that you’ve been working with are listed in the “Cloud Files” browser on the right. Under “Home”, you’ll see the notebook we’ve been working in. The Cloud Deployments I’ve made are listed under “Deployments”. For example, here’s the web form that we made. You can track your cloud usage in the “Usage Dashboard” accessible from the Programming Cloud homepage. It shows you how you have used your Cloud credits and how many you have left. You can learn more about the Wolfram Language and what you can do in the Programming Cloud by visiting the Wolfram Language examples that are linked from the Programming Cloud homepage. Each example contains Wolfram Language code and an explanation of how it works. You can try the code yourself in your Cloud account account by clicking the “Open Live Version” button at the top of the example. For help with Wolfram Language questions, try visiting the Wolfram Community page, which is also linked from the Wolfram Programming Cloud homepage. Community is a group of over 7,000 people, and growing, who discuss Wolfram Language and other Wolfram technology issues. Members can often answer questions and you’ll also find a lot of interesting applications of the Wolfram Language there If you try out the Wolfram Programming Cloud, let us know how you like it by sending us a message with the “Feedback” button. I hope you enjoy exploring. You can do incredible things with the Wolfram Language and now that it’s in the Cloud it’s easier than ever to use it. Let us know what great things you do.

Video Details

Duration: 15 minutes and 23 seconds
Language: English
License: Dotsub - Standard License
Genre: None
Views: 39
Posted by: wolfram on Apr 14, 2015


Caption and Translate

    Sign In/Register for Dotsub to translate this video.