<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5419182</atom:id><lastBuildDate>Fri, 21 Nov 2008 21:17:27 +0000</lastBuildDate><title>jimmy.thinking</title><description>Musings on web frameworks, dynamic languages, and playing nice @ Microsoft. And Life ;)</description><link>http://blog.jimmy.schementi.com/</link><managingEditor>noreply@blogger.com (Jimmy Schementi)</managingEditor><generator>Blogger</generator><openSearch:totalResults>158</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><geo:lat>47.61487</geo:lat><geo:long>-122.345784</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/jimmy-thinking" type="application/rss+xml" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-2822183687451509905</guid><pubDate>Fri, 21 Nov 2008 20:30:00 +0000</pubDate><atom:updated>2008-11-21T13:17:27.061-08:00</atom:updated><title>Speaking at WPI on 2008-11-24</title><description>&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_OqCZhp9yI0Q/SScaVfQ_mPI/AAAAAAAAAEs/SapKKhOLVmo/wpi_logo%5B3%5D.gif?imgmax=800"&gt;&lt;img alt="wpi_logo" src="http://lh3.ggpht.com/_OqCZhp9yI0Q/SScaVjCR0WI/AAAAAAAAAEw/7HEChAFrKGA/wpi_logo_thumb%5B1%5D.gif?imgmax=800" width="235" height="91" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Monday, November 24 I'm speaking at Worcester Polytechnic Institute in Worcester, MA about what I've been doing since graduating in May 2007. There will be a trip down memory lane, Ruby, Python, .NET, Macs, Robots, Music, and spontaneity; it will be epic.&lt;/p&gt;  &lt;p style="line-height: 1.4em"&gt;&lt;font size="3"&gt;&lt;font color="#ff8000"&gt;&lt;strong&gt;Jimmy hacking (at) Microsoft&lt;/strong&gt; &lt;/font&gt;&lt;/font&gt;    &lt;br /&gt;Monday, November 21, 2008, 6pm     &lt;br /&gt;Fuller Auditorium, Fuller Labs     &lt;br /&gt;Worcester Polytechnic Institute     &lt;br /&gt;100 Institute Road     &lt;br /&gt;Worcester, MA 01609 &lt;/p&gt;  &lt;p&gt;I'm flying to NY tonight (woot for red-eyes) with Felicia, and then driving/busing (depends how much work is left to do ;)) to Worcester Sunday. Should be a fun couple of days.&lt;/p&gt;  &lt;p&gt;If you're in the Worcester-area, stop by! Slides/Demos will be posted shortly after the talk, and I'm looking into recording.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=MpJLCd"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=MpJLCd" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=vB7JN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=vB7JN" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=sDGqN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=sDGqN" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=uj8in"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=uj8in" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=NZhzn"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=NZhzn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=PAVTN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=PAVTN" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/461156943" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/461156943/speaking-at-wpi-on-2008-11-24.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F11%2Fspeaking-at-wpi-on-2008-11-24.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/11/speaking-at-wpi-on-2008-11-24.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-3962317714816684457</guid><pubDate>Tue, 18 Nov 2008 06:30:00 +0000</pubDate><atom:updated>2008-11-17T23:00:08.048-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>Adding scripting to a C# Silverlight app</title><description>&lt;p&gt;&lt;a title="white minority" href="http://www.flickr.com/photos/9462006@N08/2709696790/"&gt;&lt;img border="0" alt="The Minority" src="http://static.flickr.com/3150/2709696790_669c8488f7.jpg" width="400" height="228" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;At Microsoft, the &lt;a href="http://blog.remlog.net/"&gt;people&lt;/a&gt; I &lt;a href="http://www.devhawk.net/"&gt;work&lt;/a&gt; &lt;a href="http://www.iunknown.com"&gt;with&lt;/a&gt; and I are definitely the minority, preaching about the benefits of dynamic languages and &lt;a href="http://channel9.msdn.com/pdc2008/TL44/"&gt;using the right tools for the right jobs&lt;/a&gt;, as in don't use static languages where you don't need it -- though there are plenty of times where you need it.&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#ff8000" size="4"&gt;&lt;strong&gt;And now you ask, &amp;quot;Jimmy, but why would I, someone who gets paid to write C#, use a dynamic language?&amp;quot;&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;The majority would only have static languages pulled from their cold, dead fingers, and I totally agree with them. Don't change for the sake of change. Though, for certain scenarios, running scripts in a VB/C# application would be useful. For example, a shopping application that has a bunch of business rules, like &amp;quot;when someone has three items in their cart that all have to do with cooking, give them 10% off.&amp;quot; These type of rules can change all the time, and traditionally you'd either store the rules in a database and implement a engine to understand the rules, or hand-code them yourself and have to redeploy the system every time you want to change them. &lt;/p&gt;&lt;p&gt;Or, you could save yourself the hassle and store the rules as Python or Ruby code, and then host the DLR in your application to run the code. Want to update the rules? Just update the code, nothing more. And a dynamic language is probably closer to how the domain-expert would represent them as, so they could even write them. Yes, this is just one scenario, but a powerful one for existing static language developers. This was the last part of my Seattle CodeCamp talk -- how to host the DLR in your C# Silverlight application.&lt;/p&gt;&lt;p&gt;&lt;a href="http://jimmy.schementi.com/downloads/seattle-code-camp-v4.0/SilverlightDLRDemo-Start.zip"&gt;Starting with an existing C# Silverlight application that just takes some input and echos it back&lt;/a&gt;, I'll extend it to &lt;a href="http://jimmy.schementi.com/downloads/seattle-code-camp-v4.0/SilverlightDLRDemo-Answer.zip"&gt;run the code through IronRuby and print the result&lt;/a&gt;. First, open the solution, and hit F5 to see that the app just echos what you type in the grey area. &lt;em&gt;This requires you to have installed the &lt;a href="http://go.microsoft.com/fwlink/?LinkId=129043"&gt;Silverlight Tools&lt;/a&gt;.&lt;/em&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_OqCZhp9yI0Q/SSJg9TKmcSI/AAAAAAAAAEU/Ft-ILeDdLS0/image%5B14%5D.png?imgmax=800"&gt;&lt;img alt="image" src="http://lh3.ggpht.com/_OqCZhp9yI0Q/SSJg9mGiSmI/AAAAAAAAAEY/HQ3_CbBfCVU/image_thumb%5B10%5D.png?imgmax=800" width="400" height="369" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;Now add references to the DLR and IronRuby (in the Dependencies folder):&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_OqCZhp9yI0Q/SSJg-PmGDWI/AAAAAAAAAEc/-fsc8WDBp2Y/image%5B19%5D.png?imgmax=800"&gt;&lt;img alt="image" src="http://lh5.ggpht.com/_OqCZhp9yI0Q/SSJg-7AbKTI/AAAAAAAAAEg/n7nQyyXCdls/image_thumb%5B13%5D.png?imgmax=800" width="400" height="368" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;Let's write a little wrapper class run Ruby code. Open App.xaml.cs and add the following class to the SilverlightDLRDemo namespace:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:ea8b248a-1942-4088-a009-119d87972561" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="csharp:nogutter"&gt;class RubyEngine {
  private ScriptEngine _engine;

  public RubyEngine() {
    var runtime = new ScriptRuntime(
      DynamicApplication.CreateRuntimeSetup()
    );
    _engine = Ruby.GetEngine(runtime);
  }

  public object Execute(string code) {
    return _engine.Execute(code);
  }
}
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note: this exact code won't work on the Desktop; you'd have to just give the ScriptRuntime constructor no parameters. Here I use the DynamicApplication.CreateRuntimeSetup() to use the same ScriptRuntimeSetup object that Microsoft.Scripting.Silverlight uses, which knows how to map File system access to the XAP file, which is useful for dynamic languages to depend on other files. Of course, it's your decision to allow this or not.&lt;/p&gt;&lt;p&gt;You'll also need to add the following &amp;quot;using&amp;quot; statements:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:b4d96ca9-5052-44d1-a717-84cd7071ad1f" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="csharp:nogutter"&gt;using Microsoft.Scripting.Hosting;
using IronRuby;
using Microsoft.Scripting.Silverlight;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And that's it! That's all we need to run IronRuby code. Now let's hook it up to the page. Open Page.xaml.cs and add an instance variable to the Page class, and initialize it in the Page constructor:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:d27c037e-cf12-4b78-b5d7-a61b0bdd6746" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="csharp:nogutter"&gt;// add to Page class
private RubyEngine _ruby;

// add to Page constructor
_ruby = new RubyEngine();&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Lastly, replace the &amp;quot;Result.Text = ...&amp;quot; line with this, which prints the typed code, and then the result computed by the RubyEngine wrapper we just wrote:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:191dc507-82a5-49bf-809b-6dc0654da4e1" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="c#:nogutter"&gt;Result.Text = "\n\n" + 
  "&amp;gt;&amp;gt; " + Code.Text + "\n" +
  (_ruby.Execute(Code.Text).ToString()) + 
  Result.Text;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now hit F5 again, and type some Ruby into the TextBox, hit enter, and boom, you're C# Silverlight application is running IronRuby code.&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_OqCZhp9yI0Q/SSJg_C2swcI/AAAAAAAAAEk/iG_EBapd2B4/image%5B29%5D.png?imgmax=800"&gt;&lt;img alt="image" src="http://lh3.ggpht.com/_OqCZhp9yI0Q/SSJhABIci3I/AAAAAAAAAEo/pkmeDXF2IyM/image_thumb%5B19%5D.png?imgmax=800" width="400" height="368" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;In fact, this is exactly how &lt;a href="http://github.com/jschementi/agdlr"&gt;AgDLR&lt;/a&gt;, aka the dynamic language integration with Silverlight, works -- a C# application (&lt;a href="http://github.com/jschementi/agdlr/tree/master/src/Microsoft.Scripting.Silverlight"&gt;Microsoft.Scripting.Silverlight.dll&lt;/a&gt;) which hosts the DLR and runs a script file (app.rb or app.py). &lt;a href="http://github.com/jschementi/agdlr/tree/master/src/Microsoft.Scripting.Silverlight/DynamicApplication.cs"&gt;Take a look for yourself&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I hope that shows you how easy it is to host the DLR from a C# Silverlight application, and think twice when writing those complex rule engines. =)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=KDiGTA"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=KDiGTA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=o8R8N"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=o8R8N" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=eF2mN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=eF2mN" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=f9EUn"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=f9EUn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=2Debn"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=2Debn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=QfWTN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=QfWTN" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/456845861" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/456845861/adding-scripting-to-c-silverlight-app.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F11%2Fadding-scripting-to-c-silverlight-app.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/11/adding-scripting-to-c-silverlight-app.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-9134717009753070621</guid><pubDate>Tue, 18 Nov 2008 01:23:00 +0000</pubDate><atom:updated>2008-11-17T17:38:14.111-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">talks</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>"console=true": REPLs in Silverlight</title><description>&lt;p&gt;At &lt;a href="https://seattle.codecamp.us/"&gt;Seattle CodeCamp v4.0&lt;/a&gt; today, I talked a lot about &lt;a href="http://en.wikipedia.org/wiki/REPL"&gt;REPLs, or &amp;quot;Read, Evaluate, Print Loops&amp;quot;&lt;/a&gt;. They are the true &amp;quot;minimalist&amp;quot; view of programming; type a line, run a line. Most of them are no frills, only a terminal window and a blinking cursor, though they themselves could be really rich development environments. Also, REPLs are a vital tool for runtime-compilation languages, since the methods/variables/classes/etc are only *really* known to exist at runtime. &lt;/p&gt;&lt;p&gt;I started my talk with a Ruby REPL showing off how you can use IronRuby to explore .NET.&lt;/p&gt;&lt;p&gt;&lt;a title="ruby-browser-repl" href="http://www.flickr.com/photos/24458122@N00/3036629807/"&gt;&lt;img border="0" alt="ruby-browser-repl" src="http://static.flickr.com/3001/3036629807_1f8bc64d5f.jpg" width="400" height="400" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Ah, the beauty of &lt;a href="http://flickr.com/photos/jschementi/2898698253/"&gt;two worlds colliding&lt;/a&gt;. You can use Ruby-idioms to explore the .NET types, starting with an A, B, or C, in the System namespace, just like they were Ruby classes to begin with. Call .NET methods, even with Ruby method naming conventions; IsInterface as is_interface. &lt;/p&gt;&lt;p&gt;The lurking awesomeness here is this REPL is running inside the browser! This is a &lt;a href="http://msdn.microsoft.com/en-us/library/cc189089(VS.95).aspx"&gt;HTML-based Silverlight application&lt;/a&gt;, which provides an IronRuby REPL. It accomplishes this by using the &lt;a href="http://codeplex.com/dlr"&gt;Dynamic Language Runtime&lt;/a&gt; (DLR) hosting APIs, but don't get hung up on the details of how that works, I'll explain later.&lt;/p&gt;&lt;p&gt;&lt;a title="Monkey patching" href="http://www.flickr.com/photos/24458122@N00/3036887651/"&gt;&lt;img border="0" alt="Monkey patching" src="http://static.flickr.com/3192/3036887651_e07658e920.jpg" width="400" height="340" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This is nothing *new* in my world. &lt;a target="_blank" href="http://silverlight.net/samples/sl2/dlrconsole/index.html"&gt;DLRConsole&lt;/a&gt; has been around for a while now, and lets you write code in the browser to manipulate a Silverlight canvas. Both REPLs are self-contained, as in they only work against code manually loaded into them, like the previous screenshot shows with loading in the clock.rb and drag.rb files. This is fine for trying small things out, but becomes very cumbersome when trying to interact with a live application.&lt;/p&gt;&lt;p&gt;To interact with a live application seamlessly, the bare minimum would be to have a REPL available directly in the application itself. &lt;a href="http://github.com/jschementi/agdlr/commit/f7e4b6a22974209600b6b95a8126bf63db0cdcf6"&gt;And that's what I've done&lt;/a&gt;:&lt;/p&gt;&lt;p&gt;&lt;a title="silverlight-repl" href="http://www.flickr.com/photos/24458122@N00/3039815620/"&gt;&lt;img border="0" alt="silverlight-repl" src="http://static.flickr.com/3287/3039815620_2492553744.jpg" width="400" height="305" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you build the &lt;a href="http://github.com/jschementi/agdlr"&gt;latest bits&lt;/a&gt;, you can add a new initParam option called &amp;quot;console&amp;quot; to enable a REPL in any application:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:8761a212-ee2b-4c60-91a9-68decfaa5dbd" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="xml:nogutter:nocontrols"&gt;&amp;lt;object ... &amp;gt;
  ...
  &amp;lt;param name="initParams" value="console=true" /&amp;gt;
