Difference between revisions of "How Complex is "Personal Computing"? (2009)"
From Viewpoints Intelligent Archive
(Created page with "{{#evt: service=youtubeIA |id=HAT4iewOHDs |alignment=left |autoresize=false }}") |
|||
Line 3: | Line 3: | ||
|id=HAT4iewOHDs | |id=HAT4iewOHDs | ||
|alignment=left | |alignment=left | ||
− | |autoresize= | + | |autoresize=true |
}} | }} | ||
+ | |||
+ | <subtitle id="0:0:7">so I'll just put thing you guys whoop I should</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:10"> get your signature back</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:13"> I was just gonna write the name of I'll put</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:16"> it over here so the the basic</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:19"> apologize</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:22"> in advance for a couple of things</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:25"> one</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:28"> is one is the</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:31"> brevity and the</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:34"> kind of livid is a navy term for five pounds of</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:37"> shit in a one pound bag and so</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:40"> we have a lot more information</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:43"> that we'd like to talk to you</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:46"> about but we haven't ever been</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:49"> able to fit it into an hour and</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:52"> so we're gonna try to give</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:55"> you the gist of some of the things that we're</subtitle> | ||
+ | |||
+ | <subtitle id="0:0:58"> doing but this website</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:1"> Vpr i.org</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:7">maybe our talks are kind of a commercial</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:10"> to just have you look</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:13"> at some of the stuff there so I'm just gonna spend a few minutes giving</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:16"> you the context</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:19"> for a project that</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:22"> the NSF reviewers turned the</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:25"> preposterous proposal when they turned it down</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:28"> anybody ever been turned down by an</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:31"> NSF peer review now</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:34"> it turns out that the program managers at NSF</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:37">have always had the power to override those and in</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:40"> this case the program manager</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:43"> did override it so we got our money anyway</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:46"> but they only gave us money to</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:49"> cover about half the expenses of this project so we</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:52"> raised a matching amount of money</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:55"> to do it it's a project that a</subtitle> | ||
+ | |||
+ | <subtitle id="0:1:58">number of us have been thinking about for as</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:1"> long as 30 years that would be really interesting</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:4"> to do and</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:7"> it would be very much in the original spirit of</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:10">computer science was supposed to be as articulated</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:13"> in the 60s by Al so</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:2:19"> that kind of starts</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:22">quintessential Maxwell's equations t-shirt</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:25"> and</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:28"> this is one that everybody's seen</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:31"> and if</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:34"> you're familiar with Maxwell you know that he actually</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:37"> wrote five papers arriving</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:40"> at these conclusions and in five different ways he</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:43"> did this over a period of years using different</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:46"> models and the original form of</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:49"> maskull's equations was not fiddle on a t-shirt</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:52"> so this form was actually</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:55"> made by several people including the</subtitle> | ||
+ | |||
+ | <subtitle id="0:2:58"> Germans who were much more interested in it than the</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:1"> British in</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:4"> no small part because Maxwell's</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:7"> equations violated Newton and Newton was</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:10"> a god Maxwell was only their best guy in the</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:13"> 19th century but Newton was</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:16"> a god and of course the interesting</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:19"> thing about getting him in this form is</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:22"> although Faraday's</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:25"> experiments showed that there should</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:28"> be a symmetric relationship between the electric</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:31"> and magnetic fields the equation didn't show</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:34"> those relations as symmetric</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:37"> and this asymmetry and this way of</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:40">things led to Einstein's theory of relativity and in</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:43"> fact a much simpler form of writing these</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:46"> guys down and reason</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:49"> I'm putting it up there is I had a similar</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:52"> experience when I was in graduate school</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:55"> trying to understand programming languages and I looked at</subtitle> | ||
+ | |||
+ | <subtitle id="0:3:58"> the bottom of page 13 of the list 1.5</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:1"> manual and here was McCarthy's</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:4"> formulation of Lisp using itself as a</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:7"> metal language and how</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:10"> many people have had the experience of going</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:13"> through this it takes a couple of hours on a Sunday afternoon</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:16"> to do and you run out of fingers because</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:19"> you have your fingers down in all the places that recursos</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:22"> and reenters and so forth and</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:25"> I felt I understand stood it when I found in this</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:28"> code there is one bug and</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:31"> the thing I got out of</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:34"> it is boy after those two hours I understood</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:37"> what programming languages were about a factor of a</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:40">hundred better than I did before I went in because</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:43"> McCarthy had carved away all the bullshit and</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:46"> God that's something that was</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:49"> more powerful than any other programming language of the day and more</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:52">powerful expressively the most programming languages today</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:55"> and had</subtitle> | ||
+ | |||
+ | <subtitle id="0:4:58"> done it in this interesting</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:1"> form and in</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:4"> fact it had a lot of effect on subsequent</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:7"> things that were done and because I had a math</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:10"> degree I just love this stuff and</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:13"> so we</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:16"> tried these ideas a number of times on various</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:19">of the stuff we did it Xerox PARC</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:22"> that</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:25"> gee you can do</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:28">programming language in under a thousand lines of code or</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:31"> you might be able to do it in the page and there</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:34"> are advantages to the page for</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:37"> sure so</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:40"> so</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:43"> the thing we were speculating about is</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:46"> do you it'd be really interesting if</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:52">you could apply this way of looking at</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:55">processes to an entire system that's well</subtitle> | ||
+ | |||
+ | <subtitle id="0:5:58"> understood like personal computing so</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:1"> we have now this interesting idea that if</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:4"> science is the study of and modeling of</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:7"> phenomena in order to understand it better we actually build</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:10"> artifacts that exhibit interesting phenomena</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:13"> and what John did is</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:16"> to take the phenomena exhibited by programming languages</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:19"> of the day and find an abstraction that</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:22">abstraction happened to be more powerful than</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:25"> the ones he was looking at which is kind of an old mathematicians</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:28"> trick you know solved the more general problem</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:31"> if you can and so</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:34"> the idea here was be</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:37"> interesting to take this body of behavior</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:40"> from the end-user to the</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:43"> metal of the Machine and</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:46"> try to understand it by right</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:49"> making a model that you could actually run it would generate</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:52"> the same phenomena and so</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:55"> how many t-shirts would it take to do all</subtitle> | ||
+ | |||
+ | <subtitle id="0:6:58"> of personal computing that's the question here you</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:1"> can see why they called it preposterous right</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:4"> because Microsoft's version of this is a few</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:7"> hundred million lines of code their</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:10"> operating system and the same</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:13"> Microsoft Office is about 220 million lines</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:16"> of code but if you think about</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:19"> it with the view of well what is it doing really</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:22"> and how many things in it that</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:25">decided to do differently for example are</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:28"> actually the same thing masquerading under a few</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:31"> simple parameterizations and and</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:34"> also the first time around that this stuff was done</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:37"> it was only ten thousand lines of code it at</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:40"> Xerox PARC and there's not a lot more</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:43"> functionality now</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:46">than there was back then so the idea is this could</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:49"> be a lot smaller and be very</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:52"> interesting to see for the same reasons that these</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:55"> two guys are interesting but this would be look</subtitle> | ||
+ | |||
+ | <subtitle id="0:7:58">what our project is</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:1"> and there's one more tea involved here</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:4"> which is we one</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:7"> of the things that's nice about making</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:10"> things small and simple is you got something like</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:13"> a Model T Ford which any 12 year old</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:16"> could take apart in the barn over</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:19"> the weekend and put together only had about 350 major</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:22"> parts in it and about a thousand</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:25"> screws and nuts and bolts and stuff so anybody who</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:28"> grew up in a farm like I did</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:31">where there's still Model T trucks and</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:34">in the 40 they would be routinely taken apart they</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:37"> recently were still around this you couldn't couldn't really kill</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:40"> them because everything</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:43"> that broke on them was fixable in the blacksmithing shop</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:46"> that every farm had back then there was nothing true they didn't</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:49"> even have a distributor they didn't even have gears</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:52"> they had belts</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:55"> and pulleys on them so</subtitle> | ||
+ | |||
+ | <subtitle id="0:8:58">but they're a real automobiles so they had this interesting</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:1"> thing they caused even though their automobiles</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:4">before them they caused the automobile revolution</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:7"> in America because they were so easy to manufacture and</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:10"> they lasted well and so forth so just</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:13"> one bottle T story</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:16"> the</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:19"> gap the spark gap on</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:22"> Model T was</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:25"> optimized to be the width of a dime</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:28"> and somebody asked Henry Ford once why did</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:31"> you do that and he said well people always lose</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:34"> gauges but they usually have a dime on them so</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:37"> he's fully expected anybody who's had one of these things</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:40">would be able to just fix it and tweak it up and that's</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:43"> what happened so it's a nice metaphor</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:46">so</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:49"> my theory is before you write the Ferrari code you should write</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:52"> model-t code because there's</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:55"> a 12 year old kid who just isn't gonna be able to understand</subtitle> | ||
+ | |||
+ | <subtitle id="0:9:58"> the Ferrari code and you have a moral obligation to</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:1"> write that Model T code that is understandable</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:10:7"> so</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:10"> kind of the standard model for personal computing</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:13"> is from the Xerox</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:16"> PARC</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:19"> experience and so</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:22"> the bitmap screen that can display anything and a</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:25"> way of organizing views on the display</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:28"> and people have been confused</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:31"> by the difference between desktop publishing</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:34"> and Microsoft for instance has been</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:37"> and window display they're actually</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:40"> the same thing just these guys have</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:43"> boundaries around the views and the</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:46">publishing you don't have boundaries around the views but</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:49"> aside from that everything else is exactly the same and</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:52"> it was done with the same code so</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:55"> this is a modern version of it</subtitle> | ||
+ | |||
+ | <subtitle id="0:10:58"> and I'm disappointed</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:1"> in this display because Danny</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:4"> molang has done a lot of work to</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:7"> do really fantastic graphics</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:10"> which some of the</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:13"> things are shown here and you can't see how crisp</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:16"> and beautiful it is but this is kind of a modern</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:19"> version of it done with some of the stuff that that</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:22"> that we've</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:25"> done and just to show you a little slant of it</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:28"> here</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:31"> so I I can</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:34"> edit this as I'm as I'm</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:40">and</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:43"> but I can this</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:46">completely differently than the way you might think so</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:49"> for instance the the code behind</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:52"> these paragraphs is the justification</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:55"> and the editor for</subtitle> | ||
+ | |||
+ | <subtitle id="0:11:58"> come to about 23 lines of</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:1"> code in one of the languages we developed to</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:4"> do this and I'm not gonna explain exactly</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:7"> how we did this but I'll just give you a little flavor of</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:10"> what's actually going on here so</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:13"> you can think of this as swarm programming</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:16"> so what we have is thousands and thousands</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:19"> of parallel processes running</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:22"> at the same time and these are all objects</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:25"> and</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:28"> so the slowest simplest</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:31"> way you can think of doing</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:34"> the</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:37"> problem here is well</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:40"> just follow the guy in front of</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:43"> you if you don't have anybody in front of you you know where to go if</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:46">you're over the margin tell the guy in front of you and if somebody</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:49"> tells you they're on the margin and you're the first there's</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:52"> a blank in front of you then go to the next line all right so that's</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:55"> four things that do a text</subtitle> | ||
+ | |||
+ | <subtitle id="0:12:58"> justification Oulu</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:1"> sore anything they're just all running and</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:4"> they're related to each other so we call this particles</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:7"> and fields type programming and there's a lot of</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:10"> it in this in the system and</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:13"> you notice that I've embedded a view of the</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:16"> entire document recursively into it so</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:19"> that was operating at the same time so this is basically</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:22"> this kind of stuff in which each part</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:25"> of the thing has been mathematize dand done in a separate</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:28">programming language and of course we have to make the programming</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:31">to do it we have to make the tools to make the programming</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:34"> languages to do it and</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:37">but</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:40"> what we don't try to do so these are the three main</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:43"> operating systems and won't</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:46"> tell you which one the lemon is but</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:49"> they're all big and we</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:52"> want to avoid apples and oranges comparison</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:55"> so</subtitle> | ||
+ | |||
+ | <subtitle id="0:13:58"> the stuff that we're doing is is not</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:1"> there's nothing that we can do that can</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:4"> be honestly compared to</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:7"> what Microsoft or Apple do because they</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:10"> have legacy problems we don't have there's</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:13"> a million things so we don't even worry about that but</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:16"> here's a t-shirt with a mustard seed on it and</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:19"> that gives you kind of what we're out after out after</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:22"> more than a factor of a thousand change</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:25"> in the size of the code that it takes to make this kind of</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:28"> phenomena something more like a factor</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:31"> of 10,000</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:34"> and</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:37">so if you have the</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:40"> end-user at one end and you have a power supply at the other</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:43"> you have a lot of different</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:46"> kinds of phenomena in there and the question is how many</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:49"> t-shirts do you actually have to do so you think</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:52"> of the the two and</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:55"> a half D anti-alias graphics as you'd</subtitle> | ||
+ | |||
+ | <subtitle id="0:14:58"> love to have that in one or two t-shirts so</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:1"> that's regularly a couple hundred thousand lines of code and</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:4"> if you think</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:7">of the number of different languages you might want to</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:10"> invent to mathematize the different parts of these</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:13">probably five or ten different languages you have to do</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:16"> so you have to have a metal language metal language has to deal with itself</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:19"> and and so forth and</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:22"> you'd like to improve</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:25"> semantics of programming and so forth so</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:28"> we have a dozen or so powerful</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:31"> principles here are ten of them there's nothing more boring</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:34"> than somebody enumerated list</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:37"> on a slide so I'll just point out</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:40"> that most of these powerful principles are ones that</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:43">have been around since I started in computing in the early 60s</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:46"> and most of them are not in</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:49"> general use today or in use the way they</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:52"> were originally used so</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:55"> some of these are things that have been</subtitle> | ||
+ | |||
+ | <subtitle id="0:15:58"> resurrected so</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:1"> the particles infield is something that hasn't hasn't been</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:4"> used very much but</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:7"> the notion of simulating time not letting the CPU determine</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:10"> what time is all about goes back to both</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:13"> Simula and john</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:16"> mccarthy situation calculus these are old</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:19"> ideas but they have the great</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:22"> advantage that you don't get deadlocks</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:25">monitors and semaphores so</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:28"> the basic idea is if you simulate the time that you're running in</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:31">have race conditions that you haven't explicitly</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:34"> allowed and so on</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:37"> so the underlying idea here is that math wins</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:40"> not standard math but math that</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:43"> you actually invent in order to characterize all</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:46"> the different behaviors that you</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:49"> half and with that I'm going to turn it</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:52"> over to Dan amma lang who</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:55">you a little bit about how we do the graphics because</subtitle> | ||
+ | |||
+ | <subtitle id="0:16:58"> this is kind of a classic case study of</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:17:4"> give you this</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:7"> dan is a graduate student at</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:10"> UC san diego and</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:13"> just got his master's for part of this and</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:16"> is on his way to getting his PhD for the</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:19"> rest of it</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:22"> and well what we'd like to do here is</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:25"> to I don't think anything</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:28"> I said needs questions except maybe to the end</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:31"> but be great I brought</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:34"> the three people who did a lot of work in this system</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:37"> along there by the time</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:40"> you get to my age you're just a figurehead some</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:43"> thrill to actual actually bring</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:46"> people who are doing stuff here and to have them tell you</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:49">little bit about how they're approaching these</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:52"> problems and hope you do ask questions</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:55"> hello</subtitle> | ||
+ | |||
+ | <subtitle id="0:17:58"> so like Alan said my name is Dan am</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:1"> Liang I'm a grad student like you guys so go</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:4"> easy on me I'm getting</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:7"> towards the end of my</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:10"> times of PhD students so I'm</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:13"> gonna present to you basically where</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:16"> I am on my dissertation work I have still about</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:19"> a year and a little more than that to go</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:22"> although I've noticed that kind of just extends</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:25"> forward it's a tradition of PhD</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:28"> students right so I'm a</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:31"> UCSD PhD student and I but I'm also an</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:34"> employee of viewpoints Research Institute and</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:37"> so my little niche in this project is</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:40"> the 2d rendering system because we'd like to build</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:43"> a whole</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:46"> basically a whole software stack and</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:49"> we're not allowed to just delegate to the</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:18:55">to reinvent programming at every level so I have some background in</subtitle> | ||
+ | |||
+ | <subtitle id="0:18:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:19:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:20:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:21:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:22:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:23:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:24:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:25:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:26:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:27:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:28:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:29:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:30:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:31:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:32:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:33:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:34:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:28">to me was that you can't just keep having ideas and just sort of you know</subtitle> | ||
+ | |||
+ | <subtitle id="0:35:31"> experiment</subtitle> | ||
+ | |||
+ | <subtitle id="0:35:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:35:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:36:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:37:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:4"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:7"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:10"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:13"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:16"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:19"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:22"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:25"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:28"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:31"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:34"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:37"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:40"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:43"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:46"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:49"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:52"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:55"></subtitle> | ||
+ | |||
+ | <subtitle id="0:38:58"></subtitle> | ||
+ | |||
+ | <subtitle id="0:39:1"></subtitle> | ||
+ | |||
+ | <subtitle id="0:39:4">have several meta implementations this particular one uses</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:7"> JavaScript as the target language as the assembly language underneath</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:10"> and so in this web</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:13"> browser I can just type in a bunch</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:16"> of code like well even any JavaScript</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:19"> expression like that I can evaluate on the fly</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:22"> but that's not very interesting</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:25"> right because I as a language guy I want</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:28">control over the language that I'm using and so the stuff</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:31">you tell it to evaluate is not necessarily the stuff that gets</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:34">evaluated there's a level of Indra there's an interaction</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:37"> here in this function groups</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:40"> called translate code that</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:43"> gets called with this string that you want to evaluate and</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:46"> is supposed to return the the thing that you pass</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:49"> to the eval function in JavaScript so it</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:52"> doesn't matter what it says right now but</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:55"> the cool thing about this is it lets</subtitle> | ||
+ | |||
+ | <subtitle id="0:39:58">you replace the programming language that's been that's</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:1"> being used in this interface very easily and</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:4"> of course it's very self-serving because</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:7"> Oh Matta is sort of the ideal language as far as I'm concerned</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:10">translate code I'm very</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:13"> modest so let's</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:16"> see here I</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:19"> don't know why I can't see well</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:22"> oh I</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:25">know what's going on hang on one sec technical difficulties</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:28"> okay so</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:31"> instead of going over the language and stuff I'm just gonna</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:34"> say few words about it and then I'm gonna show</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:37"> you a bunch of examples and end up with Dan's niall</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:40"> translator so the the</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:43">language is that pattern matching is good for most</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:46"> things that you care about in writing a translator for</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:49"> instance if all you care about is lexical</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:52">you could pattern match on a stream of characters and produce</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:55"> a stream of tokens similarly to write</subtitle> | ||
+ | |||
+ | <subtitle id="0:40:58">can pattern match on the stream of tokens to</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:1"> produce parse trees and then code generation</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:4"> at least naive code generation can be done by pattern</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:7"> matching on a parse tree to output</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:10"> some code and so on even transformations on</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:13">parse trees and optimizations can be done in the same way</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:16"> and so let's</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:19"> start off with something</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:22"> fairly standard so a little</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:25"> while ago is set down with a friend of mine and I</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:28"> wrote a library in JavaScript that's about 70 lines of</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:31"> code that implements the semantics</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:34"> of Prolog including your unification backtracking all</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:37"> that stuff and that's what's</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:40"> being loaded on the top of the page the thing that you</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:43"> see right here is a grammar</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:46"> written in omena that teaches</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:49"> the browser how to understand Prolog syntax it</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:52"> doesn't include things like the special list</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:55"> syntax you know in Prolog but that doesn't</subtitle> | ||
+ | |||
+ | <subtitle id="0:41:58"> matter anyway because it's just syntactic sugar so the</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:1"> important stuff is there and it's fairly easy to</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:4"> grasp and gist and so on so I'm</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:7"> gonna load this stuff and</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:10"> okay</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:13"> now</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:16"> down here I can tell my Prolog</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:19"> translator to answer certain Prolog</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:22"> queries given a few</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:25"> facts and rules just like you would do in a in a real</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:28"> Prolog interpreter and so in this</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:31">I'm asking for all the natural numbers given that</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:34"> zero is a natural number and the successor of X is a natural number if</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:37"> X is a natural number and so if</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:40"> I select this stuff and</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:43"> tell it to execute it's saying that zero</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:46"> is a natural number so it's kind of small one is a natural</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:49"> number two is a natural number and so on forever</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:52"> until I tell it I'm done</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:55"> and then this next example should</subtitle> | ||
+ | |||
+ | <subtitle id="0:42:58"> be very familiar it's</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:1"> it's</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:4"> the usual thing that everyone does in Prolog in their</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:7"> first couple of sessions</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:10"> right it's a it's an all male in</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:13"> child world so</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:16"> I'm asking for all the grandfather and grandchild</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:19"> relationships given that you know Abe</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:22"> is Homer's father Homer's Lisa's father homers</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:25"> Bart's father and homey Homer is Maggie's</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:28"> father and then there's the rule for</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:31"> grandfather in there which yeah</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:34"> it doesn't include women I guess I'm</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:37"> not PCs so when</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:40"> I say that you get the right answers it enumerates</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:43"> all the three relationships that you care about</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:46"> so quickly</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:49">to show one of these before</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:52"> I move on to the meaty scope</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:55"> where is this</subtitle> | ||
+ | |||
+ | <subtitle id="0:43:58"> by the way this is</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:1"> a wiki also and so anyone who's interested</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:4"> in this stuff can just open up this webpage on their browser</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:7"> without downloading anything and see these projects</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:10"> try them out and make their own project save them and</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:13"> so on so</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:16"> ok on this page what</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:19"> I have it's roughly a page of code here this</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:22"> is logo syntax and on</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:25"> the left hand side you see sort of</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:28"> the BNF style rules to describe the logo</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:31"> syntax using left recursion and stuff it's</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:34"> fairly readable and on the right hand side there's some JavaScript</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:37">code that's being output by the semantic actions and</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:40"> and then this is</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:43"> the neat part after I've defined the language and</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:46">there's a little bit of runtime support above the</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:49"> grammar I can read the find translate code</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:52"> to be a function that takes in the code that you tell it to</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:55"> evaluate and then passes to smiley</subtitle> | ||
+ | |||
+ | <subtitle id="0:44:58"> my turtle the code to evaluate and and</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:1"> it doesn't return any useful value</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:4">undefined by the way I'm returning the undefined string</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:7"> because one JavaScript tries</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:10"> to evaluate the undefined string it's not</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:13"> going to do much so if I select</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:16"> all this stuff and tell it to evaluate</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:19"> quickly this added my</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:22"> code added a you know dynamically added</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:25"> a canvas elements to this page and then</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:28"> down here</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:31"> so it's</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:34">also switched the language that's understood by this browser where</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:37"> there's a work space so I</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:40"> can teach it to do a spiral which is code that I actually</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:43"> took from the Wikipedia page on</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:46"> on logo and then if I</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:49"> tell it to draw a spiral and I can call</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:52"> it was too quickly - up</subtitle> | ||
+ | |||
+ | <subtitle id="0:45:55"> but I can draw</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:1">ell hopefully I don't think I'm cheating but</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:4"> it actually draws in real-time and it looks</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:7"> really cute so anyway now I'm going to show you some</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:10"> more interesting examples first</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:13"> thing I want to show you is that</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:16"> there's a little JavaScript compiler</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:19">eally a compiler that's a bit of a misnomer</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:22"> what this is in this case by the way I have implemented</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:25"> a very nearly</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:28"> complete subset of JavaScript it's about like</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:31"> maybe 90 or 95% of the language</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:34"> using all meta and I have a translator that takes</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:37"> the JavaScript program and outputs</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:40"> some small talk and it works on</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:43">top of squeak so that's pretty neat to play with but I don't have time</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:46"> to show that today and I have a couple other</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:49"> backends for that but in this case what I have is</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:52"> a JavaScript parser written in nomada that's</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:55"> about 120 140 lines of code</subtitle> | ||
+ | |||
+ | <subtitle id="0:46:58"> I don't remember exactly what it is and then after that I</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:1"> have a translator that pattern</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:4"> matches on the parse trees that I generate and outputs</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:7">JavaScript code again so it's sort of the identity transformation</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:10"> on JavaScript which on its own is not very interesting</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:13"> but the neat thing about it is that once you have something</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:16">that you can easily because Oh Matta is object-oriented you</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:19"> can inherit from these grammars and override certain</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:22">rules for instance if you want to add a new kind of statement</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:25"> you override the statement rule and uh and</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:28"> add some new construct so</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:31"> I'm gonna skip over that</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:34">example but you you guys get the idea so far right okay</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:37"> and of course O'Meara</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:40"> is implemented in itself</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:43"> so</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:46"> in a very similar style to that</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:49"> JavaScript translator that I just showed you so</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:52">this is the parser for Oh Mehta and underneath</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:55"> is the code generator which just translates</subtitle> | ||
+ | |||
+ | <subtitle id="0:47:58"> the parse trees to JavaScript and I have</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:1"> a little bit of a library that I wrote that's maybe</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:4">something like 50 lines of code or whatever that</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:7"> supports the semantics of Oh meta in JavaScript</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:10"> and that's the way a bootstrap Oh meta</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:13">you you just implement a very</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:16"> minimal set of semantics as a library in</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:19"> that host language and then I do the</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:22"> parsing and cogeneration in no matter but</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:25"> one interesting thing here is that you don't</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:28">have to do this you know very direct two-step</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:31"> process you can do some more interesting</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:34"> things with it so for instance the</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:37"> O meta translator is just taking a parse tree and outputting</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:40">JavaScript but my parser is not extremely smart</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:43"> for instance if you if you have nested</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:46"> or expressions you know while you're doing your</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:49"> pattern matching as you often do if I use parentheses you</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:52"> know I say X or Y or Z</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:55"> that's going to generate two</subtitle> | ||
+ | |||
+ | <subtitle id="0:48:58"> or operations you know and the or operation no matter has</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:1">remember the position that you're at so that it can backtrack</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:4"> properly and so on and that's</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:7"> sort of wasteful so one thing that I did</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:10"> that</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:13"> was very straightforward was I implemented</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:16"> an optimal optimus asian framework</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:19"> for all meta parse trees in</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:22"> nomada itself after I had the stuff working and</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:25"> so what you see on top here is a grammar that</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:28"> pattern matches on a parse tree for a matter and</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:31"> by looking at this you can see how little you have to implement</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:34"> in order to have a language like cometa it's very similar</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:37"> to Brian for its pegs you know</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:40"> you only have or and cleani star</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:43"> cleany plus this is assignment which is used</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:46"> for binding expressions to names there's</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:49"> a knot operation look ahead and</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:52"> so on so it's fairly straightforward anyway</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:55"> this is kind of like a visitor for a meta parse trees</subtitle> | ||
+ | |||
+ | <subtitle id="0:49:58"> and on its own it's not very</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:1">useful but then down here what I'm doing is I'm ism</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:4"> inheriting this visitor and overriding the</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:7"> and and orals so that when I have</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:10"> nesting you know if I have an end that has an</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:13"> end as an argument I can pull out the</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:16"> parts of that end into</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:19">the outer end and the semantics is going to be the same except</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:22"> it's going to be more efficient because I only have you</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:25"> know to implement that one operation and</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:28"> and when I implemented this the</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:31"> the Oh manage is implementation became I think</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:34"> 30 percent faster which was pretty neat for very</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:37"> minimal effort</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:40"> anyway oh yeah</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:43"> and the last thing I want to show you here before I</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:46"> show the Dan stuff</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:49"> is so if you if you</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:52"> end up taking the time to take a look to look at this stuff online</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:55"> I encourage you to look at this project it's called meta</subtitle> | ||
+ | |||
+ | <subtitle id="0:50:58"> to t oo which is a pun on you know</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:1"> the meta to which had the Roman numeral</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:4"> two that I told you about before and what</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:7"> this is is a language that's very close to a</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:10"> meta implemented entirely in this little</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:13"> project and so at first this</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:16"> this javascript object that you see up here is</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:19"> a is the</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:22"> library like object that implements all</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:25"> of the semantics that you need for doing the parsing and pattern</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:28"> matching and then down here what I have</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:31"> is the parser for this language written</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:34">in know meta and then I have a couple of examples</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:37"> you know with with arithmetic</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:40"> expressions and so on but then of course that</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:43"> is not sufficient to do bootstrapping</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:46"> but what you really need to do is once you have the</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:49"> the Oh Matt alike language working you</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:52">that you want to implement that guy in itself which</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:55"> is what I do down here and</subtitle> | ||
+ | |||
+ | <subtitle id="0:51:58"> you can see it's a little bit uglier than no</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:1"> matter particularly because the semantic actions have</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:4"> to be enclosed in these funny characters and so</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:7"> on but I did that so that I wouldn't have to implement</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:10"> the JavaScript parser as part of this thing right</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:13">blindly consume the JavaScript and output</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:16"> it in the translated code so</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:19"> anyway that's the implementation</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:22">and you can compile the compiler with the original</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:25"> compiler that I wrote with no meta and it works and then</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:28"> the thing that really tests it later on is if</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:31"> you take the the version of the compiler</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:34">that was generated from the code up here by using the</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:37"> no matter you know compiler</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:40"> if you take that and and compile it</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:43">self and replace the thing you're using with</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:46"> that result and it still works down here you know you're</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:49"> you're good and that kind of works</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:52">it's a neat little example of bootstrapping</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:55"> if you want to take a look at that later on</subtitle> | ||
+ | |||
+ | <subtitle id="0:52:58"> so I think oh yeah</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:1"> one less thing that I want to show here and</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:4"> take a quick look at this JavaScript</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:7"> doesn't have multi-line string literals right</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:10"> but if you look at this I'm actually</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:13"> using one right here it looks very Python esque and</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:16"> the reason why I can do that is because</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:19"> you know this translate code thing my JavaScript</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:22">doesn't have to be JavaScript right I have that intermediate</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:25"> thing the JavaScript parser and and translator</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:28">that I showed you before and I can easily inherit</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:31"> from that and add new kinds of things so that was</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:34">traightforward and the the other neat thing about having</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:37"> things having these languages implemented and no matter</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:40">that there's a thing called foreign rule invocation</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:43"> that allows a grammar to lend its input stream</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:46"> to another grammar temporarily and</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:49"> it's an it's an alternative to inheritance for</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:52">that you may have noticed that the language that I'm using in</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:55">workspace is not just JavaScript and it's not just no</subtitle> | ||
+ | |||
+ | <subtitle id="0:53:58"> matter it's kind of a mash-up of these two languages and if</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:1">you wanted to implement that with single inheritance</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:4"> you would have to inherit from one of these translators</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:7"> and then implement the functionality of the other translator</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:10"> which would be very annoying</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:13"> to have to do and multiple</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:16"> inheritance is clearly a bad idea I'm not going to go into that</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:19"> because of all the you know complications</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:22"> and and so on and so with</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:25">foreign rule invocation I can just have one grammar that doesn't</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:28"> inherit from either if I don't want to and just says try</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:31"> parsing my input as a no matter grammar and if</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:34">parsing my input as a JavaScript statement or</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:37"> expression or whatever sorry</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:40"> punch line yes okay so</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:43"> what you're looking at here is</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:46"> part of my translator</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:49">for the Niall language that Dan was talking about so</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:52"> the stuff on top implements is</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:55"> a is a grammar that on its own implements the offside rule you</subtitle> | ||
+ | |||
+ | <subtitle id="0:54:58"> know indentation as block structure that you see in Python</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:1"> and Haskell and so on a neat thing about that is that that's</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:4"> modularized away from whatever language</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:7">that you're implementing so all this stuff like</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:10"> a keeping track of a stack of indentation levels</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:13"> and so on that can be done in that one grammar</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:16"> and my my</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:19"> Nile parser which is down here also</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:22"> written in no matter just inherits from that guy</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:25"> and can just say you know I I want</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:28"> to I want to indent</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:31"> I don't know</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:34"> that's identifier anyway there's there's</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:37"> there's a bunch of indentation code</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:40"> ah here we go so I want to I want</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:43"> to tab over here and then there are these funny unicode</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:46"> characters that dan is very fond of and</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:49"> so on so this is the</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:52"> the parser part of the implementation of Dan's</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:55"> thing and there's also a</subtitle> | ||
+ | |||
+ | <subtitle id="0:55:58"> type checker and code generator that are written</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:1"> by pattern matching on those data</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:4">structures that I'm creating on the right hand side and the</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:7"> so it's a it's a fairly you know that one</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:10"> of the cool things about Dan's language is that in addition</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:13"> to you know types being used for</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:16"> making sure that you don't get things wrong the</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:19"> the types matter a lot for efficient</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:22"> code generation for Niall and it</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:25"> turned out to be relatively straightforward to keep track</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:28"> of types in these grammars since you know</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:31"> the grammars are kind of like class grammar</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:34">no matter is pretty much like a class in an object-oriented</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:37"> language you can have state associated with running instances</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:40"> of that grammar and then you can keep the</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:43"> symbol table on there and and so on and in</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:46"> do proper type checking so I think I'm</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:49"> gonna stop here sorry if I ran a little long and</subtitle> | ||
+ | |||
+ | <subtitle id="0:56:52"> SM is gonna</subtitle> | ||
+ | |||
+ | <subtitle id="0:58:37">nd just to clarify pegs on their</subtitle> | ||
+ | |||
+ | <subtitle id="0:58:40">don't support left recursion but there's a cool trick that</subtitle> | ||
+ | |||
+ | <subtitle id="0:58:43"> you can do with the memo table that's used by packrat parsers</subtitle> | ||
+ | |||
+ | <subtitle id="0:58:46"> I wrote a paper about that you guys Rangers</subtitle> | ||
+ | |||
+ | <subtitle id="0:58:58">you have all these</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:7">right so right</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:10"> now I don't have a great answer to that I try it out and</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:13"> hopefully it works but we're</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:16"> hoping that at some point</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:19"> soon we're going to be able to use the princess and</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:22">programs that then has I kind of think of them as</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:25"> the meaning of the thing that I care about and</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:28"> it would be really great to have an automatic way</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:31"> to check the meaning against it's</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:34"> true okay</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:37"> we can discuss it offline</subtitle> | ||
+ | |||
+ | <subtitle id="0:59:40"> you don't need this</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:10">please feel free to leave us</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:13">time be another ten minutes I'm</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:16"> Kazama I work at viewpoints as well as</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:19"> um understood at UCLA actually called my father but</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:22"> he said you should be out party</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:25"></subtitle> | ||
+ | |||
+ | <subtitle id="1:1:28"> so what part of all the interest</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:31">is I'm sure you have seen an imperative as well as declarative</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:34"> methodologies to do programming imperative</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:37"> is how implementations are darling</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:40"> declarative is we've seen Prolog language</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:43"> you know its meanings they're compact</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:46"> they're very understandable</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:49"> but we need search in order to to execute</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:52"> them so that the often not practical part</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:55">what your interests are here to save codes as well as to add</subtitle> | ||
+ | |||
+ | <subtitle id="1:1:58"> understandability to problems</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:1"> is is there a way to kind of combine both at</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:4">he same time which is not very common today this is a famous quote</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:7"> that I made recently that the natural</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:10"> combination of the claritin predators is</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:13"> missing a couple of methodologies</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:16"> that we kind of studied in this direction is</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:19"> one is I'm just I'm just gonna quickly go</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:22"> over it but basically if</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:25"> you add a layer</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:28"> of logic on top of your your your</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:31"> languages to support search basically</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:34"> your heuristic search you can do imperative</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:37">programming with a little bit of overhead if you're always willing</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:40"> to add optimizations so in the in</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:43"> the presence of multiple methods if there's a if</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:46">there's an optimization that always tells you based on</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:49"> the state which method is the is the good method to</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:52">so you always do this check to to find out the different</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:55"> alternatives then you have this lovely the overhead</subtitle> | ||
+ | |||
+ | <subtitle id="1:2:58"> of checking to do your normal imperative but</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:1"> when you do want when you do have the you</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:4"> know leverage to do kind</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:7"> of search you can you have the option</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:10"> to say well explore possibilities and</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:13"> find the best best scenario to do so</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:16"> this is what this this prodigies are all about you</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:19"> know allows you to kind of separate the optimizations and here</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:22"> is the from from the actual implementations the actions</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:25"> that you see here to satisfy the goals so</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:28"> implements that the budget programs really</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:31"> small they're really cute and slow but there</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:34"> have this nice way that you can add</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:37"> for example this chess program that was about</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:40"> three hundred lines of code that even included some</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:43"> text ASCII art graphics</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:46"> where you could just actually</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:49"> add any arbitrary number of heuristics that say</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:52"> based on the the states that you explore basically</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:55"> heuristics tell you which one is the better one to</subtitle> | ||
+ | |||
+ | <subtitle id="1:3:58"> do and then these heuristics tell</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:1"> you that you know it's better to take a move when you actually</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:4"> capture the opponent's piece then try not</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:7"> to get captures we're adding some numeric values so you</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:10"> can basically reorder the you know alternatives</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:13"> but</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:16"> another more serious one was you know</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:19"> in compilers need to do register allocations</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:22"> which is you have registers and you have variables</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:25"> in the program these variables the compiler needs to decide</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:28"> where they gonna be in on the registers and this has</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:31"> happens to be an NP complete problem this hard problem</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:34">you want to do it optimally and then it's this is nice way</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:37"> because you know you just allow a high-level</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:40"> goal that that kind of this this is using</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:43">methodology in Smalltalk program that you just expressed</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:46"> the goal that all variables want to be you</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:49"> know assigned and you then you</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:52"> have you tell it what what actions</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:55"> are taken when you're doing this this task which is usually</subtitle> | ||
+ | |||
+ | <subtitle id="1:4:58"> assigning particular register with the</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:1">variable or deciding to spill or split and then</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:4"> you define the optimizations on top of this that says based</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:7"> on whatever state you are if you have room for</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:10"> the next variable then take that particular method if</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:13"> you have otherwise take the spill method</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:16"> you know it just in has a layer on top of</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:19"> your normal logic you can express that</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:22"> in more declarative way</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:25"> but the problem with here is success as</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:28">you know is that if you're implementing your own search it's</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:31">interactable so recent</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:34"> or studies then I'm going to show now is more</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:37"> based on boolean satisfiability</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:40"> sad solvers constraint solving</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:43"> technologies which are recently been shown that</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:46"> it's much you know it's a</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:49"> scale much better so our Britta more recent</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:52"> stuff is not based on the search that we come up with ourselves but</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:55"> based kind of plugging or whatever</subtitle> | ||
+ | |||
+ | <subtitle id="1:5:58"> a tool that we have two external tools that are</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:1"> really good at solving problems using sad solving technologies</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:4"> as we will see that they have their</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:7"> own problems that they're kind of not very and they're</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:10"> not nice to adding user specific</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:13"> heuristics so eventually</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:16"> we want some combination of the two two ways</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:19"> the heuristic searching or sad solving</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:22"> technologies to rethink that you know might answer</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:25"> our problem so this this project</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:28"> is about adding syntactic sugars to programming</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:31">languages in this case I'm showing you examples from an</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:34"> extension of Java language where we allowing</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:37"> first-order logic expressions like this</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:40"> or you know set comprehension stuff like this</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:43"> this is from a lloyd language actually</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:46"> it's a model object modeling language so</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:49"> we we allow these kind of expressions in the language</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:52"> but they serve two purposes one is that we can</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:55"> easily do sugar these two low-level syntax</subtitle> | ||
+ | |||
+ | <subtitle id="1:6:58"> of the program so these are actually runnable so if I</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:1"> but this is actually a part of the code</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:4"> of the binary tree and if I actually instantiate</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:7"> an object and I run it you know because</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:10"> it's gonna be compiled to a low-level code is going to</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:13"> be runnable even though it's compact but that's</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:16">the only thing that we're interested to save lines of code we're</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:19"> also interested in having a</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:22"> runnable executed runnable meanings meanings that</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:25"> are actually executable you see when we say</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:28"> meanings we mean high-level expressions like this that says</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:31"> I want a graph that is</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:34"> a cyclic then this is the meaning of a cyclic</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:37"> that there's no note that that kind of points back to itself right</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:40">nice to be able to without any implementation</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:43">execute this meaning that not</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:46"> just running in the program that kind of using</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:49">constraint solving technology to actually find a</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:52"> satisfying state for that particular</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:55"> constraint so so that's</subtitle> | ||
+ | |||
+ | <subtitle id="1:7:58">what I'm saying executable in terms of we can use some</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:1"> external tool to get to what state that</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:4"> we're happy without actually any implementations now we're going to use</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:7"> that for two things one</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:10">the software reliability I'm showing you an</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:13"> implementation of the bubble sort for in this this</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:16"> extension that is pretty routine it's a bubble</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:19"> sort routine but we see that you</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:22"> know this is in the in light of you</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:25"> know program annotations you've seen in a Java modeling language</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:28"> and others where you just annotate the program</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:31"> with meanings basically which says</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:34"> this particular method is accomplishing this</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:37"> this expression this is followed by that insurance</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:40"> clause that says the job of the sort method is</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:43">that it's going to find some value that's a permutation</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:46"> of the the old alts all</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:49"> this and it's gonna be a sorted this is something</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:52"> that we can automatically insert instrument in the in the compiled</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:55">version so that if when method of methods are</subtitle> | ||
+ | |||
+ | <subtitle id="1:8:58"> done these constraints of these</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:1"> expression is going to be evaluated and if</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:4"> they happen to be false that means the method was</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:7"> faulty method was buggy or if they</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:10"> if they even happened to have some kind of runtime</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:13"> failure like a division by zero that</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:16"> it's not easily found we can kind</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:19"> of catch that exception and use the</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:22"> exec use these efficacious as</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:25"> kind of a fallback as an alternative</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:28"> that the method didn't work but we can have an</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:31"> alternative to to try what accomplish</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:34"> what we want and in this case we</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:37"> can use we kind of translate this</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:40"> expression into the synthetic the logic syntax</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:43">where we can can call an external tool to to find basically</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:46"> sort this list</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:49">so it's a live but bigger</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:52"> example is this an implementation of red-black</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:55"> tree that also have annotations for</subtitle> | ||
+ | |||
+ | <subtitle id="1:9:58"> the insert and delete methods basically</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:1">saying on an insert insert you just have one</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:4"> one you note added to the set of the notes and</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:7"> I delete you have one less and</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:10"> basically assuming they have some</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:13">implementation that's not reliable you can just you</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:16"> know use this the annotations to</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:19"> accomplish what what they do actually you</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:22"> can think of this so</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:25"> I found the implementation typically about five</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:28"> six hundred lines of code or three hundred lines of code of Java</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:31"> because of a lot of corner cases that these balance</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:34"> trees need to satisfy this</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:37"> you can think of it as a kind of a minimalistic</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:40"> runnable implementation as you will it's</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:43"> like an interface for for the whoever wants</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:46"> to implement it but the neat thing that this</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:49"> has that the interfaces don't have its runnable so you can have</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:52">actually write what these two methods are gonna be</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:55"> in the future but because you have annotated</subtitle> | ||
+ | |||
+ | <subtitle id="1:10:58"> them actually you can we can test them and run them because</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:1"> yeah you know we have that underlying</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:4"> reasoning system so that you actually without</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:7"> the implementation can test your program</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:10"> interface to to</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:13"> move around another so</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:16"> this is the last thing I'm showing is that you can</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:19"> always intentionally use this fallback</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:22"> system the use of fallback</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:25"> when you want to do something bit clearer deeply you don't you</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:28"> don't even want to implement something but</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:31"> you know you can use the constraint solving technology that kind of</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:34"> embedded in your in your language to accomplish</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:37"> something that's kind of cumbersome</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:40"> so in this case for example this is a it's a a</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:43"> GUI example where this</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:46"> is very simple a user just puts the dots on the</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:49"> screen you see these four dots are putting in</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:52"> screen without a problem so the the the job of this</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:55"> particular method the ad body is very trivial</subtitle> | ||
+ | |||
+ | <subtitle id="1:11:58"> it's just you know draws the dot and this box</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:1"> shows that there's this restriction</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:4"> on this this application</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:7"> that says a user should not put two dots</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:10"> too close to each other there's a minimum distance that they might have</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:13"> so you imagine the the normal</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:16"> you know invocation of this method is</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:19"> very trivial it just draws it as as far as those</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:22"> violations are not you know those specifications</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:25">it's okay it just but</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:28"> under a corner case is when actually somebody</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:31"> put a red dot here and that kind of you</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:34"> know violated that property you</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:37"> don't want you don't want to implement that that's a that's a hard</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:40">thing to do potentially a lot of dots needs to be moved around right so</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:43"> in that case you just don't</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:46"> handle it in your in your program and</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:49"> we're gonna kind of you can't automatically fall</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:52">back to constraint solving in a sad solving - to do what</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:55"> - basically shift some dots around - to</subtitle> | ||
+ | |||
+ | <subtitle id="1:12:58">properties and that's what's happening here</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:1"> and you see that that box</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:4"> here is saying there's a restriction of how much those</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:7"> dots are you know are allowed to shift by by</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:10"> the by the method so you see that you know</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:13"> these two are shifted a little bit you know to</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:16">separation is happening so basically I'm showing</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:19"> you the code that that does this</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:22"> this is the this is the</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:25"> entire code that when you're when you're adding a dot you see</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:28"> that it has this this</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:31"> check that it needs to do that I'm written</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:34"> here also in a in a high level syntax</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:37"> of alloy the first order logic that they</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:40"> have the two things that says no to dust needs to be too</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:43"> you know too close to each other and when you do move them you know</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:46"> you're not allowed to remove them by more than an</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:49"> a value and you see that there's no implementations here so</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:52"> that when I put that red dot you know it kind</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:55"> of automatically figured out</subtitle> | ||
+ | |||
+ | <subtitle id="1:13:58"> those are the things that just wanted to show you so</subtitle> | ||
+ | |||
+ | <subtitle id="1:14:1"> if you have any questions or for</subtitle> | ||
+ | |||
+ | <subtitle id="1:14:4"> previous</subtitle> | ||
+ | |||
+ | <subtitle id="1:16:7">before</subtitle> | ||
+ | |||
+ | <subtitle id="1:16:22">basically</subtitle> | ||
+ | |||
+ | <subtitle id="1:16:34">but also</subtitle> | ||
+ | |||
+ | <subtitle id="1:16:37"> II think that we don't have a cat</subtitle> | ||
+ | |||
+ | <subtitle id="1:16:40"> the other</subtitle> | ||
+ | |||
+ | <subtitle id="1:16:52">find that</subtitle> | ||
+ | |||
+ | <subtitle id="1:16:55">like</subtitle> |
Revision as of 18:24, 6 December 2017
so I'll just put thing you guys whoop I should
get your signature back
I was just gonna write the name of I'll put
it over here so the the basic
apologize
in advance for a couple of things
one
is one is the
brevity and the
kind of livid is a navy term for five pounds of
shit in a one pound bag and so
we have a lot more information
that we'd like to talk to you
about but we haven't ever been
able to fit it into an hour and
so we're gonna try to give
you the gist of some of the things that we're
doing but this website
Vpr i.org
maybe our talks are kind of a commercial
to just have you look
at some of the stuff there so I'm just gonna spend a few minutes giving
you the context
for a project that
the NSF reviewers turned the
preposterous proposal when they turned it down
anybody ever been turned down by an
NSF peer review now
it turns out that the program managers at NSF
have always had the power to override those and in
this case the program manager
did override it so we got our money anyway
but they only gave us money to
cover about half the expenses of this project so we
raised a matching amount of money
to do it it's a project that a
number of us have been thinking about for as
long as 30 years that would be really interesting
to do and
it would be very much in the original spirit of
computer science was supposed to be as articulated
in the 60s by Al so
that kind of starts
quintessential Maxwell's equations t-shirt
and
this is one that everybody's seen
and if
you're familiar with Maxwell you know that he actually
wrote five papers arriving
at these conclusions and in five different ways he
did this over a period of years using different
models and the original form of
maskull's equations was not fiddle on a t-shirt
so this form was actually
made by several people including the
Germans who were much more interested in it than the
British in
no small part because Maxwell's
equations violated Newton and Newton was
a god Maxwell was only their best guy in the
19th century but Newton was
a god and of course the interesting
thing about getting him in this form is
although Faraday's
experiments showed that there should
be a symmetric relationship between the electric
and magnetic fields the equation didn't show
those relations as symmetric
and this asymmetry and this way of
things led to Einstein's theory of relativity and in
fact a much simpler form of writing these
guys down and reason
I'm putting it up there is I had a similar
experience when I was in graduate school
trying to understand programming languages and I looked at
the bottom of page 13 of the list 1.5
manual and here was McCarthy's
formulation of Lisp using itself as a
metal language and how
many people have had the experience of going
through this it takes a couple of hours on a Sunday afternoon
to do and you run out of fingers because
you have your fingers down in all the places that recursos
and reenters and so forth and
I felt I understand stood it when I found in this
code there is one bug and
the thing I got out of
it is boy after those two hours I understood
what programming languages were about a factor of a
hundred better than I did before I went in because
McCarthy had carved away all the bullshit and
God that's something that was
more powerful than any other programming language of the day and more
powerful expressively the most programming languages today
and had
done it in this interesting
form and in
fact it had a lot of effect on subsequent
things that were done and because I had a math
degree I just love this stuff and
so we
tried these ideas a number of times on various
of the stuff we did it Xerox PARC
that
gee you can do
programming language in under a thousand lines of code or
you might be able to do it in the page and there
are advantages to the page for
sure so
so
the thing we were speculating about is
do you it'd be really interesting if
you could apply this way of looking at
processes to an entire system that's well
understood like personal computing so
we have now this interesting idea that if
science is the study of and modeling of
phenomena in order to understand it better we actually build
artifacts that exhibit interesting phenomena
and what John did is
to take the phenomena exhibited by programming languages
of the day and find an abstraction that
abstraction happened to be more powerful than
the ones he was looking at which is kind of an old mathematicians
trick you know solved the more general problem
if you can and so
the idea here was be
interesting to take this body of behavior
from the end-user to the
metal of the Machine and
try to understand it by right
making a model that you could actually run it would generate
the same phenomena and so
how many t-shirts would it take to do all
of personal computing that's the question here you
can see why they called it preposterous right
because Microsoft's version of this is a few
hundred million lines of code their
operating system and the same
Microsoft Office is about 220 million lines
of code but if you think about
it with the view of well what is it doing really
and how many things in it that
decided to do differently for example are
actually the same thing masquerading under a few
simple parameterizations and and
also the first time around that this stuff was done
it was only ten thousand lines of code it at
Xerox PARC and there's not a lot more
functionality now
than there was back then so the idea is this could
be a lot smaller and be very
interesting to see for the same reasons that these
two guys are interesting but this would be look
what our project is
and there's one more tea involved here
which is we one
of the things that's nice about making
things small and simple is you got something like
a Model T Ford which any 12 year old
could take apart in the barn over
the weekend and put together only had about 350 major
parts in it and about a thousand
screws and nuts and bolts and stuff so anybody who
grew up in a farm like I did
where there's still Model T trucks and
in the 40 they would be routinely taken apart they
recently were still around this you couldn't couldn't really kill
them because everything
that broke on them was fixable in the blacksmithing shop
that every farm had back then there was nothing true they didn't
even have a distributor they didn't even have gears
they had belts
and pulleys on them so
but they're a real automobiles so they had this interesting
thing they caused even though their automobiles
before them they caused the automobile revolution
in America because they were so easy to manufacture and
they lasted well and so forth so just
one bottle T story
the
gap the spark gap on
Model T was
optimized to be the width of a dime
and somebody asked Henry Ford once why did
you do that and he said well people always lose
gauges but they usually have a dime on them so
he's fully expected anybody who's had one of these things
would be able to just fix it and tweak it up and that's
what happened so it's a nice metaphor
so
my theory is before you write the Ferrari code you should write
model-t code because there's
a 12 year old kid who just isn't gonna be able to understand
the Ferrari code and you have a moral obligation to
write that Model T code that is understandable
so
kind of the standard model for personal computing
is from the Xerox
PARC
experience and so
the bitmap screen that can display anything and a
way of organizing views on the display
and people have been confused
by the difference between desktop publishing
and Microsoft for instance has been
and window display they're actually
the same thing just these guys have
boundaries around the views and the
publishing you don't have boundaries around the views but
aside from that everything else is exactly the same and
it was done with the same code so
this is a modern version of it
and I'm disappointed
in this display because Danny
molang has done a lot of work to
do really fantastic graphics
which some of the
things are shown here and you can't see how crisp
and beautiful it is but this is kind of a modern
version of it done with some of the stuff that that
that we've
done and just to show you a little slant of it
here
so I I can
edit this as I'm as I'm
and
but I can this
completely differently than the way you might think so
for instance the the code behind
these paragraphs is the justification
and the editor for
come to about 23 lines of
code in one of the languages we developed to
do this and I'm not gonna explain exactly
how we did this but I'll just give you a little flavor of
what's actually going on here so
you can think of this as swarm programming
so what we have is thousands and thousands
of parallel processes running
at the same time and these are all objects
and
so the slowest simplest
way you can think of doing
the
problem here is well
just follow the guy in front of
you if you don't have anybody in front of you you know where to go if
you're over the margin tell the guy in front of you and if somebody
tells you they're on the margin and you're the first there's
a blank in front of you then go to the next line all right so that's
four things that do a text
justification Oulu
sore anything they're just all running and
they're related to each other so we call this particles
and fields type programming and there's a lot of
it in this in the system and
you notice that I've embedded a view of the
entire document recursively into it so
that was operating at the same time so this is basically
this kind of stuff in which each part
of the thing has been mathematize dand done in a separate
programming language and of course we have to make the programming
to do it we have to make the tools to make the programming
languages to do it and
but
what we don't try to do so these are the three main
operating systems and won't
tell you which one the lemon is but
they're all big and we
want to avoid apples and oranges comparison
so
the stuff that we're doing is is not
there's nothing that we can do that can
be honestly compared to
what Microsoft or Apple do because they
have legacy problems we don't have there's
a million things so we don't even worry about that but
here's a t-shirt with a mustard seed on it and
that gives you kind of what we're out after out after
more than a factor of a thousand change
in the size of the code that it takes to make this kind of
phenomena something more like a factor
of 10,000
and
so if you have the
end-user at one end and you have a power supply at the other
you have a lot of different
kinds of phenomena in there and the question is how many
t-shirts do you actually have to do so you think
of the the two and
a half D anti-alias graphics as you'd
love to have that in one or two t-shirts so
that's regularly a couple hundred thousand lines of code and
if you think
of the number of different languages you might want to
invent to mathematize the different parts of these
probably five or ten different languages you have to do
so you have to have a metal language metal language has to deal with itself
and and so forth and
you'd like to improve
semantics of programming and so forth so
we have a dozen or so powerful
principles here are ten of them there's nothing more boring
than somebody enumerated list
on a slide so I'll just point out
that most of these powerful principles are ones that
have been around since I started in computing in the early 60s
and most of them are not in
general use today or in use the way they
were originally used so
some of these are things that have been
resurrected so
the particles infield is something that hasn't hasn't been
used very much but
the notion of simulating time not letting the CPU determine
what time is all about goes back to both
Simula and john
mccarthy situation calculus these are old
ideas but they have the great
advantage that you don't get deadlocks
monitors and semaphores so
the basic idea is if you simulate the time that you're running in
have race conditions that you haven't explicitly
allowed and so on
so the underlying idea here is that math wins
not standard math but math that
you actually invent in order to characterize all
the different behaviors that you
half and with that I'm going to turn it
over to Dan amma lang who
you a little bit about how we do the graphics because
this is kind of a classic case study of
give you this
dan is a graduate student at
UC san diego and
just got his master's for part of this and
is on his way to getting his PhD for the
rest of it
and well what we'd like to do here is
to I don't think anything
I said needs questions except maybe to the end
but be great I brought
the three people who did a lot of work in this system
along there by the time
you get to my age you're just a figurehead some
thrill to actual actually bring
people who are doing stuff here and to have them tell you
little bit about how they're approaching these
problems and hope you do ask questions
hello
so like Alan said my name is Dan am
Liang I'm a grad student like you guys so go
easy on me I'm getting
towards the end of my
times of PhD students so I'm
gonna present to you basically where
I am on my dissertation work I have still about
a year and a little more than that to go
although I've noticed that kind of just extends
forward it's a tradition of PhD
students right so I'm a
UCSD PhD student and I but I'm also an
employee of viewpoints Research Institute and
so my little niche in this project is
the 2d rendering system because we'd like to build
a whole
basically a whole software stack and
we're not allowed to just delegate to the
to reinvent programming at every level so I have some background in
to me was that you can't just keep having ideas and just sort of you know
experiment
have several meta implementations this particular one uses
JavaScript as the target language as the assembly language underneath
and so in this web
browser I can just type in a bunch
of code like well even any JavaScript
expression like that I can evaluate on the fly
but that's not very interesting
right because I as a language guy I want
control over the language that I'm using and so the stuff
you tell it to evaluate is not necessarily the stuff that gets
evaluated there's a level of Indra there's an interaction
here in this function groups
called translate code that
gets called with this string that you want to evaluate and
is supposed to return the the thing that you pass
to the eval function in JavaScript so it
doesn't matter what it says right now but
the cool thing about this is it lets
you replace the programming language that's been that's
being used in this interface very easily and
of course it's very self-serving because
Oh Matta is sort of the ideal language as far as I'm concerned
translate code I'm very
modest so let's
see here I
don't know why I can't see well
oh I
know what's going on hang on one sec technical difficulties
okay so
instead of going over the language and stuff I'm just gonna
say few words about it and then I'm gonna show
you a bunch of examples and end up with Dan's niall
translator so the the
language is that pattern matching is good for most
things that you care about in writing a translator for
instance if all you care about is lexical
you could pattern match on a stream of characters and produce
a stream of tokens similarly to write
can pattern match on the stream of tokens to
produce parse trees and then code generation
at least naive code generation can be done by pattern
matching on a parse tree to output
some code and so on even transformations on
parse trees and optimizations can be done in the same way
and so let's
start off with something
fairly standard so a little
while ago is set down with a friend of mine and I
wrote a library in JavaScript that's about 70 lines of
code that implements the semantics
of Prolog including your unification backtracking all
that stuff and that's what's
being loaded on the top of the page the thing that you
see right here is a grammar
written in omena that teaches
the browser how to understand Prolog syntax it
doesn't include things like the special list
syntax you know in Prolog but that doesn't
matter anyway because it's just syntactic sugar so the
important stuff is there and it's fairly easy to
grasp and gist and so on so I'm
gonna load this stuff and
okay
now
down here I can tell my Prolog
translator to answer certain Prolog
queries given a few
facts and rules just like you would do in a in a real
Prolog interpreter and so in this
I'm asking for all the natural numbers given that
zero is a natural number and the successor of X is a natural number if
X is a natural number and so if
I select this stuff and
tell it to execute it's saying that zero
is a natural number so it's kind of small one is a natural
number two is a natural number and so on forever
until I tell it I'm done
and then this next example should
be very familiar it's
it's
the usual thing that everyone does in Prolog in their
first couple of sessions
right it's a it's an all male in
child world so
I'm asking for all the grandfather and grandchild
relationships given that you know Abe
is Homer's father Homer's Lisa's father homers
Bart's father and homey Homer is Maggie's
father and then there's the rule for
grandfather in there which yeah
it doesn't include women I guess I'm
not PCs so when
I say that you get the right answers it enumerates
all the three relationships that you care about
so quickly
to show one of these before
I move on to the meaty scope
where is this
by the way this is
a wiki also and so anyone who's interested
in this stuff can just open up this webpage on their browser
without downloading anything and see these projects
try them out and make their own project save them and
so on so
ok on this page what
I have it's roughly a page of code here this
is logo syntax and on
the left hand side you see sort of
the BNF style rules to describe the logo
syntax using left recursion and stuff it's
fairly readable and on the right hand side there's some JavaScript
code that's being output by the semantic actions and
and then this is
the neat part after I've defined the language and
there's a little bit of runtime support above the
grammar I can read the find translate code
to be a function that takes in the code that you tell it to
evaluate and then passes to smiley
my turtle the code to evaluate and and
it doesn't return any useful value
undefined by the way I'm returning the undefined string
because one JavaScript tries
to evaluate the undefined string it's not
going to do much so if I select
all this stuff and tell it to evaluate
quickly this added my
code added a you know dynamically added
a canvas elements to this page and then
down here
so it's
also switched the language that's understood by this browser where
there's a work space so I
can teach it to do a spiral which is code that I actually
took from the Wikipedia page on
on logo and then if I
tell it to draw a spiral and I can call
it was too quickly - up
but I can draw
ell hopefully I don't think I'm cheating but
it actually draws in real-time and it looks
really cute so anyway now I'm going to show you some
more interesting examples first
thing I want to show you is that
there's a little JavaScript compiler
eally a compiler that's a bit of a misnomer
what this is in this case by the way I have implemented
a very nearly
complete subset of JavaScript it's about like
maybe 90 or 95% of the language
using all meta and I have a translator that takes
the JavaScript program and outputs
some small talk and it works on
top of squeak so that's pretty neat to play with but I don't have time
to show that today and I have a couple other
backends for that but in this case what I have is
a JavaScript parser written in nomada that's
about 120 140 lines of code
I don't remember exactly what it is and then after that I
have a translator that pattern
matches on the parse trees that I generate and outputs
JavaScript code again so it's sort of the identity transformation
on JavaScript which on its own is not very interesting
but the neat thing about it is that once you have something
that you can easily because Oh Matta is object-oriented you
can inherit from these grammars and override certain
rules for instance if you want to add a new kind of statement
you override the statement rule and uh and
add some new construct so
I'm gonna skip over that
example but you you guys get the idea so far right okay
and of course O'Meara
is implemented in itself
so
in a very similar style to that
JavaScript translator that I just showed you so
this is the parser for Oh Mehta and underneath
is the code generator which just translates
the parse trees to JavaScript and I have
a little bit of a library that I wrote that's maybe
something like 50 lines of code or whatever that
supports the semantics of Oh meta in JavaScript
and that's the way a bootstrap Oh meta
you you just implement a very
minimal set of semantics as a library in
that host language and then I do the
parsing and cogeneration in no matter but
one interesting thing here is that you don't
have to do this you know very direct two-step
process you can do some more interesting
things with it so for instance the
O meta translator is just taking a parse tree and outputting
JavaScript but my parser is not extremely smart
for instance if you if you have nested
or expressions you know while you're doing your
pattern matching as you often do if I use parentheses you
know I say X or Y or Z
that's going to generate two
or operations you know and the or operation no matter has
remember the position that you're at so that it can backtrack
properly and so on and that's
sort of wasteful so one thing that I did
that
was very straightforward was I implemented
an optimal optimus asian framework
for all meta parse trees in
nomada itself after I had the stuff working and
so what you see on top here is a grammar that
pattern matches on a parse tree for a matter and
by looking at this you can see how little you have to implement
in order to have a language like cometa it's very similar
to Brian for its pegs you know
you only have or and cleani star
cleany plus this is assignment which is used
for binding expressions to names there's
a knot operation look ahead and
so on so it's fairly straightforward anyway
this is kind of like a visitor for a meta parse trees
and on its own it's not very
useful but then down here what I'm doing is I'm ism
inheriting this visitor and overriding the
and and orals so that when I have
nesting you know if I have an end that has an
end as an argument I can pull out the
parts of that end into
the outer end and the semantics is going to be the same except
it's going to be more efficient because I only have you
know to implement that one operation and
and when I implemented this the
the Oh manage is implementation became I think
30 percent faster which was pretty neat for very
minimal effort
anyway oh yeah
and the last thing I want to show you here before I
show the Dan stuff
is so if you if you
end up taking the time to take a look to look at this stuff online
I encourage you to look at this project it's called meta
to t oo which is a pun on you know
the meta to which had the Roman numeral
two that I told you about before and what
this is is a language that's very close to a
meta implemented entirely in this little
project and so at first this
this javascript object that you see up here is
a is the
library like object that implements all
of the semantics that you need for doing the parsing and pattern
matching and then down here what I have
is the parser for this language written
in know meta and then I have a couple of examples
you know with with arithmetic
expressions and so on but then of course that
is not sufficient to do bootstrapping
but what you really need to do is once you have the
the Oh Matt alike language working you
that you want to implement that guy in itself which
is what I do down here and
you can see it's a little bit uglier than no
matter particularly because the semantic actions have
to be enclosed in these funny characters and so
on but I did that so that I wouldn't have to implement
the JavaScript parser as part of this thing right
blindly consume the JavaScript and output
it in the translated code so
anyway that's the implementation
and you can compile the compiler with the original
compiler that I wrote with no meta and it works and then
the thing that really tests it later on is if
you take the the version of the compiler
that was generated from the code up here by using the
no matter you know compiler
if you take that and and compile it
self and replace the thing you're using with
that result and it still works down here you know you're
you're good and that kind of works
it's a neat little example of bootstrapping
if you want to take a look at that later on
so I think oh yeah
one less thing that I want to show here and
take a quick look at this JavaScript
doesn't have multi-line string literals right
but if you look at this I'm actually
using one right here it looks very Python esque and
the reason why I can do that is because
you know this translate code thing my JavaScript
doesn't have to be JavaScript right I have that intermediate
thing the JavaScript parser and and translator
that I showed you before and I can easily inherit
from that and add new kinds of things so that was
traightforward and the the other neat thing about having
things having these languages implemented and no matter
that there's a thing called foreign rule invocation
that allows a grammar to lend its input stream
to another grammar temporarily and
it's an it's an alternative to inheritance for
that you may have noticed that the language that I'm using in
workspace is not just JavaScript and it's not just no
matter it's kind of a mash-up of these two languages and if
you wanted to implement that with single inheritance
you would have to inherit from one of these translators
and then implement the functionality of the other translator
which would be very annoying
to have to do and multiple
inheritance is clearly a bad idea I'm not going to go into that
because of all the you know complications
and and so on and so with
foreign rule invocation I can just have one grammar that doesn't
inherit from either if I don't want to and just says try
parsing my input as a no matter grammar and if
parsing my input as a JavaScript statement or
expression or whatever sorry
punch line yes okay so
what you're looking at here is
part of my translator
for the Niall language that Dan was talking about so
the stuff on top implements is
a is a grammar that on its own implements the offside rule you
know indentation as block structure that you see in Python
and Haskell and so on a neat thing about that is that that's
modularized away from whatever language
that you're implementing so all this stuff like
a keeping track of a stack of indentation levels
and so on that can be done in that one grammar
and my my
Nile parser which is down here also
written in no matter just inherits from that guy
and can just say you know I I want
to I want to indent
I don't know
that's identifier anyway there's there's
there's a bunch of indentation code
ah here we go so I want to I want
to tab over here and then there are these funny unicode
characters that dan is very fond of and
so on so this is the
the parser part of the implementation of Dan's
thing and there's also a
type checker and code generator that are written
by pattern matching on those data
structures that I'm creating on the right hand side and the
so it's a it's a fairly you know that one
of the cool things about Dan's language is that in addition
to you know types being used for
making sure that you don't get things wrong the
the types matter a lot for efficient
code generation for Niall and it
turned out to be relatively straightforward to keep track
of types in these grammars since you know
the grammars are kind of like class grammar
no matter is pretty much like a class in an object-oriented
language you can have state associated with running instances
of that grammar and then you can keep the
symbol table on there and and so on and in
do proper type checking so I think I'm
gonna stop here sorry if I ran a little long and
SM is gonna
nd just to clarify pegs on their
don't support left recursion but there's a cool trick that
you can do with the memo table that's used by packrat parsers
I wrote a paper about that you guys Rangers
you have all these
right so right
now I don't have a great answer to that I try it out and
hopefully it works but we're
hoping that at some point
soon we're going to be able to use the princess and
programs that then has I kind of think of them as
the meaning of the thing that I care about and
it would be really great to have an automatic way
to check the meaning against it's
true okay
we can discuss it offline
you don't need this
please feel free to leave us
time be another ten minutes I'm
Kazama I work at viewpoints as well as
um understood at UCLA actually called my father but
he said you should be out party
so what part of all the interest
is I'm sure you have seen an imperative as well as declarative
methodologies to do programming imperative
is how implementations are darling
declarative is we've seen Prolog language
you know its meanings they're compact
they're very understandable
but we need search in order to to execute
them so that the often not practical part
what your interests are here to save codes as well as to add
understandability to problems
is is there a way to kind of combine both at
he same time which is not very common today this is a famous quote
that I made recently that the natural
combination of the claritin predators is
missing a couple of methodologies
that we kind of studied in this direction is
one is I'm just I'm just gonna quickly go
over it but basically if
you add a layer
of logic on top of your your your
languages to support search basically
your heuristic search you can do imperative
programming with a little bit of overhead if you're always willing
to add optimizations so in the in
the presence of multiple methods if there's a if
there's an optimization that always tells you based on
the state which method is the is the good method to
so you always do this check to to find out the different
alternatives then you have this lovely the overhead
of checking to do your normal imperative but
when you do want when you do have the you
know leverage to do kind
of search you can you have the option
to say well explore possibilities and
find the best best scenario to do so
this is what this this prodigies are all about you
know allows you to kind of separate the optimizations and here
is the from from the actual implementations the actions
that you see here to satisfy the goals so
implements that the budget programs really
small they're really cute and slow but there
have this nice way that you can add
for example this chess program that was about
three hundred lines of code that even included some
text ASCII art graphics
where you could just actually
add any arbitrary number of heuristics that say
based on the the states that you explore basically
heuristics tell you which one is the better one to
do and then these heuristics tell
you that you know it's better to take a move when you actually
capture the opponent's piece then try not
to get captures we're adding some numeric values so you
can basically reorder the you know alternatives
but
another more serious one was you know
in compilers need to do register allocations
which is you have registers and you have variables
in the program these variables the compiler needs to decide
where they gonna be in on the registers and this has
happens to be an NP complete problem this hard problem
you want to do it optimally and then it's this is nice way
because you know you just allow a high-level
goal that that kind of this this is using
methodology in Smalltalk program that you just expressed
the goal that all variables want to be you
know assigned and you then you
have you tell it what what actions
are taken when you're doing this this task which is usually
assigning particular register with the
variable or deciding to spill or split and then
you define the optimizations on top of this that says based
on whatever state you are if you have room for
the next variable then take that particular method if
you have otherwise take the spill method
you know it just in has a layer on top of
your normal logic you can express that
in more declarative way
but the problem with here is success as
you know is that if you're implementing your own search it's
interactable so recent
or studies then I'm going to show now is more
based on boolean satisfiability
sad solvers constraint solving
technologies which are recently been shown that
it's much you know it's a
scale much better so our Britta more recent
stuff is not based on the search that we come up with ourselves but
based kind of plugging or whatever
a tool that we have two external tools that are
really good at solving problems using sad solving technologies
as we will see that they have their
own problems that they're kind of not very and they're
not nice to adding user specific
heuristics so eventually
we want some combination of the two two ways
the heuristic searching or sad solving
technologies to rethink that you know might answer
our problem so this this project
is about adding syntactic sugars to programming
languages in this case I'm showing you examples from an
extension of Java language where we allowing
first-order logic expressions like this
or you know set comprehension stuff like this
this is from a lloyd language actually
it's a model object modeling language so
we we allow these kind of expressions in the language
but they serve two purposes one is that we can
easily do sugar these two low-level syntax
of the program so these are actually runnable so if I
but this is actually a part of the code
of the binary tree and if I actually instantiate
an object and I run it you know because
it's gonna be compiled to a low-level code is going to
be runnable even though it's compact but that's
the only thing that we're interested to save lines of code we're
also interested in having a
runnable executed runnable meanings meanings that
are actually executable you see when we say
meanings we mean high-level expressions like this that says
I want a graph that is
a cyclic then this is the meaning of a cyclic
that there's no note that that kind of points back to itself right
nice to be able to without any implementation
execute this meaning that not
just running in the program that kind of using
constraint solving technology to actually find a
satisfying state for that particular
constraint so so that's
what I'm saying executable in terms of we can use some
external tool to get to what state that
we're happy without actually any implementations now we're going to use
that for two things one
the software reliability I'm showing you an
implementation of the bubble sort for in this this
extension that is pretty routine it's a bubble
sort routine but we see that you
know this is in the in light of you
know program annotations you've seen in a Java modeling language
and others where you just annotate the program
with meanings basically which says
this particular method is accomplishing this
this expression this is followed by that insurance
clause that says the job of the sort method is
that it's going to find some value that's a permutation
of the the old alts all
this and it's gonna be a sorted this is something
that we can automatically insert instrument in the in the compiled
version so that if when method of methods are
done these constraints of these
expression is going to be evaluated and if
they happen to be false that means the method was
faulty method was buggy or if they
if they even happened to have some kind of runtime
failure like a division by zero that
it's not easily found we can kind
of catch that exception and use the
exec use these efficacious as
kind of a fallback as an alternative
that the method didn't work but we can have an
alternative to to try what accomplish
what we want and in this case we
can use we kind of translate this
expression into the synthetic the logic syntax
where we can can call an external tool to to find basically
sort this list
so it's a live but bigger
example is this an implementation of red-black
tree that also have annotations for
the insert and delete methods basically
saying on an insert insert you just have one
one you note added to the set of the notes and
I delete you have one less and
basically assuming they have some
implementation that's not reliable you can just you
know use this the annotations to
accomplish what what they do actually you
can think of this so
I found the implementation typically about five
six hundred lines of code or three hundred lines of code of Java
because of a lot of corner cases that these balance
trees need to satisfy this
you can think of it as a kind of a minimalistic
runnable implementation as you will it's
like an interface for for the whoever wants
to implement it but the neat thing that this
has that the interfaces don't have its runnable so you can have
actually write what these two methods are gonna be
in the future but because you have annotated
them actually you can we can test them and run them because
yeah you know we have that underlying
reasoning system so that you actually without
the implementation can test your program
interface to to
move around another so
this is the last thing I'm showing is that you can
always intentionally use this fallback
system the use of fallback
when you want to do something bit clearer deeply you don't you
don't even want to implement something but
you know you can use the constraint solving technology that kind of
embedded in your in your language to accomplish
something that's kind of cumbersome
so in this case for example this is a it's a a
GUI example where this
is very simple a user just puts the dots on the
screen you see these four dots are putting in
screen without a problem so the the the job of this
particular method the ad body is very trivial
it's just you know draws the dot and this box
shows that there's this restriction
on this this application
that says a user should not put two dots
too close to each other there's a minimum distance that they might have
so you imagine the the normal
you know invocation of this method is
very trivial it just draws it as as far as those
violations are not you know those specifications
it's okay it just but
under a corner case is when actually somebody
put a red dot here and that kind of you
know violated that property you
don't want you don't want to implement that that's a that's a hard
thing to do potentially a lot of dots needs to be moved around right so
in that case you just don't
handle it in your in your program and
we're gonna kind of you can't automatically fall
back to constraint solving in a sad solving - to do what
- basically shift some dots around - to
properties and that's what's happening here
and you see that that box
here is saying there's a restriction of how much those
dots are you know are allowed to shift by by
the by the method so you see that you know
these two are shifted a little bit you know to
separation is happening so basically I'm showing
you the code that that does this
this is the this is the
entire code that when you're when you're adding a dot you see
that it has this this
check that it needs to do that I'm written
here also in a in a high level syntax
of alloy the first order logic that they
have the two things that says no to dust needs to be too
you know too close to each other and when you do move them you know
you're not allowed to remove them by more than an
a value and you see that there's no implementations here so
that when I put that red dot you know it kind
of automatically figured out
those are the things that just wanted to show you so
if you have any questions or for
previous
before
basically
but also
II think that we don't have a cat
the other
find that
like