 So thanks for coming I think that this talk is going to be the one where we have by far the most amounts of like beta alpha Fresh off the presses software in this conference. I've got a random build of Windows 7 running up here with various versions of Unreleased products and C sharp things and all sorts of stuff. So I think we're gonna have a lot of fun here Well, we're just gonna blow up spectacularly right one way or another You know, I certainly can blame all sorts of other stuff right for this thing blowing up now I Wanted to Talk a bit about where we are today with with Ruby and an iron Ruby I think that where things have kind of changed the most Since the last time I saw all you guys was certainly we've had a year to to write more code Which is a good thing the second thing is As of late we've kind of focused on some interop scenarios Which I'm going to be spending most of the talk today talking about And by interop it's really asking or answering the question Why would you want to use iron Ruby in the first place? And it's really if you want to talk to netcode right if you're not interested in talking to netcode There really isn't an awful lot of reason for you to be I'm using our reviews plenty of other things We can use but if you are interested in interopping with netcode Either by hosting Ruby I'm Ruby inside of one of your existing applications or perhaps you know just going off and Talking to Ruby code from from your your from or talking to sorry your netcode from Ruby scripts You know those are the two kind of key scenarios that you know that we think are important to folks that want to use it I'm going to leave all that status stuff about where we're at You know and all that stuff for the very end of the talk so we'll talk about that there but I thought I'd start off with by By kind of talking about the things that I've identified particularly interesting about Ruby Which is the interactive nature of of the of of the language Certainly most of you guys in this room spent a lot of time in herb right and rightfully so And I wanted to essentially try and spend as much time as we can inside of herb And I thought what better way of kind of showing off Where our Ruby today is today, but by kind of building our own or right building a repl And this first part of the talk is going to show you how to host Iron Ruby inside of an existing application that you might have already and to show you essentially the set of hosting interfaces We have Which make it very very straightforward for you to go off and do exactly that right which is take some chunk of code and executed inside of iron Ruby So I'm gonna start off here with this this This WPF application this WPF application just kind of goes up and throws up a big blank screen With an area where you can go off and type some stuff into There's lots of crazy software running on my machine. I'm paging in the world right now, right? So This is in the normal state of reference. Okay, there you go So I can say hello and this thing just simply goes off and echoes it right so what we're gonna do is we're gonna change Just things so that we're gonna take what was typed in up at the top there And we're gonna run it through iron Ruby right and throw the results back out onto this rendering surface that we have here So the first thing we have to do is add some references to a few assemblies The assemblies that we need to add some references to are The iron Ruby assembly certainly there's two of those guys and the three on DLR assemblies that we have as well So we come over here We'll come in here. We'll see that. Oh, we'll see those guys later So these are the five assemblies will add references to in here Once we've got those things out at inside of our project We're now free to go off and construct an instance of the iron Ruby engine and from the iron Ruby engine We'll just go off and get it to to execute a little bit of code on our behalf So coming up to here, let's let's go off and create an instance of this engine Let's kind of drop a field in here first This is a script engine All right, we'll create one of these guys and In here, we'll just go off and initialize it now. What's cool about this thing I'm going to show you next is we're going to not just to create an instance of the engine We're going to initialize it to To some set of things or there's options that you can certainly provide to your compiler What's particularly interesting about this these interfaces? We're using a wrapper here with Ruby dot create engine There's a more generic set of interfaces that sit behind this thing so that you can certainly use exactly the same set of interfaces These are the DLR hosting interfaces to host any arbitrary DLR scripting language Inside of your application, right? So by essentially changing the name of the engine that you want be at C sharp which we'll show you later Right or other things like, you know iron play thong You can simply go off and have exactly the same chunk of code But switch arbitrary engines at runtime right or embed arbitrary on DLR scripting engines at runtime Anyone here's seen the new C sharp for syntax Yeah, so these one guy here right so what I'm showing you so C sharp 3 syntax. I'm getting ahead of my self so the The C sharp 3 syntax. This is a delegate that we're creating. We're creating anonymous delegate on there's a parameter set up there We're typing furring what the type of setup is in there So there is the parameter list inside of the first set of prints with a set up inside of it now inside of the curly braces I'm going to go off and define the the delegate or the block or the block like thing so I can go off and say set up dot options and Interpret it we'll set this thing to true Right, so I've gone off and created this thing and I got a little bit more punctuation that I need in this language It's a lie that So I'm going to turn on the interpretive mode one of the things we have inside of The current version of iron Ruby today is by default. We compile everything Right and certainly for if you're going to default to compiling everything from the get-go And you're just executing code inside of a repel right it doesn't make an awful lot of sense to do that since you're Just kind of throwing dynamically typed in code at this thing So rather than us going off and compiling everything what we'll do is we'll execute things inside of the DLR interpreter This is the interpreter that we use for all of the DLR languages We'll interpret using that thing and then we'll do some other stuff right so we've gone off and we've created our engine right here And let's go down to here where I just have this little chunk here which inserts some text right? So let's go grab that text first Oops Okay, so I've got the code Sitting in there now, and now let's go off and evaluate this and grab the result So remember I have the engine that I created Up in my constructor earlier, and I can go off and execute the code that we just typed in there I can take the result of this I'm going to put a little bit of a guard clause in here to test for Null here All right, so we can match the Ruby semantics a little bit better for this thing here and then what we'll do is We'll just say result.toString And we'll insert the result of whatever we typed in and we'll print it back up All right So that's essentially the sum total of everything that you need to type in to go off and take Iron Ruby or with a few more lines of code in arbitrary DLR scripting language embedded inside of an existing C-sharp language Or application and run it So go off and run this guy now All right, so certainly we should be able to add numbers right we should be able to add Define a Ruby method We'll do that Right, and so we get that right so you know in what like a few minutes We were able to go off and take some the Iron Ruby thing and embed it into Wow, that's not very contrasty up there Embed this thing inside of an existing application So that's the first thing that I mean why want to do the second thing that I want to talk a bit about is So we've taken the Ruby scripting engine embedded into something now Let's try and do some other Ruby ask things inside of our REPL One of the interesting things about REPL certainly is that we have the ability You know to to evaluate not just a chunk of code, right? But we want to be able to evaluate the chunk of code grab the result right so we've already got the result They're sitting in result But what we would like to do next is let's take that and let's invoke something Right, so let's invoke something on that object. I've got an object reference now Right, so rather than doing everything as strings like we have before Let's go off and invoke a method on that object reference that we just got back make sense So two things I want to now show you is how we can go off and you know from C sharp again Just add a reference to an existing Ruby file And the second thing that I want to show you is Once we're inside of this thing once we've kind of added a reference to something Let's go off and invoke that that thing so What I want to show you is how we're going to take the object that we got back And we're going to invoke a little helper method So what we do do is we're in a monkey patch object We'll add a little helper method which will convert things to XAML for us So I'll take a to XAML method that's going to return to me at least initially a string And then we're going to extend this thing a little bit more on later on in this talk And What we'll do is we'll just print the results out right so we're going to pass it back to Ruby to do something and we'll take the results and and display it on the screen So let's get out of this guy here. Oops Yeah, I'll show you a solution Right. I'm watching me type stuff. I'm going to show you a few other things in here. So Inside of this project. I want to show you this file So do fall default viewer dot rb It's simply a Ruby file that does The monkey patching thing I talked about before right so it adds a to XAML method up at the top there Which simply was says, you know equals equals and the result of converting myself back into a string right and printing out my string representation there So that's the the kind of universal chunk of code that I have there What I'm gonna do next here is I'm going to show you the two little bits of magic, right? So remember this was the same stuff that we saw there before Right down here what I'm going to do is I'm going to require the Ruby file All right. So again walking up to the engine. This is a Ruby engine. So I have a require Ruby file Method on there, and I'm just gonna go off and grab that default viewer dot rb file once I've got that Let's scroll down here to the interesting part and This is where all of the action is here. All right, so var object I'm gonna walk up to our engine Given the operations and I'm gonna invoke a member right so remember result was what I got back from initially evaluating the thing Right, so I've eval the expression say it's 3 plus 4 return me back to 7 which is a fixed num Right. I've now got the fixed num object, and now I want to go off and invoke the to xaml method on it now Since I had earlier required right that default viewer program right the default viewer program is monkey patched object I have a to xaml method on this thing right so this will go off and do the invocation for me so set a break point in this and Let's run the app again So we're gonna evaluate this guy here, and if we just kind of hover over this thing That's a little bit tough to see but that's that says seven right on the tooltip there, you know above the result Right, so we've done the evaluation. We've got this guy back. He's now a seven Now we're gonna go off and invoke this to xaml thing And now what you'll see is is that obj is now equals equals seven right again, you know Imagine that it says that but it does so it says equally equal seven So we now have the result of this thing and if we continue running this thing come back out But you will see that that's what it printed it back out to the screen So I have the ability now certainly to go off require arbitrary chunks of Ruby code into my C sharp programs Invoke on that code You know on an per object basis right or on any arbitrary object that I get back from iron Ruby I can store these things Manipulate them from C sharp if that's what I want to do and then send the results back Right so it's this kind of interop which really makes you know iron Ruby particularly interesting to people that I want to go off And do some interesting.net things Now kind of taking this idea about rebels a little bit further The value of rebels is really and especially if you kind of combine them with something that isn't just about text Right the problem with consoles is that consoles are just about text If we have a richer rendering surface and just something that's supposed supports a character mode interface We can go off and render arbitrary things in a more interesting way right So the next part of this thing what we're going to do is we're going to take the same idea which is I've got these viewers right and these viewers are just these Ruby scripts. I can take these viewer scripts And build arbitrary viewers for arbitrary types Right and since I have a graphical surface here. I can stick arbitrary things in there So let's take a look at The next step of this down. So look at part 3 a Few other things change here, but the file. I want to show you now inside of part 3 You'll notice that there are two of these viewer things. There's this crazy looking system Da blah blah blah create that thing right system windows media imaging bitmap image viewer All right, so inside of WPF, which is a windows presentation foundation User interface library We have bitmap images like you have bitmap images and virtually every other kind of UI library What I want to do is if I go off and run this thing and I get one of these guys back Right if I get a bitmap image thing I want to inspect the type of the result that it got from eval the expression that the user typed into the rebel Right once I've got the expression type I want to go off once once I've got the object right that was returned I want to inspect its type right get back its class name You'll notice that's why I have this scary looking File name up there because a scary looking file name is the type name with dog viewer dot rb appended to the end of it I will dynamically load in the viewer right for that thing I'm using the require mechanism and once I've got that thing loaded I can essentially dynamically expand my repel right my repel can now Come back and allow me to build custom viewers in script for arbitrary types You know and and certainly your user to find types as well So all this thing does is it monkey patches The the bitmap image type and that of course is a WPF type right so what we're now doing is we're opening up an existing net class We're adding our to xaml method that we have there What our to xaml does is this is just a bunch of WPF stuff, right? So it does a bunch of WPF things are required to go off and display a picture on the screen details Aren't particularly important in here. What is important is the fact that you know our view of the dot-dead type system from iron Ruby Is the same as the Ruby type system is from the perspective of a Ruby programmer? And that is all types are open at all times We can go off and monkey patches things and do the usual Metaprogramming tricks that you're used to on the other world So we've got that thing there Let's run this guy Was over here What I'm going to do is I'm going to go and grab the scary-looking chunk of text that I'm going to type in here oops not there This scary-looking chunk of text oops We'll do that so You know it is kind of cool, right? There are a lot of things that we can do here The scary-looking chunk of text is I'm going to require some assemblies on that I need those are the assemblies that contain the types That I happen to be using Presentation core is the assembly that contains bitmap image right and system is the assembly that contains the URI type So what I all I did was I went off and grabs them image. I was lying around on my desktop and And constructed it of course and since that was the last thing that was evaluated the result was passed back to C sharp Right, we can actually see this run a little bit better inside of the debugger Let's do that way So Right here Let's see the different steps that we have inside of this code So it pays the same chunk of code back in up here And we'll run that so when we execute the code here, I've got a result there and this is a That's the bitmap source object that was returned to me Once I've got that I can go off and grab his class name So the fully qualified class name is into the system windows media imaging bitmap image that comes out of there I'm going to you know do the little guard to test that it exists and then require that that Ruby viewer file in this case We've done the require now again. We're going to go off and invoke that to XAML Method to XAML returns me back an object and that object in this case here is a paragraph object Right, because if we go back to the code here You'll see that the thing that's actually returned from the to XAML method here oops is A paragraph that's new it up and P is the last expression that was evaluated inside of that so I get the paragraph object back from this monkey patch method on the other side and We just do a little bit of testing to see those really a string or not Right, and if so then I call this insert object thing which inserts the picture into the surface. Yes Yes absolutely anything that you can do right you can in Ruby you can do with our Undefined from the So I believe your question is Does it undefined from the CLR's view of the world or just from the Ruby view of the world and it's only from the Ruby view of the World right the CLR is still ecstatically type runtime, right? So we can't just walk up to types and remove things right But what we can do from the Ruby view of that type is remove that remove that that method right from from our Binder lookup, so we can certainly do some kind of funky things like that. So so that's all pretty interesting right like you know we I think that these kinds of scenarios are really interesting for people, especially when you have an existing application So we've been doing some experiments You know back of the ranch those experiments have us taking a very large chunk of compiled code like visual studio Right and building extensions for visual studio inside of a dynamically type language Right so so that turns out to be very interesting if you've ever tried to build an extension for any IDE Not just visual studio You know how painful that is right because the the the the idea is the thing that you're building the thing That's hosting in back in the thing right so you always have this multiple step painful process of building the thing Shutting down the idea bring back the idea again or having multiple instances or some other crazy thing right so So again in this kind of script-driven development against a large chunk of statically Compiled code right turns out to be a nice way for adding extensibility points into the into the applications that you're building as well So there was on step three now So the next thing I want to show you is going to be perhaps a little bit more adventurous Right and let's kind of take a look at and it's so adventurous in fact that we needed to you know shove the thing into its own house Which is right here now some folks Earlier I believe during Charlie's talk about what it's like for you from a statically type language to go off and invoke methods Right inside of a dynamically type language like Ruby So one of the things that we recently announced of a week or several months ago depending on how you measure time Is this new feature inside of C sharp 4 called the dynamic feature? All right, so what dynamic allows us to do is it allows us To walk up to stuff right so here what I've done in this little program here is I've Precreated a little chunk of Ruby code right so you've already seen that stuff Ruby create engine right? I'm going to execute and define a class C right inside of inside of iron Ruby and Of course since that's the last thing that gets returned right you know So the last expression valid is returned so we have a reference to C right that's returned back to us now what we can now do is We can walk back up to this this engine Right and inspect its variables right or its constants if you want to talk in Ruby terms I can scrape back out the C constant right find the object reference that it's referred to and I can do stuff with it Now right and now that I have compiler support inside of The language for doing these kinds of things It looks a little bit better. It's not quite as Beautiful as it could be right because of keywords and silly things like that right, but I'll show you essentially what this stuff winds up looking like You know when we do this so let's let's do that Let's just hope I'm not paging the world in right now which might happen so But the nice thing is I'm using Vim right so it it's certainly a lot smaller than other things So what I want to do is create a variable called class C right notice that uh the static type of this dynamically type thing is dynamic So I have class C. I'm going to walk up to our engine that I have up above there And I'm going to go off and retrieve the variable Now these are generic DLR hosting interfaces. These are not Ruby specific things right so variable I'll make sense in DLR terms although it doesn't necessarily make sense in in Ruby terms Okay, so I'm going to go off and grab this thing now that I've got the class C reference You can imagine that I can create an instance of this thing now, right? So I'm going to go off and this is the thing it's going to hold on to the instance So really what I want to do is I want to invoke the new method right on on the the C unfortunately since new is a C sharp keyword right we can escape You know reserve words and C sharp with the at sign and I can construct a new instance of this guy All right, so I have that and now that I have the instance I can just go off and invoke stuff right so I can say hello oops from Iron Ruby All right like so and if I just go off and build this thing a little bit of building and I run the program After paging in the world again. We see hello from Iron Ruby. All right, so certainly what we have here, right? Is a much nicer way for allowing us to from a dynamically or statically type language to go off and invoke stuff inside of You know a dynamically type language now this works not just for Ruby So this so what C sharp is doing is it's using the DLR to go off and do all the invocation against these These dynamic entities on the other side so all of the things that we get from the DLR the call site caching stuff right is also being used and exploded inside of C sharp to go off and and talk to the languages on the other side It might not necessarily be a Ruby thing one of the more important scenarios I don't know if you've ever done office programming from C sharp, but that's a very painful thing So this certainly makes it much easier to talk to con based objects and you could argue the con based objects via I dispatch are really dynamically type things right guy can walk up and say and Get me a member called Bob right and go off and invoke the member called Bob, right? That's what I dispatch is all about And certainly it makes it much easier for languages statically type languages like C sharp to play inside of that world where I need to Be able to go off and do dynamic invocation right against existing big large chunks of code So So this is so this is coming in C sharp 4 Which is part of the visual studio 2010 kind of wave of release of things And I think that this will be a you know a pretty fun thing certainly for folks not just doing you know Obviously office programming, but people are interested in interropping with existing libraries of Ruby code from C sharp Now so I can now make this VM go away, which will be awesome Bye Now If C sharp 4 wasn't enough for you, I'm going to show you C sharp 5 All right, because we you know, there's certainly more things, you know Upper sleeve so there's been an effort the the R Ruby team sits in a larger organization of Microsoft Which is our languages team so languages team is where we certainly have C sharp and VB and as well as languages like iron Python and F sharp as well So we share a bunch of things one of the things that we're doing in The C sharp team is rewriting the compilers the compilers are originally written in C plus plus right which made a lot of sense Considering the heritage and the legacy of this thing the compilers are being rewritten inside of C sharp itself So what this makes possible is for us to go off and use a compiler as a service So now that we have the ability to use a compiler as a service We can now go off and do interactive C sharp type things right so we can build repels for C sharp Right, we should be able to get the same static type in goodness. It's still a statically type language, right? But we can add a repel experience So rather than being all dogmatic about should you be dynamic or should you be static right? The idea is inside of C sharp that you all the ability to kind of mix and match and and go between the two worlds as you see fit So I want to show you is I'm a slightly more sophisticated version of the repel that I've been showing you up until now And what this thing does is it has some key? Bindings and stuff in it to allow me to kind of toggle between the languages So if I wanted to do I'm something inside of C sharp, right? This is C sharp and notice I didn't need the trailing semicolon inside of there. It's smart enough to figure that out I can go off and define a class inside of this thing. So I have class C here Let's make this a public class so I can actually see it Public string say hello String dot format right. Hello, right to me All right, so I can go off and define a C sharp class from here and Let's also essentially go off and let's once I've defined this thing. I can return a new instance of The C sharp class after I've defined it. So let's execute that All right, so you'll notice I've got a little bit of syntax coloring and stuff inside of here as well So I've got class C. I can do say hello, and I've got this reference now We're now in Ruby Well, we're not really in Ruby. We're in a repel right the repel essentially has two key bindings one They'll execute the code inside of iron Ruby and the other one that will execute the code inside of the C sharp repel that we have right So as you know inside of Ruby right the last expression that you've evaluated right is sitting inside of underscore So if I now execute that code inside of Ruby, you can see a Ruby esque style thing at the bottom Right, so again interactively from this this guy now. I can walk up to this guy and say Say hello oops To that right so I've gone off and inside of repel dynamically to find inside of a repel some C sharp code I'm inside of Ruby gone off invoke that thing and brought the results back all the way So that's a pretty Interesting way of development right again this kind of very exploratory style of development living inside of a repel all the time Hopefully trying to type the min set of things that you you need to type in order to make things work The C sharp repel also allows me to define methods of top-level scope as well if that's what you want All right, so again, I don't have to define the class But in the case of where we're sitting right now We kind of sort of have to do it to make it easier for us to do the demo right But that's just due to the state of our implementation But down the road will certainly make it very easy for you to go off and invoke the method That's on the other side just the same all right now The object that we have right that that we've got sitting inside of underscore or D or whatever That object is a C sharp object and it behaves like a C sharp object Right, you'll notice that it takes a string as a type So we've done some conversion magic right to take a Ruby string and you know and convert it to the appropriate type Right once it hits the C sharp side of the house But what if we wanted that guy to behave a little bit more like Ruby Right, so you know the Ruby right when you take methods to take strings There's some you know a lot of the things you do are these protocol conversions inside of Ruby, right? So if he method if he an object implements a to stir method, right? We'll go off and call to stir right automatically before right as part of the protocol conversion, right? So we type this thing as object and wrote a bunch of code to introspect into object to see whether or not he implemented to stir and if he did then call it and right That's a whole bunch of boilerplate code that you have to do over and over again You know when you have to go off and build libraries that you want to integrate more seamlessly with Ruby All right, so you're not satisfied with these things just being C sharp libraries You want to kind of rubify on these libraries that you have on the other side In an ideal world Right, what I would do is I would go off and type that class definition again and insert this little magical attribute That we're about to show you in a second But unfortunately the C sharp 5 compiler isn't done yet, right? So it doesn't really understand attributes and there was a little bit too much work for Tomasz to go off and hack attributes into the C sharp compiler Just before this talk. So what I'm going to do instead is I'm going to statically compile this guy So I've got this guy here. So let me show you repel dot CS So this is the same method I showed you before Except that I have this default protocol attribute here that guy there On what the default protocol attribute is this is what we use inside of our libraries, right? So we have so what we're doing is inside of our method binder We look at the annotation right the that that we have inside of the default protocol attribute We look at the type of the parameter that it's attached to this is a parameter attribute It's attached to a string. So we say ah, we know what the default protocols right for converting to string Are we look for this to stir method and we do the the to stir set of conversions So we've essentially codified this thing inside of an attribute week which we can declaratively apply to our library methods This is how we build things inside of the iron Ruby libraries themselves, right? But you can take advantage of the same things that we did in building the iron Ruby libraries to make C sharp libraries integrate more seamlessly back in with With your Ruby applications. So what we'll do is we'll just simply compile this guy here There's a build script inside there that generates repel dot DLL So there's repel dot DLL that we just compiled there Let's get back out of here and Let's run the thing again and let's require that guy All right. So this thing is a dot net assembly. So it's equal in whack. What was it? bdc Ruby repel scripts repel dot DLL, right was the name of that guy. So I've now grabbed that assembly I now need to create an instance With that guy and say hello, right and we'll pass John right the simple thing right just to verify that the simple case does work Now let's go off into flying a new class. Let's call it D, right? We'll define the to stir method on this guy, right? We'll say, you know Mike right in there Right, we'll define D right then I can go see dot new dot say hello to D dot new And we also have that Automatical protocol thing that happened there, right? So I took a Ruby object that I created right an instance of the class D there, right? Constructed it passed it in there and we automatically called We did the correct protocol conversion on the way in To our C sharp methods, right? So again, it also makes it much easier for you to you know to integrate these things back in with your world All right, so So we did that we did that Okay, some more fun stuff to kind of you know finish it all off So on the the the more fun side of the house, I guess it's been What years is now this 2008 right so 2007 2006 right so two years ago Was where I first kind of showed off this black thing right that that that I like and I'm gonna let it page in the world right now. It has to do a little bit thinking right now, but But the black thing is Kind of interesting right because it's this repel but it's a repel built on top of a WPF surface So in a WPF surface, it also makes it much easier for us to integrate other things like documentation right into the surface And render it in nice ways and that kind of stuff So what I have here is essentially all the R doc stuff, right? So, you know, I can go off and hit this key, right? We can look at the docs in line here. We can toggle this thing and bring it, you know Make it show up or hide, you know But this is a relatively simple thing for me to go off and do what's actually rather interesting about this thing Is it does the right thing with different types? So depending on how good my network connectivity is this is where we live dangerously, right? All right, so if I require Ms. Coralib and I include system and I can go I disposable and Trigger for the same hot key what this will now do is go off To if the network gods are willing It goes off to MSDN and scrapes the the documentation off of a web servers from From the web since I didn't test this before I turn this thing on maybe my wireless is busted But anyways What this will do is it will go off and pull on pull down and integrate arbitrary documentation from outside sweet You know integrate arbitrary documentation from the outside world and drop it into here, right? So this is the same docs that you can view on the web if you search for this stuff And everything just shows up and again you can do this all interactively right so I've got some object reference I do control f right it goes off and finds Determines the type of the thing and looks up the documentation for Depending on whether or not it's a ruby type or if it's a you know a dot-net type All right, so there's a lot of kind of cool things that we can go off and explore You know now that we have you know a nice surface right for us to go off and render things onto All right, so I think there's some really interesting ideas that we can do here with Contacts and stuff so so anyone wants to talk to me about this stuff at the conference I'm really interested in hearing your ideas because I think that there's a lot of fun things that we can do with With an interactive repel style of experience, you know talking to Your statically type stuff right whatever that happens to be So to finish things off, I will have my obligatory status slides which unfortunately I haven't updated So Tomosh be mad at me here because I didn't update some of these numbers. We're doing better on the language on specs So on the language specs we are passing on the order of 93 percent as opposed to 91 which is what that thing says The library specs were roughly unchanged. We're still at 78 percent. So we're not done doing this ruby standard libraries You know so again, this is you know stuff That's actually not as horrible to implement as you might imagine right given a lot of our Declarative style of programming that we have inside of our code base. So that's where we are in terms of the ruby spec pass rate This is our performance numbers right so performance like all things. It's a mixed bag Sometimes we're better. Sometimes we're worse those. That's the the ruby 1.9 benchmark suite You know the details of which ones are you know suck and which ones are awesome really aren't all that particularly interesting, right? We really haven't had an opportunity to do any performance tuning at all These are just our numbers right now as is you know run like a couple of weeks ago. I'm using some random build You know so like a lot of things is a mixed bag We're still working on making sure we get the language, right? And I think that a ruby language conformance tests are you know or you know essentially showing that our efforts in that area Sitting at 93 percent right now But we're gonna you know drive that thing as high as possible right given the limitations of the CLR itself and Once we're done doing all that stuff. We'll start paying attention to some of those numbers You know certainly the worst number I think they're the biggest red thing going off to the left right as our regex support right now All right, so there's a whole bunch of things that you know We know suck and we will go off and fix those things one at a time when we get there The other interesting thing about our ruby is its size right now if you use a modern compression algorithm seven zip we We compress down to 1.4 meg for ruby and the DLR right so all five of those assemblies I showed you earlier. Oh, sorry not just those guys, but the entire ruby standard library that is all in ruby form compresses down to 1.4 meg I Suspect that that's not going to grow by an awful lot. We'll certainly weigh in at less than 2 meg by the time we're done You know getting to 1.0, but that's a pretty kind of encouraging result in terms of you know Trying to keep things small and simple. Ah Yeah, okay, so I got one more hippie moment, right? This is my hippie moment So this is an interesting fact. This is a few years old, right? Which is rather shocking depending on whether or not you look at these numbers much at all But this is what the DOE Estimates in 2006. That's an awful lot of power that's being used by servers Now what's interesting is as you know this whole cloud thing and all that stuff starts showing up It becomes interesting right like you want to optimize on different axes at different points in time during the kind Of trajectory of your your project, right? You know certainly in the early days you want to make sure you ship the thing Right, that's obviously the most important thing for you But over time right migrating pieces of code over to a more efficient languages. Let's call them that right You know makes a lot of sense right especially in the cloud where you're being billed by walk walk CPU hour Right, you know how a financial incentive to make sure that you're using as few of those cycles as possible on a per Transaction basis right so starting off in a dynamically type language But having an easy migration path for the parts of your code that you should do right? You know migrate over to statically type code as it makes sense is a very useful thing to do One thing that I thought was particularly interesting We had our big developer shindig last week in Los Angeles The top rated talk and all of PDC was a talk from some folks at MSR on That's Microsoft research on static verification of code, right? So you don't want to necessarily just go to statically type languages just for so-called performance benefits But you might want to go there because they're more sophisticated analysis tools that are available to you in a statically type world Then you have in a dynamically type world right so again for the parts of your program that might be More critical you want to you might want to go off in and migrate to a statically type language So you have the ability to do static analysis across these things as well All right, so not just the hippie stuff, but these other things are things that you can consider as well So I Have no idea how much time I have am I right on the I think I'm right on the the 45 minute mark right now So that's where we are right. That's where our wiki lives. We certainly were an open source project all the usual stuff, right? I'm sure you guys know that by now You know so, you know, we're very interested in having people you know help us if not with just ideas Maybe code right on bug reports and fixes and those kinds of things are certainly welcome as well And I want to thank you guys for showing up here and let's open it up for questions if there are any time left So how much for the question was you know, how much faster how much more awesome are we gonna get right once we start paying attention to this stuff I don't know right, you know like like performance is this black art thing, right? Like you like performance in the scenarios that you care about other things that matter, right? So certainly whole program performance is what people really care about micro benchmarks are very useful for compiler implementers But not very useful as far as people that use a language are concerned So that's really where bug reports really help, right? You know so, you know having you run your your stuff in real Applications and report back to us all we have to do is hit some code path where we suck, right? And your overall performance is gonna suck and you're not gonna be very happy with that So in terms of figuring out how much headroom that we have there hard to say But certainly if you look at where iron python is right in a language that has had a lot of tuning Relative to CPython iron python is faster and CPython on micro benchmarks, right? You know we've done some other things with some other languages inside of the lab as well So we have some very encouraging performance numbers with them more popular dynamic languages Let's say that we've we've investigated in terms of seeing how fast we can push to see a lot of go things so You'll have to wait until we have the results, right? Is probably the best thing is I'm not gonna make up numbers here, right? Because that's not gonna be very useful. Yep Yeah, we have some patches coming in from the outside, you know almost all of our numerical support was written by Peter bacon Darwin Who really likes numbers which we're very happy about? You know certainly what we've seen is that the bar to The barrier to contribute is relatively high and first some of the reasons are our own fault, right? We maintain two source code repositories which really sucks, right? And and and that's an artifact of our big testing infrastructure that we have inside of the company and you know one of my my top-line things I really want to do when we get back to the ranch is Figure out how to fix that problem, right? We really want to get to a single repo We will most likely move off of SVN on a git when we do that You know it just it makes sense for us to do this right what it means is the bottom line Is pain has to be felt somewhere the question is where should the pain be felt, right? Should it be felt on the inside of the company or should it be felt on the outside of right now? The pain is felt on the outside right because there's a lag between our internal commits our internal source control and So the time stuff gets on the outside And you know two-way merges and that are just not fun, right? So It's really who wants to do the merging and where does the merging happen, right? And that that's really kind of what happens right because we build on top of stuff that's changing, right? So that's the other thing right the DLR is changing the CLR underneath that thing is changing as well Right with the next version of CLR So there's always the V dot next of some other thing that we depend on right that sits somewhere inside of the chain Right, so it's that's where it comes back to right where you want to feel the pain So that that's our big thing we want to make it much easier for folks on the outside to contribute Yeah So the question was are there plans to make the DLR more of a first-class citizen? Oh, I see what you mean. Okay. Yeah, so so Yeah, so we already have I could have shown you that I didn't think this crowd would be particularly interested in seeing found new Ruby project But we do have found new Ruby project working inside of Visual Studio today. We've got some rudimentary syntax coloring working in there You know this extension model that we're talking about experimenting with you know where you can build extensions to Visual Studio inside of Ruby We've got some you know prototypes of that stuff as well So we are definitely working on those things and we definitely want to make sure that you know at some point in the future, right? For Visual Studio 2010, it's too late right for us to get on that that boat But you know for whatever the version after that's going to be called, you know, that's certainly in the plans right now Well more sure Okay, so the question was so so we're 1.4 meg on on on size of the bytes on disk, right? How much memory do we consume right now? Oh, we really suck at that right now. So So in terms of memory consumption We're on the order of 2x worse than than jRuby is right now We know where a lot of that is and we know how to cut that up. We just haven't done the work yet So we've done the measurements to know where where that sits so our goal certainly is like there's no reason why we shouldn't be able to get down to jRuby numbers in in terms of our working set and Yeah, so that's that's all kind of tied into that Yep So the question was what about Ruby 1.9 compatibility Certainly the place where you've done the most work in that is inside of our string implementation right with with an I4 to the The internationalization of a multinationalization stuff inside of 1.9. So that's where we've done a lot of work We've got a experimental 1.9 flag inside of iron Ruby today that you can enable if you want to try a few features But we really haven't been tracking it right? We're you know, we're still trying to get 186 to work Right, so so that's really where most of our energy is is focused But we are looking forward in cases where it makes sense like in strings on that Am I out of time? I'm out of time. Okay. Thank you very much