&amp;lt;/object&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will inject a HTML-based REPL into whatever web page your app is running on. The language of the REPL is set to whatever language your start script is. To make the console pretty, &lt;a href="http://github.com/jschementi/agdlr/tree/master/samples/ruby/photoviewer/stylesheets/console.css?raw=true"&gt;add this stylesheet to your page&lt;/a&gt;. Eventually this stylesheet will be included in the templates script/sl produces. &lt;/p&gt;&lt;p&gt;In the screenshot above, I did not type/click anything on the UI; the code I typed into the REPL set the search term and &amp;quot;clicked&amp;quot; the search button. This type of integration with your application could easily produce &lt;a href="http://wtr.rubyforge.org/"&gt;Waitr&lt;/a&gt;-like automation, for testing and whatnot. I'd really like to see Waitr ported to IronRuby. =&lt;/p&gt;&lt;p&gt;But there's plenty more to-do: this console is very simple.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;It only supports Ruby currently; though simple Python statements will work (white space is a bitch =P). &lt;/li&gt;
&lt;li&gt;It supports single and multi-line statements, but since the text input is implemented on top of a &amp;lt;input&amp;gt; tag, browser history gets in the way =P &lt;/li&gt;
&lt;li&gt;History works, but never resets itself. &lt;/li&gt;
&lt;li&gt;If you make a typo, and it's not clear that you've intended for the statement to be completed (like typing &amp;quot;class &amp;lt;enter&amp;gt;&amp;quot;), you'll have to force the console to run the command with &amp;lt;ctrl&amp;gt;+&amp;lt;enter&amp;gt; &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Please, play around with this new &amp;quot;usefulness&amp;quot; and let me know what you think. I'd prefer you to leave comments on github, so everyone can participate in the discussion. The code for the REPL lives in &lt;a href="http://github.com/jschementi/agdlr/tree/master/src/Microsoft.Scripting.Silverlight/Console.cs"&gt;Console.cs&lt;/a&gt;, so if you want to fix something on the list above, or see something else broken, fix it! If you find more bugs, please post them to &lt;a href="http://www.codeplex.com/sdlsdk/WorkItem/List.aspx"&gt;Codeplex&lt;/a&gt; under the 0.x.0 release.&lt;/p&gt;&lt;p&gt;Hope this little feature makes your live a bit easier!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=JyVKvK"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=JyVKvK" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=x4A1N"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=x4A1N" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=2MpON"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=2MpON" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=JkCEn"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=JkCEn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=ndP1n"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=ndP1n" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=fk3fN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=fk3fN" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/456631501" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/456631501/repls-in-silverlight.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F11%2Frepls-in-silverlight.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/11/repls-in-silverlight.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-7411091678713719472</guid><pubDate>Mon, 17 Nov 2008 21:23:00 +0000</pubDate><atom:updated>2008-11-17T17:38:14.112-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">Open Source</category><category domain="http://www.blogger.com/atom/ns#">talks</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>agdlr: Silverlight + DLR + Open Source</title><description>&lt;p align="center"&gt;&lt;img style="border: 0px" src="http://jimmy.schementi.com/downloads/agdlr-400.png" width="240" height="101" /&gt; &lt;/p&gt;&lt;p&gt;The &lt;a target="_blank" href="http://codeplex.com/sdlsdk"&gt;&amp;quot;Silverlight Dynamic Languages SDK&amp;quot; Codeplex project&lt;/a&gt; has existed since March 2008, with signed binary releases and source code drops every month or so. Though it's a good ship vehicle for the Silverlight+DLR integration, it's not really an open source project -- mainly as it lacks a public source repository. That changes today.&lt;/p&gt;&lt;p style="padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px" align="center"&gt;&lt;span style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 5px; background-color: #333; padding-left: 5px; padding-right: 5px; border-top: gray 1px solid; border-right: gray 1px solid; padding-top: 5px"&gt;&lt;a href="http://github.com/jschementi/agdlr"&gt;&lt;font size="5"&gt;&lt;strong&gt;AgDLR&lt;/strong&gt; Source Repository&lt;/font&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;This repository will contain the sources to Microsoft.Scripting.Silverlight.dll and Chiron.exe, as well as Ruby/Python libraries for writing Silverlight applications. Any &amp;quot;feature&amp;quot; work on those pieces of code will be committed to the public repository first, and eventually make its way into MIcrosoft's internal source control so the DLR/Iron* languages don't break it. This repository takes a binary dependency on the Iron* languages as well as the DLR, since this isn't the place to change that code. The source code for &lt;a href="http://ironruby.rubyforge.org/svn/trunk/"&gt;IronRuby&lt;/a&gt;, &lt;a href="http://www.codeplex.com/IronPython/SourceControl/ListDownloadableCommits.aspx"&gt;IronPython&lt;/a&gt;, and the &lt;a href="http://www.codeplex.com/dlr"&gt;DLR&lt;/a&gt; are available elsewhere, but releases on the &lt;a href="http://codeplex.com/sdlsdk"&gt;Codeplex page for this project&lt;/a&gt; will still contain source drops of everything.&lt;/p&gt;&lt;p align="center"&gt;&lt;img style="background-color: white; margin: 5px" src="http://markelikalderon.com/wp-content/uploads/2008/04/octocat.png" width="210" height="210" /&gt; &lt;/p&gt;&lt;p&gt;The repository is hosted on &lt;a href="http://github.com"&gt;http://github.com&lt;/a&gt;, which is a collaborative development site based around &lt;a href="http://git.or.cz/"&gt;git&lt;/a&gt;, a &amp;quot;fast, efficient, distributed version control system ideal for the collaborative development of software&amp;quot;. You can browse the sources on the website, look at &lt;a href="http://github.com/jschementi/agdlr/commit/f7e4b6a22974209600b6b95a8126bf63db0cdcf6"&gt;commits&lt;/a&gt;, &lt;a href="http://github.com/jschementi/agdlr/fork"&gt;fork&lt;/a&gt; your own version of the repository, or just &lt;a href="http://github.com/jschementi/agdlr/zipball/master"&gt;download a snapshot&lt;/a&gt;. If you're new to git, just install it (&lt;a href="http://code.google.com/p/msysgit/downloads/list"&gt;for windows, see here&lt;/a&gt;, &lt;a href="http://git.debuggable.com/screencasts/2:using_git_on_windows"&gt;and here&lt;/a&gt;). If you'd like to learn more about Github, or Git, &lt;a href="http://github.com/guides/home"&gt;Github guides&lt;/a&gt; is a good place to start.&lt;/p&gt;&lt;p&gt;If you'd like to contribute to AgDLR, fork your own version of the repository, commit your changes to your version, and send me a &lt;a href="http://github.com/guides/pull-requests"&gt;pull request&lt;/a&gt; on github. We'll take it from there.&lt;/p&gt;&lt;p&gt;I've already started to work on a new feature which I talked about at Seattle CodeCamp, but that's the next post.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=0mcu2S"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=0mcu2S" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=1UGKN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=1UGKN" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=awnAN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=awnAN" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=MfrPn"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=MfrPn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=oANdn"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=oANdn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=SAwiN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=SAwiN" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/456441729" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/456441729/agdlr-silverlight-dlr-open-source.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F11%2Fagdlr-silverlight-dlr-open-source.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/11/agdlr-silverlight-dlr-open-source.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-8163340490884219750</guid><pubDate>Sun, 16 Nov 2008 19:36:00 +0000</pubDate><atom:updated>2008-11-17T17:38:14.113-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">talks</category><title>Seattle CodeCamp v4.0</title><description>&lt;p&gt;&lt;img src="https://seattle.codecamp.us/images/CodeCampBanner.jpg" width="382" height="94" /&gt; &lt;/p&gt;  &lt;p&gt;I just finished speaking at &lt;a href="https://seattle.codecamp.us/"&gt;Seattle CodeCamp v4.0&lt;/a&gt; about dynamic languages in &lt;a href="http://silverlight.net"&gt;Silverlight&lt;/a&gt;, titled &lt;a href="https://seattle.codecamp.us/sessions.aspx#Browser+meet+Ruby+and+Python"&gt;Browser, Meet Ruby and Python&lt;/a&gt;. Here's my abstract:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;People entrenched in Visual Studio all day [sometimes] forget how powerful a command-line and a text-editor can be. Remember, these are the *tools* that built and continue-to-build the web. With nothing else up my sleeves (I wear short sleeves) I'll build a cool web applications with &lt;a href="http://ironruby.net"&gt;IronRuby&lt;/a&gt;, &lt;a href="http://codeplex.com/ironpython"&gt;IronPython&lt;/a&gt;, &lt;a href="http://codeplex.com/aspnet"&gt;ASP.NET MVC&lt;/a&gt;, and &lt;a href="http://silverlight.net"&gt;Silverlight&lt;/a&gt;, and show you why scripting/dynamic languages are powerful and productive tools.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Of course, that didn't end up being my exact talk, but close enough. I talked about REPL's, &lt;a href="http://ironruby.net"&gt;IronRuby&lt;/a&gt;, &lt;a href="http://silverlight.net"&gt;Silverlight&lt;/a&gt;, and &lt;a href="http://www.flickr.com/photos/marchange/444184871/"&gt;Hippies&lt;/a&gt;. Here are the &lt;a href="http://jimmy.schementi.com/downloads/seattle-code-camp-v4.0/seattle-code-camp-2008-11-16.pptx"&gt;slides&lt;/a&gt; (&lt;em&gt;rename it to pptx since my web server is reporting it as a zip mime-type&lt;/em&gt;), but I'll be making subsequent posts about the specific things I showed. Stay tuned!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=rcKuLv"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=rcKuLv" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=xQdtN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=xQdtN" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=dYBmN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=dYBmN" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=7mZfn"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=7mZfn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=Ugabn"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=Ugabn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=PGyaN"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=PGyaN" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/455202781" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/455202781/seattle-codecamp-v40.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F11%2Fseattle-codecamp-v40.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/11/seattle-codecamp-v40.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-7509479060779032904</guid><pubDate>Wed, 15 Oct 2008 23:12:00 +0000</pubDate><atom:updated>2008-11-17T17:38:51.367-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Dynamic Languages in Silverlight 2 RTW!</title><description>&lt;p&gt;Silverlight 2 shipped yesterday! And, better yet, there's a new release of dynamic languages for Silverlight!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=17839"&gt;&lt;font size="5"&gt;Download the SDK!&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;&lt;font size="1"&gt;Note: it's the same version number as the RC0 release (0.4.0)&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Since this post is devoid of content, here's a bunch of other posts I've made that are more interesting. Here are some announcement blog posts:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/10/dynamic-languages-in-silverlight-2-rc0.html"&gt;Dynamic Languages in Silverlight 2 RC0&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/07/browser-meet-ruby-on-rails.html"&gt;Browser, Meet Ruby on Rails (silverline)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/08/silverlight-dynamic-languages-sdk-03.html"&gt;Dynamic Languages in Silverlight 2 Beta 2 (sdlsdk-0.3)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/06/dynamic-languages-in-silverlight-2-beta.html"&gt;Dynamic Languages in Silverlight 2 Beta 2 (sdlsdk-0.2)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/03/dynamic-silverlight.html"&gt;Dynamic Languages in Silverlight 2 Beta 1 (sdlsdk-0.1)&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For more interesting posts/walk-throughs:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/08/walk-through-silverlight-flickr-client.html"&gt;Walk-through: Silverlight Flickr Client in IronRuby&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/08/dragging-elements-in-silverlight-with.html"&gt;Dragging elements in Silverlight with DLRConsole&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/07/run-chiron-with-right-click.html"&gt;Run Chiron with a right-click&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/05/story-of-ruby-and-python-in-silverlight.html"&gt;The story of Ruby and Python in Silverlight&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/04/silverlight-on-rails.html"&gt;Silverlight on Rails&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/09/compiling-dlr-ironruby-and-ironpython.html"&gt;Compiling the DLR, IronRuby, and IronPython for ANY version of Silverlight&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.jimmy.schementi.com/2008/05/error-reporting-in-silverlight-ruby-and.html"&gt;Error reporting in Silverlight: Ruby and Python&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=Rxlx5K"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=Rxlx5K" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=asecM"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=asecM" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=YsMoM"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=YsMoM" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=la5vm"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=la5vm" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=oJEQm"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=oJEQm" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=HAPQM"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=HAPQM" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/422061783" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/422061783/dynamic-languages-in-silverlight-2-rtw.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F10%2Fdynamic-languages-in-silverlight-2-rtw.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/10/dynamic-languages-in-silverlight-2-rtw.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-7647508829191219690</guid><pubDate>Wed, 01 Oct 2008 07:10:00 +0000</pubDate><atom:updated>2008-11-17T22:50:30.047-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Dynamic Languages in Silverlight 2 RC0</title><description>&lt;p&gt;&lt;a style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" href="http://bp2.blogger.com/_OqCZhp9yI0Q/SE74VwxHC3I/AAAAAAAAACo/Z7Q--6yQISM/s1600-h/slpyrb-small.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="" align="left" src="http://bp2.blogger.com/_OqCZhp9yI0Q/SE74VwxHC3I/AAAAAAAAACo/Z7Q--6yQISM/s400/slpyrb-small.png" /&gt;&lt;/a&gt;I've just released the Silverlight Dynamic Languages SDK with the newest DLR, IronRuby, IronPython, and JScript binaries and sources to work against Silverlight 2 RC0!&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=17839"&gt;&lt;font size="5"&gt;Download the SDK!&lt;/font&gt;&lt;/a&gt; &lt;/p&gt;&lt;p align="center"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#808080" size="1"&gt;This release works with &lt;/font&gt;&lt;/em&gt;&lt;a target="_blank" href="http://silverlight.net/GetStarted/sl2rc0.aspx"&gt;&lt;em&gt;&lt;font color="#808080" size="1"&gt;Silverlight 2 RC0&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;font color="#808080" size="1"&gt;&lt;em&gt;. Keep in mind this is a developer release, so no &amp;quot;end-user&amp;quot; runtime exists. This is why the &amp;quot;not-installed&amp;quot; experience doesn't take you directly to the download, but to a page where you can install the tools.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;As usual, report any issues on the &lt;a target="_blank" href="http://www.codeplex.com/sdlsdk/WorkItem/List.aspx"&gt;Issue Tracker&lt;/a&gt;, and feel free to ask any questions on the &lt;a target="_blank" href="http://www.codeplex.com/sdlsdk/Thread/List.aspx"&gt;Discussions tab&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;This release has slightly refactored Microsoft.Scripting.Silverlight, adding two new types: &amp;quot;Package&amp;quot; and &amp;quot;Configuration&amp;quot;. You can use &amp;quot;Package&amp;quot; to access files inside the XAP, and &amp;quot;Configuration&amp;quot; can be used to detect languages available in Silverlight. &lt;/p&gt;&lt;h4&gt;&lt;font color="#ff8000"&gt;Hosting&lt;/font&gt;&lt;/h4&gt;&lt;p&gt;&lt;font color="#ff8000"&gt;&lt;font color="#cccccc"&gt;In past releases, if you wanted to host the DLR you needed to create your own ScriptRuntimeSetup which uses Microsoft.Scripting.Silverlight.BrowserScriptHost to tell your hosted scripts about how Silverlight. Your code would look like this:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:1eb14652-ef65-4429-8262-80a08fd0abaf" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="c#"&gt;using Microsoft.Scripting.Silverlight;
using Microsoft.Scripting.Hosting;

