Bestand wählen

1.1 Introducing the Rappture Toolkit

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Erkannte Entitäten
all of a and it was hot only in simulation and will work for new technology Boardwalk you are in this 1st
section we're going to take a look at this rapture toolkit trash
and to help you understand why why were bothering when you take a little trip back through time and the years 1985 and Back to the Future was just out in the box-office
Don Henley was singing the boys of summer and the superbowl
but was going was a 49 years versus Miami back in the day I'm sure you all remember right how many how many of you were born there are array of so
tetris was really big because of what video games looked like back in the day a little bit of a history
lesson and I was working on a program at Purdue at the time and which is called the sequel to point 1 semiconductor electrostatics with quantum analysis that was my program it was written in Fortran Fortran 77 was supposed to simulate a resonant tunneling diode which is actually a what it is is a sandwich of material layers really really thin size material layers and it turns out if you make a sandwich of different materials like that apply bias to it it does really funny things because there's quantum physics involved if you did the quantum physics right you get some interesting characteristics out of this thing trash so here's this
program that I had and it was written in Fortran 77 look at all the ASCII art nicely formatted output I spent a lot of time doing that again back in the day that was what we call graphics and these are the guys in the machine room not really but pretty close back in the day and it turns out if you want to get a copy of that program you could write to my advisor you could send them a letter along with like a 10 dollar bill and he would send you a magnetic tape probably bled off by those guys that had the software on it so I graduated that's what happened they gave me a cap down and said congratulations and we said this agreement that anybody that 1 of the software could send in a 10 dollar bill and get take that was back in the day right so nowadays the same program is available on nano hot and this is what it looks like the same thing the only thing that we did was we put a graphical user interface on top of it so it runs the same engine code but instead of looking like that is like this and instead of a 10 dollar bill is lot of and push the button and it comes up and starts running and it's pretty easy to use just fill in the number of fields and include simulating boom you've got a resonant tunneling diode at your fingertips so it turns out back in the day nobody ever did this I graduated thinking I was gonna make a million dollars over the next Bill Gates everybody wants my resonant tunneling diode program all have to do is sell 100 thousand copies right of the rich of but nobody did this because nobody wanted to go through the bother of 10 dollars and that of the magnetic tape but on the other hand this now on nanoHUB has thousands of users people are using the code because it's free and it's easy and it's available so that's the point for all of you you guys can do the same thing you can take your code your advisers code you can put a graphical interface online put out on nanoHUB and thousands of people will find it and use it in in fact if you look at the stats you can see that you know there's a really great job of tracking stats on the statistics like how many people have access this many questions are out there how many citations in academic literature I hardly ever get citations when I was doing this but now it's actually started its and citations because it's out there and people find it so the bottom line the story the moral of the story I guess is the magnetic tape was 10 dollars and alive simulation tools priceless like the MasterCard commercial so so that's what we're trying to do here for the next 3 days I wanna show you guys how to do this how to take your advisers stinky Matlab code and make it look fantastically beautiful and lived on and off of the total mass that was
thinking right so here's what it is the rapture toolkit states that code and moves it into a graphical interface sits in between 2 and basically manages all of the inputs and the outputs to your to your program rapture stands for the rapid application infrastructure came out a long time ago in 2005 and we've been sort of working out a little at a time however since is available as open source raptured out the ST spoke with the 2 pieces know kind of Internet thing and so the 2 toupees makes a cool and it says that basically creates standard desktop that's the best thing about it is that it works with your favorite programming language so all kinds of languages you may say why don't like for transparent no for trend that's fine and maybe the Java Ruby or Python or Perl or any of those matlab so and we've even added or a few others recently so so whatever programming language you like to use you can take that code and you can put a rapture interface on it will work pretty much the same way and so far we
used it to deploy hundreds of tools on Nanoha than other hubs and Anaheim has about 200 and 30 40 tools right now almost all of them are written rapture just because not because we require it you don't have to use raptured put tools on on on lot of what some people use other things but it turns out it's a whole lot easier to build the tools rapture than it is to roll your own interface with qt your matlab a lot less work so people like it and it's used for other hubs to follow has about a dozen tools knees has a couple of tools and you look at all the different hubs there's a few at least a few on on a lot of the hubs written rapture so there
really 3 parts to the rapture and where start today this morning with the builder of a linear walk you through all the parts by the time we get to Thursday will get all the way here to the tester so you start with the rapture builder and you can count a drag and drop controls and fill information and push a button and it generates saves the information into a file that we call tool that XML to XML description but you XML the extensible markup languages like HTML and so it's just that information description of everything you told it when you're dragging and dropping your so we we say this description everything we need to know about your tool is in the tool that XML then you around the tool of rapture we say rapture Rashid actual run it will read the tool that XML that was generated by the builder and it will generate the interface based on the description so if you told rapture I've got a number and I've got a Boolean control in a curve comes out then the rapture runtime reads that tool description and renders the graphical interface and when you push the button to run your tool tools will write out a run files the run file will have all the information about the inputs and the outputs and everything you need to know about that run and then finally the last part is attested the tester takes the description of your tool and a bunch of test cases that you've written in the past so you can you can get your tool working perfectly and you can generate a bunch of test cases and so on side and then let's say advisor comes back and says I want to add this award should change that I want to fix this change this fixes bugs so then you go to publish again you wanna make sure everything's correct at that point you can run the tester and regression testable run through all the previous test test cases you generated in nature of the matches up if there's a problem all of a sudden if you fix the bug but actually broke something else in the process the tester will catch that will tell you some wrong and then you can go back take another look and fix it so those are the 3 parts to rapture the builder to build your tool the rather this is where when the tools running on and all of its mostly running in this area and then the tester whenever you go to put out a new version of the tool you can test it and deploy any of these tools are at once and gonna you may put up a 1st version of your tools and add some stuff and put up a 2nd version 1 . 1 1 . 2 1 . 5 1 . 5 . 7 . 1 so you get a lot of fun with numbers but anyway put up a lot of different versions of your tool as you keep adding features and that that's typically a healthy thing to do but along the way you want to go on a test nature's work by solar me show you what the
rapture builder looks like when you bring this up which you guys will be doing in just a minute and you get a graphical kind of interface like this over here on the left here and there are a bunch of different control types so things that you can choose from the curves and boolean values and strings and what you do is grab 1 of those and drag them over drag them into the input section becomes an input drag it to the output section it's an output so drag these little objects around you build up the inputs and the outputs for your tool then for each 1 you highlight a particular 1 like this Boolean-valued as highlighted in the bluish purple color and I'll show you all its properties the fill the properties the changes label its description given a default value you keep doing that for all the different controls to configure them and then you can click on the preview tab in the preview tab will show you what your face is gonna look like you can check if doesn't look right and go back in and it's the more look at again preview again and then finally there's a save button up at the top you click on that you can say about your tool that XML file that's that's it that's the builders you've done that much to build something for a so what I wanna do
next is kind what the through that show you what it looks like in real life not just powerpoint and because you guys we do it in just a minute so why don't you know might you watch watch and learn from this is what I'm going to build I want a simple tools like hello world application so it's got 2 inputs 1 input is 1 the hello to I can put in any name their friend or whatever another 1 is a Boolean control which is on you know whether or not I want enthusiasm at an exclamation point to the output so I have 2 inputs coming into my tool and then it's going to generate some output and the output is going to generate is just a string the hello world message and so that's why very simple tools that I'll build and I'm gonna build it with 2 different languages just to kind of show you how it works so build in Python and build it and Fortran but so let me flick bring up my web browser and the work on have 0 and when you doing this work and you log into a half of 1 of the tools that you'll find either on the all tools lists stored somewhere maybe it's on your recent tools 1 of the things you'll see is something called a workspace a workspace is like a Linux desktop that you can access through the whole of any time anywhere and it's where will the be doing most of our work on today inside of workspace so you find this workspace tool and there's a little button right here that you can click on to launch it and if I click here on workspace it'll just take a description of the workspace which I can also click here to launch it and so he the way I can click on you can click on the big black but in the large the workspace or you can click on this little launch button and what it does it is you may have to allow Java do its thing it launches a workspace section back kind of 0 and modern go so well he says something about the inactive plugin right tried again but restora browser after enabling great although they are right so that's why it's
supposed to work the mean bump up my font size you guys can see what I'm
doing right so this is what it looks like we're workspace comes up and if you have any problems with Johnny got very fast with it make sure a job is enabled of job is disabled level of problems just adjusted so I said Nauman workspace and I have a command line here
where I can type stuff but you can see I have a bunch of files here these are all in mind on the hub 0 side and go into my boot camp 2012 in the lectures and I'm going to make a directory called hello for hello world OK so now I'm in my directory I can say rapture dashed builder and it'll bring up the builder program right so this is
what you guys are going to do you know rapture dashed builder and you get this screen you can browse through all the objects on the side and see what's there and I'm going to start by grabbing a strange and dragging it over to the input and dropping it and I am a string right and I also wanted a boolean value and I'm and drag that in and I have those 2 values I think I can figure them this name right here is the name will use inside program will see that in a minute rather than calling value 1 that's what rapture calls it by default I'm gonna give that'll a little better name but under call that name that's the name of the person and a label it on the gooey say hello to so that's so I'm gonna say hello to a description you can say this is who we say hello to and there's some other stuff that we'll talk about later on and I can put in a default values like world so by default I got this string control now it's it's labeled sale 0 2 and the default values world right hello world now under look at the boolean value the same way and this what I'm gonna call in my program a colored explain so that's the name it'll have analyzes callable inequality enthusiasm and the and the description is and then x Club and nations point and down in the default value well set it to be false so you have to ask for enthusiasm to turn it up now 1 of the things I want to produce an output so I can drop a string control and drop it over here on the output side and the output of give it the name result and the that hello output and this is the output generated by Hello world alright so now I've got an interface I've got 2 inputs the string and the boolean value is going to produce a string called result as the output side pretty much describe my interface and I want to take a look at it so I can click on preview when I couldn't preview tells me all this couple of things wrong there 3 mornings for the current tool definition you wanna take a look at and yet are I was take a look and see what I messed up so yes and I'll show you up here each warning it says 1st of all I should have a title that describes the tool only I forgot completely adding and look at the tool part when I was explaining all this to you so let's make up a title this is on a call this simple but simple Hello
world at and then I clicked next and it gives me a description OK says you should have a do brief description of the tool is usually pops up when you 1st doing and so the description is demo apt for boot camp 2012 OK and the next and then it says OK dataset the program tied down here so if you click you this is highlighted the click on that will show you these are all the different languages the rapture supports and depending on how I wanna do the demo I can pick any 1 of these so for right now and this are off with Python in guys know Python seen by them before there are I will make sense to a few of you I guess of so let's see what it looks like and there's no more warnings so I'm all done here now so I can click on preview again and now chose
the preview died in a sense so this is what the program is going to look like in a minute when I start to run it and you can very quickly take a look and see does everything look right I I forget to label something that have a good description you notice all the descriptions that I gave and will show up as as tool to so mouse over here say hello to world and then the little pop-up messages this is who we say hello to right and similarly the the Boolean value an exclamation point so if I flip back you can see again a change in the message then I can just change any of these input or the default value and so forth right so all that looks good to me and undergo had now and save this sort click Save As and choose 1 and I can choose to save it to any file you noticed by default it says tool that XML that's kind of rapture conventions that we always say into a file called tool that XML you can change it if you want to but others keep that and I can also have it generate a program forming a skeleton program that I'm going to fill in with the logic for my program and that's a good thing it's probably a good way to get started especially if you're just getting started with rapture sort choose this main dot pi or I can I can get a different to if I click choose I can change whatever name I want me not higher whatever that's finally let alone and I'll say saved and then I can quit the program OK now if I look around you notice that my generated to files generated may not high and tool that XML let's start quickly with the tool that XML just curiously see what's in it and you can see it's an XML file you know XML as little diamond braces and a bunch of mock up that explains all the bits and pieces and you can pretty much see what we did in the interface here you can see for example this part right here says that we define defining a string whose name his name any any it has a label say hello to it as a description this is who we say hello to in default value of world so pretty much everything is on the builder you're seeing here except it's saved out now in this XML format by so that's the XML file now
let's take a look at the main program this is the main program that generated by the rapture builder and has some gobbledy-gook that's all in this case all set up for Python is is what you need the same type in Python you start out by importing the rapture package and you might want to bring other things too like system map those a common libraries and it starts off with some stuff to open rapture fractured out library and it says I O that yet and I would get know that so this stuff these statements are actually reaching inside that XML and getting the value of the thing called name and this reaches inside the XML and gets the value of the Boolean can the Boolean control of called exclaim so now I have these 2 variables name and explain that represent my 2 inputs that's what I'm trying to get at the interface and if I scroll down a little bit you notice it says right here at code here for the main body of your program so I generate a skeleton it's got the skeleton of a program 90 to fill in the middle with the stuff that I want to do and then at the very end you can see that it's doing I O . output and it's stating that result variable is sitting out the the string called result so what I'm gonna do is on a fix up the middle part here will just get rid of the progress stuff and and to add some code here but basically so that the whole world application the whole point of it is to build a result string and the result string is basically hello plus on my name variable in hello world a hello friends right so that's basically it but I added a wrinkle to make it just a little more fun that the explain is turned on then I wanna add on an exclamation point there so when explain this set land exclamation point to the set into the so that's the guts of my program and you notice I'm using all those variables that I declared in the rapture builder on my inputs are the variables name and explain and my output is the variable results which was automatically set up here to be saved as an output it's on you those names we defined earlier important they become the variable names in your program so now I can say this and now my
programs all set to go off I wanna write it I can just say rapture and this rapture by default if you say nothing else will look for the tool that XML file in the current directory will read the tool that XML and will generate the whole interface you notice it's got the title that we set for the application is a simple hello world that has as demo at 4 camp 2012 so that's the descriptions stuff that we sat on the talk page you noticed that it's got last sale 0 2 and the enthusiasm patrol here and I really don't have to do do with where h normally set up everything has good default values I don't have to mess with it I can just click the button all your tool should be set like most users don't know what to do or limited up when confronted with a page like this so the best thing is that they can at least click the button and it works when you're in good shape so we click the button it went off and ran my Python program and get better result Hello world Melanie tried again I can try something else I can give it a different name like Fred and I can turn on the enthusiasm and I can run it again and now generates hello Fred with an exclamation point and we ranchers built you can run lots of cases like this you can actually go and flip back and forth between the results so we can try lots of different things up so now we have 3 different results the original Hello world the hello Fred with enthusiasm and hell of again so I've got all those different results that I can browse enrapture interface actually like select cooler when you have graphs is stuff that you can actually flip back and forth between the graphs instead just where messages but I have I wanna make changes I can go back into the builder rapture dash builder and I can load
up I can open that existing tool that XML file and everything is right back where I left it so I can make changes to name and exclaimed and all that so maybe maybe I want the default value to be true for the exclaimed I can do that and I can say that know when I go to say that again I may just want to change the tool that XML file if i regenerate the skeleton program at this point it'll actually overwrite the changes that I made right so if I regenerate may not pi will basically wipe out the body that I had stuck in there and that's no good so if you do regenerate the skeleton program was probably regenerated and different files otherwise been wiped out the work you did but in this case I'm not going to do that I'm I'm not going to generate the skeleton of just change the tool that XML and I'll say that and then alpha rhi rapture again you notice now
enthusiasm is on by default because that's what I did I change right so you can kind of back and forth with the builder make changes tested and when you get to a point like I am now where everything is working properly then your tool ready to go on in all of you can actually deployed put it out and other people can use it OK alright so that was my
demo taken the 2 inputs from producing string output always unity in Python and showed you for trend to write this part of the how
many people use water and how many people's grandfather's for training a few outlying come and I know your grandfather's is Fortran of go back into the reactor builder and I'll leave everything just as it was only
I gotta open my file again so everything is just as it was except now I'm going to go into the tools section and I'm going to change the language to Fortran click on OK so now it's Fortran 77 and I'm gonna say that and I'm going understand the tool that XML generate on main program for for trend may not have and I'm also going to generate something called a Makefile we have for trend for trains an old old man's language to compile it down to machine code so that you can write it right and when you want compile it there's a certain thing called a file that makes it easy to compile and in fact rapture makes it even easier because it generates the Makefile for you so if you just click on that button and get a Makefile right used to build for track so honored below from get the tool definition the skeleton program in the file and click Save now if I take a look you can see there is a makefile there but what's right there the Makefile shows these are the rules that I would use to build rapture and and to build my program not have so showing all that and I'll send the program that f and I need to fix up to and again this is the skeleton that rapture generates most of the way there it does the Fortran way of managing rapture it defines and stuff the reaction needs and it to variables at the top and a dozen stuff to decline open up you know is doing roughly the same thing it's still trying to get the variable called names is producing something called name and it's still trying to get the the boolean value for exclaim and setting that variable to exclaim as well as the dual of the more stuff there still a middle part in here where you need add your code and then there's a part of the N word saving the string result so pretty much the same as Python just a little different language in terms of our works again the recipe is going to get rid of this stuff in the middle and I'm put my own stuff in here so I'm add an if statement if explain but then result is hello and concatenated with the name concatenated with the exclamation point otherwise I just take hello and concatenated with the name so that said I just added in that little bit code can produce the
string I want result
and and now have to compile its I type make them what make does books but a just give a couple of warnings for unused variables How clean them up and like have warnings to back into my program I've got the variable OK and API and convert double that were really being used again when you say make it invokes the compiler rule with all the right libraries to build everything and link it all together and at the end of that now i have an executable program and the executable program we call mean 77 so if I look sure enough there's a program their main F 77 so that the actual executable that raptures gonna run when you're doing your simulate and L-type rapture and it looks like the same program as the same interface world and exclaimed and that these that when I clicked simulate because often it runs the Fortran version now and it builds that result probably wouldn't believe me unless unless proved it to but we can take may not have and change it to a set of hello all just make it 77 and remake whenever you change a program in fortran you always have to rebuild remake it and then run rapture take this as a 77 world which makes no sense but at least you know it's a Fortran program that is running now under the hood so that's how it works and again the tool that XML is something that you you figure out once and it doesn't matter what language you're using in the builder you can choose whatever language you want and then you build a skeleton program and then you go from there can connected up to the guts of whatever you're trying to do we have some programs and then all of that aren't even 1 thing it'll be rapture calls a Python program the Python programme execs the Fortran programming matlab and half a dozen other things takes all the results but some together produces the final result so you can build really complicated systems if you want to with all of this but it all works pretty much that way by alright
so now that was my demo build a simple interface and show you 2 different programs Python and Fortran so now I want you guys to try and what you did in your workspace now should be everybody authorized for workspace alright so you should be good to go to be able to get into new or have 0 into workspace and so on what I want you to do is build a program or whatever your favorite program what language is whether it's pipe for whatever you feel comfortable with Perl tickle I don't care on the pick a language that you're comfortable with and I want you to build a program that has 2 integers are coming in and you can sum them and produce integer result right so for example you could have you know 2 plus 2 and you get the answer for right is 2 plus 2 is 4 and so your program when you're running it should look like this should have 2 images on the input side and when you click the buttons you're going to get a number of resulting integer result on the output side when don't be surprised when rapture shows you an integer value will show it to you like this on a graph which is kind of weird you might think you would just print out the value like 4 on but is actually more useful to see it on a graph because again you can simulate again and again and again you can stack of a bunch of results and you can see him on the same plot so 1 so it's kind of more useful to have plot but this is what the final program will look like it's 2 images on this site and an integer and decide which shows up as a plot when you're running it so if if you do everything correctly that's what you'll see now when you're getting into workspaces having you guys if use Linux before you like Linux gurus good you those of you who have never seen Linux before or command line prompt of don't worry we'll throughout the out but Derek here it's got some some sheets that he's going to pass around other work workspace reference and let me also show you we have all the materials for this on the on the website to if you are if you can remember anything else in your trying to figure out like where do I go over documentation if you could just remember rapture with two-piece rapture that a word with 2 pieces it will take you to the rapture website with all the documentation and if you search and therefore boot camp who have to spell right but you'll find get 2012 right that's us boot camp 2012 and on this page on rapture out organized bootcamp 2012 you'll see the outline and you'll see all the materials and you'll also see this workspace reference that Derek has here is passing out so the workspace reference will kind of help you get started you logging in to workspace high you launch it all that energy is again a cheat sheet of various things that you want to do what I they to suggest for each lab assignment start with a fresh directory so for this 1st lab assignment use that make the command and K. DIR right near the assignment 1 whatever lab 1 where everyone call it make yourself a fresh directory and then you can use the CD command change directory so you make the last 1 and then see the in the lab 1 and then launch the builder and go from there each lab assignment you're going to have a separate directory otherwise when you start the next lab assignments can overwrite the tool that axonal from the 1st lab assignment errors can be all balled up right so glad and log in to workspace the which shows on the left hand side here and from there you some of these commands like make during CD make yourself a lab 1 directory change into that directory and then you can go ahead and launch the rapture builders and if you like Deng I wish I was listening when he was telling me all that stuff about the builder here thinking that don't panic because you can just go back on the boot camp and you can find right there all the slides that we just looked at right so remember raptured out or would actually to two-piece go on to that search for boot camp 2012 and on the boot 2012 by the way the earlier book games 2011 20 29 don't don't get confused because the older of labs the yield a cancer not too good enough so today so look for camp 2012 the 1st stuff and there is the all the slides for introducing rapture right there so you can pull up the PDF and use as you cheat sheet and also the the sheet the deer and passed around and if you have any questions were then like the next half an hour working our way through lab assigned I'll put back up on the screen here and there but if you have any questions want you work through it called people over right we got George here we have then we get derrick and I'll be walking around to all happy to help you guys with questions so give it a try and see what you can come up with our but certainly say my solution is found for this particular lab assignment so you member were trying to build this program it takes to integer values and produces an integer result and it's it's real important we use images so the rapture can kind and force the interface so
here I am overran my workspace and have 0 I'll go into boot camp 2012 and I have all these directories on their use like file folders to keep everything separate so you can see a lot of stuff here and have 0 . org working a lot of different projects and the easiest way to keep things straight is to to make directories so I've got this directory and you notice on such a lazy type I can just type B 0 and hit tab and all types everything else for me this pretty antique so it takes as much as it can and then waits for metered finish the rest what was it tried that 2009 2011 2012 so I can go into bootcamp 2012 and look around and I've got these 3 assignments lectures and solutions folders so I'll go into solutions and again I type S. O. taboo and it fills in the rest forming and I can look around and then I can go into exercise 1 if I wanted to I could make a new directory and I've got 3 solutions here 1 4 C language 1 for for training 1 for Python but but but others make a new solution directory new sizing make during you and I can see the 2 new and now I have a nice fresh clean directory where I can keep all my stuff because remember when you run the builder it's going to generate a tool that XML and Make file in main program and all that stuff and you what to get lost with everything else you're doing so make yourself a clean directory that around rapture dash builder to bring up the builder
and out of all these different controls I try to pick the most specific 1 and you know you could grab for example a string over here and use string is an input value but that means that anybody could type in whatever string then what they I have to use integers they could type in x y your Hello world and when you get into Matlab senior trying to add hello to world as numbers not gonna work right into trouble so forget about the strings for that'll mess you up when you you've got a control you don't want a little delete button here over to the side I can click delete and that goes away so instead I'm going to grab an integer and put that over here you noticed there is also a number in rapture the number rapture led to have fractional values so if you want to have a number like 2 . 1 7 or 3 . 1 4 1 5 9 you can use a number for that number also as physical systems of units will be learning more about as we go along so you have to ask yourself in this case and suppose to use that can I allow new number values with fractional values double values with units or is it an integer this I here is images on a stick with integers but there's a subtle difference if you're trying to have a number of grid points for example you can have 2 . 7 grid points right that has to be an integer 100 grid points thousand grid points you can have you know fractional values so think about the controls is you're dragging them over make sure you got the right once again I can always produce string output but I wanna string output I want integer outputs I can plot so well so I've got 2 integers coming in and the reading the first one anyone help prompt the user 1 by saying and this and given a default value should always give a default value effective I don't wanna go to say this do something preview raptures going to yell at me and tell me there's errors and warnings after fix up Sunday given a default value whatever you think makes sense I'll say 0 and then the other 1 and the renaming it to and to that a nice variable name in my program and 2 and I'll label it can do this and I'll give it also a default value of 0 and then finally on the output side and then rename that to some and this is our call some on some of the 2 inputs so now I can try to preview and see what I'm gonna get out 5 warnings for the current tool definition going to take a look at that as will take a look and again it's telling me I should have a title a collapse of number 1 number 1 and then the next day and I'll tell me a description solution or allowed number 1 and next and it'll tell me any choose my program OK and so lot you guys and using Matlab and that's good because it's easier may know it already I'm going to use on a you could use matlab i'm gonna choose active and I'll tell you why it's the same as Matlab like 99 per cent the same it's the same language same everything it doesn't quite have as fancy but it also doesn't take as long for the whole program to start up when that starts up man takes a long time for that you really come up and that's nice when you're sitting there working with an interactive later but it's not so nice when you have a program that you try to run in the blood as some of you found out and so you may not be able to tell the difference between active in Matlab as far as raptures concerned because it's just it's running your script under the hood and just the same programming language basically on plus if you like free software go going to free software then you you minimize will use active and supportive and so anyway and because it's not licensed software you'll actually find out lot more places when when we deal with Matlab we have to be careful we have to make sure Peru people are using Matlab and then the all this stuff which is why we ran into the permission problems with some of you guys which we sort of worked around for now there's a better fix on so the with with matlab there's all these headaches that deal with commercial software and all of that on all the other hubs you'll find active as a standard things in linux it's on all the other Hobbes so when you run into a roadblock with Matlab just which active because chances are you won't notice the difference the syntax is all pretty much the same unless you're using the tool boxes and stuff like many keep working through might get down on my soapbox and keep working through my in my notes and it's asking for a description and another description and that's pretty much it so I didn't bother with those 2 descriptions of I try to preview now still so there
2 warnings but I'll just say I don't look at those problems and so on ahead so if the warnings of benign or you don't want fix summer whatever rapture keep nagging you about it but don't worry just move on and the so that got an interface where the 2 images coming in default values 0 and produce an output integer which is the sum of by so I can save all this so I'm going to go ahead and say that and still lagging about all those mornings I really should fix them but I might use a tool definition files in this directory tool that XML and I have generate a skeleton program and there's no need for a file with octave and Saudis have generate that save it and quit now so now you can see my 2 files there tool that XML has all the XML code it with the images of all that in mind this is my main program generated by the rapture builder and you can see that it's basically pulling out the variable anyone here and variable and 2 and then at the very bottom of the program it's sitting out the variable some right here converting it to a number and then the number to a string basically and saving it back out so what my job is to fix up where it says add your code here right that's your marker that's where your code goes if your program runs for a long time you can put out all these you to our progress messages you can say you know program starting don't give up on me don't give up on me 10 % done hang on hang on 20 % done so if your program takes a long time to run it's a good idea to put out this progress messages to the user is likewise it hung up you know so you can say what's happening in your program in this case the programmer and so quickly it's even worth putting out the progress messages or get rid of them and what I say instead it is the sum of the equals n 1 plus 2 so that's what I wanted to do basically you know 2 plus 2 is 4 and then write out the sums so that's the whole body of this particular program you noticed this all looks like matlab syntax right here if you know matlab this is basically the same stuff all the stuff you can do in matlab you can do here in octave it's a clone of of
Matlab right so I say that out and now I can run rapture and a property now hopes for the 2 values so I can plug in 2 plus 2 and simulate and it's giving me a hard time and that's giving me a hard time sometimes it gives you a hard time because you haven't got the right use thing so if I say it but you have to make sure that have but I do and so you have to make sure that you're using the right program right and a lot you guys ran into this because you got right to where I did it was like dying it it doesn't work in the next section show you how it all works under the hood and how to debug all of that but 1 of the 1st things you could run into is the fact that active may not be working so you gotta make sure you get the using set up if it is set up you should see a star there so I've got active set up and if there's any doubt you can you can say use again and make a persistent and Missy beyond that I must have some kind of syntax error in what I did not active so you say you say just into when he but in and to a double or a try Derek solution was if their got to close to 4 or so in 32 years to work in older versions of active in order to convert to an integer lattice so the skeleton must be generated something a little funny or something that check on that 1 and we'll talk a little bit more about debugging in the next section at like too far into the debugging stuff is were and you have to death in the next section of that we show you quickly 1 more solution because some of you guys did us a language so again I can do rapture dash
builder and I can open my tool that XML and again preview at same interface but this time under the tools section i'm gonna choose something else i'm gonna choose C language as my target language and when I go to say that I got a tool that XML and I can have it generate a skeleton program a Makefile make sure you do the Makefile I saw some people generating skeleton program but just try to compile it by hand it's too hard to compile it by hand because a gaggle right libraries and include files and everything so when you're dealing with something with this option to generate Makefile make sure you generate a Makefile that's very handy so again the same this now and I can get in and edit my program so here's the the program that are generated for me in se and again you can see it grabbing the value for anyone and the value for n 2 and producing some were so again and there's a sum equals n 1 plus N 2 that's basically the body of my program in C language and I'll say that out and now that's not enough I have to actually make it and I generated this nice Make file that's explains how to build my program and now that got it I can just say make and it's given me a warning about an unused variable I can go in and clean that up line 18 I think it said were so did like that that wasn't used so I can say make now builds cleanly and you notice is all the libraries and everything at the end of that there's a program there it's called the programmer builds is called means and so we're ready to run I can run rapture and give it a value like 3 and 5 and simulate any gives me the sum a notice that I give a different values like 3 and 7 monogamy tender and forgiving 3 and 12 will give me 15 and I can go back through all of the different values and i can also click on the all button the kind of plot a once and so when you simulate a bunch of cases in rapture you can actually get a bunch of plots this this feature is actually more handy now you're dealing with something like 2 plus 2 equals 4 but imagine that you simulating something as a function of temperature and you wanna try bunch different temperatures and at each temperature you get a number and then by trying to budget temperatures you can plot all you can actually sort of build a curve of how it varies versus temperature various versus pressure all the different things that you can change so so this is kind of in in the feature this plotting thing and that's the reason set up that way you notice also because I used an integer value here if I try to type in x y z where it really there so rapture does all this built-in error checking if you try to type something funny and it's going to give you an error I even if I tried it I 2 . 2 1 4 7 2 4 whatever it is a problem with that and so so if you are it and the integer control also has little buttons built so you can just click the buttons to change the value of which is another little feature so if you use the right control in about a 3rd of the type that you're trying to to deal with it will give you a better version it'll it'll do all the error checking properly it'll give you built in things like the little buttons on the shows the most specific you can with all the rapture controls and and what you're intending to do
Domain <Netzwerk>
Gewichtete Summe
Ungerichteter Graph
Lineare Regression
Skript <Programm>
Generator <Informatik>
Lemma <Logik>
Einheit <Mathematik>
Ordnung <Mathematik>
Große Vereinheitlichung
Oktave <Mathematik>
Mathematische Logik
Virtuelle Maschine
Weg <Topologie>
Konvexe Hülle
Plug in
Binder <Informatik>
Wort <Informatik>
Boolesche Algebra
Prozess <Physik>
Weg <Topologie>
Natürliche Zahl
Fortsetzung <Mathematik>
Spannungsmessung <Mechanik>
Lineares Funktional
Plot <Graphische Darstellung>
Konfiguration <Informatik>
Arithmetisches Mittel
Spannweite <Stochastik>
Oktave <Mathematik>
Projektive Ebene
Objektorientierte Programmiersprache
Web Site
Bildgebendes Verfahren
NP-hartes Problem
Kollaboration <Informatik>
Physikalisches System
Objekt <Kategorie>
Innerer Punkt
Demo <Programm>
Umsetzung <Informatik>
Quilt <Mathematik>
Geneigte Ebene
Deskriptive Statistik
Metropolitan area network
Befehl <Informatik>
Shape <Informatik>
Kategorie <Mathematik>
Güte der Anpassung
Gebäude <Mathematik>
Rhombus <Mathematik>
Rechter Winkel
Dynamisches RAM
Baum <Mathematik>
Open Source
Lesezeichen <Internet>
Arithmetische Folge
Delisches Problem
Demo <Programm>
Materialisation <Physik>
Open Source
Profil <Strömung>
Statistische Analyse
Elektronische Publikation
Formale Sprache
Kartesische Koordinaten
Skeleton <Programmierung>
Einheit <Mathematik>
Prozess <Informatik>
Funktion <Mathematik>
Inklusion <Mathematik>
Twitter <Softwareplattform>
Funktion <Mathematik>
Ganze Zahl
Autonomes System
Gebäude <Mathematik>
Quantisierung <Physik>
Elektronische Publikation
Mapping <Computergraphik>
Formale Sprache


Formale Metadaten

Titel 1.1 Introducing the Rappture Toolkit
Serientitel Rappture Bootcamp
Teil 1.1
Anzahl der Teile 12
Autor McLennan, Michael
Lizenz CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
DOI 10.5446/18185
Herausgeber nanoHUB
Erscheinungsjahr 2012
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract 00:09 Introducing the Rappture Toolkit 00:15 Take a trip back to 1985... 01:35 Now back to the present... 04:22 Introducing: The Rappture Toolkit 05:26 Used to deploy hundreds of tools 06:05 Three parts 08:47 Rappture Builder 10:14 Demo: Hello, World! 32:21 Assignment #1: Build a simple Addition tool

Ähnliche Filme