{"id":74,"date":"2007-03-17T08:18:07","date_gmt":"2007-03-17T16:18:07","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=74"},"modified":"2007-03-17T08:18:07","modified_gmt":"2007-03-17T16:18:07","slug":"mtnwestruby-rubyclr-and-rubynet-by-john-lam","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/mtnwestruby-rubyclr-and-rubynet-by-john-lam\/","title":{"rendered":"mtnwestruby: RubyCLR and Ruby.NET by John Lam"},"content":{"rendered":"<p>\nmtnwestruby: RubyCLR and Ruby.NET by John Lam<br \/>\n17 March 2007\n<\/p>\n<p>\nJohn works for Microsoft. Before coming to Microsoft, he built the bridge for running Ruby on the CLR (common language runtime).<\/p>\n<p>\nWhy would anyone want to run Ruby on someone else&#8217;s virtual machine? To answer<br \/>\nthat, we look at the overlap between what we want to do and what we actually<br \/>\ndo at work. It would be nice to maximize that overlap. Many of us want to use<br \/>\ndynamic languages, by many of us have to use .NET or Java. Running dynamic<br \/>\nlanguages on the one of these VMs helps maximize the overlap.<\/p>\n<p>\nThe interop layer for Python is going to be fundamentally different than that<br \/>\nfor Ruby so that when you write a Python program using .NET libraries, it still<br \/>\nfeels like Python code, and when you write Ruby code, using .NET libraries, it<br \/>\nstill feels like writing Ruby code.<\/p>\n<p>\nLutz is an MS employee that worked on <a href=\"http:\/\/en.wikipedia.org\/wiki\/Intentional_programming\">Intentional Programming<\/a>, which never went<br \/>\nanywhere at MS. He created an editor that would parse the AST (abstract syntax<br \/>\ntree) and display it in different ways. This idea lives on in the <a href=\"http:\/\/www.aisto.com\/roeder\/dotnet\">.NET<br \/>\nReflector<\/a>, which will decompile .NET assemblies into IL, Visual Basic, C#,<br \/>\nDelphi, etc. It&#8217;s interesting to use Iron Python to compile code, and use the<br \/>\n.NET Reflector to look at the IL.<\/p>\n<p>\nDynamic methods are an interesting feature of the CLR in version 2.0. If they&#8217;re not going to be used, they get garbage collected. Before 2.0, once you load code, it stays loaded for the lifetime of the VM.<\/p>\n<p>\nInteresting: The CLR supports polymorphic methods based on the <em>return<\/em> type, not jus the arguments. This isn&#8217;t a feature that C# supports.<\/p>\n<p>\nThe Ruby to .NET interop is extremely fast &#8212; millions of operations per<br \/>\nsecond.<\/p>\n<p>\nJohn used Vim on Windows when he edited code.<\/p>\n<p>\nOn April 30th at the <a href=\"http:\/\/www.microsoft.com\/events\/mix\/\">MS mixed conference<\/a>, we will see the interesting things<br \/>\nthat John Lam has been working on since he joined Microsoft, which he can&#8217;t<br \/>\ntalk about right now. However, the really interesting conference will be Microsoft PDC because the technology will be more mature.<\/p>\n<p>\nQ: Can you run Rails on the Ruby CLR?<br \/>\nA: No idea.<\/p>\n<p>\nQ: Can I run Ruby.NET on mono or on my PowerPC?<br \/>\nA: There&#8217;s nothing that would preclude it from running on Mono, but Microsoft is not working on it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>mtnwestruby: RubyCLR and Ruby.NET by John Lam 17 March 2007 John works for Microsoft. Before coming to Microsoft, he built the bridge for running Ruby on the CLR (common language runtime). Why would anyone want to run Ruby on someone else&#8217;s virtual machine? To answer that, we look at the overlap between what we want &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/mtnwestruby-rubyclr-and-rubynet-by-john-lam\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;mtnwestruby: RubyCLR and Ruby.NET by John Lam&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,17],"tags":[],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry","category-programming","category-tech"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=74"}],"version-history":[{"count":0,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/74\/revisions"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}