//...

var setup = new ScriptRuntimeSetup();
setup.HostType = typeof(BrowserScriptHost);
var runtime = new ScriptRuntime(setup);

//...&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, since the ScriptRuntimeSetup we use to run user code is public, you can simply this code to:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:e8e3ced9-1ed9-4ccb-bc2c-01680e420449" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="c#"&gt;using Microsoft.Scripting.Silverlight;
using Microsoft.Scripting.Hosting;

//...

var runtime = DynamicApplication.Current.Runtime;

// or if you wanted to create your own runtime, reuse the setup

var runtime = new ScriptRuntime(DynamicApplication.Current.Runtime.Setup);

//...&lt;/pre&gt;&lt;/div&gt;&lt;font color="#ff8000"&gt;&lt;h4&gt;Future&lt;/h4&gt;&lt;/font&gt;&lt;p&gt;Blah, blah, blah, I always talk about the future. Has anything happened? Nope. Well, it will eventually. Just keep pestering. If you have no idea what I'm talking about, take a look at my &lt;a href="http://blog.jimmy.schementi.com/2008/08/silverlight-dynamic-languages-sdk-03.html"&gt;last post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=rE5RmT"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=rE5RmT" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=FgDSM"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=FgDSM" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=jzVMM"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=jzVMM" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=j15vm"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=j15vm" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=DZ4bm"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=DZ4bm" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=NamDM"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=NamDM" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/408023448" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/408023448/dynamic-languages-in-silverlight-2-rc0.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp2.blogger.com/_OqCZhp9yI0Q/SE74VwxHC3I/AAAAAAAAACo/Z7Q--6yQISM/s72-c/slpyrb-small.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F10%2Fdynamic-languages-in-silverlight-2-rc0.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/10/dynamic-languages-in-silverlight-2-rc0.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-8224986643847439579</guid><pubDate>Wed, 01 Oct 2008 06:25:00 +0000</pubDate><atom:updated>2008-11-17T17:38:51.370-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Compiling the DLR, IronRuby, and IronPython for ANY version of Silverlight</title><description>&lt;p&gt;&lt;a title="swan2008 (1)" href="http://www.flickr.com/photos/24129409@N03/2291963395/"&gt;&lt;img border="0" alt="swan2008 (1)" align="middle" src="http://static.flickr.com/3039/2291963395_0c35a5057c.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I know you feel like this sometimes when trying to solve a problem. I do. Almost all the time. Even when I'm not angry ... but I digress.&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000"&gt;&lt;a target="_blank" href="http://silverlight.net/GetStarted/sl2rc0.aspx"&gt;Silverlight 2 RC0&lt;/a&gt;&lt;/font&gt; was released this past Thursday, but anyone wanting to use the DLR in it was surprised ... no new binary release of the DLR bits for Silverlight 2 RC0 yet. As I said on &lt;a target="_blank" href="http://twitter.com/jschementi/statuses/939462615"&gt;Twitter&lt;/a&gt;, it would be delayed until today, but that shouldn't stop anyone from &lt;a target="_blank" href="http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=16845"&gt;taking the sources&lt;/a&gt; and compiling them against the new SIlverlight build, right?&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000"&gt;Of course!&lt;/font&gt; Everything should just work, since there were no major breaking changes in Silverlight that affect the DLR between Beta2 and RC0. So, you hacked up the csproj files to point at mscorlib.dll, system.dll, etc in the new Silverlight install directory (C:\Program Files\Microsoft Silverlight\2.0.30923.0), compile, and it builds fine. Then you try to run an app ...&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000"&gt;&amp;quot;InitializeError- Failed to load the application. It was built with an obsolete version of Silverlight&amp;quot;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Poof! What the hell happened? That's a really bad error message, but what it means to say is:&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff8000"&gt;&amp;quot;The application's AppManifest.xaml has a RuntimeVersion &amp;lt;= 2.0.30523.00, which is Silverlight 2 Beta 2's version number, so Silverlight 2 RC0 won't load this application.&amp;quot;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;So you see, the XAP file that was produced by Chiron is still for SL2 Beta2. But that's an easy fix;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Make sure Chiron.exe isn't running.&lt;/li&gt;    &lt;li&gt;Go to your custom build, and edit Chiron.exe.config&lt;/li&gt;    &lt;li&gt;Find the &amp;lt;AppManifest.xaml&amp;gt; section, and where it says &amp;quot;RuntimeVersion&amp;quot; make it's value be &amp;quot;2.0.30923.0&amp;quot; (anything with the first three version numbers being greater than the current will do, but be save and use the actual version.)&lt;/li&gt;    &lt;li&gt;Re-run Chiron.exe, navigate to your Silverlight application, and .... it works!&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Welcome to the wonderful world of versioning in Silverlight. :)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=irKYed"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=irKYed" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=RVu4M"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=RVu4M" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=U9lwM"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=U9lwM" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=mXEWm"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=mXEWm" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=kUutm"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=kUutm" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=9UaOM"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=9UaOM" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/407973999" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/407973999/compiling-dlr-ironruby-and-ironpython.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F09%2Fcompiling-dlr-ironruby-and-ironpython.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/09/compiling-dlr-ironruby-and-ironpython.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-2712175335408040144</guid><pubDate>Wed, 24 Sep 2008 01:21:00 +0000</pubDate><atom:updated>2008-11-17T17:39:11.403-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">Python</category><title>ASP.NET Dynamic Language Support Refreshed!</title><description>&lt;p&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="party_time_top" src="http://lh4.ggpht.com/jschementi/SNmWFZx17EI/AAAAAAAAAEQ/EdmakcKmgIw/party_time_top.gif?imgmax=800" width="400" height="264" /&gt; &lt;/p&gt;&lt;p&gt;Today, the IronPython team and the ASP.NET team released &lt;a target="_blank" href="http://codeplex.com/aspnet/Wiki/View.aspx?title=Dynamic%20Language%20Support&amp;amp;referringTitle=Home"&gt;ASP.NET Dynamic Language Support&lt;/a&gt; on the &lt;a target="_blank" href="http://codeplex.com/aspnet"&gt;ASP.NET Codeplex site&lt;/a&gt;!&lt;/p&gt;&lt;p align="center"&gt;&amp;#160;&lt;/p&gt;&lt;p align="center"&gt;&lt;a target="_blank" href="http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=17613"&gt;&lt;font size="4"&gt;Download it here!&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align="center"&gt;&amp;#160;&lt;/p&gt;&lt;h3&gt;Package&lt;/h3&gt;&lt;p&gt;&lt;font color="#ff8000"&gt;&lt;strong&gt;ironpython-webforms-sample.zip&lt;/strong&gt;:&lt;/font&gt; running IronPython ASP.NET website. Either dump this in IIS or open with Visual Studio as a website project.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;font color="#ff8000"&gt;ironpython-mvc-sample.zip:&lt;/font&gt;&lt;/strong&gt; and IronPython ASP.NET MVC website, so you can get a feel for how dynamic languages can integrate into MVC. However, this just shows IronPython working in Views, not Controllers or Models yet. This requires &lt;a target="_blank" href="http://www.codeplex.com/aspnet/Wiki/View.aspx?title=MVC&amp;amp;referringTitle=Home"&gt;MVC to be installed&lt;/a&gt; to open the project in Visual Studio. Open it with Visual Studio, build, and run your shiny IronPython ASP.NET MVC app.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;font color="#ff8000"&gt;aspnet-dlr-docs.zip:&lt;/font&gt; &lt;/strong&gt;Documentation on how to use all this stuff. Open intro.html and have fun. :)&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;h3&gt;Many Thanks!&lt;/h3&gt;&lt;p&gt;This is a project that me, &lt;a target="_blank" href="http://blogs.msdn.com/davidebb/"&gt;David Ebbo&lt;/a&gt;, and &lt;a target="_blank" href="http://haacked.com/"&gt;Phil Haack&lt;/a&gt; have been working on for a bit, and I'm so happy that the ASP.NET team is taking the DLR and committing to making dynamic languages work well on ASP.NET. Phil actually &lt;a target="_blank" href="http://haacked.com/archive/2008/09/23/refreshing-asp.net-dynamic-language-support.aspx"&gt;announced this on his blog as well&lt;/a&gt;, and I'm sure will be talking about this much more in the future. In short, a big thanks to David and Phil for getting this project kick-started again.&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;h3&gt;Walk-through: WebForms&lt;/h3&gt;&lt;p&gt;&lt;a target="_blank" href="http://blog.jimmy.schementi.com/2008/07/aspnet-and-dynamic-languages.html"&gt;Back in June I talked about this day coming&lt;/a&gt;, but I didn't even have a piece offering, other than my whit. To make up for that, I'm going to walk you through using IronPython in ASP.NET.&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#959595"&gt;Note: I'm going to walk you through using Visual Studio to open the website and make changes. However, you can simply drop this directory into your IIS wwwroot and simply edit the files with a text-editor of your choice.&lt;/font&gt;&lt;/em&gt; &lt;/p&gt;&lt;p&gt;1. Extract ironpython-webforms-sample.zip, open Visual Studio, and then open a website project (File &amp;gt; Open &amp;gt; Web Site ...). Navigate to where you extracted the webforms sample, and click open; now you should see the following.&lt;/p&gt;&lt;p&gt;&lt;img alt="merlinweb-start" src="http://lh3.ggpht.com/jschementi/SNmWFpozmDI/AAAAAAAAAD8/GsTJ4OsZlhQ/merlinweb-start%5B6%5D.jpg?imgmax=800" width="300" height="199" /&gt; &lt;/p&gt;&lt;p&gt;2. Take a look at the code in Default.aspx and Default.aspx.py. The aspx page has a asp:Literal control, with the id &amp;quot;messageLiteral&amp;quot;, and the py file sets the text of that asp:Literal control.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:fd83766f-952e-441b-972e-cdf3ef401434" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="xml:nogutter"&gt;&amp;lt;!-- Default.aspx --&amp;gt;
&amp;lt;%@ Page Language="IronPython" CodeFile="Default.aspx.py" %&amp;gt;
&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;

