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)
Hey, what’s going on, everybody? My name is Allen Kleiner, currently a student in the college of engineering at the University of Illinois at Urbana Champaign, studying computer science. As a Wolfram intern, I have been fortunate to attend numerous hackathon across the country and even before that I have been fortunate to go to hackathons in Michigan, in Pennsylvania and even most recently in Arizona. Over the past several months in meeting with various people here at Wolfram, we thought it would be pretty interesting to bring some of the exciting technology that we have going on here to the hackathon community and bring hackathon activity to members of the Wolfram Language community as well. Today I am going to be sharing a little trip-planning project, it’s something that I got inspired to do after traveling to Arizona this past weekend. I’ll show you guys step by step processes that I went through to get from point a to point b, intermediate steps, etc. and hopefully in the process I’ll be able to show you guys just how powerful Wolfram Language code is and how easy it is to deploy it through the Wolfram Cloud. First thought, let’s get started with a little presentation from Chip Hurst, showing you guys how to quickly get started with the programming cloud, so here’s Chip. 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. I’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 and 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 where 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. There 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 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. Now that everybody has been introduced to the Wolfram Programming Cloud, we can go ahead and take a look at my Hackathon project. And for those of you who might not know what the Hackathon exactly is, it’s simply put a 24 - 36 hour coding competition where you can make anything from scratch. So I wanted to lay that little definition out there for those of you who might not be familiar. In addition, I wanted to, before we got started, invite you all to hopefully full screen it, feel free to ask questions—we want this to be as interactive as possible. Now, I’ll go ahead and get started on the project and as soon as that’s ready to go I’ll have a couple of developers join me for a code review for potential improvements and feedback from them. If you have any questions go ahead and ask them in the Q&A pod but other than that we can go ahead and get started. Let’s go here. Like in the video, if you go to you can go ahead and see here that we’ve already got a few options ready to go but I’m going to go ahead and select the programming cloud and going to go ahead and log in. So this is the primary interface for the Wolfram Programming Cloud as you guys probably saw in the video. So there’s another video here if you guys want to go ahead and get started again and if you guys also just want to play around with some of the examples, see another fast introduction for programmers etc., or if you just want to go ahead and create a notebook, which is the primary interface for writing Wolfram Language code you can go ahead and do that. I already have a notebook ready to go so I can go ahead and open it here. And as soon as it loads… I’m going to ahead and get started walking you guys through some of this code. Ill just go ahead and get started and I’ll answer questions hopefully along the way but I’ll just try to keep going through and see if this goes alright. So for starters, like I said, I wanted to have a trip planner function. I want to make a trip planner app of sorts. So we’re going to go ahead and declare a function called “TripPlanner” and we’re going to give it three parameters. So namely we’re going to give it “Temperature”, we’re going to give it “WindDirection”, and we’re going to give it “WindSpeed”. The idea of this trip planner is that if you were ultimately going to enter two cities and evaluate them against each other you can see city 1—here’s the temperature, wind direction, wind speed—and city 2—here’s the temperature, wind direction, wind speed. It’s a super simple app but you can see just quickly and just how easily it can get deployed to the Cloud through here. For starters, like I said, we have three parameters— “Temperature”, “WindDirection”, and “WindSpeed”—they’re followed by an underscore to declare that they are parameters and then this is our little notion for this is the start of a function. So now we have a “With” function and essentially what “With” does is you can provide it a variable here and in any instance that it sees “With” the variable somewhere in there it’s going to go ahead and replace that variable definition with its value. So in this case I’m providing its size and I’m saying “100” and specifically I want it provide it so that later on here, which I’ll get to in just a couple seconds, that our images remain a pretty consistent size—about 100—all around. Now I want to start a row and within that row I want to have the following things. So in here I want to have this IconData of air temperature evaluated at temperature, which is our variable, and I want to show that with the image size of “size”. So specifically I can actually go down here, let’s go ahead and show what IconData can do. So let’s provide it “AirTemperature” and let’s give it let’s say “15” and it shold come back. So that’s essentially what IconData looks like. If you want to see something else, so let’s see “WindDirection” and you can go ahead and evaluate that using Shift Enter. Bam. There you go same idea. It goes ahead and interprets this “15” as its input and then adjusts the icon accordingly. We’re going to go ahead and do “Show”, “IconData” for “AirTemperature” with the variable “temperature” and evaluate that image size “size” and now we’re going to delimit each of our things in the row by a comma. So we’re going to have “,” and again “Show”, “IconData”, “WindDirection”, with the wind direction parameter, again evaluate it at “size” and then finally, once again, we’re going to have “Show”, “IconData”, “WindSpeed”, the wind speed parameter, image size as “size”. And for those of you who want to take a look at what that wind speed icon looks like, let’s go ahead and evaluate that. Same idea—instead of having the direction it just put the number in the icon as well. Awesome. Now that we have our initial function definition, we can go ahead and evaluate that and it will be ready for us to use later on. So we’re going to go ahead and evaluate this cell with Shift Enter. And it should have evaluated and to prove that it evaluated we’re going to go ahead in here and type “TripPlanner”. Let’s say our temperature is 80 degrees Celsius—it’s a hot day— wind direction is let’s say 20 and wind speed is 45. I don’t know where you’ll ever get those degrees and that wind speed but oh well. So bam—there you go. And that’s exactly what we wanted. So we wanted to specify and put everything in a row and then display those icons accordingly all in a row together and that’s exactly what we wanted. So now given all of that, we want to actually then go down here and—hold on one second here, I’ll add these in later— so now we actually want to have our overarching trip planner function. I said, we want to give it a location, first location and a second location, and then we want to have it display that accordingly. So again, same notation as above, specify its parameters and give it an underscore to ensure that they are parameters and then we’re going to, again, signify the start of a function. Now, we’re going to wrap them in a column. So the idea behind this is that we want to stack –for one city we want all of that data and then for the second city we want all of that data as well. And then we’re going to see here that we’re going to have a distance between two points, which I’ll actually get into right now. Here we’re going to specify a new row within our column and we’re going to provide it the text “the total distance is” as well as this GeoDistance function between location 1 and location 2. We can evaluate here. It takes in two entities, so like in the video we can hit Control Enter and let’s give it “Houston” as one —ooh that’s not where I wanted to go— and let’s say “Chicago”. And let’s give it a second to see what that is. So if I hover over both of these you can see the actual Wolfram Language Code for this ends up being entity of city—specifically, Houston, Texas, United States; similarly for Chicago, entity of city, Chicago, Illinois, United States. So now if we evaluate this, there you go. So the distance between Houston and Chicago is 899.246 miles. Let’s get back to up here. So now you know what the GeoDistance function does. And now we’re going to specify again in our columns. We’re going to provide the first thing, if you will, in our trip planner. So we’re going to make a call to our TripPlanner function up here and specifically we’re going to provide it the “WeatherData” call for “location1”, “Temperature”, so that matches up here, and we’re going to then call again “WeatherData” “WindDirection” for “location1”, matches up there, “WeatherData” “location1” “WindSpeed”. And we’re going to call the TripPlanner function around all of that and that is going to render as one entity in a column of itself. And then similarly you can probably imagine for our second column we’re going to go ahead and call “TripPlanner” again and go ahead and provide the exact same things, we’re just going to give it “WeatherData” of “location2”, “temperature” “WeatherData” “location2”, “WindDirection” “WeatherData” “location2”, “WindSpeed” and now that’s all set up just fine. And we can go ahead and wrap that and finish that in our column. So now let me go ahead and evaluate this so that we have the new TripPlanner definition in our code library, if you will. So that seemed to work. Let me get rid of this for now. We can go ahead and call “TripPlanner” again. Let’s go ahead and do “Houston”, “,”, “Chicago”. From this, you should essentially see—or we should essentially see— —the output which would be just the total distance and then a grid of these stacked upon each other, like we said here in this column call and by providing it “TripPlanner” and then the entity in the column and then this is a new entity in the column as well so we can see how this goes. Give it a second here. So there you go – perfect initializing CityData entities and WeatherData entities because of our WeatherData clause. These tend to be a little bit slow for whatever odd reason— —there’s a lot of data that it needs to pull in. It’s doing things. Awesome. So total distance 899.246 miles, like we had seen before, and then it stacks up here with temperature, wind direction, wind speed, temperature, wind direction, wind speed. Awesome. Now, we can end it there but that’s no fun. Let’s actually go ahead and deploy this to the Cloud as a web form it’s an instant web form that anybody should be able to access and from there they can enter their own inputs and it’ll evaluate accordingly. So we’re going to go ahead and use the “CloudDeploy” function and for those of you guys who maybe haven’t noticed already there is built in autocomplete into the programming cloud so if you start typing “Cloud” it gives you everything that starts with “cloud” but we specifically want to use “CloudDeploy” and again here is autocompleting but we’re going to go ahead and skip through that so we want “FormFunction”, we want a to deploy a form and now we want to give it, say, two parameters. So City1 is a city and City2 is also a city. So we specified our parameters. We want to give a function to evaluate at, so we’re going to ahead and say “TripPlanner” of now hash “City1” hash “City2”, evaluate that. We’re going to close that there for the form and we’re going to close the CloudDeploy as well. So that being said let’s also give it an output to render as, let’s say PNG—we want it to render as an image. So let’s deploy this to the Cloud now. Hopefully this works. Awesome. So let’s give it “Houston”, “Chicago”. Remember, as you saw in the video these are Wolfram smart fields aka if you provide it something like “City of Angels” or anything that can identify something as a city it will interpret that properly but if you provide it something like “chicken” it’ll say, “you’re wrong.” So that’s something really nice to have built in to the form— automatic error checking, you know, things like that. So if we submit this—give it a second to evaluate everything and hopefully things went alright… I’m really hoping this goes alright… still loading—and there you go, that’s exactly what we wanted. We can add things to this, such as let’s say boundaries or let’s add a little bit of padding around here, we can make it bigger or whatnot, but for the basic, simple starter project you saw how quick and easy that was. So yeah, I think that would be kind of just the basics of it so hopefully you guys saw just how quick and easy it is to deploy from the Cloud. I think we’re good to go from here for now, so let’s get some feedback. I’ll let Chris Carlson go ahead and introduce the developer panel and once again I wanted to say thank you guys for being here today. We’re going to go ahead and jump into the introductions of everybody and get started with the code review. Ok thanks, Allen, that was a great demonstration of how quickly you can deploy an app with the Programming Cloud and you can do it all in the browser—the development, the deployment is all in the browser. All you need is a browser. So we’ve put together a panel of senior developers to comment on what you just saw. Sitting to the right is Joel Klein who is a kernel architect and joining us offsite is Bob Sandheinrich, who is a software engineer and I’m Chris Carlson, a user interface developer. So, gentlemen, do you have any comments off the bat? Joel: Well, it’s a cool demonstration. One thing that I would love to see is just the names of the cities for the two bars of icons, which one is which? Allen: Yeah, true. I did not think of putting that in. I can actually put that in now and redeploy, if that could work. Chris: Yeah, sure. Allen: Let me just go ahead and type in “location1” and then down here, “location2”. And once again, if I go ahead and reevaluate this, then I’ll go ahead and reevaluate this cell as well. And I can redeploy it too. Hang on a second. Oh, there you go. So now it has labeled “Houston” and “Chicago” and once again if I want to redeploy this, we can go ahead and do that. And everything is pretty automatic, so if I want to say “Houston”, “Chicago” so that it can give it a little bit of time. Just evaluate everything. There you go. So now it has the labels for both cities on it. Joel: Nice. Allen: It was easy. Chris: Yeah, that’s one of the nice things about the Wolfram Language— the code is very malleable. It’s very easy to go in and make modifications and since it’s interpreted, you don’t have to go through a compile step you just have to evaluate and get the new output so you can very quickly go through iterations and develop things. I would like to just make a comment about the output that you get on the Cloud. Allen: Sure. Chris: So, by default what you get is not necessarily formatted really nicely. For example, when you deploy it as a PDF you get a really tight frame around the contents. So you can add a little white space, for example, by using “Pane''. Allen: “Pane”? OK. Chris: So if you just wrap your output with “Pane” and specify images margins of some value it’ll give you just a little more white space relief in there. Allen: OK. Chris: You can also go beyond that. For example, there’s a construct called “Framed” if you just wrap it with “Framed” you also get a nice black frame around it. Allen: OK. Chris: There are a lot of features you can use to style what you see in the Cloud and you can make very nicely refined, professional, kinds of outputs. Allen: And even something immediately like that, so if we want to deploy, like I said here, “Deploy” the “FormFunction” with your “City1” “City2”, but then I specify the output to be a PNG and I know that I could change that output to be, I know even a PNG ended up rendering kind of tight but PDF might give it a little bit of extra wiggle room. It might just be marginal but if I try, let’s say if we do, output as a PDF—I just want to see what that looks like—because then you could choose PDF, PNG, JIF, etc. Just one more time. And these evaluations take a little bit of time but it’s all worth it at the end of the day, I guess. Chris: It seems to be running a little bit slower today. Allen: Yeah. So, PDF ends up rendering it a little bit clearer if I may say so myself. Chris: Why don’t you go back to your notebook and just try adding that additional format. Just wrap your TripPlanner there. Allen. Sure, so you’re saying this…? Chris: No, the definition. Or you can just put it right in the CloudDeploy if you want. Allen: Yeah, sure I can do that. Chris: So put it “Framed” of “pane”. Allen: Around where? Chris: Around “TripPlanner”. Allen: OK. So like that? Chris: Right. Chris: Right. “Framed”, open bracket and then “pane” after frame. And then “frame”, “,” “ImageSize” or “ImageMargins” arrow like I don’t know, say, 20? Allen: And now “ImageMargins”, you’re saying, where would that go? Chris: So that would go after “TripPlanner”. Allen: OK. Chris: After the closing bracket for “TripPlanner”. Allen: OK. Chris: So “,”, “ImageMargins”, arrow “20”. Allen: 20? Chris: Right. So that should do it. Try that. Allen: OK, so let’s redeploy this again. But if this were a PDF it would still, “ImageMargins” would still be fine? Chris: Yeah. Allen: Oh wow, nice. Chris: OK, there you go. Allen: Perfect. Chris: Yeah, so that gives you a little bit of white relief. The frame doesn’t come out so good because it’s on a black background but you get an idea of what you can do. Allen: Awesome. Chris: One other comment was— so what you’ve deployed with just the bare bones “CloudDeploy” is accessible only by you. Allen: Sure. Chris: So if you want the world to be able to look at what you’ve done then you need to specify within “CloudDeploy” “,” “permissions” arrow “public”… Allen: Or down here I can say set permissions and I can say “accessible by everybody”… Chris: Right you can do that as well. Allen: So I can do that. Perfect. And now it’s accessible by everybody? Chris: Now everybody who is listening to this event can type in that URL, you can actually go to what was just deployed and try it out. Allen: Perfect. Chris: Several people asked about the fact that you had two versions of “TripPlanner” there, which were actually different functions, and that is one feature of the Wolfram Language, which is polymorphism. So you can define different functions that have the same name and it chooses the function according to the types of the arguments and the number of the arguments. Allen: Right. So then, I would then also say for those that might be familiar with a traditional-ish programming language, like JAVA, let’s say, that also supports polymorphism, that’s a familiar feature that’s available in the Wolfram Language. Chris: Right. It may have looked like a recursive call but it’s not actually recursive. Those are two different functions that just happen to have the same name. That’s a nice way of documenting that those are actually two aspects of the same function. You did some other things that were just nice programing practice in what you did. Like, for example, using “With” to factor out the size so that if you want to change the size you don’t have to change it in three different places in the code. And another nice thing is that you defined a function—the “TripPlanner” function— separate from the “CloudDeploy”. You could conceivably just do the whole documentation inside your “CloudDeploy” but it’s nice to sort of separate that, you can test it either in your desktop version if that’s where you’re working or in your Cloud and then when you’re satisfied that it’s working that way you want it to you can deploy it with the “CloudDeploy”. Allen: Sure. Joel: One thing that you could add to this is logging. You could, if you were interested in finding out what cities are popular, what trips are people planning, you know, is there something I could optimize? You could always write the inputs to a file, keep appending to that, and go look at that later and maybe make adjustments to that later on how you were doing things. Allen: Definitely, definitely. Joel: You could cash results of the same sets of cities are getting requested, you know, within a short period of time or something. Allen: Right, very cool. Chris: So this is just the tip of the iceberg of what you can do with “CloudDeploy”. And you used a number of our data functions like IconData, WeatherData…there are scads of those, there is just a ton of information in the Wolfram Language—CountryData, there’s CityData, there’s ElementData, there’s ElementaryParticleData, just all sorts of stuff. And you can use those here directly to expand your trip planner. For example, you can use CountryData to get at the electrical outlet type of the country, get an image of that. You can use the mapping functions to put a map of your destination in the output. There are just all sorts of possibilities. Bob is the expert on a lot of those things, how the geographic functionality works in some of these data paclets but there’s a lot to draw on. Allen: Absolutely. And I was going to say even something like getting the two cities’ populations, just kind of compare quick side by side or something like that using CityData just extract a wealth of knowledge really that you can just compare and really expand on the trip planner here. Chris: Do we have any questions online? If you have any questions now you can go to the chat pod and type them in and we’ll try to answer what we can. Somebody had asked about whether this language, the Wolfram Language, is free, so anybody can go to the Cloud and get an account for free, which has a basic level of access. There are higher subscription levels for the Cloud if you’re going to do some serious development. The desktop version, which is Mathematica or Wolfram Desktop, is a commercial product, a paid product. Although, if you are a student, if you are a student, the student license is pretty reasonable and if you’re at a university, many universities have site licenses so you can get Mathematica essentially for free at the university. University of Illinois does, so students don’t pay for it there. Allen: And also you guys can look at this page right here, just give me two seconds, let me get it fired up here. You guys can see pretty much at every tier just the deploy to the Cloud whether it’s an instant API or a form, etc., there are different tiers to deploy to. For the most part you, for just kind of general, recreational Hackathon needs if you will, you won’t really need anything past the free tier. But, of course, if you are starting to scale whatever you build you can go ahead and do explorer, developer, producer—if you start to make a company out of it—team, etc. So yeah, there are different levels that are available within the Wolfram Programming Cloud for deploying. Chris: Let me just highlight a couple of other things that are online that might be useful to people. Ok, so if you go to there are resources for just getting familiar with the language. There’s an introductory video here from Stephen Wolfram and if you just are interested in examples there’s this code gallery here, which has a bunch of typical applications. Some of these also have Cloud deployments in them. So you can visit one of these, I think this was mentioned in the video, it’ll give you an example of how to do something with the Wolfram Language. Most of these are pretty simple, pretty basic. This one is doing face detection in images. Then you can click here, I guess this one is not yet live, you can click here usually to take this example into the Cloud and you can play with it yourself there. For Hackathons, there’s a page here that collects a bunch of resources that would be interesting to people who are thinking about using Wolfram things in Hackathons. There’s information about the Programming Cloud, the Wolfram Language runs on Raspberry Pi, a lot of people are doing interesting device hardware oriented projects with the Wolfram Language, and so on. Let’s see. And there’s also this page here,, that will give you information in general about using the Wolfram Language in the Cloud and getting online. I’m looking here at questions that people have sent in. One person asked, so how does the city field in the input form handle misspellings? You can specify a type, like city, and there are lots of types—there’s cities, there’s countries, there’s web addresses, all sorts of things—that’s what we call a smart field and it will actually interpret what you type in, try to interpret it as a city. And it’s actually pretty robust with respect to misspellings. You can be pretty messy about it and it generally does a pretty good idea of guessing what you intend. That’s a nice feature of those fields— it doesn’t take any effort to get that functionality in your forms. Joel: I can take another question from the chat room— is the Wolfram Language intended to be an easier way to develop web apps and programs rather than using HTML, JAVA Script, PHP, etc.? This is an interesting question because there are a couple of answers. It’s definitely a easier way to develop things on the web. The nice thing is that you can choose—the power of it is kind of in the back end, which would sort of be the replacement for a PHP type of thing but for the front end you can use, as we’ve been showing here, you can use a lot of Wolfram Language stuff to make display artifacts or you can, like PHP, generate all of the HTML, CSS, JAVA Script for your front end from the Wolfram Language back end. A lot of the things that we see in the notebook, they’re driven by the Wolfram Language and showing up in our internal HTML, CSS, JAVA Script. Allen: And I was even going to say that there is built in the Wolfram Language connectivity to MYSQL databases too, right? Joel: Correct. Allen: For people who go to Hackathons, I work as a Hackathon intern so I go to Hackathons on Wolfram’s behalf. A popular thing that I’ve seen a lot of people use the Wolfram Language for is to actually deploy instant APIs. They’re instant restful APIs that you can then call from JAVA Script or Python or whatever their favorite language is. So that’s a really easy, quick way to integrate Wolfram Language with your favorite programming language if you will, while still harnessing a lot of the built in computations knowledge that is built in to the Wolfram Language. So that’s kind of just a little side note I guess. But do we take any more questions? Chris: I think we have time for a few more, don’t we? Yeah. One person asked about the Wolfram Language on the Raspberry Pi. So there are two related questions. One person asked, what’s the relationship between Mathematica —which comes on the Raspberry Pi—and the Wolfram Language? So the Wolfram Language is the language itself. Mathematica is one implementation of that, another implementation is the Programming Cloud and so forth. Mathematica is the Wolfram Language in addition to a development environment and a programming interface. So you can think of them as actually being the same thing if you’re just thinking of the language aspect of it. About developing for the Pi, if you go to, there’s a large community of Wolfram technology users and I think on the right you’ll see a topics bar and there’s a Raspberry Pi thread or a Raspberry Pi group and there are many examples there of using Wolfram Language on the Pi to control cameras, implement a weather station, all sorts of things. So I think if you are interested in those that kind of thing, that’s a good resource for you. I’m sure there is also a web page online, I would guess, about that but I don’t know what that is off the top of my head. Allen: And even on the page there is a little mention of Wolfram Language connectivity to the Raspberry Pi so you guys can definitely go check that out as well. Chris: I’m looking for more questions here. Joel: Is it possible to do an HTTP post in Wolfram Language? Yes, from two senses. You can use the “URLFetch” function to make kind of web request, you can specify the method as post. You can also write your instant API to receive post methods or whatever. That kind of aspect to Wolfram Language is all there. Chris: There’s a question about using data input by the user in the Wolfram Cloud. There are lots of ways to do that. You can import data from a URL, you can input data that you have locally on your desktop or laptop. There’s a new thing that we just rolled out called “DataDrop”, which is a repository just generally for data online. You can very conveniently drop data into a data drop bin and then you can pull that in anywhere, whether it’s on the Cloud or on the desktop with the Wolfram Language. That’s one of the things that we’ve made—making connections to data sources, to other programs, to whatever it is, that Mathematica or the Wolfram Language might want to work with—one of our emphases and we work very hard to make it easy to pull in data from all sorts of sources. Let’s see, what other questions do we have? Who owns copyrights for apps deployed with the Wolfram Language? You do. We don’t have any claim at all on the things that you develop with the Wolfram Language. Allen: So I see a question here— I’m also new to programming and I’m mostly overwhelmed by it. Is the language you use, the Wolfram Language, applicable or the same as JAVA, Python and similar to MATLAB? So if you heard me earlier, I said more traditional languages, like JAVA and Python, I think syntactically Wolfram Language is very different from those two. It’s very function driven, a lot of the data and variables, etc. you get back are either entities or functions, whatever it may be. So I think in that aspect it is very different from something like JAVA or Python. Syntactically it looks a bit different as well. I think the best resources though for getting started about learning it and I know I am still learning it myself— I’ve only been learning it for a couple of months— is really just check out the reference page— There are tons of examples in there, whether it’s instant needs for just deploying web forms or webpages, what not, to actually writing full applications in Wolfram Language. It is sort intimating almost how much there is built in to the language but the docs are superb. There are tons of examples that you can go ahead just play around with so I think those are kind of some ways to get started with the language. And once you start to get the hang of it you can see just how easy it is and how familiar the syntax can actually be. So I just wanted to address that. Chris: One question is asked about whether you can do something more graphically intensive. The thing is with the Wolfram Language including within “Manipulate” the graphics functionality within the Wolfram Language is very strong and you can do very sophisticated things. We haven’t even come close to addressing what you can do and anything that you can do within the Wolfram Language you can do within a “Manipulate”. Of course, you can always implement something which is going to take a long time to compute and your “Manipulate” won’t be very responsive. But generally you can do some very impressive interactive graphics with the Wolfram Language. I think I’m getting the signal that we are out of time so thank you, Allen, for a very nice demo and thank you panel and thank you for attending and we hope to see you at other Wolfram training events soon.

Video Details

Duration: 55 minutes and 20 seconds
Language: English
License: Dotsub - Standard License
Genre: None
Views: 29
Posted by: wolfram on Apr 14, 2015


Caption and Translate

    Sign In/Register for Dotsub to translate this video.