&amp;lt;html xmlns="http://www.w3.org/1999/xhtml" &amp;gt;
    &amp;lt;head runat="server"&amp;gt;
        &amp;lt;title&amp;gt;Untitled Page&amp;lt;/title&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;form id="form1" runat="server"&amp;gt;
        &amp;lt;div&amp;gt;
            &amp;lt;asp:Literal id="messageLiteral" runat="server" /&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;/form&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:cba2604f-d22f-4672-b614-cb6f82e3a73d" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="py:nogutter"&gt;# Default.aspx.py
def Page_Load(sender, e):
    messageLiteral.Text = "Hello Dynamic World!"&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;3. Hit Ctrl+F5 (Start without debugging), and the app will run. If you are not using Visual Studio, simply navigate to Default.aspx in your web browser.&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/jschementi/SNmWF5SiFcI/AAAAAAAAAEA/0l8OuUBM4qI/merlinweb-hello-dynamic-world%5B12%5D.jpg?imgmax=800"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="merlinweb-hello-dynamic-world" src="http://lh3.ggpht.com/jschementi/SNmWGAyZDnI/AAAAAAAAAEE/unTFyP8oQyI/merlinweb-hello-dynamic-world_thumb%5B8%5D.jpg?imgmax=800" width="400" height="277" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;4. Awesome, our app runs! Now let's make it do &lt;em&gt;something&lt;/em&gt;. Replace the inside of the &amp;lt;div /&amp;gt; with a Label, TextBox, and a Button control &lt;font color="#999999"&gt;(Note: you can also open the Toolbox in Visual Studio and drag these in).&lt;/font&gt;&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:41823471-7549-435b-83e4-f4caabc88e6d" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="xml:nogutter"&gt;Enter your name: &amp;lt;br /&amp;gt;
    &amp;lt;asp:TextBox ID="TextBox1" runat="server"&amp;gt;
    &amp;lt;/asp:TextBox&amp;gt;
    &amp;lt;asp:Button ID="Button1" runat="server" Text="Button" /&amp;gt;
    &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;
    &amp;lt;asp:Label ID="Label1" runat="server" Text="Label"&amp;gt;
    &amp;lt;/asp:Label&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;5. Open Default.aspx.py and change the Page_Load method to be the following:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:6d93e8a4-9615-4bc5-90ca-b2806c9d1ed9" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="py:nogutter"&gt;def Page_Load(sender, e):
    if not IsPostBack:
        Label1.Text = "...Your name here..."&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;6. Now add the following code to Default.aspx.py to handle the button's Click event:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:ca2590c9-9b44-40dd-8dd5-8dbb6f1d15d9" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="py:nogutter"&gt;def Button1_Click(sender, e):
    Label1.Text = Textbox1.Text&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;7. Switch back to Default.aspx.py and make the Button handle the event:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:ee808bff-4128-49da-98c1-5fb68a2f1baa" class="wlWriterSmartContent"&gt;&lt;pre name="code" class="xml:nogutter"&gt;&amp;lt;asp:Button ID="Button1" runat="server" Text="Button"
     OnClick="Button1_Click"/&amp;gt;
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;8. Now navigate back to your browser, and refresh the page. Enter any text in the textblock, click the button, and it'll appear in the label below.&lt;/p&gt;&lt;p&gt;&lt;font color="#ff0000"&gt;&lt;a href="http://lh5.ggpht.com/jschementi/SNmWGVyaBnI/AAAAAAAAAEI/nQTI7AduXpU/merlinweb-name%5B6%5D.jpg?imgmax=800"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="merlinweb-name" src="http://lh5.ggpht.com/jschementi/SNmWGvi1pOI/AAAAAAAAAEM/KUyaKI-TTHs/merlinweb-name_thumb%5B4%5D.jpg?imgmax=800" width="400" height="330" /&gt;&lt;/a&gt; &lt;/font&gt;&lt;/p&gt;&lt;p&gt;Yeah, I know, not very useful, but it gives you an idea of how things work. Look through the &amp;quot;ASP.NET Dynamic Language Runtime Support Documentation&amp;quot; on the &lt;a target="_blank" href="http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=17613"&gt;downloads page&lt;/a&gt; for more walk-throughs with IronPython and ASP.NET WebForms.&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;h3&gt;Go make awesome stuff!&lt;/h3&gt;&lt;p&gt;I'm so happy that this finally got out, so hopefully I'll hear about people starting to use IronPython in ASP.NET much more. Consult &lt;a href="http://codeplex.com/aspnet"&gt;http://codeplex.com/aspnet&lt;/a&gt; for any questions about roadmap or tutorials, and feel free to ask me questions as well.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=73a8Ju"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=73a8Ju" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=CtF5L"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=CtF5L" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=wzvHL"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=wzvHL" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=Qol2l"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=Qol2l" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=mHhll"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=mHhll" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=zekIL"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=zekIL" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/401325989" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/401325989/aspnet-dynamic-language-support.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F09%2Faspnet-dynamic-language-support.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/09/aspnet-dynamic-language-support.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-4772978386714751892</guid><pubDate>Sun, 31 Aug 2008 02:04:00 +0000</pubDate><atom:updated>2008-09-30T23:33:59.165-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">Dynamic Languages</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><category domain="http://www.blogger.com/atom/ns#">Python</category><title>Silverlight Dynamic Languages SDK 0.3</title><description>&lt;p&gt;&lt;a href="http://bp2.blogger.com/_OqCZhp9yI0Q/SE74VwxHC3I/AAAAAAAAACo/Z7Q--6yQISM/s1600-h/slpyrb-small.png" style="border: 0px"&gt;&lt;img border="0" alt="" align="left" src="http://bp2.blogger.com/_OqCZhp9yI0Q/SE74VwxHC3I/AAAAAAAAACo/Z7Q--6yQISM/s400/slpyrb-small.png" style="border: 0px" /&gt;&lt;/a&gt;I've finally updated the Silverlight Dynamic Languages SDK with the newest DLR, IronRuby, IronPython, and JScript binaries and sources!&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=16845"&gt;Download the SDK!&lt;/a&gt;    &lt;br /&gt;
&lt;font size="1"&gt;This release works with &lt;/font&gt;&lt;a href="http://www.microsoft.com/silverlight/resources/install.aspx?v=2.0.30523.8"&gt;&lt;font size="1"&gt;Silverlight 2 Beta 2&lt;/font&gt;&lt;/a&gt;&lt;font size="1"&gt;.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;For more information on what is in the SDK, check out the &lt;a href="http://blog.jimmy.schementi.com/2008/06/dynamic-languages-in-silverlight-2-beta.html"&gt;previous release's post&lt;/a&gt; or the &lt;a href="http://blog.jimmy.schementi.com/2008/03/dynamic-silverlight.html"&gt;initial MIX'08 release's post&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;As usual, report any issues on the &lt;a target="_blank" href="http://www.codeplex.com/sdlsdk/WorkItem/List.aspx"&gt;Issue Tracker&lt;/a&gt;, and feel free to ask any questions on the &lt;a target="_blank" href="http://www.codeplex.com/sdlsdk/Thread/List.aspx"&gt;Discussions tab&lt;/a&gt;.&lt;/p&gt;&lt;h4&gt;&lt;font color="#ff8000"&gt;Version 0.3.0&lt;/font&gt;&lt;/h4&gt;&lt;p&gt;One noticeable change is the &amp;quot;0.3.0&amp;quot;; where the hell did that come from!? It's going to be more necessary to have a proper version number after this release, since there will be a couple more releases between now and the next major Silverlight release. So, this release is 0.3, and the previous 2 releases are 0.1 and 0.2. &lt;/p&gt;&lt;h4&gt;&lt;font color="#ff8000"&gt;Packaging&lt;/font&gt;&lt;/h4&gt;&lt;p&gt;&lt;font color="#ff8000"&gt;&lt;font color="#cccccc"&gt;Another noticeable change is the packaging; you've now got a 1-stop-shop for binaries, scripts, samples, and source code in the download labeled &amp;quot;Everything.&amp;quot; The individual packages still exist as well.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;h4&gt;&lt;font color="#ff8000"&gt;Future&lt;/font&gt;&lt;/h4&gt;&lt;p&gt;The releases after this will be as much about the Silverlight-specific experience, along with packaging up the new language bits to work together in Silverlight. Some future features being worked on are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Better support for download-on-demand dynamic language code and assemblies&lt;/li&gt;
&lt;li&gt;Tooling support in Visual Studio&lt;/li&gt;
&lt;li&gt;Built in console for every app when debug=true&lt;/li&gt;
&lt;li&gt;Better ruby stack traces&lt;/li&gt;
&lt;li&gt;Startup improvements (running code in interpreted mode to start).&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;&lt;font color="#ff8000"&gt;Name?&lt;/font&gt;&lt;/h4&gt;&lt;p&gt;&amp;quot;Silverlight Dynamic Languages SDK&amp;quot; is a horrible name, and &amp;quot;sdlsdk&amp;quot; is an even more horrible acronym. We need a good/origional/non-suck name for it. If you have any ideas, hit me up on &lt;a href="http://twitter.com/jschementi"&gt;http://twitter.com/jschementi&lt;/a&gt;, or leave me a comment.&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;About the Silverlight Dynamic Languages SDK:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://silverlight.net/dlr"&gt;&lt;font size="1"&gt;This project&lt;/font&gt;&lt;/a&gt;&lt;font size="1"&gt; represents the integration between Silverlight and Dynamic Languages running on the Dynamic Language Runtime (DLR). The languages included in this package are IronRuby, IronPython, and Managed JScript. The DLR, Silverlight Integration, IronRuby, and IronPython are released under the &lt;/font&gt;&lt;a href="http://www.opensource.org/licenses/ms-pl.html"&gt;&lt;font size="1"&gt;Microsoft Public License&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=zCgcip"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=zCgcip" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=f4Dp5K"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=f4Dp5K" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=hHl2MK"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=hHl2MK" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=zgWUrk"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=zgWUrk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=mndYuk"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=mndYuk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=3fYHmK"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=3fYHmK" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/379338489" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/379338489/silverlight-dynamic-languages-sdk-03.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp2.blogger.com/_OqCZhp9yI0Q/SE74VwxHC3I/AAAAAAAAACo/Z7Q--6yQISM/s72-c/slpyrb-small.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F08%2Fsilverlight-dynamic-languages-sdk-03.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/08/silverlight-dynamic-languages-sdk-03.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-6863666874844480076</guid><pubDate>Wed, 27 Aug 2008 05:34:00 +0000</pubDate><atom:updated>2008-08-27T10:45:56.917-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">Dynamic Languages</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>Dragging elements in Silverlight with DLRConsole</title><description>&lt;center&gt;&lt;a href="http://www.flickr.com/photos/jschementi/2801795133/" title="DLRConsole Rocks by jschementi, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3244/2801795133_13e205b1b8.jpg" width="346" height="393" alt="DLRConsole Rocks" /&gt;&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;
&lt;p&gt;Dragging elements around in Silverlight is not trivial, so I wrote a Drag class in IronRuby during a demo of DLRConsole to show how cool REPL-programming is. I did a &lt;a href="http://www.flickr.com/photos/jschementi/2802888469/" target="_blank"&gt;10-minute screencast of this same demo&lt;/a&gt; a while ago, but I've given this demo enough times that it deserves a post on its own.&lt;/p&gt;&lt;h4 style="color: rgb(255, 204, 0);"&gt;Meet DLRConsole&lt;/h4&gt;&lt;p&gt;Can't show dragging without having stuff to drag, can I? Well, rather than requiring you to download a bunch of stuff, let's just program in the browser. Yes, the browser.&lt;br /&gt;
&lt;/p&gt;&lt;a href="http://www.flickr.com/photos/jschementi/2801783623/" title="DLRConsole by jschementi, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3125/2801807513_da498c5182_o.jpg" alt="DLRConsole" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p&gt;&lt;a href="http://jimmy.schementi.com/silverlight/dlrconsole" target="_blank"&gt;DLRConsole&lt;/a&gt; (&lt;a href="http://jimmy.schementi.com/silverlight/dlrconsole.zip"&gt;download&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;&lt;small&gt;You'll need Silverlight 2 Beta 2, but DLRConsole will tell you to install Silverlight if you don't have it.&lt;/small&gt;&lt;/p&gt;&lt;p&gt;If you haven't been introduced to DLRConsole yet, there she is. Pretty straight-forward; a Ruby and Python REPL prompt on the left for typing code in, and a Silverlight canvas on the right for &lt;i&gt;pretty&lt;/i&gt; stuff to come out. Got it? Good.&lt;br /&gt;
&lt;/p&gt;&lt;h4 style="color: rgb(255, 204, 0);"&gt;Makin' some stuff to drag&lt;/h4&gt;&lt;p&gt;So what do you want to drag around? I know, a clock? Of course, since we can't get enough of those freakin' things in Silverlight-land. I've done you a favor and build a clock already, so you don't have to. You're welcome. Click on the "Ruby" text on the bottom left to switch the console to Ruby, and then type the following in the prompt: &lt;br /&gt;
&lt;/p&gt;&lt;pre name="code" class="ruby"&gt;require 'lib/clock'
$clock = Clock.show
&lt;/pre&gt;&lt;a href="http://www.flickr.com/photos/jschementi/2802630898/" title="DLRConsole clock by jschementi, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3116/2801812537_b4d7d50e88_o.jpg" alt="DLRConsole clock" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p&gt;Awesome, a clock, in all it's majesty. You might have the urge to try to click said clock to move it ... go ahead, it won't bite. &lt;br /&gt;
&lt;/p&gt;&lt;h4 style="color: rgb(255, 204, 0);"&gt;Drag that face all over the place&lt;/h4&gt;&lt;p&gt;Didn't move, huh? Sucks. Let's fix that. Go back to the console and type this:&lt;/p&gt;&lt;pre name="code" class="ruby"&gt;require 'lib/drag'
Drag.new($clock.canvas)
&lt;/pre&gt;&lt;p&gt;&lt;small&gt;And for the curious, here's the code in lib/drag.rb:&lt;/small&gt;&lt;/p&gt;&lt;pre name="code" class="ruby"&gt;class Drag
  def initialize(obj)
    @click = nil
    @obj = obj
  end
  
  def enable
    @obj.mouse_left_button_down do |s,e| 
      @click = e.get_position @obj
    end
    Application.current.root_visual.mouse_left_button_up do |s,e| 
      @click = nil
    end
    canvas.mouse_move do |s,e|
      unless @click.nil?
        mouse_pos = e.get_position canvas
        @obj.left, @obj.top = mouse_pos.x - @click.x, mouse_pos.y - @click.y
      end
    end
    self
  end
end
&lt;/pre&gt;&lt;object type="application/x-shockwave-flash" width="400" height="248" data="http://www.flickr.com/apps/video/stewart.swf?v=59154" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"&gt; &lt;param name="flashvars" value="intl_lang=en-us&amp;amp;photo_secret=095a44c348&amp;amp;photo_id=2802715720&amp;amp;show_info_box=true"&gt;&lt;/param&gt;&lt;param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=59154"&gt;&lt;/param&gt;&lt;param name="bgcolor" value="#000000"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=59154" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&amp;amp;photo_secret=095a44c348&amp;amp;photo_id=2802715720&amp;amp;flickr_show_info_box=true" height="248" width="400"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;p&gt;Now click, hold, and moooooove! Awesome, we can move shit. Go ahead, get carried away. Try to find that "Silverlight Canvas" TextBlock and make that dragg-able too. Enjoy your new found powers.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=acilWO"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=acilWO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=LCT5KK"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=LCT5KK" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=2uofzK"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=2uofzK" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=ylwadk"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=ylwadk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=0DZ2Qk"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=0DZ2Qk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=B4cE3K"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=B4cE3K" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/375960257" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/375960257/dragging-elements-in-silverlight-with.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F08%2Fdragging-elements-in-silverlight-with.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/08/dragging-elements-in-silverlight-with.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-9217369615180954818</guid><pubDate>Wed, 13 Aug 2008 07:29:00 +0000</pubDate><atom:updated>2008-08-16T14:32:29.729-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">Flickr</category><category domain="http://www.blogger.com/atom/ns#">Walk Through</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>Walk-through: Silverlight Flickr Client in IronRuby</title><description>Yesterday I spoke about &lt;a href="http://ironruby.net/" target="_blank"&gt;IronRuby&lt;/a&gt; and &lt;a href="http://silverlight.net/" target="_blank"&gt;Silverlight&lt;/a&gt; to the &lt;a href="http://www.netda.net/" target="_blank"&gt;.NET Developers Association&lt;/a&gt;, or "NETDA", on (Microsoft's) campus tonight. In this post, I'll show one of the apps I built, a Flickr client. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/24458122@N00/2759163228/" title="photoviewer"&gt;&lt;img alt="photoviewer" border="0" src="http://static.flickr.com/3099/2759163228_83b3128ec6.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Here's the live app: &lt;a href="http://jimmy.schementi.com/silverlight/photoviewer" target="_blank"&gt;http://jimmy.schementi.com/silverlight/photoviewer&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;Pre-requisites&lt;/span&gt;&lt;/h4&gt;This walk-through will work for &lt;b&gt;both&lt;/b&gt; Mac and Windows, however the app seems to have problems in Safari currently. Firefox or IE will work fine.&lt;br /&gt;
&lt;br /&gt;
For starters, you'll need &lt;a href="http://go2.microsoft.com/fwlink/?LinkID=115261" target="_blank"&gt;install Silverlight 2 Beta 2&lt;/a&gt;, as well as &lt;a href="http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=14254#ReleaseFiles" target="_blank"&gt;download the Silverlight Dynamic Languages SDK (Beta 2)&lt;/a&gt;, or "sdl-sdk" for short. Unzip &lt;a href="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=sdlsdk&amp;amp;DownloadId=36528" target="_blank"&gt;sdl-sdk.zip&lt;/a&gt; to a folder named "sdl-sdk" anywhere on your file system.&lt;br /&gt;
&lt;br /&gt;
You'll also need &lt;a href="http://jimmy.schementi.com/silverlight/photoviewer-start.zip" target="_blank"&gt;photoviewer-start.zip&lt;/a&gt;, which contains images and libraries that this app depends on. (You can also grab &lt;a href="http://jimmy.schementi.com/silverlight/photoviewer-final.zip" target="_blank"&gt;photoviewer-final.zip&lt;/a&gt; if you want to &lt;a href="http://www.homestarrunner.com/vcr_cheat.html" target="_blank"&gt;cheat&lt;/a&gt;)&lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;Creating a new project&lt;/span&gt;&lt;/h4&gt;To create a Silverlight app, there's a script included in the SDK called "sl", which takes two arguments: the language (ruby, python, or jscript), and the name of your application. A folder will be created with the name of your app in your current directory, and a default app generated inside it. Enough talking, let's get to it ... open cmd.exe/Terminal.app/whatever and type:&lt;br /&gt;
&lt;pre&gt;$ cd path/to/sdl-sdk
$ script/sl ruby photoviewer&lt;/pre&gt;&lt;span style="color: #999999; font-size: xx-small;"&gt;(Note: if you're on Windows, make sure to use&amp;nbsp;backslashes "\" instead of forward slashes "/" in the path names)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This should say something along the lines of "&lt;b&gt;Your ruby Silverlight application was created in photoviewer&lt;/b&gt;". It does for you too? Awesome, let's move on. So, what got generated? Inside the new "photoviewer" folder you'll find:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #ff8000;"&gt;&lt;b&gt;index.html&lt;/b&gt; -&lt;/span&gt; This hosts the Ruby Silverlight app. &lt;span style="color: grey; font-size: 78%;"&gt;If you're curious as to what's going on here, there's documentation inline, so read it!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #ff8000;"&gt;&lt;b&gt;ruby/app.rb&lt;/b&gt; -&lt;/span&gt; Entry point to the Silverlight app. This generated file just renders app.xaml and sets some text from Ruby.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #ff8000;"&gt;ruby/app.xaml&lt;/span&gt;&lt;/b&gt; - XAML UI for the app. &lt;span style="color: grey; font-size: 78%;"&gt;Actually, we're not going to use XAML for this app, so we'll delete this later.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #ff8000;"&gt;ruby/silverlight.rb&lt;/span&gt;&lt;/b&gt; - Defined "SilverlightApplication" and makes existing Silverlight API's friendlier to Ruby &lt;span style="color: grey; font-size: 78%;"&gt;I gave you a newer version of this file in photoviewer-start.zip, so you'll have to overwrite this file with that.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #ff8000;"&gt;stylesheets/error.css -&lt;/span&gt;&lt;/b&gt; In the unfortunate event of you writing bad Ruby code, this stylesheet will format the in-browser error message all pretty-like for you.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #ff8000;"&gt;javascripts/error.js -&lt;/span&gt;&lt;/b&gt; In case you turn Ruby error reporting off, this file will still catch any errors and not cause your users to see some ugly alert box.&lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;Running your newly created Ruby app&lt;/span&gt;&lt;/h4&gt;Enough talk, does this thing work? We'll, let's try ...&lt;br /&gt;
&lt;pre&gt;$ cd photoviewer
$ script/server /b:index.html&lt;/pre&gt;&lt;span style="color: #999999; font-size: xx-small;"&gt;(Note "/b" is the same on Windows/Mac, always a forward slash since its part of the argument and not the path)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This will start a Silverlight development web server called &lt;a href="http://www.codeplex.com/sdlsdk/Wiki/View.aspx?title=Chiron&amp;amp;referringTitle=Getting%20Started" target="_blank"&gt;Chiron&lt;/a&gt;, and launch your default browser at index.html. Using the "/w" flag just starts the server and doesn't open your browser. Anyway, you should see this (in your default browser, of course):&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/24458122@N00/2758685635/" title="hello-silverlight"&gt;&lt;img alt="hello-silverlight" border="0" src="http://static.flickr.com/3230/2758685635_0fed5fe9b9.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;Adding external libraries&lt;/span&gt;&lt;/h4&gt;Before we can start coding, this app depends on some external libraries, so let's put them in our project now. Since I'm such a good guy, I put all the external dependencies in that &lt;a href="http://jimmy.schementi.com/silverlight/photoviewer-start.zip" target="_blank"&gt;photoviewer-start.zip&lt;/a&gt; file I had you download already. Yep, I'm awesome, you're welcome. Anyway, take the contents of that zip and place it in your project. Your OS may complain about overwriting silverlight.rb, but it's ok, overwrite it. Did it? Good. So, what did you just add to your app?&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #ff8000;"&gt;&lt;b&gt;images/loading.gif&lt;/b&gt;&lt;/span&gt; - loading indicator gif thingy. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #ff8000;"&gt;ruby/System.Json.dll&lt;/span&gt;&lt;/b&gt; - JSON parser that ships in the Silverlight SDK.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #ff8000;"&gt;ruby/json.rb&lt;/span&gt;&lt;/b&gt; - requires and monkey patches System.Json to be more ruby-esk.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: #ff8000;"&gt;ruby/silverlight.rb&lt;/span&gt;&lt;/b&gt; - This app will depend on a more up-to-date version of silverlight.rb, so you can replace the generated one with this.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;a href="http://www.huddletogether.com/projects/lightbox2/" target="_blank"&gt;&lt;span style="color: #ff8000;"&gt;lightbox/&lt;/span&gt;&lt;/a&gt; -&lt;/b&gt; A javascript library for showing images prettily. Love it.&lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;Writing some freakin' code! UI, that is&lt;/span&gt;&lt;/h4&gt;As I hinted at before, this application with have a HTML UI with IronRuby driving it. Yes, you can use Silverlight without all the pretty graphics. ;) Anyway, to accomplish this, we need to make the Silverlight canvas virtually invisible. Open index.html and on line 28 change the width and height attributes from "100%" to "1":&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:d2523989-9b43-4751-b7ce-ae6f26331840" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;&lt;pre class="html" name="code"&gt;&amp;lt;object data="data:application/x-silverlight," type="application/x-silverlight-2-b2" width="1" height="1"&amp;gt;&lt;/pre&gt;&lt;/div&gt;By changing the width/height to "1", we're making the control basically invisible, but still actually visible so it still loads. Clever hack, huh?&lt;br /&gt;
&lt;br /&gt;
Now let's give our app a UI. Type this after the "&amp;lt;/object&amp;gt;" tag at the bottom of index.html:&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:5cde73cd-27ec-4481-b85c-012097e0531f" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;&lt;pre class="html" name="code"&gt;&amp;lt;div class="search"&amp;gt; 
  &amp;lt;form id="search" action="javascript:void(0)"&amp;gt; 
    &amp;lt;input type="text" id="keyword" /&amp;gt; 
    &amp;lt;input type="submit" id="submit_search" value="search" /&amp;gt; 
    &amp;lt;img src="images/loading.gif" id="images_loading" /&amp;gt; 
  &amp;lt;/form&amp;gt; 
  &amp;lt;div id="search_results"&amp;gt; 
    &amp;lt;div id="search_images"&amp;gt;&amp;lt;/div&amp;gt; 
    &amp;lt;div id="search_links"&amp;gt;&amp;lt;/div&amp;gt; 
  &amp;lt;/div&amp;gt; 
&amp;lt;/div&amp;gt; 
&amp;lt;div class="clear"&amp;gt;&amp;lt;/div&amp;gt; 
&lt;/pre&gt;&lt;/div&gt;This is basic search box, submit button, and a place to render the images found. Let's style it ... open up stylesheets/screen.css. First comes first; delete the #silverlightControlHost style since we don't want our 1x1 control taking up 100% of the page.&lt;br /&gt;
&lt;pre&gt;&lt;strike&gt;#silverlightControlHost {
  height: 100%;
}&lt;/strike&gt;&lt;/pre&gt;Now let's style our plain UI we just made:&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:73fb356e-92c1-4d0d-b192-3538462f03c1" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;&lt;pre class="css" name="code"&gt;body { 
  font-family: "Trebuchet MS" Verdana sans-serif; 
  border: 0px; padding: 0px; margin: 0px; 
} 

div.clear { 
  clear: both; 
} 

/* main search box */ 
.search { 
  padding: 20px; 
  margin: 20px; 
  border: 10px solid gray; 
  background-color: #ccc; 
} 

form#search #images_loading { 
  width: 18px;  
  height: 15px; 
  display: none; 
} 


/* search results */ 
#search_results { 
  display: none; 
} 

/* search images */ 
#search_images { 
  padding-top: 10px; 
} 
#search_images .image, .image a, .image a img { 
  float: left;  
  padding: 0px;  
  margin: 0px;  
  border: 0px; 
} 
#search_images .image a:link,  
#search_images .image a:visited { 
  background-color: white; 
  padding: 5px; 
  margin: 5px; 
  background-color: white; 
  border: 1px solid gray; 
} 
#search_images .image a:hover { 
  background-color: #ff9966; 
} 

/* search links */ 
#search_links { 
  clear: both; 
  padding-top: 10px; 
} 
#search_links a { 
  border: 1px solid #003344; 
  margin: 2px; 
  padding: 0px 5px; 
  color: #003344; 
  background-color: white; 
  text-decoration: none; 
} 
#search_links a:hover, 
#search_links a.active { 
  color: white; 
  background-color: #003344; 
  border: 1px solid white; 
} 
#search_links a.active { 
  cursor: default; 
}&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
Refresh your browser and you'll see this:&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/24458122@N00/2758745585/" title="html"&gt;&lt;img alt="html" border="0" src="http://static.flickr.com/3111/2758745585_166b0d5c84.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;IronRuby loves the DOM&lt;/span&gt;&lt;/h4&gt;Awesome, now we have a UI, but it does nothing ... &lt;i&gt;Ruby enters stage left&lt;/i&gt;. Open up ruby/app.rb and let's start hacking.&lt;br /&gt;
The point of this app is to type a keyword, hit search, and see images from Flickr that have something to do with the keyword. So, I propose the first step would be to get Ruby handle that search button press. Agree? Good. Replace the entire body of the App class with the following:&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:3e87ec6a-0f51-4ce3-b2a0-ea7a62eb78ad" style="display: inline; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;def initialize 
  document.submit_search.onclick do |s, e| 
    puts "Search button pressed!"
  end
end
&lt;/pre&gt;&lt;/div&gt;That will print "Search button pressed!" at the bottom of the page every time you press the search button. Duh, that's what the code says! =P&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/24458122@N00/2758762001/" title="search"&gt;&lt;img alt="search" border="0" src="http://static.flickr.com/3002/2758762001_50b114ebf6.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;Ruby loves Flickr&lt;/span&gt;&lt;/h4&gt;Now that we know how to hook a button click with Ruby, let's make it talk to Flickr and get the data about our search back. First off, we need to know what to say to Flickr. So, let's redefine &lt;span style="font-family: Courier New;"&gt;initialize&lt;/span&gt; to do the following:&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:2a964897-49a9-4704-a252-30400aa2f666" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;def initialize 
  @url = "http://api.flickr.com/services/rest" 
  @options = { 
    :method =&amp;gt; "flickr.photos.search", 
    :format =&amp;gt; "json", 
    :nojsoncallback =&amp;gt; "1", 
    :api_key =&amp;gt; "6dba7971b2abf352b9dcd48a2e5a5921", 
    :sort =&amp;gt; "relevance", 
    :per_page =&amp;gt; "30" 
  } 
  document.submit_search.onclick do |s, e| 
    create(document.keyword.value, 1) 
  end 
end 
&lt;/pre&gt;&lt;/div&gt;We're going to talk to Flickr using REST, because we're sane. The &lt;span style="font-family: Courier New;"&gt;@options&lt;/span&gt; hash simply collects the various parts that the REST call requires; we'll build a function to make this into a URL later. The important part is that we're calling &lt;span style="font-family: courier;"&gt;flickr.photos.search&lt;/span&gt; and asking for the response to be JSON. The &lt;span style="font-family: Courier New;"&gt;onclick&lt;/span&gt; event calls this cryptically-name &lt;b&gt;create &lt;/b&gt;method which doesn't exist yet, so let's write it.&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:7f485b1f-e763-458b-b33f-9a5117546bec" style="display: inline; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;def create(keyword, page) 
  @options[:tags] = keyword 
  @options[:page] = page 
  request 
end 

def request 
  make_url 
  request = Net::WebClient.new 
  request.download_string_completed do |sender, args| 
    @response = args.result 
    show 
  end 
  document.images_loading.style[:display] = "inline" 
  request.download_string_async Uri.new(@url) 
end 
&lt;/pre&gt;&lt;/div&gt;I had a feeling I'd need to reuse &lt;b&gt;create&lt;/b&gt;, so it just adds those arguments to the &lt;span style="font-family: Courier New;"&gt;@options&lt;/span&gt; we built in &lt;b&gt;&lt;span style="font-family: courier new;"&gt;initialize&lt;/span&gt; &lt;/b&gt;since they're also needed to be part of the URI, and call this request method. This is where the "talking" happens.&lt;br /&gt;
&lt;br /&gt;
First, it makes the URL from the &lt;span style="font-family: Courier New;"&gt;@options&lt;/span&gt; (we'll define that method soon enough). Then it news-up an instance of &lt;span style="font-family: Courier New;"&gt;System::Windows::Net::WebClient&lt;/span&gt;, part of Silverlight, to actually make the request to Flickr. The &lt;span style="font-family: Courier New;"&gt;images_loading.style[:display] = "inline"&lt;/span&gt; causes the loading indicator to start spinning. When the response comes back, I call &lt;b&gt;show,&lt;/b&gt; which presumable should show the results in some way. For now, we'll just print the response, and stop our loading indicator.&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:d54908c6-f4ca-48c6-b3bc-662b95b39066" style="display: inline; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;def show 
  puts @response 
  document.images_loading.style[:display] = "none" 
end
&lt;/pre&gt;&lt;/div&gt;Oh, and now would be a good time to implement &lt;b&gt;&lt;span style="font-family: courier new;"&gt;make_url&lt;/span&gt;&lt;/b&gt; ;)&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:0e0e8dc0-73c0-454e-bfbd-dbd66d53618b" style="display: inline; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;def make_url 
  first, separator = true, '?' 
  @options.each do |key, value| 
    separator = "&amp;amp;" unless first 
    @url += "#{separator}#{key}=#{value}" 
    first = false 
  end 
end 
&lt;/pre&gt;&lt;/div&gt;Nothing’s really special here, just puts the "?", "&amp;amp;", and "=" in the right places. Anyway, we're not ready to give her another run. Save app.rb, refresh your browser, type a search-term, click search, and you'll see the magic unfold:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/24458122@N00/2758561585/" title="json-dump"&gt;&lt;img alt="json-dump" border="0" src="http://static.flickr.com/3046/2758561585_e18127bddf.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;Let's make this gunk pretty&lt;/span&gt;&lt;/h4&gt;So, what to do with all this Flickr data ... hmmm ... thoughts? Somewhere in that muck are some pretty pictures, so let's squeeze them out ... aka parse the JSON. At the top of app.rb, add the following:&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:83bcea08-ddc7-4bab-bf55-2f6bdc5eda5f" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby:nogutter:nocontrols" name="code"&gt;require 'json'&lt;/pre&gt;&lt;/div&gt;That'll load that json.rb file we copied in the beginning. It simply monkey patches &lt;span style="font-family: courier new;"&gt;System::Json::JsonValue&lt;/span&gt; to give easier access to the data. Here's a loot at json.rb, just for fun.&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:ea06c678-5181-409a-8462-6b3e08462e59" style="display: inline; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;require 'System.Json.dll' 
include System 

module System::Json 

  class JsonValue 
    def [](index) 
      item = self.get_Item(index.to_clr_string) 
      type = item.get_JsonType 
      return item.to_string.to_s.to_f if type == JsonType.Number 
      return item.to_string.to_s.split("\"").last if type == JsonType.String 
      return System::Boolean.parse(item) if type == JsonType.Boolean 
      item 
    end 
  
    def inspect 
      to_string.to_s 
    end 
  end 

end&lt;/pre&gt;&lt;/div&gt;This just adds the &lt;span style="font-family: courier new;"&gt;[]&lt;/span&gt; method to &lt;span style="font-family: courier new;"&gt;JsonValue&lt;/span&gt; so you can access JSON values like &lt;span style="font-family: courier new;"&gt;foo['bar']&lt;/span&gt; where the JSON was &lt;span style="font-family: courier new;"&gt;foo = {'bar' : 'baz'}&lt;/span&gt;. Useful. Anyway, back to writing code ourselves. In app.rb, let's redefine the show method to parse our JSON and do something useful with it.&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:1819af05-b561-44b4-b252-2c2a6f3a6598" style="display: inline; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;def show 
  @flickr = System::Json::JsonValue.parse(@response) 
  render 
end 

def render 
  @render = Render.new(@flickr, @options[:tags], @options[:page]) 
  document.search_images[:innerHTML] = @render.generate_photos 
  document.search_links[:innerHTML] = @render.generate_pages 
  @render.hook_page_events('search_links') 
  document.images_loading.style[:display] = "none" 
  document.search_results.style[:display] = "block" 
end 
&lt;/pre&gt;&lt;/div&gt;So, now show just calls &lt;span style="font-family: courier new;"&gt;System::Json::JsonValue.parse&lt;/span&gt; on our Flickr response, and then I've written a new method called render which delegates the rendering to a new class called &lt;span style="font-family: courier new;"&gt;Render&lt;/span&gt; (defining that is next), and stops the loading indicator. Let's make a new file called render.rb and require it in app.rb:&lt;br /&gt;
&lt;pre class="ruby" name="code"&gt;require 'render'&lt;/pre&gt;Open render.rb and let's first tackle rendering the photos:&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:789c0f59-4c77-4303-9779-78daa678135a" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;class Render 
  def initialize(flickr, tags, current_page) 
    @flickr = flickr 
    @tags = tags 
    @current_page = current_page 
  end 

  def generate_photos 
    if @flickr['stat'] == "ok" &amp;amp;&amp;amp; @flickr['photos']['total'].to_i &amp;gt; 0 
      tag(:div, :class =&amp;gt; 'images') do 
        @flickr['photos']['photo'].collect do |p|  
          photo(p) 
        end.join 
      end 
    else 
      "No images found!" 
    end 
  end 

  def photo(p) 
    source = "http://farm#{p['farm'].to_i}.static.flickr.com/#{p['server']}/#{p['id']}_#{p['secret']}" 
    thumb = "#{source}_s.jpg" 
    img = "#{source}.jpg" 
    tag(:div, :class =&amp;gt; 'image') do 
      tag(:a, :href  =&amp;gt; "#{img}") do 
        tag(:img, :src =&amp;gt; "#{thumb}") 
      end 
    end 
  end 

  def generate_pages 
    "" 
  end 

  def hook_page_events(div) 
  end 

private 

  def tag(name, options, &amp;amp;block) 
    output = "" 
    output &amp;lt;&amp;lt; "&amp;lt;#{name}" 
    keyvalue = options.collect do |key, value|  
      "#{key}=\"#{value}\"" 
    end 
    output &amp;lt;&amp;lt; " #{keyvalue.join(" ")}" if keyvalue.size &amp;gt; 0 
    if block  
      output &amp;lt;&amp;lt; "&amp;gt;" 
      output &amp;lt;&amp;lt; yield  
      output &amp;lt;&amp;lt; "&amp;lt;/#{name}&amp;gt;" 
    else 
      output &amp;lt;&amp;lt; " /&amp;gt;" 
    end 
    output 
  end 
end&lt;/pre&gt;&lt;/div&gt;A bit of code here, but it's all straight-forward, except for all these "tag" calls. The private &lt;span style="font-family: courier new;"&gt;tag&lt;/span&gt; method does most of the work here, but generating HTML based on a name and options; it makes writing HTML more ruby-esk. You'll also notice that &lt;span style="font-family: courier new;"&gt;generate_pages&lt;/span&gt; and &lt;span style="font-family: courier new;"&gt;hook_page_events&lt;/span&gt; aren't implemented yet. You can not implement them now, refresh your browser, do a search, and you'll at least get the images back:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/24458122@N00/2759400768/" title="images"&gt;&lt;img alt="images" border="0" src="http://static.flickr.com/2412/2759400768_02c6f84414.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;Paginating the Flickrnation&lt;/span&gt;&lt;/h4&gt;Flickr only sends you one page of your request. When we created the options for the Flickr request, there was a &lt;span style="font-family: courier new;"&gt;:per_page =&amp;gt; "30"&lt;/span&gt; entry, saying that I want pages of 30 images ... duh. When we call &lt;span style="font-family: courier new;"&gt;create(document.keyword.value, 1)&lt;/span&gt; on the search button click, that second argument asks Flickr for the 1st page of the request. So, to get any page we want, you just give it to the create function, and it'll give is that page. Told you we'd need to reuse it!&lt;br /&gt;
So, to implement &lt;span style="font-family: courier new;"&gt;generate_pages&lt;/span&gt;, we just need to render links for the pages, and to implement &lt;span style="font-family: courier new;"&gt;hook_page_events&lt;/span&gt;, we need to hook each one of those page links with an event that calls create for the given page. Simple enough ...&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:f28f9c9c-196c-47b5-a411-cff1aad7746a" style="display: inline; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;def generate_pages 
  render = "" 
  if @flickr['photos']['total'].to_i &amp;gt; 0 
    num_pages = @flickr['photos']['pages'].to_i &amp;gt; 10 ? 10 : @flickr['photos']['pages'].to_i 
    num_pages.times { |i| render += page(i + 1) } if num_pages &amp;gt; 1 
  end 
  render 
end 

def page(i) 
  tag(:a, :href =&amp;gt; 'javascript:void(0)', :id =&amp;gt; "#{i}") { "#{i}" } 
end 

def hook_page_events(div) 
  $app.document.get_element_by_id(div.to_s.to_clr_string).children.each do |child| 
    if child.id.to_s.to_i == @current_page 
      child.css_class = "active"  
    else 
      child.onclick { |s, args| $app.create(@tags, child.id.to_s.to_i) } 
    end 
  end 
end&lt;/pre&gt;&lt;/div&gt;Do the whole save/refresh/search song-and-dance and you'll have pretty paging action.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/24458122@N00/2759700250/" title="pagination"&gt;&lt;img alt="pagination" border="0" src="http://static.flickr.com/3257/2759700250_51df2356b5.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;Ruby, you play nice with Javascript, ya hear!&lt;/span&gt;&lt;/h4&gt;This is pretty awesome ... ya know, Ruby in the browser and all. But truth be told, I like Javascript too. Especially since there are a ton of Javascript libraries out there.&lt;br /&gt;
&lt;br /&gt;
That being said, I'd like to spruce up the "clicking on an image". Right now it opens in a completely new page, and breaks the back-button since your search is wiped away. It's be awesome to have some cool visual effect when clicking on the image, and even having it link to the real Flickr image page. Only if there was such a library ...&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.huddletogether.com/projects/lightbox2/"&gt;http://www.huddletogether.com/projects/lightbox2/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Like I said before, Lightbox is awesome. So, to pretty up zooming in on an image, we'll use Lightbox. First, let's go back to index.html and add some references to Lightbox:&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:37165f0d-a8c3-4ee2-a17e-58c81ae113ed" style="display: inline; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;&amp;lt;script type="text/javascript" src="lightbox/js/prototype.js"&amp;gt;&amp;lt;/script&amp;gt; 
&amp;lt;script type="text/javascript" src="lightbox/js/scriptaculous.js?load=effects"&amp;gt;&amp;lt;/script&amp;gt; 
&amp;lt;script type="text/javascript" src="lightbox/js/lightbox.js"&amp;gt;&amp;lt;/script&amp;gt; 
&amp;lt;link rel="stylesheet" href="lightbox/css/lightbox.css" type="text/css" media="screen" /&amp;gt;&lt;/pre&gt;&lt;/div&gt;Lightbox uses special properties on the anchor tag to store information about the image you are viewing, like if it's part of a collection, or what the title of the image should be, etc. Let's go back into our &lt;span style="font-family: courier new;"&gt;Render#photo&lt;/span&gt; method and add a &lt;span style="font-family: courier new;"&gt;:title&lt;/span&gt; and &lt;span style="font-family: courier new;"&gt;:rel&lt;/span&gt; values to our &lt;span style="font-family: courier new;"&gt;:a&lt;/span&gt; tag.&lt;br /&gt;
&lt;br /&gt;
So, the entire &lt;span style="font-family: courier new;"&gt;tag(:a)&lt;/span&gt; call turns into this:&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:e0cfcfdc-9f67-4d4b-8a67-845b185d1316" style="display: inline; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;tag(:a, {
  :href  =&amp;gt; "#{img}",  
  :title =&amp;gt; "&amp;amp;lt;a href=&amp;amp;quot;http://www.flickr.com/photos/#{p['owner']}/#{p['id']}&amp;amp;quot; target=&amp;amp;quot;_blank&amp;amp;quot;&amp;amp;gt;#{p['title']}&amp;amp;lt;/a&amp;amp;gt;", 
  :rel   =&amp;gt; "lightbox[#{@tags}]" 
}) do 
  tag(:img, :src =&amp;gt; "#{thumb}") 
end&lt;/pre&gt;&lt;/div&gt;Lastly, let's initialize Lightbox when we show the response. Put the following after the &lt;span style="font-family: courier new;"&gt;render&lt;/span&gt; call in the &lt;span style="font-family: courier new;"&gt;show&lt;/span&gt; method in app.rb:&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:06827386-be12-4afb-a7e4-1e0eac593b08" style="display: inline; margin: 0px; padding: 0px;"&gt;&lt;pre class="ruby" name="code"&gt;if document.overlay &amp;amp;&amp;amp; document.lightbox 
  document.overlay.parent.remove_child document.overlay 
  document.lightbox.parent.remove_child document.lightbox 
end
HtmlPage.window.eval("initLightbox()") 
&lt;/pre&gt;&lt;/div&gt;That last line isn't the prettiest, but our images are all pretty. &lt;br /&gt;
&lt;h4&gt;&lt;span style="color: #ff8000;"&gt;And we're done!&lt;/span&gt;&lt;/h4&gt;Congrats for getting this far! Now waste time searching for "boobs" or other dirty things on Flickr.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.flickr.com/photos/24458122@N00/2758561659/" title="lightbox"&gt;&lt;img alt="lightbox" border="0" src="http://static.flickr.com/3030/2758561659_1f51cab446.jpg" /&gt;&lt;/a&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=usPZhV"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=usPZhV" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=PUn8uK"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=PUn8uK" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=O1cg5K"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=O1cg5K" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=spsWdk"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=spsWdk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=TN1Xdk"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=TN1Xdk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=wsnthK"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=wsnthK" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/363678821" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/363678821/walk-through-silverlight-flickr-client.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F08%2Fwalk-through-silverlight-flickr-client.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/08/walk-through-silverlight-flickr-client.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-8586523542583126401</guid><pubDate>Wed, 30 Jul 2008 03:21:00 +0000</pubDate><atom:updated>2008-07-29T20:26:17.283-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><category domain="http://www.blogger.com/atom/ns#">Chiron</category><title>Run Chiron with a right-click</title><description>&lt;p&gt;&lt;a title="Pluto / Chiron" href="http://www.flickr.com/photos/21063632@N07/2706001250/"&gt;&lt;img border="0" alt="Pluto / Chiron" src="http://static.flickr.com/3271/2706001250_e1b8bc4020.jpg" width="396" height="178" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;About a month ago &lt;a href="http://haacked.com/" target="_blank"&gt;Phil Haack&lt;/a&gt; posted a &lt;a href="http://haacked.com/archive/2008/06/24/vs2008-web-server-here-shell-extension.aspx" target="_blank"&gt;registry hack to run the ASP.NET Web Server from a directory's right-click menu&lt;/a&gt;, and I thought it would be pretty awesome to have some right-click options for Chiron. Finally decided today would be the day for that:&lt;/p&gt;  &lt;p&gt;&lt;span class="arrow"&gt;&lt;/span&gt;&lt;a href="http://jimmy.schementi.com/silverlight/chiron-here.zip"&gt;&amp;#8595; Download chiron-here.zip&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="chiron-here" href="http://www.flickr.com/photos/24458122@N00/2715864992/"&gt;&lt;img border="0" alt="chiron-here" src="http://static.flickr.com/3214/2715864992_05f5561f5c.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note: You will need to have the &lt;a href="http://codeplex.com/sdlsdk" target="_blank"&gt;Silverlight Dynamic Languages SDK&lt;/a&gt; for any of this to work; only sdl-sdk.zip is required. &lt;/em&gt;&lt;/p&gt;  &lt;h4&gt;&lt;font color="#ff8000"&gt;Installation (please read!)&lt;/font&gt;&lt;/h4&gt;  &lt;p&gt;chiron-here.reg assumes that you unzipped sdl-sdk.zip into C:\sdl-sdk. If this is not the case, open chiron-here.reg in your editor of choice (notepad will do) and change the &lt;strong&gt;two paths&lt;/strong&gt; to point to your sdl-sdk location.&lt;/p&gt;  &lt;p&gt;To install, simply double-click on chiron-here.reg. Say *Yes* to the prompt if you *really* want to install it. That's it! No reboot required.&lt;/p&gt;  &lt;p&gt;Take a look at the README for usage. If you're a Windows person hacking Silverlight with Ruby/Python/JScript, this could definitely be useful. Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=92Xudy"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=92Xudy" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=RxbySJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=RxbySJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=5ORHLJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=5ORHLJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=twSefj"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=twSefj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=8dzGKj"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=8dzGKj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=kpxFnJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=kpxFnJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/350086580" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/350086580/run-chiron-with-right-click.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F07%2Frun-chiron-with-right-click.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/07/run-chiron-with-right-click.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-764498937506293808</guid><pubDate>Thu, 24 Jul 2008 21:55:00 +0000</pubDate><atom:updated>2008-07-30T15:59:01.058-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">rails</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>Browser, meet Ruby on Rails</title><description>&lt;p&gt;&lt;a href="http://www.iunknown.com" target="_blank"&gt;John Lam&lt;/a&gt; is announcing a bunch of good &lt;a href="http://ironruby.net" target="_blank"&gt;IronRuby&lt;/a&gt; stuff at OSCON today, mainly around the project's commitment to open source. Part of this commitment is being able to collaborate with the Ruby community on projects that are related to IronRuby. This is where I fit in. :)&lt;/p&gt;  &lt;p&gt;At RailsConf John Lam and I gave a talk about &lt;a href="http://ironruby.net" target="_blank"&gt;IronRuby&lt;/a&gt;, &lt;a href="http://rubyonrails.com" target="_blank"&gt;Rails&lt;/a&gt;, and &lt;a href="http://silverlight.net" target="_blank"&gt;Silverlight&lt;/a&gt;. We showed &lt;a href="http://www.iunknown.com/2008/05/ironruby-and-rails.html" target="_blank"&gt;IronRuby running Rails&lt;/a&gt;, as well as the beginnings of an &lt;strong&gt;integration between Silverlight and Rails&lt;/strong&gt;. I've &lt;a href="http://blog.jimmy.schementi.com/2008/03/teaser-rails-and-blue-nebula.html" target="_blank"&gt;hinted&lt;/a&gt; in the past about &lt;a href="http://blog.jimmy.schementi.com/2008/04/silverlight-on-rails.html" target="_blank"&gt;this very thing&lt;/a&gt;, but RailsConf was the first time I got to show it to working to actual Rails developers. Pretty awesome. Today, I get to share it with the world:&lt;/p&gt;  &lt;p&gt;&lt;a style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" href="http://schementi.com/silverline" target="_blank"&gt;&lt;img style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px; background-color: black; border-right-width: 0px" src="http://www.schementi.com/silverline/silverline.png" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;silverline&lt;/b&gt; is a &lt;a href="http://www.rubyonrails.org" target="_blank"&gt;Ruby on Rails&lt;/a&gt; plug-in which gives the ability to run &lt;a href="http://en.wikipedia.org/wiki/Ruby_%28programming_language%29" target="_blank"&gt;Ruby&lt;/a&gt; in the browser to manipulate &lt;a href="http://en.wikipedia.org/wiki/HTML" target="_blank"&gt;HTML&lt;/a&gt;, vector graphics, or just do some computation. &lt;strong&gt;Bottom line&lt;/strong&gt;: it let's you write Rails code that can run on the client. &lt;/p&gt;  &lt;p&gt;Check out the website: &lt;a href="http://schementi.com/silverline" target="_blank"&gt;http://schementi.com/silverline&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;And, most importantly, you can download the plug-in from &lt;a href="http://github.com" target="_blank"&gt;github&lt;/a&gt;: &lt;a href="http://github.com/jschementi/silverline" target="_blank"&gt;http://github.com/jschementi/silverline&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Also, you can submit bugs/feature-requests on &lt;a href="http://lighthouseapp.com" target="_blank"&gt;lighthouse&lt;/a&gt;: &lt;a href="http://silverline.lighthouseapp.com" target="_blank"&gt;http://silverline.lighthouseapp.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://silverlight.net"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" border="0" alt="Sl_h_rgb-small" src="http://lh4.ggpht.com/jschementi/SIj6PxXgd5I/AAAAAAAAADA/yFYBD6yOSUo/Sl_h_rgb-small%5B10%5D.png?imgmax=800" width="154" height="50" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is all possible because of &lt;a href="http://en.wikipedia.org/wiki/Silverlight#Silverlight_2" target="_blank"&gt;Silverlight&lt;/a&gt;, the 4 megabyte download of the .NET Framework, and IronRuby, the implementation of Ruby on .NET and the Dynamic Language Runtime. &lt;strong&gt;silverline&lt;/strong&gt; lets you do anything you can do in Silverlight with IronRuby, but it's a first-class part of your Rails application, and makes things a whole lot easier.&lt;/p&gt;  &lt;p&gt;&lt;a title="watch" href="http://silverline.schementi.com/watch" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" alt="watch" src="http://static.flickr.com/3148/2699798680_f61bdf9956_t.jpg" width="74" height="66" /&gt;&lt;/a&gt;&lt;a title="tryruby" href="http://silverline.schementi.com/tryruby" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" alt="tryruby" src="http://static.flickr.com/3060/2698983019_111514d1c1_t.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To see &lt;strong&gt;silverline&lt;/strong&gt; in action, take a look at the demo site: &lt;a href="http://silverline.schementi.com" target="_blank"&gt;http://silverline.schementi.com&lt;/a&gt;. The source is located at &lt;a href="http://github.com/jschementi/silverline-demos" target="_blank"&gt;http://github.com/jschementi/silverline-demos&lt;/a&gt;. I will be posting walk-throughs of silverline's features shortly. Enjoy!&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#8d8d8d" size="1"&gt;Note: &amp;quot;silverline&amp;quot; might not be the name of this thing in a couple days, so if you see something else on my blog that seems the same but has a different name, then it's the same thing.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=qI4x2Q"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=qI4x2Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=F3p8kJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=F3p8kJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=EcKeyJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=EcKeyJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=3zBLyj"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=3zBLyj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=ZBNbEj"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=ZBNbEj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=Sz1L9J"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=Sz1L9J" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/345037521" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/345037521/browser-meet-ruby-on-rails.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F07%2Fbrowser-meet-ruby-on-rails.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/07/browser-meet-ruby-on-rails.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-88119741387709199</guid><pubDate>Fri, 04 Jul 2008 00:04:00 +0000</pubDate><atom:updated>2008-07-04T14:30:45.079-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>ASP.NET and Dynamic Languages</title><description>&lt;p&gt;In the last year, my team @ Microsoft hasn't really done much with &lt;a href="http://asp.net/"&gt;ASP.NET&lt;/a&gt;. Unfortunately so, since our focus has been on the languages themselves. Though, we have an integration with  &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt;, so why is ASP.NET left out?&lt;/p&gt;  &lt;p&gt;That's definitely changing, 'cause now ASP.NET and Dynamic Languages are like this:&lt;/p&gt;  &lt;p style="text-align: center;"&gt;&lt;a title="Best friends" href="http://www.flickr.com/photos/78656792@N00/84196531/"&gt;&lt;img alt="Best friends" src="http://bp0.blogger.com/_OqCZhp9yI0Q/SG6WJQKvb2I/AAAAAAAAACw/W5mEsZNprEE/s400/84196531_143245f498.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;... but, that's not to say that we did &lt;em&gt;nothing &lt;/em&gt;in the last year:&lt;/p&gt;  &lt;h4&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;ASP.NET Futures&lt;/span&gt;&lt;/h4&gt;  &lt;p&gt;In July 2007 the &lt;a href="http://www.asp.net/Downloads/futures/"&gt;ASP.NET Futures Release&lt;/a&gt; contained Dynamic Language Support in ASP.NET, giving you &lt;a href="http://codeplex.com/ironpython"&gt;IronPython&lt;/a&gt; and Managed JScript as programming languages in ASP.NET. It also had a ton of other good stuff in there, like AJAX futures, Silverlight controls, and &lt;a href="http://www.codeplex.com/aspnet/Wiki/View.aspx?title=Dynamic%20Data&amp;amp;referringTitle=Home"&gt;Dynamic Data Controls&lt;/a&gt;. If you're interested in learning more about this, take a look at the &lt;a href="http://quickstarts.asp.net/Futures/dlr/doc/intro.aspx"&gt;Dynamic Languages in ASP.NET Quickstarts&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The problem with this release is it's a one-off; as in &lt;em&gt;"who the hell knows when this stuff is going to be updated."&lt;/em&gt; Also, IronPython releases every month, so the IronPython bits in this release were old fast. And sitting here a year later, a lot has changed! The release is really intended on being a &lt;em&gt;"look at what we *might* do in the future"&lt;/em&gt;, and a year without anything substantial is way to long in our world.&lt;/p&gt;  &lt;p&gt;More so, there is no support for IronRuby. Even today we're not as far along as people would hope. I have a couple "Hello, World" aspx pages using IronRuby running on my machine, but that's really the extent of it. Sucks.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Shout out&lt;/strong&gt;: Being able to use DLR languages in ASP.NET and Dynamic Data Controls are both the blood and sweat of &lt;/em&gt;&lt;a href="http://blogs.msdn.com/davidebb/"&gt;&lt;em&gt;David Ebbo&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, an Architect on the ASP.NET team, and the cool guy I got to give &lt;/em&gt;&lt;a href="http://blog.jimmy.schementi.com/2006/07/techready-3.html"&gt;&lt;em&gt;a talk&lt;/em&gt;&lt;/a&gt;&lt;em&gt; with two years ago as an intern.&lt;/em&gt;&lt;/p&gt;  &lt;h4&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;ASP.NET MVC&lt;/span&gt;&lt;/h4&gt;  &lt;p&gt;Tangential to the whole &lt;em&gt;"holy crap why can't I use Iron* in ASP.NET"&lt;/em&gt; issue is giving the &lt;em&gt;"&lt;/em&gt;&lt;a href="http://www.ruby-forum.com/topic/154936"&gt;&lt;em&gt;when is my IronRuby going to be in ASP.NET MVC&lt;/em&gt;&lt;/a&gt;&lt;em&gt;"&lt;/em&gt; drones something to chew on. And at &lt;a href="http://www.microsoft.com/events/teched2008/developer/default.mspx"&gt;TechEd 2008&lt;/a&gt;, &lt;a href="http://www.iunknown.com/"&gt;John Lam&lt;/a&gt; gave them some slivers of meat: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.iunknown.com/2008/06/ironruby-and-aspnet-mvc.html"&gt;IronRuby and ASP.NET MVC&lt;/a&gt;. Also, &lt;a href="http://haacked.com/"&gt;Phil Haack&lt;/a&gt; followed up with a &lt;a href="http://haacked.com/archive/2008/06/12/ironruby-and-asp.net-bffs-forever.aspx"&gt;IronRuby and ASP.NET BFFs Forever&lt;/a&gt; post. Yes, very cute.  =) &lt;/p&gt;  &lt;p&gt;Anyway, no real bits are out there yet for this, but we do have proof for ourselves that ASP.NET MVC aren't doing things that alienate DLR languages. Woohoo! Now it's just a matter of doing it right and getting it out the door.&lt;/p&gt;  &lt;h4&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;Next stop: the Web Server&lt;/span&gt;&lt;/h4&gt;  &lt;p&gt;Today we run on the client, which can be represented by cmd.exe/WPF/WinForms, as well in Firefox/Internet Explorer/Safari with &lt;a href="http://codeplex.com/sdlsdk"&gt;Silverlight&lt;/a&gt;. However, the web server has been fairly uncharted by us. This is what we're changing. &lt;/p&gt;  &lt;p&gt;Really, this whole post is about DLR Languages and the web server. The DLR in ASP.NET and ASP.NET MVC (yes, they are different. yes, it's confusing).&lt;/p&gt;  &lt;p&gt;But it extends past Microsoft web frameworks. At &lt;a href="http://en.oreilly.com/rails2008"&gt;RailsConf 2008&lt;/a&gt; &lt;a href="http://www.iunknown.com/"&gt;John Lam&lt;/a&gt; showed &lt;a href="http://www.iunknown.com/2008/05/ironruby-and-rails.html"&gt;IronRuby running Rails&lt;/a&gt;, and I showed integrating Ruby on Rails with Silverlight to nicely have Ruby on the server and the client (more information on the plugin soon).&lt;/p&gt;  &lt;p&gt;It's all about making the Microsoft platform, being Windows or Silverlight, valuable to developers.&lt;/p&gt;  &lt;h4&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;Next steps&lt;/span&gt;&lt;/h4&gt;  &lt;p&gt;All this kind of leaves you, the dude/dudette trying to get something done, at a loss, since any bits we have are a year old, and with all these pretty words, I've given you nothing but some continued hope. Wow, I'm cynical.&lt;/p&gt;  &lt;p&gt;Not really sure about what's next, other than a ton of coffee with David and other folks on the ASP.NET team, trying to figure out how to get this stuff into your hands. We're pretty addicted to &lt;a href="http://codeplex.com/"&gt;Codeplex&lt;/a&gt;, so I'm pretty sure it'll find it's way there. However, we need to finish building it, so that's got to happen first. Again, that will be more coffee. Or &lt;a href="http://www.odwalla.com/"&gt;expensive juice&lt;/a&gt;, I've been hooked on that stuff. &lt;/p&gt;  &lt;p&gt;So, with that, all I've got to say is "Stay Tuned" =)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.feedburner.com/~a/jimmy-thinking?a=xq6X6h"&gt;&lt;img src="http://feeds.feedburner.com/~a/jimmy-thinking?i=xq6X6h" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=F4YMxJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=F4YMxJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=dvWIbJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=dvWIbJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=bIiwFj"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=bIiwFj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=jD25kj"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=jD25kj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/jimmy-thinking?a=qNzxgJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/jimmy-thinking?i=qNzxgJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/jimmy-thinking/~4/326221348" height="1" width="1"/&gt;</description><link>http://feeds.feedburner.com/~r/jimmy-thinking/~3/326221348/aspnet-and-dynamic-languages.html</link><author>noreply@blogger.com (Jimmy Schementi)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp0.blogger.com/_OqCZhp9yI0Q/SG6WJQKvb2I/AAAAAAAAACw/W5mEsZNprEE/s72-c/84196531_143245f498.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jimmy-thinking&amp;itemurl=http%3A%2F%2Fblog.jimmy.schementi.com%2F2008%2F07%2Faspnet-and-dynamic-languages.html</feedburner:awareness><feedburner:origLink>http://blog.jimmy.schementi.com/2008/07/aspnet-and-dynamic-languages.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5419182.post-8871121453039909416</guid><pubDate>Wed, 18 Jun 2008 21:25:00 +0000</pubDate><atom:updated>2008-06-18T14:35:11.640-07:00</atom:updated><title>Live Mesh doesn't require UAC!</title><description>&lt;p&gt;&lt;a title="Live Mesh Logo" href="http://www.flickr.com/photos/24458122@N00/2590440231/"&gt;&lt;img border="0" alt="Live Mesh Logo" src="http://static.flickr.com/3044/2590440231_0d953a6379_m.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Today my three machines (2 Vista and 1 XP) which use &lt;a href="http://en.wikipedia.org/wiki/Windows_Live_Core"&gt;Live Mesh&lt;/a&gt; asked to be updated. No information to what the updates include ... just that they wanted to plug back into the mother ship. I thought, &amp;quot;Could this be, the infamous Live Mesh update that removes the need for &lt;a href="http://www.youtube.com/watch?v=DUPxkzV1RTc"&gt;UAC&lt;/a&gt;&amp;quot;? After updating my Vista machines, I &lt;a href="http://www.howtogeek.com/howto/windows-vista/disable-user-account-c